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