- updaated styles;

- added saving evaluation on opening amendment;
This commit is contained in:
Vitalii Kiiko
2024-11-25 12:12:47 +01:00
parent d596499ec4
commit 6f11070259
3 changed files with 60 additions and 45 deletions

View File

@@ -137,7 +137,7 @@ const SoccorsoEditPreInstructor = () => {
}, []);
const submitData = {
applicationFormFields: newFormValues,
applicationFormFields: newFormValues
}
storeSet.main.setAsyncRequest();
AmendmentsService.updateSoccorso(amendmentId, submitData, updateAmendmentCallback, errUpdateAmendmentCallback);
@@ -366,9 +366,10 @@ const SoccorsoEditPreInstructor = () => {
<h3>{__('Documenti Richiesti', 'gepafin')}</h3>
<ol className="appPageSection__list">
{data.formFields
? data.formFields.map((o, i) => <li key={o.fieldId} style={{ flexDirection: 'row' }}>
<span>{o.label}</span>
</li>) : null}
? data.formFields.map((o, i) => <li key={o.fieldId}
style={{ flexDirection: 'row' }}>
<span>{o.label}</span>
</li>) : null}
</ol>
</div>
<div>
@@ -393,26 +394,44 @@ const SoccorsoEditPreInstructor = () => {
<form className="appForm" onSubmit={handleSubmit(onSubmit)}>
{data.formFields
? data.formFields.map((o, i) => {
return <FormField
key={o.fieldId}
disabled={data.status === 'CLOSE'}
type="fileupload"
setDataFn={setValue}
saveFormCallback={doUpdateAmendment}
fieldName={o.fieldId}
label={o.label}
control={control}
register={register}
errors={errors}
defaultValue={formInitialData[o.fieldId] ? formInitialData[o.fieldId] : []}
accept={[]}
sourceId={data.applicationId}
multiple={true}
/>
}) : null}
return <FormField
key={o.fieldId}
disabled={data.status === 'CLOSE'}
type="fileupload"
setDataFn={setValue}
saveFormCallback={doUpdateAmendment}
fieldName={o.fieldId}
label={o.label}
control={control}
register={register}
errors={errors}
defaultValue={formInitialData[o.fieldId] ? formInitialData[o.fieldId] : []}
accept={[]}
sourceId={data.applicationId}
multiple={true}
/>
}) : null}
</form>
</div>
<div className="appForm__field">
<label>{__('Motivazioni / Note Interne', 'gepafin')}</label>
<div style={{ position: 'relative' }}>
<BlockingOverlay shouldDisplay={data.status === 'CLOSE'}/>
<Editor
value={data.internalNote}
readOnly={data.status === 'CLOSE'}
placeholder={__('Digita qui il messagio', 'gepafin')}
headerTemplate={header}
onTextChange={(e) => updateNewAmendmentData(
e.htmlValue,
'internalNote'
)}
style={{ height: 80 * 3, width: '100%' }}
/>
</div>
</div>
<div className="appPage__spacer"></div>
<div className="appPageSection__hr">
@@ -437,6 +456,12 @@ const SoccorsoEditPreInstructor = () => {
label={__('Estendi Scadenza', 'gepafin')}
icon="pi pi-stopwatch"
/>
{/*<Button
type="button"
onClick={doUpdateAmendment}
disabled={isAsyncRequest || data.status === 'CLOSE'}
label={__('Salva bozza', 'gepafin')}
icon="pi pi-save" iconPos="right"/>*/}
<Button
type="button"
onClick={doCloseAmendment}
@@ -446,24 +471,6 @@ const SoccorsoEditPreInstructor = () => {
</div>
</div>
<div className="appForm__field" style={{ marginTop: '-40px' }}>
<label>{__('Note Interne', 'gepafin')}</label>
<div style={{position: 'relative'}}>
<BlockingOverlay shouldDisplay={data.status === 'CLOSE'}/>
<Editor
value={data.internalNote}
readOnly={data.status === 'CLOSE'}
placeholder={__('Digita qui il messagio', 'gepafin')}
headerTemplate={header}
onTextChange={(e) => updateNewAmendmentData(
e.htmlValue,
'internalNote'
)}
style={{ height: 80 * 3, width: '100%' }}
/>
</div>
</div>
</div>
<Dialog