- updated tables and fixed some bugs;

This commit is contained in:
Vitalii Kiiko
2024-10-24 17:33:13 +02:00
parent 255af71365
commit 36b9ebb165
9 changed files with 40 additions and 21 deletions

View File

@@ -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')}

View File

@@ -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 = () => {

View File

@@ -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;

View File

@@ -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;

View File

@@ -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>
)