import React, {Component} from 'react'; import {connect} from 'react-redux'; import {fetchCustomerDocuments, fetchValidationComments} from '../../../../actions/orders/processActions'; import ValidateQuestionnaireItem from './ValidateQuestionnaireItem.jsx'; import '../../style/ValidateQuestionnaire.css'; class ValidateQuestionnaire extends Component { componentDidMount(){ const {idOrder, idProcessStep} = this.props.step; this.props.dispatch(fetchCustomerDocuments(idOrder, 'orderQuestionaire')); this.props.dispatch(fetchValidationComments(idOrder, idProcessStep, 'invalidQuestionnaireComment')); } findById(orderPackage, idOrderPackagePair){ const idPackage = idOrderPackagePair.split('-')[1]; return orderPackage.idPackage === parseInt(idPackage, 10); } render() { const {customerDocuments, validationComments, orderPackages} = this.props; return (