- updated tables and fixed some bugs;
This commit is contained in:
@@ -14,6 +14,9 @@ const getBandoLabel = (status) => {
|
||||
case 'READY_TO_PUBLISH':
|
||||
return __('Pronto', 'gepafin');
|
||||
|
||||
case 'READY':
|
||||
return __('Pronto', 'gepafin');
|
||||
|
||||
case 'DRAFT':
|
||||
return __('Bozza', 'gepafin');
|
||||
|
||||
@@ -23,6 +26,12 @@ const getBandoLabel = (status) => {
|
||||
case 'AWAIT':
|
||||
return __('In attesa', 'gepafin');
|
||||
|
||||
case 'ASSIGNED':
|
||||
return __('Assegnato', 'gepafin');
|
||||
|
||||
case 'EVALUATION':
|
||||
return __('Valutazione', 'gepafin');
|
||||
|
||||
case 'EXPIRED':
|
||||
return __('Scaduto', 'gepafin');
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@ const getBandoSeverity = (status) => {
|
||||
case 'READY_TO_PUBLISH':
|
||||
return 'info';
|
||||
|
||||
case 'READY':
|
||||
return 'info';
|
||||
|
||||
case 'DRAFT':
|
||||
return 'warning';
|
||||
|
||||
@@ -21,6 +24,12 @@ const getBandoSeverity = (status) => {
|
||||
case 'AWAIT':
|
||||
return 'warning';
|
||||
|
||||
case 'ASSIGNED':
|
||||
return 'warning';
|
||||
|
||||
case 'EVALUATION':
|
||||
return 'info';
|
||||
|
||||
case 'EXPIRED':
|
||||
return 'closed';
|
||||
|
||||
|
||||
@@ -604,7 +604,7 @@ const BandoApplication = () => {
|
||||
iconPos="right"/>
|
||||
</div> : null}
|
||||
|
||||
{['AWAIT', 'READY', 'SUBMIT', 'EVALUATION'].includes(applicationStatus)
|
||||
{'DRAFT' !== applicationStatus
|
||||
? <div className="appPageSection">
|
||||
<div className="appForm__field">
|
||||
<label htmlFor="signedPdfFile">
|
||||
@@ -615,7 +615,7 @@ const BandoApplication = () => {
|
||||
<FileuploadApplicationSignedPdf
|
||||
setDataFn={handleSetSignedDocumentFromFileupload}
|
||||
fieldName="signedPdfFile"
|
||||
disabled={['READY', 'SUBMIT', 'EVALUATION'].includes(applicationStatus)}
|
||||
disabled={'AWAIT' !== applicationStatus}
|
||||
defaultValue={is(Array, signedPdfFile) ? signedPdfFile : []}
|
||||
accept={['.p7m,application/pkcs7-mime,application/x-pkcs7-mime,.zip']}
|
||||
chooseLabel={__('Aggiungi documento', 'gepafin')}
|
||||
|
||||
@@ -14,7 +14,7 @@ import DashboardService from '../../service/dashboard-service';
|
||||
import LatestBandiTable from './components/LatestBandiTable';
|
||||
//import LatestUsersActivityTable from './components/LatestUsersActivityTable';
|
||||
import { Button } from 'primereact/button';
|
||||
import MyEvaluationsTable from '../DashboardInstructor/components/MyEvaluationsTable';
|
||||
import MyEvaluationsTable from '../DashboardPreInstructor/components/PreInstructorDomandeTable';
|
||||
import AllDomandeTable from '../Domande/components/AllDomandeTable';
|
||||
|
||||
const Dashboard = () => {
|
||||
|
||||
@@ -22,7 +22,7 @@ import AssignedApplicationService from '../../../../service/assigned-application
|
||||
import { useStore } from '../../../../store';
|
||||
|
||||
|
||||
const MyEvaluationsTable = () => {
|
||||
const PreInstructorDomandeTable = () => {
|
||||
const userData = useStore().main.userData();
|
||||
const [items, setItems] = useState(null);
|
||||
const [filters, setFilters] = useState(null);
|
||||
@@ -51,7 +51,7 @@ const MyEvaluationsTable = () => {
|
||||
const getFormattedData = (data) => {
|
||||
return data.map((d) => {
|
||||
d.callEndDate = is(String, d.callEndDate) ? new Date(d.callEndDate) : (d.callEndDate ? d.callEndDate : '');
|
||||
d.modifiedDate = is(String, d.modifiedDate) ? new Date(d.modifiedDate) : (d.modifiedDate ? d.modifiedDate : '');
|
||||
d.updatedDate = is(String, d.updatedDate) ? new Date(d.updatedDate) : (d.updatedDate ? d.updatedDate : '');
|
||||
d.submissionDate = is(String, d.submissionDate) ? new Date(d.submissionDate) : (d.submissionDate ? d.submissionDate : '');
|
||||
return d;
|
||||
});
|
||||
@@ -82,15 +82,15 @@ const MyEvaluationsTable = () => {
|
||||
const initFilters = () => {
|
||||
setFilters({
|
||||
global: { value: null, matchMode: FilterMatchMode.CONTAINS },
|
||||
callTitle: {
|
||||
callName: {
|
||||
operator: FilterOperator.AND,
|
||||
constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }]
|
||||
},
|
||||
appliedDate: {
|
||||
submissionDate: {
|
||||
operator: FilterOperator.AND,
|
||||
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
||||
},
|
||||
callEndDate: {
|
||||
updatedDate : {
|
||||
operator: FilterOperator.AND,
|
||||
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
||||
}
|
||||
@@ -115,7 +115,8 @@ const MyEvaluationsTable = () => {
|
||||
};
|
||||
|
||||
const dateEndBodyTemplate = (rowData) => {
|
||||
return formatDate(rowData.callEndDate);
|
||||
//return formatDate(rowData.callEndDate);
|
||||
return '';
|
||||
};
|
||||
|
||||
const dateFilterTemplate = (options) => {
|
||||
@@ -150,7 +151,7 @@ const MyEvaluationsTable = () => {
|
||||
<Column field="id" header={__('ID domanda', 'gepafin')}
|
||||
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
||||
style={{ minWidth: '12rem' }}/>
|
||||
<Column field="callTitle" header={__('Bando', 'gepafin')}
|
||||
<Column field="callName" header={__('Bando', 'gepafin')}
|
||||
filter filterPlaceholder={__('Cerca', 'gepafin')}
|
||||
style={{ minWidth: '12rem' }}/>
|
||||
<Column header={__('Data Ricezione', 'gepafin')} filterField="modifiedDate" dataType="date"
|
||||
@@ -168,4 +169,4 @@ const MyEvaluationsTable = () => {
|
||||
)
|
||||
}
|
||||
|
||||
export default MyEvaluationsTable;
|
||||
export default PreInstructorDomandeTable;
|
||||
@@ -13,9 +13,9 @@ import { useStore } from '../../store';
|
||||
//import LatestBandiTable from './components/LatestBandiTable';
|
||||
//import MyLatestSubmissionsTable from './components/MyLatestSubmissionsTable';
|
||||
import { Button } from 'primereact/button';
|
||||
import MyEvaluationsTable from './components/MyEvaluationsTable';
|
||||
import PreInstructorDomandeTable from './components/PreInstructorDomandeTable';
|
||||
|
||||
const DashboardInstructor = () => {
|
||||
const DashboardPreInstructor = () => {
|
||||
const navigate = useNavigate();
|
||||
//const [mainStats, setMainStats] = useState({});
|
||||
|
||||
@@ -53,7 +53,7 @@ const DashboardInstructor = () => {
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Coda di lavoro', 'gepafin')}</h2>
|
||||
<MyEvaluationsTable/>
|
||||
<PreInstructorDomandeTable/>
|
||||
</div>
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
@@ -66,11 +66,11 @@ const DashboardInstructor = () => {
|
||||
<div className="appPageSection__actions">
|
||||
<Button
|
||||
onClick={goToAllEvaluations}
|
||||
label={__('Tutti valutazioni', 'gepafin')} icon="pi pi-arrow-right" iconPos="right"/>
|
||||
label={__('Tutte le domande', 'gepafin')} icon="pi pi-arrow-right" iconPos="right"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default DashboardInstructor;
|
||||
export default DashboardPreInstructor;
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
// components
|
||||
import MyEvaluationsTable from '../DashboardInstructor/components/MyEvaluationsTable';
|
||||
import PreInstructorDomandeTable from '../DashboardPreInstructor/components/PreInstructorDomandeTable';
|
||||
|
||||
const Bandi = () => {
|
||||
return(
|
||||
@@ -14,7 +14,7 @@ const Bandi = () => {
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
<div className="appPageSection">
|
||||
<MyEvaluationsTable/>
|
||||
<PreInstructorDomandeTable/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -25,7 +25,7 @@ import ProfileCompany from './pages/ProfileCompany';
|
||||
import Users from './pages/Users';
|
||||
import AddCompany from './pages/AddCompany';
|
||||
import ResetPassword from './pages/ResetPassword';
|
||||
import DashboardInstructor from './pages/DashboardInstructor';
|
||||
import DashboardPreInstructor from './pages/DashboardPreInstructor';
|
||||
import ProfileBeneficiario from './pages/ProfileBeneficiario';
|
||||
import Evaluations from './pages/Evaluations';
|
||||
import EvaluationEdit from './pages/EvaluationEdit';
|
||||
@@ -39,7 +39,7 @@ const routes = ({ role, chosenCompanyId }) => {
|
||||
<Route path="/" element={<DefaultLayout>
|
||||
{'ROLE_SUPER_ADMIN' === role ? <Dashboard/> : null}
|
||||
{'ROLE_BENEFICIARY' === role ? <DashboardBeneficiario/> : null}
|
||||
{'ROLE_PRE_INSTRUCTOR' === role ? <DashboardInstructor/> : null}
|
||||
{'ROLE_PRE_INSTRUCTOR' === role ? <DashboardPreInstructor/> : null}
|
||||
</DefaultLayout>}/>
|
||||
<Route path="/bandi" element={<DefaultLayout>
|
||||
{'ROLE_SUPER_ADMIN' === role ? <Bandi/> : null}
|
||||
|
||||
@@ -4,7 +4,7 @@ const API_BASE_URL = process.env.REACT_APP_API_EXECUTION_ADDRESS;
|
||||
|
||||
export default class AssignedApplicationService {
|
||||
|
||||
static getAssignedApplications = (id, callback, errCallback, queryParams) => {
|
||||
static getAssignedApplications = (callback, errCallback, queryParams) => {
|
||||
NetworkService.get(`${API_BASE_URL}/assignedApplication`, callback, errCallback, queryParams);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user