- updated async tables;
- fixed typo; - added some QOL;
This commit is contained in:
@@ -59,7 +59,7 @@ const PreInstructorSoccorsiTable = ({ userId = null }) => {
|
||||
const getFormattedData = (data) => {
|
||||
return data.map((d) => {
|
||||
d.startDate = is(String, d.startDate) ? new Date(d.startDate) : (d.startDate ? d.startDate : '');
|
||||
d.evaluationEndDate = is(String, d.evaluationEndDate) ? new Date(d.evaluationEndDate) : (d.evaluationEndDate ? d.evaluationEndDate : '');
|
||||
d.expirationDate = is(String, d.expirationDate) ? new Date(d.expirationDate) : (d.expirationDate ? d.expirationDate : '');
|
||||
return d;
|
||||
});
|
||||
};
|
||||
@@ -91,7 +91,7 @@ const PreInstructorSoccorsiTable = ({ userId = null }) => {
|
||||
operator: FilterOperator.AND,
|
||||
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
||||
},
|
||||
evaluationEndDate: {
|
||||
expirationDate: {
|
||||
operator: FilterOperator.AND,
|
||||
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
||||
},
|
||||
@@ -111,7 +111,7 @@ const PreInstructorSoccorsiTable = ({ userId = null }) => {
|
||||
};
|
||||
|
||||
const dateExpirationBodyTemplate = (rowData) => {
|
||||
return rowData.evaluationEndDate ? formatDate(rowData.evaluationEndDate) : '';
|
||||
return rowData.expirationDate ? formatDate(rowData.expirationDate) : '';
|
||||
};
|
||||
|
||||
const dateFilterTemplate = (options) => {
|
||||
@@ -162,7 +162,7 @@ const PreInstructorSoccorsiTable = ({ userId = null }) => {
|
||||
style={{ minWidth: '8rem' }}
|
||||
body={dateStartBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||
<Column header={__('Scadenza', 'gepafin')}
|
||||
filterField="evaluationEndDate" dataType="date"
|
||||
filterField="expirationDate" dataType="date"
|
||||
style={{ minWidth: '8rem' }}
|
||||
body={dateExpirationBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||
<Column field="status"
|
||||
|
||||
Reference in New Issue
Block a user