- updated pre instructor table async - fixed proper date for filter;
This commit is contained in:
2
.env
2
.env
@@ -4,6 +4,6 @@ REACT_APP_API_ADDRESS=https://api-dev-gepafin.memento.credit
|
||||
REACT_APP_API_ADDRESS_WS=https://api-dev-gepafin.memento.credit/wss
|
||||
REACT_APP_LOGO_FILENAME=gepafin-logo.svg
|
||||
REACT_APP_FAVICON_FILENAME=gepafin-favicon.ico
|
||||
REACT_APP_HUB_ID=t7jh5wfg9QXylNaTZkPoE
|
||||
REACT_APP_HUB_ID=p4lk3bcx1RStqTaIVVbXs
|
||||
REACT_APP_EVALUATION_FLOW_ID=1
|
||||
REACT_APP_LOCAL_DEVELOPMENT=1
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"copy-to-clipboard": "3.3.3",
|
||||
"deep-object-diff": "1.1.9",
|
||||
"dompurify": "3.2.3",
|
||||
"expression-language": "^1.2.0",
|
||||
"expression-language": "1.2.0",
|
||||
"fast-deep-equal": "3.1.3",
|
||||
"hotkeys-js": "3.13.9",
|
||||
"html-react-parser": "5.2.2",
|
||||
@@ -26,8 +26,8 @@
|
||||
"klona": "2.0.6",
|
||||
"leader-line-new": "1.1.9",
|
||||
"luxon": "3.5.0",
|
||||
"mathjs": "^14.0.1",
|
||||
"mustache": "^4.2.0",
|
||||
"mathjs": "14.0.1",
|
||||
"mustache": "4.2.0",
|
||||
"object-path-immutable": "4.1.2",
|
||||
"primeicons": "7.0.0",
|
||||
"primereact": "10.9.2",
|
||||
@@ -41,7 +41,7 @@
|
||||
"react-router-dom": "7.1.3",
|
||||
"react-scripts": "5.0.1",
|
||||
"recharts": "2.15.0",
|
||||
"sockjs-client": "^1.6.1",
|
||||
"sockjs-client": "1.6.1",
|
||||
"validate.js": "0.13.1",
|
||||
"zustand": "4.5.4",
|
||||
"zustand-x": "3.0.4"
|
||||
|
||||
35
src/helpers/getQueryParamsForPaginatedEndpoint.js
Normal file
35
src/helpers/getQueryParamsForPaginatedEndpoint.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import { isEmpty, pathOr } from 'ramda';
|
||||
import formatDateString from './formatDateString';
|
||||
|
||||
const getQueryParamsForPaginatedEndpoint = (lazyState, statuses) => {
|
||||
let sortBy = {
|
||||
columnName: 'applicationId',
|
||||
sortDesc: true
|
||||
};
|
||||
|
||||
if (lazyState.sortField) {
|
||||
sortBy = {
|
||||
columnName: lazyState.sortField,
|
||||
sortDesc: lazyState.sortOrder === -1
|
||||
}
|
||||
}
|
||||
return {
|
||||
globalFilters: {
|
||||
page: lazyState.page ? lazyState.page + 1 : 1,
|
||||
limit: lazyState.rows,
|
||||
sortBy
|
||||
},
|
||||
status: statuses,
|
||||
filters: Object.keys(lazyState.filters).reduce((acc, cur) => {
|
||||
const value = pathOr('', ['filters', cur, 'value'], lazyState);
|
||||
if (!isEmpty(value)) {
|
||||
acc[cur] = typeof value.getMonth === 'function'
|
||||
? formatDateString(value)
|
||||
: lazyState.filters[cur];
|
||||
}
|
||||
return acc;
|
||||
}, {}),
|
||||
}
|
||||
}
|
||||
|
||||
export default getQueryParamsForPaginatedEndpoint;
|
||||
@@ -49,7 +49,7 @@ import FileuploadApplicationSignedPdf from '../../components/FileuploadApplicati
|
||||
|
||||
import { defaultMaxFileSize } from '../../configData';
|
||||
|
||||
const APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const BandoApplication = () => {
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
@@ -686,7 +686,7 @@ const BandoApplication = () => {
|
||||
setVisibleConfirmation(false);
|
||||
}}>
|
||||
<p>
|
||||
{APP_HUB_ID === 't7jh5wfg9QXylNaTZkPoE'
|
||||
{REACT_APP_HUB_ID === 't7jh5wfg9QXylNaTZkPoE'
|
||||
? __('Grazie, la tua domanda è stata inviata correttamente. Entro 24 ore riceverai una email con data, ora e numero di protocollo.', 'gepafin')
|
||||
: __('Grazie, la tua domanda è stata inviata correttamente. Entro 24 ore riceverai una pec con data, ora e numero di protocollo.', 'gepafin')
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ import LatestBandiTableAsync from './components/LatestBandiTableAsync';
|
||||
import AllDomandeTableAsync from '../Domande/components/AllDomandeTableAsync';
|
||||
import DraftApplicationsTableAsync from './components/DraftApplicationsTableAsync';
|
||||
|
||||
const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const Dashboard = () => {
|
||||
const navigate = useNavigate();
|
||||
const [mainStats, setMainStats] = useState({});
|
||||
@@ -64,7 +66,8 @@ const Dashboard = () => {
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
<div className={`appPageSection__withBorder${pecUsage > 91 ? ' danger' : ''}`}>
|
||||
{REACT_APP_HUB_ID === 'p4lk3bcx1RStqTaIVVbXs' // only for GEPAFIN
|
||||
? <div className={`appPageSection__withBorder${pecUsage > 91 ? ' danger' : ''}`}>
|
||||
<p className="appPageSection__pMeta">
|
||||
<span>{__('PEC inbox quota', 'gepafin')}</span>
|
||||
<span>{<NumberFlow
|
||||
@@ -73,7 +76,7 @@ const Dashboard = () => {
|
||||
suffix={'%'}
|
||||
locales="it-IT"/>}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div> : null}
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ const SoccorsiInstructorManagerMioTableAsync = ({ userId = null }) => {
|
||||
});
|
||||
const statuses = [];
|
||||
|
||||
const getPaginationQuery = useCallback((defaultSortBy = 'id') => {
|
||||
const getPaginationQuery = useCallback(() => {
|
||||
let sortBy = {
|
||||
columnName: 'applicationId',
|
||||
sortDesc: true
|
||||
|
||||
@@ -8,10 +8,11 @@ import translationStrings from '../../../../translationStringsForComponents';
|
||||
// api
|
||||
import AmendmentsService from '../../../../service/amendments-service';
|
||||
|
||||
//
|
||||
// tools
|
||||
import getBandoLabel from '../../../../helpers/getBandoLabel';
|
||||
import getBandoSeverity from '../../../../helpers/getBandoSeverity';
|
||||
import getFormattedDateString from '../../../../helpers/getFormattedDateString';
|
||||
import getQueryParamsForPaginatedEndpoint from '../../../../helpers/getQueryParamsForPaginatedEndpoint';
|
||||
|
||||
// components
|
||||
import { DataTable } from 'primereact/datatable';
|
||||
@@ -36,41 +37,14 @@ const SoccorsiPreInstructorTableAsync = ({ userId = null }) => {
|
||||
applicationId: { value: null, matchMode: 'contains' },
|
||||
callName: { value: null, matchMode: 'contains' },
|
||||
companyName: { value: null, matchMode: 'contains' },
|
||||
startDate: { value: null, matchMode: 'date_is' },
|
||||
expirationDate: { value: null, matchMode: 'date_is' },
|
||||
startDate: { value: null, matchMode: 'dateIs' },
|
||||
expirationDate: { value: null, matchMode: 'dateIs' },
|
||||
status: { value: null, matchMode: 'equals' }
|
||||
}
|
||||
});
|
||||
const statuses = [];
|
||||
|
||||
const getPaginationQuery = useCallback(() => {
|
||||
let sortBy = {
|
||||
columnName: 'applicationId',
|
||||
sortDesc: true
|
||||
};
|
||||
|
||||
if (lazyState.sortField) {
|
||||
sortBy = {
|
||||
columnName: lazyState.sortField,
|
||||
sortDesc: lazyState.sortOrder === -1
|
||||
}
|
||||
}
|
||||
return {
|
||||
globalFilters: {
|
||||
page: lazyState.page ? lazyState.page + 1 : 1,
|
||||
limit: lazyState.rows,
|
||||
sortBy
|
||||
},
|
||||
status: statuses,
|
||||
filters: Object.keys(lazyState.filters).reduce((acc, cur) => {
|
||||
const value = pathOr('', ['filters', cur, 'value'], lazyState);
|
||||
if (!isEmpty(value)) {
|
||||
acc[cur] = lazyState.filters[cur];
|
||||
}
|
||||
return acc;
|
||||
}, {}),
|
||||
}
|
||||
}, [lazyState]);
|
||||
const getPaginationQuery = useCallback(getQueryParamsForPaginatedEndpoint(lazyState, statuses), [lazyState]);
|
||||
|
||||
const onPage = (event) => {
|
||||
setLazyState(event);
|
||||
|
||||
Reference in New Issue
Block a user