- added logic for confidi bando;
This commit is contained in:
@@ -113,9 +113,14 @@ const AllBandiAccordion = () => {
|
|||||||
<div className="p-3">
|
<div className="p-3">
|
||||||
{renderHtmlContent(data.descriptionShort)}
|
{renderHtmlContent(data.descriptionShort)}
|
||||||
<p>{__('Scadenza', 'gepafin')}: {getDateFromISOstring(data.dates[1])}</p>
|
<p>{__('Scadenza', 'gepafin')}: {getDateFromISOstring(data.dates[1])}</p>
|
||||||
<Button onClick={() => goToBandoPage(data.id)} severity="info">
|
{!data.confidi
|
||||||
|
? <Button onClick={() => goToBandoPage(data.id)} severity="info">
|
||||||
{__('Partecipa', 'gepafin')}
|
{__('Partecipa', 'gepafin')}
|
||||||
</Button>
|
</Button> : null}
|
||||||
|
{data.confidi
|
||||||
|
? <Button onClick={() => goToBandoPage(data.id)} severity="info">
|
||||||
|
{__('Mostra', 'gepafin')}
|
||||||
|
</Button> : null}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -379,6 +379,13 @@ const BandoViewBeneficiario = () => {
|
|||||||
</>
|
</>
|
||||||
: null}
|
: null}
|
||||||
|
|
||||||
|
{data.confidi
|
||||||
|
? <>
|
||||||
|
<Message severity="error"
|
||||||
|
text={__('Non sei abilitato a partecipare a questo Bando', 'gepafin')}/>
|
||||||
|
</>
|
||||||
|
: null}
|
||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<h2>{__('Download Documenti', 'gepafin')}</h2>
|
<h2>{__('Download Documenti', 'gepafin')}</h2>
|
||||||
<div className="appPageSection__actions">
|
<div className="appPageSection__actions">
|
||||||
@@ -391,13 +398,14 @@ const BandoViewBeneficiario = () => {
|
|||||||
icon="pi pi-download" iconPos="right"/>*/}
|
icon="pi pi-download" iconPos="right"/>*/}
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
|
disabled={data.confidi}
|
||||||
outlined
|
outlined
|
||||||
onClick={scaricaModulistica}
|
onClick={scaricaModulistica}
|
||||||
label={__('Scarica Bando Completo e Modulistica', 'gepafin')}
|
label={__('Scarica Bando Completo e Modulistica', 'gepafin')}
|
||||||
icon="pi pi-download" iconPos="right"/>
|
icon="pi pi-download" iconPos="right"/>
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={isAsyncRequest || chosenCompanyId === 0}
|
disabled={isAsyncRequest || chosenCompanyId === 0 || data.confidi}
|
||||||
onClick={submitApplication}
|
onClick={submitApplication}
|
||||||
label={__('Presenta Domanda', 'gepafin')}
|
label={__('Presenta Domanda', 'gepafin')}
|
||||||
icon="pi pi-save" iconPos="right"/>
|
icon="pi pi-save" iconPos="right"/>
|
||||||
|
|||||||
@@ -89,9 +89,18 @@ const LatestBandiTable = () => {
|
|||||||
const initFilters = () => {
|
const initFilters = () => {
|
||||||
setFilters({
|
setFilters({
|
||||||
global: { value: null, matchMode: FilterMatchMode.CONTAINS },
|
global: { value: null, matchMode: FilterMatchMode.CONTAINS },
|
||||||
name: { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] },
|
name: {
|
||||||
start_date: { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }] },
|
operator: FilterOperator.AND,
|
||||||
end_date: { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }] },
|
constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }]
|
||||||
|
},
|
||||||
|
start_date: {
|
||||||
|
operator: FilterOperator.AND,
|
||||||
|
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
||||||
|
},
|
||||||
|
end_date: {
|
||||||
|
operator: FilterOperator.AND,
|
||||||
|
constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }]
|
||||||
|
},
|
||||||
status: { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] }
|
status: { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] }
|
||||||
});
|
});
|
||||||
setGlobalFilterValue('');
|
setGlobalFilterValue('');
|
||||||
@@ -100,10 +109,12 @@ const LatestBandiTable = () => {
|
|||||||
const renderHeader = () => {
|
const renderHeader = () => {
|
||||||
return (
|
return (
|
||||||
<div className="appTableHeader">
|
<div className="appTableHeader">
|
||||||
<Button type="button" icon="pi pi-filter-slash" label={__('Pulisci', 'gepafin')} outlined onClick={clearFilter} />
|
<Button type="button" icon="pi pi-filter-slash" label={__('Pulisci', 'gepafin')} outlined
|
||||||
|
onClick={clearFilter}/>
|
||||||
<IconField iconPosition="left">
|
<IconField iconPosition="left">
|
||||||
<InputIcon className="pi pi-search"/>
|
<InputIcon className="pi pi-search"/>
|
||||||
<InputText value={globalFilterValue} onChange={onGlobalFilterChange} placeholder={__('Cerca', 'gepafin')} />
|
<InputText value={globalFilterValue} onChange={onGlobalFilterChange}
|
||||||
|
placeholder={__('Cerca', 'gepafin')}/>
|
||||||
</IconField>
|
</IconField>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -118,7 +129,8 @@ const LatestBandiTable = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const dateFilterTemplate = (options) => {
|
const dateFilterTemplate = (options) => {
|
||||||
return <Calendar value={options.value} onChange={(e) => options.filterCallback(e.value, options.index)} dateFormat="mm/dd/yy" placeholder="mm/dd/yyyy" mask="99/99/9999" />;
|
return <Calendar value={options.value} onChange={(e) => options.filterCallback(e.value, options.index)}
|
||||||
|
dateFormat="mm/dd/yy" placeholder="mm/dd/yyyy" mask="99/99/9999"/>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const balanceFilterTemplate = (options) => {
|
const balanceFilterTemplate = (options) => {
|
||||||
@@ -130,7 +142,10 @@ const LatestBandiTable = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const statusFilterTemplate = (options) => {
|
const statusFilterTemplate = (options) => {
|
||||||
return <Dropdown value={options.value} options={statuses} onChange={(e) => options.filterCallback(e.value, options.index)} itemTemplate={statusItemTemplate} placeholder="Select One" className="p-column-filter" showClear />;
|
return <Dropdown value={options.value} options={statuses}
|
||||||
|
onChange={(e) => options.filterCallback(e.value, options.index)}
|
||||||
|
itemTemplate={statusItemTemplate} placeholder="Select One" className="p-column-filter"
|
||||||
|
showClear/>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const statusItemTemplate = (option) => {
|
const statusItemTemplate = (option) => {
|
||||||
@@ -138,8 +153,13 @@ const LatestBandiTable = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const actionsBodyTemplate = (rowData) => {
|
const actionsBodyTemplate = (rowData) => {
|
||||||
return <Link to={`/bandi/${rowData.id}`}>
|
return rowData.confidi
|
||||||
<Button severity="info" label={__('Partecipa', 'gepafin')} icon="pi pi-arrow-right" size="small" iconPos="right" />
|
? <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>
|
</Link>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ const MyLatestSubmissionsTable = () => {
|
|||||||
{'DRAFT' === rowData.status
|
{'DRAFT' === rowData.status
|
||||||
? <Button severity="info" label={__('Modifica', 'gepafin')} icon="pi pi-pencil" size="small"
|
? <Button severity="info" label={__('Modifica', 'gepafin')} icon="pi pi-pencil" size="small"
|
||||||
iconPos="right"/>
|
iconPos="right"/>
|
||||||
: <Button severity="info" label={__('View', 'gepafin')} icon="pi pi-eye" size="small"
|
: <Button severity="info" label={__('Mostra', 'gepafin')} icon="pi pi-eye" size="small"
|
||||||
iconPos="right"/>}
|
iconPos="right"/>}
|
||||||
</Link>
|
</Link>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user