Merge branch 'develop' of github.com:Kitzanos/GEPAFIN-FE into develop

This commit is contained in:
Vitalii Kiiko
2025-05-13 10:19:50 +02:00
10 changed files with 319 additions and 117 deletions

View File

@@ -22,6 +22,7 @@ import ProperBandoLabel from '../../../../components/ProperBandoLabel';
import { Dropdown } from 'primereact/dropdown';
import { Tag } from 'primereact/tag';
import { Calendar } from 'primereact/calendar';
import SoccorsoResendEmails from '../../../SoccorsoEditPreInstructor/components/SoccorsoResendEmails';
const SoccorsiPreInstructorTableAsync = ({ userId = null }) => {
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
@@ -94,10 +95,25 @@ const SoccorsiPreInstructorTableAsync = ({ userId = null }) => {
});
};
const updateRowData = useCallback((id, updateResponse) => {
const newItems = items.map((o) => {
if (o.id === id) {
o.emailSendResponse = updateResponse;
}
return o;
})
setItems(newItems);
}, [items]);
const actionsBodyTemplate = (rowData) => {
return <Link to={`/domande/${rowData.applicationId}/soccorso/${rowData.id}`}>
<Button severity="info" label={__('Dettagli', 'gepafin')} size="small"/>
</Link>
return <div className="appPageSection__tableActions lessGap">
<Link to={`/domande/${rowData.applicationId}/soccorso/${rowData.id}`}>
<Button severity="info" label={__('Dettagli', 'gepafin')} size="small"/>
</Link>
<SoccorsoResendEmails
emailsData={rowData.emailSendResponse}
setDataEmailsSoccorso={(updateResponse) => updateRowData(rowData.id, updateResponse)}/>
</div>
}
const statusBodyTemplate = (rowData) => {