Merge branch 'develop' into feature/65-favourite-call
This commit is contained in:
@@ -101,10 +101,12 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => {
|
|||||||
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>
|
||||||
);
|
);
|
||||||
@@ -119,7 +121,8 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
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 statusBodyTemplate = (rowData) => {
|
const statusBodyTemplate = (rowData) => {
|
||||||
@@ -127,14 +130,20 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const actionsBodyTemplate = (rowData) => {
|
const actionsBodyTemplate = (rowData) => {
|
||||||
return openDialogFn
|
return <>
|
||||||
|
{openDialogFn
|
||||||
? <Button severity="info"
|
? <Button severity="info"
|
||||||
onClick={() => openDialogFn(rowData.id)}
|
onClick={() => openDialogFn(rowData.id)}
|
||||||
label={__('Assegnare', 'gepafin')}
|
label={__('Assegnare', 'gepafin')}
|
||||||
icon="pi pi-pencil" size="small" iconPos="right"/>
|
icon="pi pi-pencil" size="small" iconPos="right"/>
|
||||||
: <Link to={'/domande'}>
|
: <Link to={'/domande'}>
|
||||||
<Button severity="info" label={__('Gestire', 'gepafin')} size="small"/>
|
<Button severity="info" label={__('Gestire', 'gepafin')} size="small"/>
|
||||||
|
</Link>}
|
||||||
|
<Link to={`/domande/${rowData.id}`}>
|
||||||
|
<Button severity="info" label={__('Anteprima', 'gepafin')} icon="pi pi-eye" size="small"
|
||||||
|
iconPos="right"/>
|
||||||
</Link>
|
</Link>
|
||||||
|
</>
|
||||||
}
|
}
|
||||||
|
|
||||||
const header = renderHeader();
|
const header = renderHeader();
|
||||||
@@ -163,8 +172,8 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => {
|
|||||||
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column field="status" header={__('Stato', 'gepafin')}
|
<Column field="status" header={__('Stato', 'gepafin')}
|
||||||
style={{ minWidth: '8rem' }} body={statusBodyTemplate}/>
|
style={{ minWidth: '8rem' }} body={statusBodyTemplate}/>
|
||||||
{/*<Column header={__('Azioni', 'gepafin')}
|
<Column header={__('Azioni', 'gepafin')}
|
||||||
body={actionsBodyTemplate}/>*/}
|
body={actionsBodyTemplate}/>
|
||||||
</DataTable>
|
</DataTable>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user