Merge pull request #46 from Kitzanos/noemi

Added button 're-admit' for previously rejected applications.
This commit is contained in:
Vitalii Kiiko
2025-05-07 11:19:42 +02:00
committed by GitHub
2 changed files with 106 additions and 91 deletions

View File

@@ -57,6 +57,7 @@
},
"scripts": {
"start": "GENERATE_SOURCEMAP=false react-scripts start",
"start2": "react-scripts start",
"start:dev": "cp environments/dev/* public/loaded-files && rm public/loaded-files/dev.env && cp environments/dev/dev.env .env && PORT=8000 react-scripts start --mode development",
"start:prod": "cp environments/prod/* public/loaded-files && rm public/loaded-files/prod.env && cp environments/prod/prod.env .env && react-scripts start --mode production",
"build": "react-scripts build",

View File

@@ -131,6 +131,7 @@ const DomandeTablePreInstructorAsync = ({ userId = null, statuses = [] }) => {
};
const actionsBodyTemplate = (rowData) => {
console.log('status', rowData.status)
if (rowData.status === 'AWAITING') {
return <Button
severity="info"
@@ -143,9 +144,22 @@ const DomandeTablePreInstructorAsync = ({ userId = null, statuses = [] }) => {
const label = ['OPEN', 'SOCCORSO'].includes(rowData.status) && userData.id === rowData.userId
? __('Valuta', 'gepafin')
: __('Mostra', 'gepafin');
return <Link to={`/domande/${rowData.applicationId}`}>
return (
<div className="appPageSection__tableActions lessGap">
<Link to={`/domande/${rowData.applicationId}`}>
<Button severity="info" label={label} icon="pi pi-eye" size="small" iconPos="right"/>
</Link>
{rowData.applicationStatus === 'REJECTED' && (
<Button
severity='success'
label={__('Riammetti', 'gepafin')}
icon='pi pi-arrow-circle-up'
size="small"
iconPos="right"
/>
)}
</div>
)
}
}