- 'resend emails' functionality - added role based access;
- fixed issue with displaying for instructor manager related amendments;
This commit is contained in:
@@ -22,6 +22,7 @@ import { Dropdown } from 'primereact/dropdown';
|
||||
import { Tag } from 'primereact/tag';
|
||||
import { Calendar } from 'primereact/calendar';
|
||||
import getQueryParamsForPaginatedEndpoint from '../../../../helpers/getQueryParamsForPaginatedEndpoint';
|
||||
import SoccorsoResendEmails from '../../../SoccorsoEditPreInstructor/components/SoccorsoResendEmails';
|
||||
|
||||
const SoccorsiInstructorManagerMioTableAsync = ({ userId = null }) => {
|
||||
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||
@@ -94,10 +95,25 @@ const SoccorsiInstructorManagerMioTableAsync = ({ 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={`/mie-domande/${rowData.applicationId}/soccorso/${rowData.id}`}>
|
||||
<Button severity="info" label={__('Dettagli', 'gepafin')} size="small"/>
|
||||
</Link>
|
||||
return <div className="appPageSection__tableActions lessGap">
|
||||
<Link to={`/mie-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) => {
|
||||
|
||||
Reference in New Issue
Block a user