- updated contract functionality;
This commit is contained in:
@@ -78,10 +78,10 @@ const getBandoLabel = (status) => {
|
||||
return __('Respinto Tec-Fin', 'gepafin');
|
||||
|
||||
case 'AWAITING_CONTRACT':
|
||||
return __('Awaiting contract', 'gepafin');
|
||||
return __('In attesa di contratto', 'gepafin');
|
||||
|
||||
case 'CONTRACT_SIGNED':
|
||||
return __('Contract signed', 'gepafin');
|
||||
return __('Contratto firmato', 'gepafin');
|
||||
|
||||
default:
|
||||
return '';
|
||||
|
||||
@@ -132,7 +132,7 @@ const DashboardBeneficiario = () => {
|
||||
|
||||
const getUploadApplicationContractCallback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
//setData(getFormattedData(data.data));
|
||||
setContractsData(null);
|
||||
if (toast.current && data.message) {
|
||||
toast.current.show({
|
||||
severity: 'success',
|
||||
@@ -185,7 +185,7 @@ const DashboardBeneficiario = () => {
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 10, width: '100%' }}>
|
||||
<div style={{ display: 'flex', gap: 10 }}>
|
||||
<i className="pi pi-info-circle"></i>
|
||||
<span className="summary">{__('You must upload contract for applications:', 'gepafin')}</span>
|
||||
<span className="summary">{__('Contratti in attesa:', 'gepafin')}</span>
|
||||
</div>
|
||||
<ul>
|
||||
{contractsData.map(o => <li key={o.id}>
|
||||
@@ -313,7 +313,7 @@ const DashboardBeneficiario = () => {
|
||||
style={{ maxWidth: '600px', width: '100%' }}
|
||||
onHide={hideContractDialog}>
|
||||
<div className="appForm__field">
|
||||
<p>The administration requires you to download these documents:</p>
|
||||
<p>Scarica il contratto:</p>
|
||||
<ul>
|
||||
{contractFormData?.instructorDocuments
|
||||
? contractFormData.instructorDocuments.map(o => <li key={o.id}>
|
||||
@@ -321,18 +321,18 @@ const DashboardBeneficiario = () => {
|
||||
</li>)
|
||||
: null}
|
||||
</ul>
|
||||
<p>Sign them digitally and upload them back in the form below:</p>
|
||||
<p>Firmalo digitalmente e ricaricalo</p>
|
||||
</div>
|
||||
<div className="appForm__field">
|
||||
<label
|
||||
className={classNames({ 'p-error': !contractFormData.files || isEmpty(contractFormData.files) })}>
|
||||
{__('Files', 'gepafin')}*
|
||||
{__('Files', 'gepafin')}* (p7m)
|
||||
</label>
|
||||
<FileUpload
|
||||
ref={contractFormFilesRef}
|
||||
name="files[]"
|
||||
multiple
|
||||
accept={mimeTypes.map(o => o.code).join(',')}
|
||||
accept='.p7m,application/pkcs7-mime,application/x-pkcs7-mime'
|
||||
maxFileSize={defaultMaxFileSize}
|
||||
auto={false}
|
||||
customUpload={true}
|
||||
|
||||
@@ -23,7 +23,7 @@ import MyLatestSubmissionsTableAsync from '../DashboardBeneficiario/components/M
|
||||
import LatestBandiBeneficiarioTableAsync from '../DashboardBeneficiario/components/LatestBandiBeneficiarioTableAsync';
|
||||
import { classNames } from 'primereact/utils';
|
||||
import { FileUpload } from 'primereact/fileupload';
|
||||
import { defaultMaxFileSize, mimeTypes } from '../../configData';
|
||||
import { defaultMaxFileSize } from '../../configData';
|
||||
import { Dialog } from 'primereact/dialog';
|
||||
import { Toast } from 'primereact/toast';
|
||||
|
||||
@@ -185,7 +185,7 @@ const DashboardBeneficiarioConfidi = () => {
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 10, width: '100%' }}>
|
||||
<div style={{ display: 'flex', gap: 10 }}>
|
||||
<i className="pi pi-info-circle"></i>
|
||||
<span className="summary">{__('You must upload contract for applications:', 'gepafin')}</span>
|
||||
<span className="summary">{__('Contratti in attesa:', 'gepafin')}</span>
|
||||
</div>
|
||||
<ul>
|
||||
{contractsData.map(o => <li key={o.id}>
|
||||
@@ -313,7 +313,7 @@ const DashboardBeneficiarioConfidi = () => {
|
||||
style={{ maxWidth: '600px', width: '100%' }}
|
||||
onHide={hideContractDialog}>
|
||||
<div className="appForm__field">
|
||||
<p>The administration requires you to download these documents:</p>
|
||||
<p>Scarica il contratto:</p>
|
||||
<ul>
|
||||
{contractFormData?.instructorDocuments
|
||||
? contractFormData.instructorDocuments.map(o => <li key={o.id}>
|
||||
@@ -321,18 +321,18 @@ const DashboardBeneficiarioConfidi = () => {
|
||||
</li>)
|
||||
: null}
|
||||
</ul>
|
||||
<p>Sign them digitally and upload them back in the form below:</p>
|
||||
<p>Firmalo digitalmente e ricaricalo</p>
|
||||
</div>
|
||||
<div className="appForm__field">
|
||||
<label
|
||||
className={classNames({ 'p-error': !contractFormData.files || isEmpty(contractFormData.files) })}>
|
||||
{__('Files', 'gepafin')}*
|
||||
{__('Files', 'gepafin')}* (p7m)
|
||||
</label>
|
||||
<FileUpload
|
||||
ref={contractFormFilesRef}
|
||||
name="files[]"
|
||||
multiple
|
||||
accept={mimeTypes.map(o => o.code).join(',')}
|
||||
accept='.p7m,application/pkcs7-mime,application/x-pkcs7-mime'
|
||||
maxFileSize={defaultMaxFileSize}
|
||||
auto={false}
|
||||
customUpload={true}
|
||||
|
||||
@@ -31,9 +31,15 @@ import SoccorsoResendEmails from '../../../SoccorsoEditPreInstructor/components/
|
||||
|
||||
const APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const DomandeTablePreInstructorAsync = ({ userId = null, statuses = [],
|
||||
applicationStatuses = ['EVALUATION', 'SOCCORSO', 'NDG', 'APPOINTMENT', 'ADMISSIBLE',
|
||||
'AWAITING_TECHNICAL_EVALUATION', 'TECHNICAL_EVALUATION']}) => {
|
||||
const DomandeTablePreInstructorAsync = ({
|
||||
userId = null,
|
||||
statuses = [],
|
||||
applicationStatuses = [
|
||||
'EVALUATION', 'SOCCORSO', 'NDG', 'APPOINTMENT', 'ADMISSIBLE',
|
||||
'AWAITING_TECHNICAL_EVALUATION', 'TECHNICAL_EVALUATION',
|
||||
'AWAITING_CONTRACT', 'CONTRACT_SIGNED'
|
||||
]
|
||||
}) => {
|
||||
const navigate = useNavigate();
|
||||
const userData = useStoreValue('userData');
|
||||
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||
|
||||
@@ -1078,7 +1078,11 @@ const DomandaEditInstructorManager = () => {
|
||||
|
||||
const getUploadApplicationContractCallback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
//setData(getFormattedData(data.data));
|
||||
setData((prev) => ({
|
||||
...prev,
|
||||
applicationStatus: 'AWAITING_CONTRACT',
|
||||
contract: data.data
|
||||
}));
|
||||
if (toast.current && data.message) {
|
||||
toast.current.show({
|
||||
severity: 'success',
|
||||
|
||||
@@ -1078,7 +1078,11 @@ const DomandaEditPreInstructor = () => {
|
||||
|
||||
const getUploadApplicationContractCallback = (data) => {
|
||||
if (data.status === 'SUCCESS') {
|
||||
//setData(getFormattedData(data.data));
|
||||
setData((prev) => ({
|
||||
...prev,
|
||||
applicationStatus: 'AWAITING_CONTRACT',
|
||||
contract: data.data
|
||||
}));
|
||||
if (toast.current && data.message) {
|
||||
toast.current.show({
|
||||
severity: 'success',
|
||||
|
||||
@@ -44,7 +44,7 @@ const AllDomandeBeneficiarioTableAsync = ({ statuses }) => {
|
||||
companyName: { value: null, matchMode: 'contains' },
|
||||
submissionDate: { value: null, matchMode: 'dateIs' },
|
||||
assignedUserName: { value: null, matchMode: 'equals' },
|
||||
status: { value: null, matchMode: 'equals' }
|
||||
applicationStatus: { value: null, matchMode: 'equals' }
|
||||
}
|
||||
});
|
||||
|
||||
@@ -122,13 +122,14 @@ const AllDomandeBeneficiarioTableAsync = ({ statuses }) => {
|
||||
options.filterCallback(e.value, options.index)
|
||||
const filters = { ...lazyState.filters };
|
||||
if (e.value) {
|
||||
filters['status'] = { value: e.value, matchMode: 'equals' };
|
||||
filters['applicationStatus'] = { value: e.value, matchMode: 'equals' };
|
||||
} else {
|
||||
delete filters['status'];
|
||||
delete filters['applicationStatus'];
|
||||
}
|
||||
setLazyState({ ...lazyState, filters, first: 0 });
|
||||
}}
|
||||
itemTemplate={statusItemTemplate} placeholder={translationStrings.selectOneLabel} className="p-column-filter"/>;
|
||||
itemTemplate={statusItemTemplate} placeholder={translationStrings.selectOneLabel}
|
||||
className="p-column-filter"/>;
|
||||
};
|
||||
|
||||
const dateFilterTemplate = (options) => {
|
||||
@@ -182,7 +183,7 @@ const AllDomandeBeneficiarioTableAsync = ({ statuses }) => {
|
||||
filterMatchModeOptions={translationStrings.dateFilterOptions}
|
||||
style={{ minWidth: '8rem' }}
|
||||
body={dateAppliedBodyTemplate}/>
|
||||
<Column field="status" header={__('Stato', 'gepafin')}
|
||||
<Column field="applicationStatus" header={__('Stato', 'gepafin')}
|
||||
filterElement={statusFilterTemplate} filter
|
||||
filterMatchModeOptions={translationStrings.statusFilterOptions}
|
||||
style={{ minWidth: '8rem' }}
|
||||
|
||||
@@ -23,8 +23,10 @@ const DomandeBeneficiario = () => {
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
<div className="appPageSection">
|
||||
<AllDomandeBeneficiarioTableAsync statuses={['SOCCORSO', 'APPROVED', 'REJECTED', 'EVALUATION', 'SUBMIT',
|
||||
'APPOINTMENT', 'NDG', 'ADMISSIBLE', 'AWAITING_TECHNICAL_EVALUATION', 'TECHNICAL_EVALUATION']}/>
|
||||
<AllDomandeBeneficiarioTableAsync
|
||||
statuses={['SOCCORSO', 'APPROVED', 'REJECTED', 'EVALUATION', 'SUBMIT',
|
||||
'APPOINTMENT', 'NDG', 'ADMISSIBLE', 'AWAITING_TECHNICAL_EVALUATION', 'TECHNICAL_EVALUATION',
|
||||
'AWAITING_CONTRACT', 'CONTRACT_SIGNED']}/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user