- added re-admit btn and functionality;
This commit is contained in:
@@ -53,6 +53,7 @@ import ApplicationInfo from '../DomandaEditPreInstructor/components/ApplicationI
|
||||
import ApplicationDownloadFiles from '../DomandaEditPreInstructor/components/ApplicationDownloadFiles';
|
||||
import FormField from '../../components/FormField';
|
||||
import SoccorsoResendEmails from '../SoccorsoEditPreInstructor/components/SoccorsoResendEmails';
|
||||
import EvaluationReAdmit from '../DomandaEditPreInstructor/components/EvaluationReAdmit';
|
||||
|
||||
const APP_EVALUATION_FLOW_ID = process.env.REACT_APP_EVALUATION_FLOW_ID;
|
||||
const APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
@@ -875,11 +876,29 @@ const DomandaEditInstructorManager = () => {
|
||||
</div>
|
||||
}
|
||||
|
||||
const auxActions = () => {
|
||||
return <div className="appPageSection__actions">
|
||||
<SoccorsoResendEmails
|
||||
emailsData={emailSendResponse}
|
||||
setDataEmailsSoccorso={updateEmailSendResponses}/>
|
||||
<EvaluationReAdmit id={data.applicationId} status={data.applicationStatus}/>
|
||||
</div>
|
||||
}
|
||||
|
||||
const updateEmailSendResponses = useCallback((newEmailData) => {
|
||||
const newData = wrap(data).set(['emailSendResponse'], newEmailData).value();
|
||||
setData(newData);
|
||||
}, [data]);
|
||||
|
||||
const motivationMsg = () => {
|
||||
return data.motivation && !isEmpty(data.motivation) && ['REJECTED', 'APPROVED'].includes(data.applicationStatus)
|
||||
? <div className="appPageSection__message info">
|
||||
<i className="pi pi-info-circle"></i>
|
||||
<span className="summary">{__('Motivazione:', 'gepafin')}</span>
|
||||
<span>{renderHtmlContent(data.motivation)}</span>
|
||||
</div> : null
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
let updatedFormValues = klona(formValues);
|
||||
let context = {};
|
||||
@@ -971,19 +990,21 @@ const DomandaEditInstructorManager = () => {
|
||||
? <div className="appPage__content">
|
||||
<ApplicationInfo data={data}/>
|
||||
|
||||
<div className="appPageSection">
|
||||
{motivationMsg()}
|
||||
</div>
|
||||
|
||||
<div className="appPageSection__hr">
|
||||
<span>{__('Azioni rapide', 'gepafin')}</span>
|
||||
</div>
|
||||
|
||||
<div className="appPageSection">
|
||||
{actionBtns()}
|
||||
<div className="appPageSection__actions">
|
||||
<SoccorsoResendEmails
|
||||
emailsData={emailSendResponse}
|
||||
setDataEmailsSoccorso={updateEmailSendResponses}/>
|
||||
</div>
|
||||
{auxActions()}
|
||||
</div>
|
||||
|
||||
<div className="appPageSection__hr"></div>
|
||||
|
||||
<ApplicationDownloadFiles id={id}/>
|
||||
|
||||
<div className="appPageSection">
|
||||
@@ -1008,6 +1029,23 @@ const DomandaEditInstructorManager = () => {
|
||||
sourceName="evaluation"/>
|
||||
</div>
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Note', 'gepafin')}</h2>
|
||||
<div translate="no" style={{ 'width': '100%' }}>
|
||||
<Editor
|
||||
value={data.note}
|
||||
readOnly={shouldDisableField('note') || evaluationBlockedForUser(data)}
|
||||
placeholder={__('Digita qui il messagio', 'gepafin')}
|
||||
headerTemplate={header}
|
||||
onTextChange={(e) => updateEvaluationValue(
|
||||
e.htmlValue,
|
||||
['note']
|
||||
)}
|
||||
style={{ height: 80 * 3, width: '100%' }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{data.evaluationVersion === 'V2'
|
||||
? <div className="appPageSection">
|
||||
<h2>{__('Documenti allegati', 'gepafin')}</h2>
|
||||
@@ -1120,21 +1158,6 @@ const DomandaEditInstructorManager = () => {
|
||||
</div>)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>{__('Note', 'gepafin')}</h3>
|
||||
<div translate="no">
|
||||
<Editor
|
||||
value={data.note}
|
||||
readOnly={shouldDisableField('note') || evaluationBlockedForUser(data)}
|
||||
placeholder={__('Digita qui il messagio', 'gepafin')}
|
||||
headerTemplate={header}
|
||||
onTextChange={(e) => updateEvaluationValue(
|
||||
e.htmlValue,
|
||||
['note']
|
||||
)}
|
||||
style={{ height: 80 * 3, width: '100%' }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>{__('Documenti allegati', 'gepafin')}</h3>
|
||||
@@ -1253,11 +1276,7 @@ const DomandaEditInstructorManager = () => {
|
||||
|
||||
<div className="appPageSection">
|
||||
{actionBtns()}
|
||||
<div className="appPageSection__actions">
|
||||
<SoccorsoResendEmails
|
||||
emailsData={emailSendResponse}
|
||||
setDataEmailsSoccorso={updateEmailSendResponses}/>
|
||||
</div>
|
||||
{auxActions()}
|
||||
</div>
|
||||
|
||||
<Dialog
|
||||
@@ -1265,7 +1284,7 @@ const DomandaEditInstructorManager = () => {
|
||||
visible={isVisibleCriterionData !== 0}
|
||||
style={{ width: '50vw' }}
|
||||
onHide={hideCriterionData}>
|
||||
{criterionDataContent}
|
||||
{criterionDataContent}
|
||||
</Dialog>
|
||||
|
||||
<Dialog
|
||||
|
||||
Reference in New Issue
Block a user