- saving progress - amendment page works for both instructor and beneficiary;
This commit is contained in:
@@ -72,7 +72,7 @@ const SoccorsoEditPreInstructor = () => {
|
||||
}, {});
|
||||
formDataInitial = {
|
||||
...formDataInitial,
|
||||
amendmentDocuments: data.amendmentDocuments
|
||||
amendmentDocuments: data.data.amendmentDocuments
|
||||
}
|
||||
setFormInitialData(formDataInitial);
|
||||
}
|
||||
@@ -162,13 +162,17 @@ const SoccorsoEditPreInstructor = () => {
|
||||
detail: data.message
|
||||
});
|
||||
}
|
||||
const newFormDataInitial = data.data.applicationFormFields.reduce((acc, cur) => {
|
||||
let formDataInitial = data.data.applicationFormFields.reduce((acc, cur) => {
|
||||
if (cur.fieldValue) {
|
||||
acc[cur.fieldId] = cur.fieldValue;
|
||||
}
|
||||
return acc;
|
||||
}, formInitialData);
|
||||
setFormInitialData(newFormDataInitial);
|
||||
formDataInitial = {
|
||||
...formDataInitial,
|
||||
amendmentDocuments: data.data.amendmentDocuments
|
||||
}
|
||||
setFormInitialData(formDataInitial);
|
||||
}
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
}
|
||||
@@ -225,7 +229,8 @@ const SoccorsoEditPreInstructor = () => {
|
||||
});
|
||||
}
|
||||
if (data.data.status) {
|
||||
updateNewAmendmentData(data.data.status, ['status'])
|
||||
updateNewAmendmentData(data.data.status, ['status']);
|
||||
setIsVisibleCloseAmendDialog(false);
|
||||
}
|
||||
}
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
@@ -448,7 +453,7 @@ const SoccorsoEditPreInstructor = () => {
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Documenti aggiuntivi', 'gepafin')}</h2>
|
||||
<div className="appPageSection columns">
|
||||
<div className="appPageSection">
|
||||
{data.amendmentNotes
|
||||
? <>
|
||||
<h3>{__('Notes', 'gepafin')}</h3>
|
||||
@@ -458,6 +463,7 @@ const SoccorsoEditPreInstructor = () => {
|
||||
</> : null}
|
||||
<FormField
|
||||
type="fileupload"
|
||||
disabled={data.status === 'CLOSE'}
|
||||
setDataFn={setValue}
|
||||
saveFormCallback={doUpdateAmendment}
|
||||
fieldName="amendmentDocuments"
|
||||
@@ -482,12 +488,12 @@ const SoccorsoEditPreInstructor = () => {
|
||||
|
||||
<div className="appPageSection">
|
||||
<div className="appPageSection__actions">
|
||||
<Button
|
||||
{/*<Button
|
||||
type="button"
|
||||
disabled={isAsyncRequest}
|
||||
onClick={doUpdateAmendment}
|
||||
label={__('Salva', 'gepafin')}
|
||||
icon="pi pi-save" iconPos="right"/>
|
||||
icon="pi pi-save" iconPos="right"/>*/}
|
||||
<Button
|
||||
type="button"
|
||||
onClick={sendReminder}
|
||||
|
||||
Reference in New Issue
Block a user