- added confirmation for amendment;
- fixed amendment creation; - added configrmation for appl deletion; - re added delega related fieldss on company profile page for non gepafin hubs;
This commit is contained in:
@@ -23,6 +23,7 @@ import BlockingOverlay from '../../components/BlockingOverlay';
|
||||
import { Toast } from 'primereact/toast';
|
||||
import { InputSwitch } from 'primereact/inputswitch';
|
||||
import ApplicationEvaluationService from '../../service/application-evaluation-service';
|
||||
import { Dialog } from 'primereact/dialog';
|
||||
|
||||
const SoccorsoAddPreInstructor = () => {
|
||||
const isAsyncRequest = useStore().main.isAsyncRequest();
|
||||
@@ -31,6 +32,7 @@ const SoccorsoAddPreInstructor = () => {
|
||||
const [data, setData] = useState({});
|
||||
const [evaluationId, setEvaluationId] = useState(0);
|
||||
const [formData, setFormData] = useState({});
|
||||
const [isVisibleConfirmDialog, setIsVisibleConfirmDialog] = useState(false)
|
||||
const toast = useRef(null);
|
||||
|
||||
const goToEvaluationPage = () => {
|
||||
@@ -49,8 +51,8 @@ const SoccorsoAddPreInstructor = () => {
|
||||
|
||||
const getCallbackEvaluation = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
setEvaluationId(data.data.assignedApplicationId);
|
||||
AmendmentsService.getSoccorsoByApplEvalId(data.data.assignedApplicationId, getCallback, errGetCallback)
|
||||
setEvaluationId(data.data.id);
|
||||
AmendmentsService.getSoccorsoByApplEvalId(data.data.id, getCallback, errGetCallback)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,6 +154,32 @@ const SoccorsoAddPreInstructor = () => {
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
}
|
||||
|
||||
const initCreationProcess = () => {
|
||||
setIsVisibleConfirmDialog(true);
|
||||
}
|
||||
|
||||
const headerConfirmDialog = () => {
|
||||
return <span>{__('Richiesta di conferma', 'gepafin')}</span>;
|
||||
}
|
||||
|
||||
const hideConfirmDialog = () => {
|
||||
setIsVisibleConfirmDialog(false);
|
||||
}
|
||||
|
||||
const footerConfirmDialog = () => {
|
||||
return <div>
|
||||
<Button type="button" label={__('No', 'gepafin')} onClick={goToEvaluationPage} outlined/>
|
||||
<Button
|
||||
type="button"
|
||||
label={__('Si', 'gepafin')} onClick={doConfirm}/>
|
||||
</div>
|
||||
}
|
||||
|
||||
const doConfirm = () => {
|
||||
setIsVisibleConfirmDialog(false);
|
||||
doCreate();
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="appPage">
|
||||
<div className="appPage__pageHeader">
|
||||
@@ -286,12 +314,24 @@ const SoccorsoAddPreInstructor = () => {
|
||||
icon="pi pi-times" iconPos="right"/>
|
||||
<Button
|
||||
type="button"
|
||||
onClick={doCreate}
|
||||
onClick={initCreationProcess}
|
||||
label={__('Invia richiesta', 'gepafin')}
|
||||
icon="pi pi-check" iconPos="right"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Dialog
|
||||
visible={isVisibleConfirmDialog}
|
||||
modal
|
||||
header={headerConfirmDialog}
|
||||
footer={footerConfirmDialog}
|
||||
style={{ maxWidth: '600px', width: '100%' }}
|
||||
onHide={hideConfirmDialog}>
|
||||
<div className="appForm__field">
|
||||
<p>{__('Soccorso istruttorio autorizzato dal direttore e autorizzazione caricata su portale a seguito del quale parte l\'email?', 'gepafin')}</p>
|
||||
</div>
|
||||
</Dialog>
|
||||
|
||||
</div>
|
||||
: <>
|
||||
<Skeleton width="20%" height="1rem" className="mb-2"></Skeleton>
|
||||
|
||||
Reference in New Issue
Block a user