diff --git a/src/helpers/getBandoLabel.js b/src/helpers/getBandoLabel.js index acd7edc..35a850e 100644 --- a/src/helpers/getBandoLabel.js +++ b/src/helpers/getBandoLabel.js @@ -26,6 +26,9 @@ const getBandoLabel = (status) => { case 'AWAIT': return __('In attesa', 'gepafin'); + case 'OPEN': + return __('Aperto', 'gepafin'); + case 'ASSIGNED': return __('Assegnato', 'gepafin'); diff --git a/src/helpers/getBandoSeverity.js b/src/helpers/getBandoSeverity.js index d7c62d2..d090c80 100644 --- a/src/helpers/getBandoSeverity.js +++ b/src/helpers/getBandoSeverity.js @@ -24,6 +24,9 @@ const getBandoSeverity = (status) => { case 'AWAIT': return 'warning'; + case 'OPEN': + return 'warning'; + case 'ASSIGNED': return 'warning'; diff --git a/src/icons/HelpIcon/index.js b/src/icons/HelpIcon/index.js new file mode 100644 index 0000000..26dfcd7 --- /dev/null +++ b/src/icons/HelpIcon/index.js @@ -0,0 +1,20 @@ +import React from 'react'; + +const HelpIcon = () => { + return + + + + + + + + + +} + +export default HelpIcon; \ No newline at end of file diff --git a/src/layouts/DefaultLayout/components/AppSidebar/index.js b/src/layouts/DefaultLayout/components/AppSidebar/index.js index 85985d2..e336bdb 100644 --- a/src/layouts/DefaultLayout/components/AppSidebar/index.js +++ b/src/layouts/DefaultLayout/components/AppSidebar/index.js @@ -1,12 +1,13 @@ import React from 'react'; import { __ } from '@wordpress/i18n'; -import { intersection } from 'ramda'; +import { intersection, is } from 'ramda'; // store import { useStore } from '../../../../store'; // components import { NavLink } from 'react-router-dom'; +import HelpIcon from '../../../../icons/HelpIcon'; const AppSidebar = () => { const permissions = useStore().main.getPermissions(); @@ -54,32 +55,39 @@ const AppSidebar = () => { id: 6, enable: intersection(permissions, ['EVALUATE_APPLICATIONS']).length }, + { + label: __('Soccorso Istruttorio', 'gepafin'), + icon: , + href: '/soccorso-istruttorio', + id: 7, + enable: intersection(permissions, ['EVALUATE_APPLICATIONS']).length + }, { label: __('Gestione Utenti', 'gepafin'), icon: 'pi pi-users', href: '/utenti', - id: 7, + id: 8, enable: intersection(permissions, ['VIEW_USERS', 'MANAGE_USERS']).length }, { label: __('Configurazione', 'gepafin'), icon: 'pi pi-cog', //href: '/configurazione', - id: 8, + id: 9, enable: false }, { label: __('Report e Analisi', 'gepafin'), icon: 'pi pi-chart-bar', //href: '/stats', - id: 9, + id: 10, enable: false }, { label: __('Log di Sistema', 'gepafin'), icon: 'pi pi-receipt', clickFn: () => {}, - id: 10, + id: 11, enable: false } ] @@ -91,11 +99,15 @@ const AppSidebar = () => { .map(o =>
  • {o.href ? - + {is(String, o.icon) + ? + : o.icon} {o.label} : }
  • )} diff --git a/src/pages/BandoForms/index.js b/src/pages/BandoForms/index.js index da67894..ea70e59 100644 --- a/src/pages/BandoForms/index.js +++ b/src/pages/BandoForms/index.js @@ -1,8 +1,9 @@ -import React, { useState, useEffect } from 'react'; +import React, { useState, useEffect, useRef } from 'react'; import { __ } from '@wordpress/i18n'; import { useParams, useNavigate } from 'react-router-dom'; -import { is, isEmpty, isNil } from 'ramda'; +import { isEmpty } from 'ramda'; import { classNames } from 'primereact/utils'; +import { klona } from 'klona'; // components import { Button } from 'primereact/button'; @@ -15,6 +16,8 @@ import FormsService from '../../service/forms-service'; import { storeSet } from '../../store'; import set404FromErrorResponse from '../../helpers/set404FromErrorResponse'; import BandoService from '../../service/bando-service'; +import uniqid from '../../helpers/uniqid'; +import { Toast } from 'primereact/toast'; const BandoForms = () => { const { id } = useParams(); @@ -22,8 +25,10 @@ const BandoForms = () => { const [templates, setTemplates] = useState(null); const [selectedTemplate, setSelectedTemplate] = useState(null); const [selectedForm, setSelectedForm] = useState(null); + const [selectedForDuplicateForm, setSelectedForDuplicateForm] = useState(null); const [forms, setForms] = useState([]); const [bandoStatus, setBandoStatus] = useState(''); + const toast = useRef(null); const doCreateNewForm = () => { navigate(`/bandi/${id}/forms/new`); @@ -43,11 +48,74 @@ const BandoForms = () => { } } - const goToEditFormFromTemplate = () => { - console.log('goToEditFormFromTemplate', selectedTemplate) - //navigate(`/bandi/${id}`); + const doDuplicateForm = () => { + const selectedFormArr = forms.filter(o => o.value === selectedForDuplicateForm); + + if (!isEmpty(selectedFormArr)) { + storeSet.main.setAsyncRequest(); + FormsService.getFormById(selectedForDuplicateForm, getFormCallback, errGetFormCallbacks); + } } + const getFormCallback = (data) => { + if (data.status === 'SUCCESS') { + const newLabel = `${data.data.label} (copy)`; + + const formData = { + label: newLabel, + content: data.data.content.map(o => ({ + ...o, + id: uniqid() + })) + } + + FormsService.createFormForCall( + id, + formData, + formCreateCallback, + errFormCreateCallback + ); + } + } + + const errGetFormCallbacks = (data) => { + set404FromErrorResponse(data); + storeSet.main.unsetAsyncRequest(); + } + + const formCreateCallback = (data) => { + if (data.status === 'SUCCESS') { + storeSet.main.unsetAsyncRequest(); + + if (toast.current) { + toast.current.show({ + severity: 'success', + summary: '', + detail: __('Il form è stato aggiornato corretamente!', 'gepafin') + }); + } + + setTimeout(() => { + navigate(`/bandi/${id}/forms/${data.data.id}`); + }, 1000) + } + } + + const errFormCreateCallback = (data) => { + storeSet.main.unsetAsyncRequest(); + if (toast.current) { + toast.current.show({ + severity: 'error', + summary: '', + detail: data.message + }); + } + } + + /*const goToEditFormFromTemplate = () => { + console.log('goToEditFormFromTemplate', selectedTemplate) + }*/ + const getCallback = (data) => { if (data.status === 'SUCCESS') { setBandoStatus(data.data.status); @@ -62,7 +130,7 @@ const BandoForms = () => { const getFormsCallback = (data) => { if (data.status === 'SUCCESS') { - const forms = data.data.map(o => ({label: o.label, value: o.id})) + const forms = data.data.map(o => ({ label: o.label, value: o.id })) setForms(forms); } storeSet.main.unsetAsyncRequest(); @@ -78,7 +146,7 @@ const BandoForms = () => { const bandoId = !isNaN(parsed) ? parsed : 0; setTemplates([ - {label: "Form template", value: 11} + { label: 'Form template', value: 11 } ]) storeSet.main.setAsyncRequest(); @@ -96,6 +164,7 @@ const BandoForms = () => {
    +
    @@ -124,16 +193,32 @@ const BandoForms = () => {

    {__('Crea un nuovo Form da Zero', 'gepafin')}

    -

    {__('Inizia con un form completamente vuoto e personalizzabil', 'gepafin')}

    +

    {__('Inizia con un form completamente vuoto e personalizzabile', 'gepafin')}

    +
    +

    {__('Duplica il form creato in precedenza', 'gepafin')}

    + setSelectedForDuplicateForm(e.value)} + options={forms} + optionLabel="label" + placeholder={__('Seleziona form', 'gepafin')}/> +
    -
    +

    {__('Modifica form esistente', 'gepafin')}

    {__('Continua a lavorare su un form precedentemente salvato', 'gepafin')}

    diff --git a/src/pages/DashboardPreInstructor/components/PreInstructorDomandeTable/index.js b/src/pages/DashboardPreInstructor/components/PreInstructorDomandeTable/index.js index 46618ee..a6ed4b5 100644 --- a/src/pages/DashboardPreInstructor/components/PreInstructorDomandeTable/index.js +++ b/src/pages/DashboardPreInstructor/components/PreInstructorDomandeTable/index.js @@ -50,7 +50,6 @@ const PreInstructorDomandeTable = () => { const getFormattedData = (data) => { return data.map((d) => { d.callEndDate = is(String, d.callEndDate) ? new Date(d.callEndDate) : (d.callEndDate ? d.callEndDate : ''); - 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; }); @@ -89,7 +88,7 @@ const PreInstructorDomandeTable = () => { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }] }, - updatedDate : { + callEndDate : { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }] } @@ -114,8 +113,7 @@ const PreInstructorDomandeTable = () => { }; const dateEndBodyTemplate = (rowData) => { - //return formatDate(rowData.callEndDate); - return ''; + return formatDate(rowData.callEndDate); }; const dateFilterTemplate = (options) => { @@ -156,7 +154,7 @@ const PreInstructorDomandeTable = () => { - { +const DomandaEditPreInstructor = () => { const isAsyncRequest = useStore().main.isAsyncRequest(); const { id } = useParams(); const navigate = useNavigate(); const [data, setData] = useState({}); const [message, setMessage] = useState(''); - const pageMsgs = useRef(null); + const [isAdmissible, setIsAdmissible] = useState(false); + const toast = useRef(null); const goToEvaluationsPage = () => { navigate('/domande'); } - /*const getCallback = (data) => { + const getCallback = (data) => { if (data.status === 'SUCCESS') { - setData(getFormattedBandiData(data.data)); + setData(getFormattedData(data.data)); } storeSet.main.unsetAsyncRequest(); } const errGetCallback = (data) => { - if (pageMsgs.current && data.message) { - pageMsgs.current.show([ - { - sticky: true, severity: 'error', summary: '', - detail: data.message, - closable: true - } - ]); + if (toast.current && data.message) { + toast.current.show({ + severity: 'error', + summary: '', + detail: data.message + }); } set404FromErrorResponse(data); storeSet.main.unsetAsyncRequest(); - }*/ + } - /*const getFormattedBandiData = (data) => { - data.dates = data.dates.map(v => is(String, v) ? new Date(v) : (v ? v : '')); + const getFormattedData = (data) => { + data.submissionDate = is(String, data.submissionDate) ? new Date(data.submissionDate) : (data.submissionDate ? data.submissionDate : ''); + data.evaluationDate = is(String, data.evaluationDate) ? new Date(data.evaluationDate) : (data.evaluationDate ? data.evaluationDate : ''); return data; - };*/ + }; const renderHeader = () => { return ( @@ -76,58 +85,69 @@ const DomandaEdit = () => { const header = renderHeader(); + const updateEvaluationValue = (value, path, maxValue) => { + let finalValue = value; + + if (maxValue) { + finalValue = value > maxValue ? maxValue : value; + } + + const newData = wrap(data).set(path.split('.'), finalValue).value(); + setData(newData); + } + + const doSaveDraft = () => { + const formData = { + criteria: klona(data.criteria), + checklist: klona(data.checklist), + files: klona(data.files), + note: data.note + } + ApplicationEvaluationService.updateEvaluation(id, formData, updateCallback, errUpdateCallback); + } + + const updateCallback = (data) => { + if (data.status === 'SUCCESS') { + if (toast.current) { + toast.current.show({ + severity: 'success', + summary: '', + detail: data.message + }); + } + } + storeSet.main.unsetAsyncRequest(); + } + + const errUpdateCallback = (data) => { + if (toast.current && data.message) { + toast.current.show({ + severity: 'error', + summary: '', + detail: data.message + }); + } + set404FromErrorResponse(data); + storeSet.main.unsetAsyncRequest(); + } + + useEffect(() => { + const maxScore = pathOr(0, ['minScore'], data); + const criteria = pathOr([], ['criteria'], data); + const scoreSum = sum(criteria.map(o => o.score)); + + setIsAdmissible(scoreSum !== 0 && scoreSum >= maxScore); + }, [data]); + useEffect(() => { const parsed = parseInt(id) const entityId = !isNaN(parsed) ? parsed : 0; - setData({ - id: 'DOM_2024_001', - callTitle: 'Innovazione 2024', - beneficiario: 'Azienda Alpha SRL', - createdAt: '2024-08-01', - scadenzaAt: '2024-08-05', - status: 'In Valutazione', - criteria: [ - { title: 'Innovatività del progetto', score: 25, id: 12 }, - { title: 'Innovatività del progetto2', score: 35, id: 13 }, - { title: 'Innovatività del progetto3', score: 15, id: 14 } - ], - minScore: 60 - }); - - //BandoService.getBando(entityId, getCallback, errGetCallback); + ApplicationEvaluationService.getEvaluationByApplId(getCallback, errGetCallback, [ + ['assignedApplicationId', entityId] + ]); }, [id]); - // TODO - const checklist = [ - { - id: 1, - title: 'Requisiti di ammissibilità soddisfatti' - }, - { - id: 2, - title: 'Documentazione completa' - }, - { - id: 3, - title: 'Obiettivi del progetto chiari e misurabili' - } - ]; - const documents = [ - { - id: 1, - title: 'Doc 1' - }, - { - id: 2, - title: 'Bilancio ultimo esercizio Bilancio ultimo esercizio Bilancio ultimo esercizio' - }, - { - id: 3, - title: 'Bilancio ultimo esercizio' - } - ]; - return (
    @@ -135,7 +155,8 @@ const DomandaEdit = () => {
    - + +
    )} {__('Punteggio:', 'gepafin')} - {68} - + {sum(data.criteria.map(o => o.score))} + + {isAdmissible + ? : null} + {!isAdmissible + ? : null} + @@ -224,12 +279,15 @@ const DomandaEdit = () => {

    {__('Lista', 'gepafin')}

    - {checklist.map(o =>
    + {data.checklist.map((o, i) =>
    console.log(e.checked)} - checked={false}> - + onChange={(e) => updateEvaluationValue( + e.checked, + `checklist.${i}.valid` + )} + checked={o.valid}> +
    )}
    @@ -237,10 +295,13 @@ const DomandaEdit = () => {

    {__('Note', 'gepafin')}

    setMessage(e.htmlValue)} + onTextChange={(e) => updateEvaluationValue( + e.htmlValue, + 'note' + )} style={{ height: 80 * 3, width: '100%' }} />
    @@ -248,14 +309,27 @@ const DomandaEdit = () => {

    {__('Documenti allegati', 'gepafin')}

      - {documents.map(o =>
    1. - {o.title} + {data.files.map((o, i) =>
    2. + {o.label}
      -
    3. )} @@ -278,30 +352,19 @@ const DomandaEdit = () => { label={<> {__('Richiedi Soccorso Istruttorio', 'gepafin')} - - - - - - - - - - + } />
    : <> - + @@ -327,4 +390,4 @@ const DomandaEdit = () => { } -export default DomandaEdit; \ No newline at end of file +export default DomandaEditPreInstructor; \ No newline at end of file diff --git a/src/pages/Domande/components/AllDomandeTable/index.js b/src/pages/Domande/components/AllDomandeTable/index.js index 4870c1a..6cc23a2 100644 --- a/src/pages/Domande/components/AllDomandeTable/index.js +++ b/src/pages/Domande/components/AllDomandeTable/index.js @@ -84,7 +84,7 @@ const AllDomandeTable = ({ openDialogFn }) => { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] }, - appliedDate: { + submissionDate: { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }] }, @@ -152,7 +152,7 @@ const AllDomandeTable = ({ openDialogFn }) => { filter filterPlaceholder={__('Cerca', 'gepafin')} style={{ minWidth: '12rem' }}/> { + const isAsyncRequest = useStore().main.isAsyncRequest(); + const { id, soccorsoId } = useParams(); + const navigate = useNavigate(); + const [data, setData] = useState({}); + const toast = useRef(null); + + const goToEvaluationPage = () => { + //navigate('/domande'); + } + + const getCallback = (data) => { + if (data.status === 'SUCCESS') { + setData(getFormattedData(data.data)); + } + storeSet.main.unsetAsyncRequest(); + } + + const errGetCallback = (data) => { + if (toast.current && data.message) { + toast.current.show({ + severity: 'error', + summary: '', + detail: data.message + }); + } + set404FromErrorResponse(data); + storeSet.main.unsetAsyncRequest(); + } + + const getFormattedData = (data) => { + data.submissionDate = is(String, data.submissionDate) ? new Date(data.submissionDate) : (data.submissionDate ? data.submissionDate : ''); + data.evaluationDate = is(String, data.evaluationDate) ? new Date(data.evaluationDate) : (data.evaluationDate ? data.evaluationDate : ''); + return data; + }; + + const renderHeader = () => { + return ( + + + + + + + + + + + + + + ); + }; + + const header = renderHeader(); + + const updateEvaluationValue = (value, path, maxValue) => { + let finalValue = value; + + if (maxValue) { + finalValue = value > maxValue ? maxValue : value; + } + + const newData = wrap(data).set(path.split('.'), finalValue).value(); + setData(newData); + } + + /*const doSaveDraft = () => { + const formData = { + criteria: klona(data.criteria), + checklist: klona(data.checklist), + files: klona(data.files), + note: data.note + } + ApplicationEvaluationService.updateEvaluation(id, formData, updateCallback, errUpdateCallback); + } + + const updateCallback = (data) => { + if (data.status === 'SUCCESS') { + if (toast.current) { + toast.current.show({ + severity: 'success', + summary: '', + detail: data.message + }); + } + } + storeSet.main.unsetAsyncRequest(); + } + + const errUpdateCallback = (data) => { + if (toast.current && data.message) { + toast.current.show({ + severity: 'error', + summary: '', + detail: data.message + }); + } + set404FromErrorResponse(data); + storeSet.main.unsetAsyncRequest(); + }*/ + + useEffect(() => { + const parsed = parseInt(id) + const assignedCallId = !isNaN(parsed) ? parsed : 0; + const parsedSoccorsoId = parseInt(soccorsoId) + const soccorsoEntityId = !isNaN(parsedSoccorsoId) ? parsedSoccorsoId : 0; + + ApplicationEvaluationService.getEvaluationByApplId(getCallback, errGetCallback, [ + ['assignedApplicationId', assignedCallId] + ]); + }, [id, soccorsoId]); + + return ( +
    +
    +

    {__('Soccorso Istruttorio - Dettagli', 'gepafin')}

    +
    + +
    + + + +
    +
    + +
    + + {!isAsyncRequest && !isEmpty(data) + ?
    +
    +

    + {__('ID domanda', 'gepafin')} + {data.applicationId} +

    +

    + {__('Bando', 'gepafin')} + {data.callName} +

    +

    + {__('Beneficiario', 'gepafin')} + {data.beneficiary} +

    +

    + {__('Data ricezione', 'gepafin')} + {getDateFromISOstring(data.submissionDate)} +

    +

    + {__('Scadenza Valutazione', 'gepafin')} + {getDateFromISOstring(data.callEndDate)} +

    +

    + {__('Stato', 'gepafin')} + {getBandoLabel(data.applicationStatus)} +

    +
    + +
    +

    {__('Punteggi di valutazione', 'gepafin')}

    + {data.criteria + ? + + + + + + + + + {data.criteria.map((o, i) => + + + + )} + + + + + + + + + + + +
    {__('Parametro', 'gepafin')}{__('Punteggio', 'gepafin')}{__('Stato', 'gepafin')}
    {o.label} +
    + updateEvaluationValue( + e.value, + `criteria.${i}.score`, + o.maxScore + )}/> + + / {o.maxScore} + +
    +
    +
    + {!isEmpty(o.criteriaMappedFields) + ?
    +
    {__('Punteggio:', 'gepafin')}{sum(data.criteria.map(o => o.score))} + {isAdmissible + ? : null} + {!isAdmissible + ? : null} +
    {sprintf(__('Punteggio minimo per l\'ammissione: %d'), data.minScore)}
    : null} +
    + +
    +

    {__('Checklist Valutazione', 'gepafin')}

    +
    +
    +

    {__('Lista', 'gepafin')}

    +
    +
    + {data.checklist.map((o, i) =>
    + updateEvaluationValue( + e.checked, + `checklist.${i}.valid` + )} + checked={o.valid}> + +
    )} +
    +
    + +

    {__('Note', 'gepafin')}

    +
    + updateEvaluationValue( + e.htmlValue, + 'note' + )} + style={{ height: 80 * 3, width: '100%' }} + /> +
    +
    +
    +

    {__('Documenti allegati', 'gepafin')}

    +
      + {data.files.map((o, i) =>
    1. + {o.label} +
      + {o.fileDetail.length === 1 + ?
      +
    2. )} +
    +
    +
    +
    + +
    + +
    + {__('Azioni rapide', 'gepafin')} +
    + +
    +
    +
    +
    + +
    + : <> + + + + + + + + + } +
    + ) + +} + +export default SoccorsoEditPreInstructor; \ No newline at end of file diff --git a/src/pages/SoccorsoIstruttorioPreInstructor/components/PreInstructorSoccorsiTable/index.js b/src/pages/SoccorsoIstruttorioPreInstructor/components/PreInstructorSoccorsiTable/index.js new file mode 100644 index 0000000..8e98c38 --- /dev/null +++ b/src/pages/SoccorsoIstruttorioPreInstructor/components/PreInstructorSoccorsiTable/index.js @@ -0,0 +1,171 @@ +import React, { useState, useEffect} from 'react'; +import { __ } from '@wordpress/i18n'; +import { is, uniq } from 'ramda'; +import { Link } from 'react-router-dom'; + +// store +//import { storeSet, storeGet } from '../../../../store'; + +// api +import ApplicationService from '../../../../service/application-service'; + +// components +import { FilterMatchMode, FilterOperator } from 'primereact/api'; +import { DataTable } from 'primereact/datatable'; +import { Column } from 'primereact/column'; +import { InputText } from 'primereact/inputtext'; +import { IconField } from 'primereact/iconfield'; +import { InputIcon } from 'primereact/inputicon'; +import { Button } from 'primereact/button'; +import { Calendar } from 'primereact/calendar'; +import ProperBandoLabel from '../../../../components/ProperBandoLabel'; + + +const PreInstructorSoccorsiTable = ({ openDialogFn }) => { + const [items, setItems] = useState(null); + const [filters, setFilters] = useState(null); + const [localAsyncRequest, setLocalAsyncRequest] = useState(false); + const [globalFilterValue, setGlobalFilterValue] = useState(''); + const [statuses, setStatuses] = useState([]); + + useEffect(() => { + setLocalAsyncRequest(true); + ApplicationService.getApplications(getCallback, errGetCallbacks, [['status', 'SUBMIT']]); + }, []); + + const getCallback = (data) => { + if (data.status === 'SUCCESS') { + setItems(getFormattedData(data.data)); + setStatuses(uniq(data.data.map(o => o.status))) + initFilters(); + } + setLocalAsyncRequest(false); + } + + const errGetCallbacks = (data) => { + setLocalAsyncRequest(false); + } + + 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.submissionDate = is(String, d.submissionDate) ? new Date(d.submissionDate) : (d.submissionDate ? d.submissionDate : ''); + return d; + }); + }; + + const formatDate = (value) => { + return value.toLocaleDateString('it-IT', { + day: '2-digit', + month: '2-digit', + year: 'numeric' + }); + }; + + const clearFilter = () => { + initFilters(); + }; + + const onGlobalFilterChange = (e) => { + const value = e.target.value; + let _filters = { ...filters }; + + _filters['global'].value = value; + + setFilters(_filters); + setGlobalFilterValue(value); + }; + + const initFilters = () => { + setFilters({ + global: { value: null, matchMode: FilterMatchMode.CONTAINS }, + callTitle: { + operator: FilterOperator.AND, + constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] + }, + submissionDate: { + operator: FilterOperator.AND, + constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }] + }, + callEndDate: { + operator: FilterOperator.AND, + constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }] + } + }); + setGlobalFilterValue(''); + }; + + const renderHeader = () => { + return ( +
    +
    + ); + }; + + const dateAppliedBodyTemplate = (rowData) => { + return formatDate(rowData.submissionDate); + }; + + const dateEndBodyTemplate = (rowData) => { + return formatDate(rowData.callEndDate); + }; + + const dateFilterTemplate = (options) => { + return options.filterCallback(e.value, options.index)} dateFormat="mm/dd/yy" placeholder="mm/dd/yyyy" mask="99/99/9999" />; + }; + + const statusBodyTemplate = (rowData) => { + return ; + }; + + const actionsBodyTemplate = (rowData) => { + return openDialogFn + ?