- merged with develop;
This commit is contained in:
@@ -147,6 +147,7 @@
|
||||
.appForm__fileUploadItemName {
|
||||
color: var(--global-textColor);
|
||||
font-style: italic;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.appForm__row {
|
||||
|
||||
@@ -276,6 +276,10 @@
|
||||
.summary {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
@container section_with_border (max-width: 600px) {
|
||||
|
||||
@@ -28,6 +28,14 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
#root, .wrapper {
|
||||
min-height: 100%;
|
||||
display: flex;
|
||||
|
||||
@@ -118,6 +118,10 @@
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.p-dropdown-panel {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.p-inputgroup.flex-1 {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ const FormFieldRepeater = ({
|
||||
const properField = (item, i) => {
|
||||
return !isNil(item.lookUpDataId)
|
||||
? <Dropdown value={item.value}
|
||||
filter
|
||||
disabled={disabled}
|
||||
onChange={(e) => selectItem(e, i)}
|
||||
optionDisabled={(opt) => usedExistingValues().includes(opt.value)}
|
||||
|
||||
@@ -79,6 +79,7 @@ const FormFieldRepeaterCriteria = ({
|
||||
const properField = (item, i) => {
|
||||
return !isNil(item.lookUpDataId)
|
||||
? <Dropdown value={item.value}
|
||||
filter
|
||||
disabled={disabled}
|
||||
onChange={(e) => selectItem(e, i)}
|
||||
optionDisabled={(opt) => usedExistingValues().includes(opt.value)}
|
||||
|
||||
@@ -12,6 +12,7 @@ import { Dialog } from 'primereact/dialog';
|
||||
import { InputSwitch } from 'primereact/inputswitch';
|
||||
import renderHtmlContent from '../../helpers/renderHtmlContent';
|
||||
import { Editor } from 'primereact/editor';
|
||||
import DOMPurify from 'dompurify';
|
||||
|
||||
const FormFieldRepeaterFaq = ({
|
||||
data,
|
||||
@@ -143,6 +144,10 @@ const FormFieldRepeaterFaq = ({
|
||||
|
||||
const header = renderHeader();
|
||||
|
||||
const faqOptionTemplate = (option) => {
|
||||
return DOMPurify.sanitize(option.title, {ALLOWED_TAGS: ['#text']});
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const storeFieldData = data ?? [];
|
||||
setStateFieldData(storeFieldData);
|
||||
@@ -177,9 +182,11 @@ const FormFieldRepeaterFaq = ({
|
||||
disabled={disabled}
|
||||
icon="pi pi-plus" onClick={addNewItem}/>
|
||||
<Dropdown onChange={(e) => selectItem(e)}
|
||||
filter
|
||||
disabled={disabled}
|
||||
optionDisabled={(opt) => usedExistingValues().includes(opt.title)}
|
||||
options={stateOptionsData}
|
||||
itemTemplate={faqOptionTemplate}
|
||||
placeholder={__('Scegli tra quelli pre-creati', 'gepafin')}
|
||||
optionLabel="title"/>
|
||||
</div>
|
||||
@@ -216,9 +223,9 @@ const FormFieldRepeaterFaq = ({
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<p className="m-0">
|
||||
<span className="m-0">
|
||||
{renderHtmlContent(o.response)}
|
||||
</p>
|
||||
</span>
|
||||
</AccordionTab>)}
|
||||
</Accordion>
|
||||
<Dialog
|
||||
|
||||
@@ -14,3 +14,32 @@ export const mimeTypes = [
|
||||
];
|
||||
|
||||
export const defaultMaxFileSize = 314572800; // 314572800 = 300 Mb
|
||||
|
||||
const dynamicDataForTextinput = [
|
||||
{ label: 'company name', value: 'company.companyName' },
|
||||
{ label: 'company piva', value: 'company.vatNumber' },
|
||||
{ label: 'company codiceFiscale', value: 'company.codiceFiscale' },
|
||||
{ label: 'company address', value: 'company.address' },
|
||||
{ label: 'company phoneNumber', value: 'company.phoneNumber' },
|
||||
{ label: 'company city', value: 'company.city' },
|
||||
{ label: 'company province', value: 'company.province' },
|
||||
{ label: 'company cap', value: 'company.cap' },
|
||||
{ label: 'company country', value: 'company.country' },
|
||||
{ label: 'company pec', value: 'company.pec' },
|
||||
{ label: 'company email', value: 'company.email' },
|
||||
{ label: 'company contactName', value: 'company.contactName' },
|
||||
{ label: 'company contactEmail', value: 'company.contactEmail' },
|
||||
{ label: 'user email', value: 'user.email' },
|
||||
{ label: 'user firstName', value: 'user.firstName' },
|
||||
{ label: 'user lastName', value: 'user.lastName' },
|
||||
{ label: 'user phoneNumber', value: 'user.phoneNumber' },
|
||||
{ label: 'user codiceFiscale', value: 'user.codiceFiscale' }
|
||||
]
|
||||
|
||||
export const dynamicDataOptions = {
|
||||
datepicker: [
|
||||
{ label: 'user dateOfBirth', value: 'user.dateOfBirth' }
|
||||
],
|
||||
textinput: dynamicDataForTextinput,
|
||||
textarea: dynamicDataForTextinput
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect} from 'react';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { is, uniq, isNil } from 'ramda';
|
||||
import { is, uniq, isNil, isEmpty } from 'ramda';
|
||||
import { wrap } from 'object-path-immutable';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
@@ -29,6 +29,7 @@ import PreferredBandoService from '../../../../service/preferred-bando-service';
|
||||
|
||||
|
||||
const AllBandiAccordion = () => {
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
const isAsyncRequest = useStore().main.isAsyncRequest();
|
||||
const [items, setItems] = useState(null);
|
||||
const [filters, setFilters] = useState(null);
|
||||
@@ -161,11 +162,11 @@ const AllBandiAccordion = () => {
|
||||
<div className="p-3">
|
||||
{renderHtmlContent(data.descriptionShort)}
|
||||
<p>{__('Scadenza', 'gepafin')}: {getDateFromISOstring(data.dates[1])}</p>
|
||||
{!data.confidi
|
||||
{!isEmpty(chosenCompanyId) && chosenCompanyId !== 0 && !data.confidi
|
||||
? <Button onClick={() => goToBandoPage(data.id)} severity="info">
|
||||
{__('Partecipa', 'gepafin')}
|
||||
</Button> : null}
|
||||
{data.confidi
|
||||
{!isEmpty(chosenCompanyId) && chosenCompanyId !== 0 && data.confidi
|
||||
? <Button onClick={() => goToBandoPage(data.id)} severity="info">
|
||||
{__('Mostra', 'gepafin')}
|
||||
</Button> : null}
|
||||
@@ -199,9 +200,10 @@ const AllBandiAccordion = () => {
|
||||
<Column field="status" header={__('Stato', 'gepafin')} filterMenuStyle={{ width: '14rem' }}
|
||||
style={{ width: '8rem' }} body={statusBodyTemplate} filter sortable
|
||||
filterElement={statusFilterTemplate}/>
|
||||
<Column header={__('Azioni', 'gepafin')}
|
||||
{!isEmpty(chosenCompanyId) && chosenCompanyId !== 0
|
||||
? <Column header={__('Azioni', 'gepafin')}
|
||||
style={{ width: '8rem' }}
|
||||
body={actionsBodyTemplate}/>
|
||||
body={actionsBodyTemplate}/> : null}
|
||||
</DataTable>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
import React from 'react';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { isEmpty } from 'ramda';
|
||||
|
||||
// store
|
||||
import { useStore } from '../../store';
|
||||
|
||||
// components
|
||||
import AllBandiAccordion from './components/AllBandiAccordion';
|
||||
|
||||
const BandiBeneficiario = () => {
|
||||
return(
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
|
||||
return (
|
||||
<div className="appPage">
|
||||
<div className="appPage__pageHeader">
|
||||
<h1>{__('Bandi disponibili', 'gepafin')}</h1>
|
||||
@@ -13,6 +20,19 @@ const BandiBeneficiario = () => {
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
{isEmpty(chosenCompanyId) || chosenCompanyId === 0
|
||||
? <>
|
||||
<div className="appPageSection__message warning">
|
||||
<i className="pi pi-exclamation-triangle"></i>
|
||||
<span className="summary">{__('Attenzione', 'gepafin')}</span>
|
||||
<span>
|
||||
{__('Per applicare ai bandi devi Registare un Azienda clicca', 'gepafin')}
|
||||
<Link to={`/agguingi-azienda`} style={{marginLeft: '0.5ch'}}>{__('qua', 'gepafin')}</Link>
|
||||
</span>
|
||||
</div>
|
||||
<div className="appPage__spacer"></div>
|
||||
</> : null}
|
||||
|
||||
<div className="appPageSection">
|
||||
<AllBandiAccordion/>
|
||||
</div>
|
||||
|
||||
@@ -5,27 +5,29 @@ import { isNil } from 'ramda';
|
||||
// components
|
||||
import { Button } from 'primereact/button';
|
||||
|
||||
const BandoEditFormActions = ({ id, openPreview, openPreviewEvaluation, submitFn }) => {
|
||||
const BandoEditFormActions = ({ id, openPreview, submitFn, status }) => {
|
||||
return (
|
||||
<div className="appPageSection">
|
||||
<div className="appPageSection__actions">
|
||||
<Button
|
||||
type="button"
|
||||
onClick={submitFn}
|
||||
label={__('Salva bozza', 'gepafin')} icon="pi pi-save" iconPos="right"/>
|
||||
label={status === 'PUBLISH'
|
||||
? __('Modifica', 'gepafin')
|
||||
: __('Salva bozza', 'gepafin')} icon="pi pi-save" iconPos="right"/>
|
||||
<Button
|
||||
type="button"
|
||||
disabled={isNil(id)}
|
||||
outlined
|
||||
onClick={openPreview}
|
||||
label={__('Anteprima beneficiario', 'gepafin')} icon="pi pi-eye" iconPos="right"/>
|
||||
<Button
|
||||
{/*<Button
|
||||
type="button"
|
||||
disabled={true}
|
||||
outlined
|
||||
onClick={openPreviewEvaluation}
|
||||
label={__('Anteprima pre-istruttoria', 'gepafin')} icon="pi pi-eye"
|
||||
iconPos="right"/>
|
||||
iconPos="right"/>*/}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -112,7 +112,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
toast.current.show({
|
||||
severity: 'success',
|
||||
summary: '',
|
||||
detail: __('Il bando è stato aggiornato corretamente!', 'gepafin')
|
||||
detail: __('Il bando è stato aggiornato correttamente!', 'gepafin')
|
||||
});
|
||||
}
|
||||
const values = getValues();
|
||||
@@ -176,8 +176,13 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
}
|
||||
|
||||
const shouldDisableField = () => {
|
||||
return values.status === 'PUBLISH'
|
||||
const shouldDisableField = (fieldName) => {
|
||||
return values.status === 'PUBLISH' &&
|
||||
![
|
||||
'descriptionShort', 'descriptionLong', 'documentationRequested', 'threshold',
|
||||
'aimedTo', 'criteria', 'docs', 'checklist', 'faq', 'amount', 'amountMin', 'amountMax',
|
||||
'email', 'phoneNumber', 'checkList', 'images'
|
||||
].includes(fieldName)
|
||||
}
|
||||
|
||||
useImperativeHandle(
|
||||
@@ -239,7 +244,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
<UnsavedChangesDetector getValuesFn={getValues}/>
|
||||
<FormField
|
||||
type="switch"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('confidi')}
|
||||
fieldName="confidi"
|
||||
label={__('Bando Confidi', 'gepafin')}
|
||||
control={control}
|
||||
@@ -251,7 +256,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormField
|
||||
type="textinput"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('name')}
|
||||
fieldName="name"
|
||||
label={__('Titolo del Bando', 'gepafin')}
|
||||
control={control}
|
||||
@@ -262,7 +267,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormField
|
||||
type="wysiwyg"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('descriptionShort')}
|
||||
fieldName="descriptionShort"
|
||||
label={__('Descrizione breve', 'gepafin')}
|
||||
control={control}
|
||||
@@ -275,7 +280,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormField
|
||||
type="wysiwyg"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('descriptionLong')}
|
||||
fieldName="descriptionLong"
|
||||
label={__('Descrizione completa', 'gepafin')}
|
||||
control={control}
|
||||
@@ -291,7 +296,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormFieldRepeater
|
||||
data={values['aimedTo']}
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('aimedTo')}
|
||||
setDataFn={setValue}
|
||||
fieldName="aimedTo"
|
||||
options={aimedToOptions}
|
||||
@@ -310,7 +315,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormField
|
||||
type="wysiwyg"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('documentationRequested')}
|
||||
fieldName="documentationRequested"
|
||||
label={__('Documentazione richiesta', 'gepafin')}
|
||||
control={control}
|
||||
@@ -334,7 +339,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
<div className="appForm__cols">
|
||||
<FormField
|
||||
type="datepicker"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('startDate')}
|
||||
fieldName="startDate"
|
||||
label={__('Data di inizio', 'gepafin')}
|
||||
control={control}
|
||||
@@ -345,7 +350,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormField
|
||||
type="datepicker"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('endDate')}
|
||||
fieldName="endDate"
|
||||
label={__('Data di fine', 'gepafin')}
|
||||
control={control}
|
||||
@@ -358,7 +363,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
<div className="appForm__cols">
|
||||
<FormField
|
||||
type="datepicker"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('startTime')}
|
||||
fieldName="startTime"
|
||||
label={__('Ora di inizio', 'gepafin')}
|
||||
control={control}
|
||||
@@ -370,7 +375,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormField
|
||||
type="datepicker"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('endTime')}
|
||||
fieldName="endTime"
|
||||
label={__('Ora di fine', 'gepafin')}
|
||||
control={control}
|
||||
@@ -384,7 +389,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
<div className="appForm__cols">
|
||||
<FormField
|
||||
type="numberinput"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('amount')}
|
||||
fieldName="amount"
|
||||
label={__('Dotazione del Bando', 'gepafin')}
|
||||
control={control}
|
||||
@@ -397,7 +402,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormField
|
||||
type="numberinput"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('amountMin')}
|
||||
fieldName="amountMin"
|
||||
label={__('Importo minimo per Progetto', 'gepafin')}
|
||||
control={control}
|
||||
@@ -410,7 +415,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormField
|
||||
type="numberinput"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('amountMax')}
|
||||
fieldName="amountMax"
|
||||
label={__('Importo massimo per Progetto', 'gepafin')}
|
||||
control={control}
|
||||
@@ -425,7 +430,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
<div className="appForm__cols">
|
||||
<FormField
|
||||
type="textinput"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('email')}
|
||||
fieldName="email"
|
||||
label={__('Email', 'gepafin')}
|
||||
control={control}
|
||||
@@ -441,7 +446,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormField
|
||||
type="textinput"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('phoneNumber')}
|
||||
fieldName="phoneNumber"
|
||||
label={__('Telefono', 'gepafin')}
|
||||
control={control}
|
||||
@@ -457,6 +462,7 @@ const BandoEditFormStep1 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormFieldRepeaterFaq
|
||||
data={values['faq']}
|
||||
disabled={shouldDisableField('faq')}
|
||||
setDataFn={setValue}
|
||||
fieldName="faq"
|
||||
options={faqOptions}
|
||||
|
||||
@@ -104,7 +104,7 @@ const BandoEditFormStep2 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
toast.current.show({
|
||||
severity: 'success',
|
||||
summary: '',
|
||||
detail: __('Il bando è stato aggiornato corretamente!', 'gepafin')
|
||||
detail: __('Il bando è stato aggiornato correttamente!', 'gepafin')
|
||||
});
|
||||
const newFormData = {...formInitialData, ...data.data};
|
||||
setFormInitialData(newFormData);
|
||||
@@ -206,8 +206,13 @@ const BandoEditFormStep2 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
}
|
||||
}, []);
|
||||
|
||||
const shouldDisableField = () => {
|
||||
return values.status === 'PUBLISH'
|
||||
const shouldDisableField = (fieldName) => {
|
||||
return values.status === 'PUBLISH' &&
|
||||
![
|
||||
'descriptionShort', 'descriptionLong', 'documentationRequested', 'threshold',
|
||||
'aimedTo', 'criteria', 'docs', 'checklist', 'faq', 'amount', 'amountMin', 'amountMax',
|
||||
'email', 'phoneNumber', 'checkList', 'images'
|
||||
].includes(fieldName)
|
||||
}
|
||||
|
||||
const acceptAllFormats = () => {
|
||||
@@ -219,7 +224,7 @@ const BandoEditFormStep2 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
<UnsavedChangesDetector getValuesFn={getValues}/>
|
||||
<FormFieldRepeaterCriteria
|
||||
data={values}
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('criteria')}
|
||||
setDataFn={setValue}
|
||||
fieldName="criteria"
|
||||
options={criteriaOptions}
|
||||
@@ -238,7 +243,7 @@ const BandoEditFormStep2 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormField
|
||||
type="fileuploadasync"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('docs')}
|
||||
setDataFn={setValue}
|
||||
fieldName="docs"
|
||||
label={__('Documentazione', 'gepafin')}
|
||||
@@ -257,7 +262,7 @@ const BandoEditFormStep2 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormField
|
||||
type="fileuploadasync"
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('images')}
|
||||
setDataFn={setValue}
|
||||
fieldName="images"
|
||||
label={__('Immagine del Bando', 'gepafin')}
|
||||
@@ -273,7 +278,7 @@ const BandoEditFormStep2 = forwardRef(function ({ initialData, getFormErrors, st
|
||||
|
||||
<FormFieldRepeater
|
||||
data={values['checkList']}
|
||||
disabled={shouldDisableField()}
|
||||
disabled={shouldDisableField('checkList')}
|
||||
setDataFn={setValue}
|
||||
fieldName="checkList"
|
||||
options={checklistOptions}
|
||||
|
||||
@@ -112,7 +112,7 @@ const BandoFlowEdit = () => {
|
||||
toast.current.show({
|
||||
severity: 'success',
|
||||
summary: '',
|
||||
detail: __('Il flusso è stato aggiornato corretamente!', 'gepafin')
|
||||
detail: __('Il flusso è stato aggiornato correttamente!', 'gepafin')
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ const BandoForms = () => {
|
||||
toast.current.show({
|
||||
severity: 'success',
|
||||
summary: '',
|
||||
detail: __('Il form è stato aggiornato corretamente!', 'gepafin')
|
||||
detail: __('Il form è stato aggiornato correttamente!', 'gepafin')
|
||||
});
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ const BandoForms = () => {
|
||||
outlined
|
||||
disabled={!selectedForm}
|
||||
onClick={goToEditForm}
|
||||
label={'PUBLISH' === bandoStatus ? __('Mostra', 'gepafin') : __('Modifica', 'gepafin')}
|
||||
label={__('Modifica', 'gepafin')}
|
||||
icon="pi pi-cog" iconPos="right"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@ import { Button } from 'primereact/button';
|
||||
import { Tag } from 'primereact/tag';
|
||||
import BuilderElementProperLabel from '../BuilderElementProperLabel';
|
||||
|
||||
const BuilderElement = ({ id, name, label, index }) => {
|
||||
const BuilderElement = ({ id, name, label, index, bandoStatus }) => {
|
||||
const draggingElementId = useStore().main.draggingElementId();
|
||||
const ref = useRef(null);
|
||||
|
||||
@@ -109,28 +109,10 @@ const BuilderElement = ({ id, name, label, index }) => {
|
||||
</div>
|
||||
<div className="actions">
|
||||
<Button icon="pi pi-cog" onClick={() => openSettings(id)} outlined severity="info"/>
|
||||
<Button icon="pi pi-trash" onClick={() => remove(id)} outlined severity="danger"/>
|
||||
<Button icon="pi pi-trash" disabled={bandoStatus === 'PUBLISH'} onClick={() => remove(id)} outlined severity="danger"/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
/*return (
|
||||
<div ref={ref} className="formBuilder__element" style={{ opacity }} data-handler-id={handlerId}>
|
||||
{draggingId === id
|
||||
? <div className="formBuilder__elementNew"></div>
|
||||
: <>
|
||||
<div className="meta">
|
||||
<Tag value={name} severity="info"/>
|
||||
<BuilderElementProperLabel id={id} defaultLabel={label}/>
|
||||
</div>
|
||||
<div className="actions">
|
||||
<Button icon="pi pi-cog" onClick={() => openSettings(id)} outlined severity="info"/>
|
||||
<Button icon="pi pi-trash" onClick={() => remove(id)} outlined severity="danger"/>
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
</div>
|
||||
)*/
|
||||
}
|
||||
|
||||
export default BuilderElement;
|
||||
@@ -11,7 +11,7 @@ import { Editor } from 'primereact/editor';
|
||||
import { mimeTypes } from '../../../../../../configData';
|
||||
import ElementSettingTableColumns from '../ElementSettingTableColumns';
|
||||
|
||||
const ElementSetting = ({ setting, changeFn, updateDataFn }) => {
|
||||
const ElementSetting = ({ setting, changeFn, updateDataFn, bandoStatus }) => {
|
||||
|
||||
const settingLabels = {
|
||||
label: __('Label', 'gepafin'),
|
||||
@@ -48,6 +48,7 @@ const ElementSetting = ({ setting, changeFn, updateDataFn }) => {
|
||||
return <ElementSettingRepeater
|
||||
value={is(Array, setting.value) ? setting.value : []}
|
||||
name={setting.name}
|
||||
bandoStatus={bandoStatus}
|
||||
setDataFn={updateDataFn}/>
|
||||
} else if (setting.name === 'mime') {
|
||||
return <MultiSelect
|
||||
@@ -75,6 +76,7 @@ const ElementSetting = ({ setting, changeFn, updateDataFn }) => {
|
||||
return <ElementSettingTableColumns
|
||||
value={is(Object, setting.value) ? setting.value : {}}
|
||||
name={setting.name}
|
||||
bandoStatus={bandoStatus}
|
||||
setDataFn={updateDataFn}/>
|
||||
} else {
|
||||
return <InputText id={setting.name} aria-describedby={`${setting.name}-help`}
|
||||
|
||||
@@ -11,7 +11,8 @@ import uniqid from '../../../../../../helpers/uniqid';
|
||||
const ElementSettingRepeater = ({
|
||||
value,
|
||||
name,
|
||||
setDataFn
|
||||
setDataFn,
|
||||
bandoStatus
|
||||
}) => {
|
||||
const [stateFieldData, setStateFieldData] = useState([]);
|
||||
|
||||
@@ -53,10 +54,10 @@ const ElementSettingRepeater = ({
|
||||
{stateFieldData.map((o, i) => <div key={i} className="formElementSettings__repeaterItem">
|
||||
<div className="p-inputgroup flex-1">
|
||||
{properField(o, i)}
|
||||
<Button icon="pi pi-times" className="p-button-danger" onClick={() => removeItem(i)}/>
|
||||
<Button icon="pi pi-times" disabled={bandoStatus === 'PUBLISH'} className="p-button-danger" onClick={() => removeItem(i)}/>
|
||||
</div>
|
||||
</div>)}
|
||||
<Button type="button" outlined label={__('Aggiungi', 'gepafin')} onClick={addNewItem}/>
|
||||
<Button type="button" disabled={bandoStatus === 'PUBLISH'} outlined label={__('Aggiungi', 'gepafin')} onClick={addNewItem}/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -14,7 +14,8 @@ import uniqid from '../../../../../../helpers/uniqid';
|
||||
const ElementSettingTableColumns = ({
|
||||
value,
|
||||
name,
|
||||
setDataFn
|
||||
setDataFn,
|
||||
bandoStatus
|
||||
}) => {
|
||||
const [stateFieldData, setStateFieldData] = useState([]);
|
||||
const [rowsData, setRowsData] = useState([]);
|
||||
@@ -34,7 +35,7 @@ const ElementSettingTableColumns = ({
|
||||
.reduce((acc, cur) => {
|
||||
acc[cur.name] = ''
|
||||
return acc;
|
||||
}, {});
|
||||
}, {});
|
||||
setRowsData([...rowsData, obj]);
|
||||
}
|
||||
|
||||
@@ -87,7 +88,10 @@ const ElementSettingTableColumns = ({
|
||||
<InputText value={item.label} onInput={(e) => onInputChange(e, i)}/>
|
||||
<div className="flex-1">
|
||||
<span>{__('Predefinito?', 'gepafin')}</span>
|
||||
<InputSwitch checked={item.predefined} onChange={(e) => setChecked(e.value, i)}/>
|
||||
<InputSwitch
|
||||
checked={item.predefined}
|
||||
disabled={bandoStatus === 'PUBLISH'}
|
||||
onChange={(e) => setChecked(e.value, i)}/>
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
@@ -118,10 +122,10 @@ const ElementSettingTableColumns = ({
|
||||
{stateFieldData.map((o, i) => <div key={i} className="formElementSettings__repeaterItem">
|
||||
<div className="p-inputgroup flex-1">
|
||||
{properField(o, i)}
|
||||
<Button icon="pi pi-times" className="p-button-danger" onClick={() => removeItem(i)}/>
|
||||
<Button icon="pi pi-times" disabled={bandoStatus === 'PUBLISH'} className="p-button-danger" onClick={() => removeItem(i)}/>
|
||||
</div>
|
||||
</div>)}
|
||||
<Button type="button" outlined label={__('Aggiungi', 'gepafin')} onClick={addNewItem}/>
|
||||
<Button type="button" disabled={bandoStatus === 'PUBLISH'} outlined label={__('Aggiungi', 'gepafin')} onClick={addNewItem}/>
|
||||
</div>
|
||||
{stateFieldData
|
||||
.filter(o => o.predefined)
|
||||
@@ -133,12 +137,16 @@ const ElementSettingTableColumns = ({
|
||||
return <div key={k} className="formElementSettings__repeaterItem">
|
||||
<div className="p-inputgroup flex-1">
|
||||
{properSubField(c, k, o.name)}
|
||||
<Button icon="pi pi-times" className="p-button-danger"
|
||||
<Button icon="pi pi-times"
|
||||
disabled={bandoStatus === 'PUBLISH'}
|
||||
className="p-button-danger"
|
||||
onClick={() => removeRow(k)}/>
|
||||
</div>
|
||||
</div>
|
||||
})}
|
||||
<Button type="button" outlined
|
||||
<Button type="button"
|
||||
outlined
|
||||
disabled={bandoStatus === 'PUBLISH'}
|
||||
label={__('Aggiungi una righa', 'gepafin')}
|
||||
onClick={addNewRow}/>
|
||||
</div>
|
||||
|
||||
@@ -16,8 +16,9 @@ import { InputSwitch } from 'primereact/inputswitch';
|
||||
import ElementSetting from './components/ElementSetting';
|
||||
import { Dropdown } from 'primereact/dropdown';
|
||||
import { MultiSelect } from 'primereact/multiselect';
|
||||
import { dynamicDataOptions } from '../../../../configData';
|
||||
|
||||
const BuilderElementSettings = ({ closeSettingsFn }) => {
|
||||
const BuilderElementSettings = ({ closeSettingsFn, bandoStatus }) => {
|
||||
const elements = useStore().main.formElements();
|
||||
const activeElement = useStore().main.activeElement();
|
||||
const criteriaOptions = useStore().main.bandoCriteria();
|
||||
@@ -162,10 +163,11 @@ const BuilderElementSettings = ({ closeSettingsFn }) => {
|
||||
? settings.map((o) => <ElementSetting
|
||||
key={o.name}
|
||||
setting={o}
|
||||
bandoStatus={bandoStatus}
|
||||
changeFn={onChange}
|
||||
updateDataFn={onUpdateOptions}/>)
|
||||
: null}
|
||||
{['textinput', 'datepicker'].includes(activeElementData.name)
|
||||
{!isNil(dynamicDataOptions[activeElementData.name])
|
||||
? <div className="formElementSettings__field">
|
||||
<label htmlFor="dynamicData">{__('Dati dinamici', 'gepafin')}</label>
|
||||
<Dropdown
|
||||
|
||||
@@ -13,7 +13,7 @@ import BuilderElementSettings from '../BuilderElementSettings';
|
||||
import BuilderDropzone from '../BuilderDropzone';
|
||||
import BlockingOverlay from '../../../../components/BlockingOverlay';
|
||||
|
||||
const FormBuilder = () => {
|
||||
const FormBuilder = ({ bandoStatus }) => {
|
||||
const elements = useStore().main.formElements();
|
||||
const elementItems = useStore().main.elementItems();
|
||||
const activeElement = useStore().main.activeElement();
|
||||
@@ -27,9 +27,10 @@ const FormBuilder = () => {
|
||||
id={field.id}
|
||||
label={field.label}
|
||||
name={field.name}
|
||||
bandoStatus={bandoStatus}
|
||||
/>
|
||||
)
|
||||
}, []);
|
||||
}, [bandoStatus]);
|
||||
|
||||
const renderItem = useCallback((item) => {
|
||||
return (
|
||||
@@ -57,7 +58,7 @@ const FormBuilder = () => {
|
||||
<>
|
||||
<Sidebar visible={!isEmpty(activeElement)} onHide={closeSettings} className="formBuilder__elementSettings">
|
||||
<h2>{__('Impostazioni del campo modulo', 'gepafin')}</h2>
|
||||
{!isEmpty(activeElement) ? <BuilderElementSettings closeSettingsFn={closeSettings}/> : null}
|
||||
{!isEmpty(activeElement) ? <BuilderElementSettings closeSettingsFn={closeSettings} bandoStatus={bandoStatus}/> : null}
|
||||
</Sidebar>
|
||||
<div className="formBuilder">
|
||||
<div className="formBuilder__main">
|
||||
|
||||
@@ -123,7 +123,7 @@ const BandoFormsEdit = () => {
|
||||
toast.current.show({
|
||||
severity: 'success',
|
||||
summary: '',
|
||||
detail: __('Il form è stato aggiornato corretamente!', 'gepafin')
|
||||
detail: __('Il form è stato aggiornato correttamente!', 'gepafin')
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -210,7 +210,6 @@ const BandoFormsEdit = () => {
|
||||
}
|
||||
|
||||
const errFormDeleteCallback = (data) => {
|
||||
console.log('errFormDeleteCallback', data)
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
}
|
||||
|
||||
@@ -223,7 +222,6 @@ const BandoFormsEdit = () => {
|
||||
}
|
||||
|
||||
const errGetElementItemsCallbacks = (data) => {
|
||||
console.log('errGetElementItemsCallbacks', data)
|
||||
storeSet.main.unsetAsyncRequest();
|
||||
}
|
||||
|
||||
@@ -246,9 +244,9 @@ const BandoFormsEdit = () => {
|
||||
|
||||
const getBandoCallback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
setBandoStatus(data.data.status);
|
||||
const criteria = pathOr([], ['data', 'criteria'], data);
|
||||
const criteriaOptions = criteria.map(o => ({value: o.id, label: o.value}));
|
||||
console.log('criteriaOptions', criteriaOptions);
|
||||
storeSet.main.bandoCriteria(criteriaOptions);
|
||||
}
|
||||
}
|
||||
@@ -319,7 +317,7 @@ const BandoFormsEdit = () => {
|
||||
|
||||
<div className="appPageSection">
|
||||
<DndProvider backend={HTML5Backend}>
|
||||
<FormBuilder/>
|
||||
<FormBuilder bandoStatus={bandoStatus}/>
|
||||
</DndProvider>
|
||||
</div>
|
||||
|
||||
@@ -334,7 +332,7 @@ const BandoFormsEdit = () => {
|
||||
label={__('Indietro', 'gepafin')} icon="pi pi-arrow-left" iconPos="left"/>
|
||||
<Button
|
||||
onClick={() => doSave()}
|
||||
disabled={isAsyncRequest || 'PUBLISH' === bandoStatus}
|
||||
disabled={isAsyncRequest}
|
||||
label={__('Salva progressi', 'gepafin')} icon="pi pi-save" iconPos="right"/>
|
||||
<Button
|
||||
outlined
|
||||
|
||||
@@ -87,6 +87,22 @@ const BandoViewBeneficiario = () => {
|
||||
return !isNaN(parsed) ? parsed : 0;
|
||||
}
|
||||
|
||||
const submitBtnLabel = () => {
|
||||
if (applicationObj && applicationObj.id) {
|
||||
return __('Vai alla domanda', 'gepafin');
|
||||
} else {
|
||||
return __('Presenta domanda', 'gepafin');
|
||||
}
|
||||
}
|
||||
|
||||
const submitBtnIcon = () => {
|
||||
if (applicationObj && applicationObj.id) {
|
||||
return 'pi pi-arrow-right';
|
||||
} else {
|
||||
return 'pi pi-save';
|
||||
}
|
||||
}
|
||||
|
||||
const submitApplication = () => {
|
||||
if (data.confidi) {
|
||||
displayConfidiPopup();
|
||||
@@ -231,13 +247,15 @@ const BandoViewBeneficiario = () => {
|
||||
const header = renderHeader();
|
||||
|
||||
useEffect(() => {
|
||||
const bandoId = getBandoId();
|
||||
storeSet.main.setAsyncRequest();
|
||||
BandoService.getBando(bandoId, getBandoCallback, errGetBandoCallback);
|
||||
ApplicationService.getApplications(getApplCallback, errGetApplCallback, [
|
||||
['callId', bandoId],
|
||||
['companyId', chosenCompanyId]
|
||||
])
|
||||
if (!isEmpty(chosenCompanyId) && chosenCompanyId !== 0) {
|
||||
const bandoId = getBandoId();
|
||||
storeSet.main.setAsyncRequest();
|
||||
BandoService.getBando(bandoId, getBandoCallback, errGetBandoCallback);
|
||||
ApplicationService.getApplications(getApplCallback, errGetApplCallback, [
|
||||
['callId', bandoId],
|
||||
['companyId', chosenCompanyId]
|
||||
]);
|
||||
}
|
||||
}, [id, chosenCompanyId]);
|
||||
|
||||
return (
|
||||
@@ -425,8 +443,8 @@ const BandoViewBeneficiario = () => {
|
||||
type="button"
|
||||
disabled={isAsyncRequest || chosenCompanyId === 0}
|
||||
onClick={submitApplication}
|
||||
label={__('Presenta Domanda', 'gepafin')}
|
||||
icon="pi pi-save" iconPos="right"/>
|
||||
label={submitBtnLabel()}
|
||||
icon={submitBtnIcon()} iconPos="right"/>
|
||||
{/*<Button
|
||||
type="button"
|
||||
outlined
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { uniq, isNil } from 'ramda';
|
||||
import { uniq, isEmpty, isNil } from 'ramda';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
// store
|
||||
import { storeGet } from '../../../../store';
|
||||
import { storeGet, useStore } from '../../../../store';
|
||||
|
||||
// api
|
||||
import BandoService from '../../../../service/bando-service';
|
||||
@@ -24,6 +24,7 @@ import set404FromErrorResponse from '../../../../helpers/set404FromErrorResponse
|
||||
|
||||
|
||||
const LatestBandiTable = () => {
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
const [items, setItems] = useState(null);
|
||||
const [filters, setFilters] = useState(null);
|
||||
const [loading, setLoading] = useState(false);
|
||||
@@ -192,16 +193,10 @@ const LatestBandiTable = () => {
|
||||
onClick={() => addToFavourites(rowData.id, rowData.preferredCallId)}>
|
||||
<i className="pi pi-heart" style={{ fontSize: '1rem' }}></i>
|
||||
</button>
|
||||
{rowData.confidi
|
||||
? <Link to={`/bandi/${rowData.id}`}>
|
||||
<Button severity="info" label={__('Mostra', 'gepafin')} icon="pi pi-eye" size="small"
|
||||
iconPos="right"/>
|
||||
</Link>
|
||||
: <Link to={`/bandi/${rowData.id}`}>
|
||||
<Button severity="info" label={__('Partecipa', 'gepafin')} icon="pi pi-arrow-right" size="small"
|
||||
iconPos="right"/>
|
||||
</Link>}
|
||||
</div>
|
||||
<Link to={`/bandi/${rowData.id}`}>
|
||||
<Button severity="info" label={__('Partecipa', 'gepafin')} icon="pi pi-arrow-right" size="small"
|
||||
iconPos="right"/>
|
||||
</Link></div>
|
||||
}
|
||||
|
||||
const header = renderHeader();
|
||||
@@ -224,9 +219,10 @@ const LatestBandiTable = () => {
|
||||
style={{ minWidth: '8rem' }}
|
||||
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||
<Column field="status" header={__('Stato', 'gepafin')}
|
||||
style={{ minWidth: '7rem' }} body={statusBodyTemplate}/>
|
||||
<Column header={__('Azioni', 'gepafin')}
|
||||
body={actionsBodyTemplate}/>
|
||||
style={{ minWidth: '7rem' }} body={statusBodyTemplate} />
|
||||
{!isEmpty(chosenCompanyId) && chosenCompanyId !== 0
|
||||
? <Column header={__('Azioni', 'gepafin')}
|
||||
body={actionsBodyTemplate}/> : null}
|
||||
</DataTable>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { uniq, is } from 'ramda';
|
||||
import { uniq, is, isEmpty } from 'ramda';
|
||||
|
||||
// tools
|
||||
import getBandoLabel from '../../../../helpers/getBandoLabel';
|
||||
@@ -36,11 +36,13 @@ const MyLatestSubmissionsTable = () => {
|
||||
const [statuses, setStatuses] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
setLocalAsyncRequest(true);
|
||||
ApplicationService.getApplications(getApplCallback, errGetApplCallback, [
|
||||
['companyId', chosenCompanyId],
|
||||
['statuses', ['DRAFT', 'AWAITING', 'READY']]
|
||||
])
|
||||
if (!isEmpty(chosenCompanyId) && chosenCompanyId !== 0) {
|
||||
setLocalAsyncRequest(true);
|
||||
ApplicationService.getApplications(getApplCallback, errGetApplCallback, [
|
||||
['companyId', chosenCompanyId],
|
||||
['statuses', ['DRAFT', 'AWAITING', 'READY']]
|
||||
]);
|
||||
}
|
||||
}, [chosenCompanyId]);
|
||||
|
||||
const getApplCallback = (data) => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { head, pathOr } from 'ramda';
|
||||
import { __, sprintf } from '@wordpress/i18n';
|
||||
import { Link, useNavigate } from 'react-router-dom';
|
||||
import { head, isEmpty, pathOr } from 'ramda';
|
||||
import NumberFlow from '@number-flow/react';
|
||||
|
||||
// store
|
||||
@@ -35,7 +35,8 @@ const DashboardBeneficiario = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const errGetStats = () => {}
|
||||
const errGetStats = () => {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const existingCompany = head(companies.filter(o => o.id === chosenCompanyId));
|
||||
@@ -45,7 +46,7 @@ const DashboardBeneficiario = () => {
|
||||
}
|
||||
}, [companies, chosenCompanyId]);
|
||||
|
||||
return(
|
||||
return (
|
||||
<div className="appPage">
|
||||
<div className="appPage__pageHeader">
|
||||
<h1>{__('Dashboard', 'gepafin')}</h1>
|
||||
@@ -61,21 +62,21 @@ const DashboardBeneficiario = () => {
|
||||
<span><NumberFlow
|
||||
value={getStatValue('numberOfApplications', 0)}
|
||||
format={{ notation: 'compact' }}
|
||||
locales="it-IT" /></span>
|
||||
locales="it-IT"/></span>
|
||||
</div>
|
||||
<div className="statsBigBadges__gridItem">
|
||||
<span>{__('Bandi osservati', 'gepafin')}</span>
|
||||
<span><NumberFlow
|
||||
value={getStatValue('numberOfCalls', 0)}
|
||||
format={{ notation: 'compact' }}
|
||||
locales="it-IT" /></span>
|
||||
locales="it-IT"/></span>
|
||||
</div>
|
||||
<div className="statsBigBadges__gridItem">
|
||||
<span>{__('Documenti da integrare', 'gepafin')}</span>
|
||||
<span><NumberFlow
|
||||
value={getStatValue('numberOfIntegratedDocuments', 0)}
|
||||
format={{ notation: 'compact' }}
|
||||
locales="it-IT" /></span>
|
||||
locales="it-IT"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -89,6 +90,19 @@ const DashboardBeneficiario = () => {
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
{isEmpty(chosenCompanyId) || chosenCompanyId === 0
|
||||
? <>
|
||||
<div className="appPageSection__message warning">
|
||||
<i className="pi pi-exclamation-triangle"></i>
|
||||
<span className="summary">{__('Attenzione', 'gepafin')}</span>
|
||||
<span>
|
||||
{__('Per applicare ai bandi devi Registare un Azienda clicca', 'gepafin')}
|
||||
<Link to={`/agguingi-azienda`} style={{marginLeft: '0.5ch'}}>{__('qua', 'gepafin')}</Link>
|
||||
</span>
|
||||
</div>
|
||||
<div className="appPage__spacer"></div>
|
||||
</> : null}
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Bandi disponibili', 'gepafin')}</h2>
|
||||
<LatestBandiTable/>
|
||||
|
||||
@@ -329,6 +329,10 @@ const DomandaEditPreInstructor = () => {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="appPageSection">
|
||||
|
||||
</div>
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Punteggi di valutazione', 'gepafin')}</h2>
|
||||
{data.criteria
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { is, uniq } from 'ramda';
|
||||
import { is, isEmpty, uniq } from 'ramda';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
// store
|
||||
@@ -36,11 +36,13 @@ const BeneficiarioDomandeTable = () => {
|
||||
const [statuses, setStatuses] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
setLocalAsyncRequest(true);
|
||||
ApplicationService.getApplications(getApplCallback, errGetApplCallback, [
|
||||
['companyId', chosenCompanyId],
|
||||
['statuses', ['SOCCORSO', 'APPROVED', 'REJECTED', 'EVALUATION']]
|
||||
])
|
||||
if (!isEmpty(chosenCompanyId) && chosenCompanyId !== 0) {
|
||||
setLocalAsyncRequest(true);
|
||||
ApplicationService.getApplications(getApplCallback, errGetApplCallback, [
|
||||
['companyId', chosenCompanyId],
|
||||
['statuses', ['SOCCORSO', 'APPROVED', 'REJECTED', 'EVALUATION']]
|
||||
]);
|
||||
}
|
||||
}, [chosenCompanyId]);
|
||||
|
||||
const getApplCallback = (data) => {
|
||||
|
||||
Reference in New Issue
Block a user