From d38616fc485af742df1f05a09c6666647d7c0b06 Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Thu, 19 Dec 2024 17:06:12 +0100 Subject: [PATCH 1/2] - saving progress; --- src/routes.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/routes.js b/src/routes.js index 34a9ba3..7018bb4 100644 --- a/src/routes.js +++ b/src/routes.js @@ -47,76 +47,91 @@ const routes = ({ role, chosenCompanyId }) => { {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_INSTRUCTOR_MANAGER' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} From 9c92d95a0e639d253152fa4912419e0bd5b3c5d6 Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Fri, 20 Dec 2024 17:09:49 +0100 Subject: [PATCH 2/2] - added new role; - added logic of statuses for amendment; --- src/helpers/getBandoLabel.js | 3 + src/helpers/getBandoSeverity.js | 3 + src/pages/Applications/index.js | 2 +- .../DraftApplicationsTable/index.js | 2 +- .../components/RepeaterFields/index.js | 7 +- src/pages/DomandaEditPreInstructor/index.js | 12 +- .../components/AllDomandeTable/index.js | 34 +++- src/pages/Domande/index.js | 14 +- .../BeneficiarioDomandeTable/index.js | 2 +- src/pages/DomandeInstructorManager/index.js | 184 ++++++++++++++++++ src/pages/DomandePreInstructor/index.js | 2 +- .../index.js | 92 +++++---- src/pages/SoccorsoEditPreInstructor/index.js | 111 ++++++----- .../Users/components/AllUsersTable/index.js | 2 +- src/pages/Users/index.js | 2 +- src/routes.js | 39 ++-- src/service/amendments-service.js | 4 + 17 files changed, 385 insertions(+), 130 deletions(-) create mode 100644 src/pages/DomandeInstructorManager/index.js rename src/pages/{DomandaBeneficiario => SoccorsoEditBeneficiario}/index.js (87%) diff --git a/src/helpers/getBandoLabel.js b/src/helpers/getBandoLabel.js index 9c8af0f..1816a42 100644 --- a/src/helpers/getBandoLabel.js +++ b/src/helpers/getBandoLabel.js @@ -29,6 +29,9 @@ const getBandoLabel = (status) => { case 'ADMISSIBLE': return __('Ammisibile', 'gepafin'); + case 'RESPONSE_RECEIVED': + return __('Riposta ricevuta', 'gepafin'); + case 'SOCCORSO': return __('Soccorso', 'gepafin'); diff --git a/src/helpers/getBandoSeverity.js b/src/helpers/getBandoSeverity.js index 9b9d16c..d6c4dbf 100644 --- a/src/helpers/getBandoSeverity.js +++ b/src/helpers/getBandoSeverity.js @@ -27,6 +27,9 @@ const getBandoSeverity = (status) => { case 'ADMISSIBLE': return 'info'; + case 'RESPONSE_RECEIVED': + return 'warning'; + case 'SOCCORSO': return 'warning'; diff --git a/src/pages/Applications/index.js b/src/pages/Applications/index.js index 21aaf42..ed42683 100644 --- a/src/pages/Applications/index.js +++ b/src/pages/Applications/index.js @@ -4,7 +4,7 @@ import { useNavigate } from 'react-router-dom'; import { head } from 'ramda'; // store -import { storeGet, useStore } from '../../store'; +import { useStore } from '../../store'; // components import MyLatestSubmissionsTable from '../DashboardBeneficiario/components/MyLatestSubmissionsTable'; diff --git a/src/pages/Dashboard/components/DraftApplicationsTable/index.js b/src/pages/Dashboard/components/DraftApplicationsTable/index.js index acaec4b..c41abb0 100644 --- a/src/pages/Dashboard/components/DraftApplicationsTable/index.js +++ b/src/pages/Dashboard/components/DraftApplicationsTable/index.js @@ -42,7 +42,7 @@ const DraftApplicationsTable = () => { if (data.status === 'SUCCESS') { if (is(Array, data.data)) { setItems(getFormattedBandiData(data.data)); - setStatuses(uniq(items.map(o => o.status))) + setStatuses(uniq(data.data.map(o => o.status))) initFilters(); } } diff --git a/src/pages/DomandaEditPreInstructor/components/RepeaterFields/index.js b/src/pages/DomandaEditPreInstructor/components/RepeaterFields/index.js index 7a24f29..d6249d9 100644 --- a/src/pages/DomandaEditPreInstructor/components/RepeaterFields/index.js +++ b/src/pages/DomandaEditPreInstructor/components/RepeaterFields/index.js @@ -19,6 +19,7 @@ const RepeaterFields = ({ updateCallbackFn = () => { }, defaultValue = [], + shouldDisable = false }) => { const [chosen, setChosen] = useState(''); const { @@ -92,6 +93,7 @@ const RepeaterFields = ({
setNewChosen(o.fieldId)}>{o.nameValue}
@@ -762,7 +766,8 @@ const DomandaEditPreInstructor = () => { {['EVALUATION', 'SOCCORSO', 'CLOSE'].includes(data.applicationStatus) ?