documents fix
This commit is contained in:
@@ -139,6 +139,7 @@ class CustomerAcceptance extends Component {
|
||||
activeClassName="upload-file-accept"
|
||||
onDrop={(acceptedFiles, rejectedFiles)=>{this.uploadFile(step.idOrder, acceptedFiles, rejectedFiles)}}>
|
||||
<h5 className="drop-zone-text">{orderTexts.labels.UPLOAD_ACCEPTANCE_LABEL}</h5>
|
||||
<p className="drop-zone-text">To upload multiple files, please pack the files to one zip-file and upload the zip-file</p>
|
||||
</Dropzone>
|
||||
</Col>
|
||||
<Col xl="4" lg="7" md="8">
|
||||
@@ -148,7 +149,7 @@ class CustomerAcceptance extends Component {
|
||||
{
|
||||
customerAcceptance.documents.map((document, index) => <div key={'acceptance-documnet-' + index}>
|
||||
<span className="document-link">
|
||||
<i className={'fa fa-file'}></i> <a download href={document.url}> {document.name} </a>
|
||||
<i className={`fa fa-${document.icon}`}></i> <a download href={document.url}> {document.name} </a>
|
||||
</span>
|
||||
<span className="document-status">
|
||||
{document.validation} <div className={'status-icon ' + document.validation}></div>
|
||||
|
||||
@@ -27,8 +27,8 @@ class ValidateQuestionnaire extends Component {
|
||||
customerQuestionnaires.map((customerQuestionnaryAction) =>
|
||||
<ValidateQuestionnaireItem
|
||||
action={customerQuestionnaryAction}
|
||||
key={'validate-questionnaire-' + customerQuestionnaryAction.action_id}
|
||||
orderPackage={orderPackages.find( orderPackage => orderPackage.orderItemId === customerQuestionnaryAction.item_id)}
|
||||
key={'validate-questionnaire-' + customerQuestionnaryAction.actionId}
|
||||
orderPackage={orderPackages.find( orderPackage => orderPackage.orderItemId === customerQuestionnaryAction.orderItemId)}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class ValidateQuestionnaireItem extends Component {
|
||||
uploadFile(action,acceptedFiles, rejectedFiles) {
|
||||
if(acceptedFiles && acceptedFiles.length){
|
||||
const file = acceptedFiles[0];
|
||||
this.props.dispatch(uploadCustomerQuestionnaire(action.order_id, action.action_id, file));
|
||||
this.props.dispatch(uploadCustomerQuestionnaire(action.orderId, action.actionId, file));
|
||||
}
|
||||
|
||||
// if(rejectedFiles && rejectedFiles.length) {
|
||||
@@ -48,7 +48,7 @@ class ValidateQuestionnaireItem extends Component {
|
||||
<div>
|
||||
|
||||
<span className="document-link">
|
||||
<i className={'fa fa-file'}></i> <a download href={document.url}> {document.name} </a>
|
||||
<i className={`fa fa-${document.icon}`}></i> <a download href={document.url}> {document.name} </a>
|
||||
</span>
|
||||
<br />
|
||||
<span className="document-status">
|
||||
@@ -59,7 +59,8 @@ class ValidateQuestionnaireItem extends Component {
|
||||
(action.comments && action.comments.length > 0) &&
|
||||
<div>
|
||||
{action.comments.map((comment, key) => <div key={'step-comment-' + document.idDocument + '-' + key} className="step-comment">
|
||||
<div>{comment}</div>
|
||||
<strong>{comment.header}</strong>
|
||||
<p>{comment.value}</p>
|
||||
</div>)}
|
||||
</div>
|
||||
}
|
||||
@@ -71,6 +72,7 @@ class ValidateQuestionnaireItem extends Component {
|
||||
activeClassName="upload-file-accept"
|
||||
onDrop={(acceptedFiles, rejectedFiles)=>{this.uploadFile(action, acceptedFiles, rejectedFiles)}}>
|
||||
<h5 className="drop-zone-text">{orderTexts.labels.SELECT_OR_DROP}</h5>
|
||||
<p className="drop-zone-text">To upload multiple files, please pack the files to one zip-file and upload the zip-file</p>
|
||||
</Dropzone>
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -79,12 +81,21 @@ class ValidateQuestionnaireItem extends Component {
|
||||
<Row>
|
||||
<Col>
|
||||
<span className="document-link">
|
||||
<i className={'fa fa-file'}></i> <a download href={document.url}> {document.name} </a>
|
||||
<i className={`fa fa-${document.icon}`}></i> <a download href={document.url}> {document.name} </a>
|
||||
</span>
|
||||
<br />
|
||||
<span className="document-status">
|
||||
{action.status.replace(/-/g,' ')} <div className={'status-icon ' + action.status}></div>
|
||||
</span>
|
||||
{
|
||||
(action.comments && action.comments.length > 0) &&
|
||||
<div>
|
||||
{action.comments.map((comment, key) => <div key={'step-comment-' + document.idDocument + '-' + key} className="step-comment">
|
||||
<strong>{comment.header}</strong>
|
||||
<p>{comment.value}</p>
|
||||
</div>)}
|
||||
</div>
|
||||
}
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
@@ -181,7 +181,7 @@ $link-line-height: 1.5rem;
|
||||
.upload-file-drop-zone {
|
||||
width: 100%;
|
||||
border: 3px dashed $borderColor;
|
||||
height: 10rem;
|
||||
padding: 2rem;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
}
|
||||
@@ -206,7 +206,6 @@ $link-line-height: 1.5rem;
|
||||
|
||||
.drop-zone-text {
|
||||
text-align: center;
|
||||
padding: 4rem 0;
|
||||
}
|
||||
|
||||
.document-link {
|
||||
@@ -357,7 +356,6 @@ $link-line-height: 1.5rem;
|
||||
|
||||
.drop-zone-text {
|
||||
text-align: center;
|
||||
padding: 4rem 0;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user