- updates;
This commit is contained in:
@@ -8,7 +8,6 @@ import NumberFlow from '@number-flow/react';
|
||||
import DashboardService from '../../service/dashboard-service';
|
||||
|
||||
// components
|
||||
import LatestBandiTable from './components/LatestBandiTable';
|
||||
import { Button } from 'primereact/button';
|
||||
import AllDomandeTable from '../Domande/components/AllDomandeTable';
|
||||
import DraftApplicationsTable from './components/DraftApplicationsTable';
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { is, uniq } from 'ramda';
|
||||
import copy from 'copy-to-clipboard';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
// store
|
||||
import { useStore } from '../../../../store';
|
||||
@@ -24,7 +22,6 @@ import { Button } from 'primereact/button';
|
||||
import { Calendar } from 'primereact/calendar';
|
||||
import { Tag } from 'primereact/tag';
|
||||
import ProperBandoLabel from '../../../../components/ProperBandoLabel';
|
||||
import translationStrings from '../../../../translationStringsForComponents';
|
||||
import { confirmPopup, ConfirmPopup } from 'primereact/confirmpopup';
|
||||
|
||||
const DocumentsTable = ({ type, reload = 0 }) => {
|
||||
|
||||
@@ -735,7 +735,57 @@ const DomandaEditPreInstructor = () => {
|
||||
}
|
||||
|
||||
const doMakeAdmisible = () => {
|
||||
// TODO
|
||||
storeSet.main.setAsyncRequest();
|
||||
//doSaveDraft();
|
||||
|
||||
setTimeout(() => {
|
||||
const submitData = {
|
||||
applicationsStatus: 'ADMISSIBLE',
|
||||
}
|
||||
if (data.evaluationVersion === 'V1') {
|
||||
ApplicationEvaluationService.updateEvaluation(
|
||||
data.assignedApplicationId,
|
||||
submitData,
|
||||
updateCallback,
|
||||
errUpdateCallback
|
||||
);
|
||||
} else if (data.evaluationVersion === 'V2') {
|
||||
ApplicationEvaluationService.updateEvaluationV2(
|
||||
data.assignedApplicationId,
|
||||
formId,
|
||||
submitData,
|
||||
updateCallback,
|
||||
errUpdateCallback
|
||||
);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
const doPassTechnicalEvaluation = () => {
|
||||
storeSet.main.setAsyncRequest();
|
||||
doSaveDraft();
|
||||
|
||||
setTimeout(() => {
|
||||
const submitData = {
|
||||
applicationsStatus: 'TECHNICAL_EVALUATION',
|
||||
}
|
||||
if (data.evaluationVersion === 'V1') {
|
||||
ApplicationEvaluationService.updateEvaluation(
|
||||
data.assignedApplicationId,
|
||||
submitData,
|
||||
updateCallback,
|
||||
errUpdateCallback
|
||||
);
|
||||
} else if (data.evaluationVersion === 'V2') {
|
||||
ApplicationEvaluationService.updateEvaluationV2(
|
||||
data.assignedApplicationId,
|
||||
formId,
|
||||
submitData,
|
||||
updateCallback,
|
||||
errUpdateCallback
|
||||
);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
const evaluationBlockedForUser = (data = {}) => {
|
||||
@@ -809,16 +859,16 @@ const DomandaEditPreInstructor = () => {
|
||||
/>
|
||||
<Button
|
||||
type="button"
|
||||
disabled={true}
|
||||
onClick={() => {
|
||||
}}
|
||||
disabled={!data.id || !['ADMISSIBLE'].includes(data.applicationStatus) || !isAdmissible || evaluationBlockedForUser(data)}
|
||||
onClick={doPassTechnicalEvaluation}
|
||||
severity={isAdmissible ? 'success' : 'warning'}
|
||||
label={__('Valutazione tecnico-finanziaria positiva', 'gepafin')}
|
||||
/>
|
||||
{data.id
|
||||
? <Button
|
||||
type="button"
|
||||
disabled={!isAdmissible
|
||||
|| ['APPROVED','REJECTED'].includes(data.applicationStatus)
|
||||
|| ['APPROVED', 'REJECTED'].includes(data.applicationStatus)
|
||||
|| evaluationBlockedForUser(data)
|
||||
|| (APP_EVALUATION_FLOW_ID === '1' && !['ADMISSIBLE'].includes(data.applicationStatus))
|
||||
}
|
||||
@@ -828,10 +878,10 @@ const DomandaEditPreInstructor = () => {
|
||||
{data.id
|
||||
? <Button
|
||||
type="button"
|
||||
disabled={['APPROVED','REJECTED'].includes(data.applicationStatus)
|
||||
|| APP_EVALUATION_FLOW_ID === '1'
|
||||
disabled={['APPROVED', 'REJECTED'].includes(data.applicationStatus)
|
||||
|| (APP_EVALUATION_FLOW_ID === '1'
|
||||
&& (!['EVALUATION', 'ADMISSIBLE', 'APPOINTMENT'].includes(data.applicationStatus)
|
||||
|| evaluationBlockedForUser(data))
|
||||
|| evaluationBlockedForUser(data)))
|
||||
}
|
||||
onClick={initiateRejecting}
|
||||
label={__('Respingi domanda', 'gepafin')}
|
||||
|
||||
Reference in New Issue
Block a user