- updates to teh flow;
This commit is contained in:
@@ -134,7 +134,9 @@ const DomandaBeneficiario = () => {
|
|||||||
});
|
});
|
||||||
return acc;
|
return acc;
|
||||||
}, []);
|
}, []);
|
||||||
const newAmendDocs = formValues.amendmentDocuments.map(o => o.id).join(',');
|
const newAmendDocs = formValues.amendmentDocuments
|
||||||
|
? formValues.amendmentDocuments.map(o => o.id).join(',')
|
||||||
|
: '';
|
||||||
|
|
||||||
const submitData = {
|
const submitData = {
|
||||||
applicationFormFields: newFormValues,
|
applicationFormFields: newFormValues,
|
||||||
@@ -340,7 +342,7 @@ const DomandaBeneficiario = () => {
|
|||||||
defaultValue={formInitialData[o.fieldId] ? formInitialData[o.fieldId] : []}
|
defaultValue={formInitialData[o.fieldId] ? formInitialData[o.fieldId] : []}
|
||||||
accept={[]}
|
accept={[]}
|
||||||
source="AMENDMENT"
|
source="AMENDMENT"
|
||||||
sourceId={data.applicationId}
|
sourceId={data.id}
|
||||||
multiple={true}
|
multiple={true}
|
||||||
/>
|
/>
|
||||||
}) : null}
|
}) : null}
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
import React, { useEffect, useRef, useState } from 'react';
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
import { isEmpty } from 'ramda';
|
import { isEmpty, pathOr, isNil } from 'ramda';
|
||||||
import { wrap } from 'object-path-immutable';
|
import { wrap } from 'object-path-immutable';
|
||||||
|
|
||||||
|
// store
|
||||||
|
import AppointmentService from '../../../../service/appointment-service';
|
||||||
|
|
||||||
|
// tools
|
||||||
|
import set404FromErrorResponse from '../../../../helpers/set404FromErrorResponse';
|
||||||
|
|
||||||
// components
|
// components
|
||||||
import { Button } from 'primereact/button';
|
import { Button } from 'primereact/button';
|
||||||
import { Dialog } from 'primereact/dialog';
|
import { Dialog } from 'primereact/dialog';
|
||||||
@@ -11,14 +17,11 @@ import { Dropdown } from 'primereact/dropdown';
|
|||||||
import { classNames } from 'primereact/utils';
|
import { classNames } from 'primereact/utils';
|
||||||
import { InputSwitch } from 'primereact/inputswitch';
|
import { InputSwitch } from 'primereact/inputswitch';
|
||||||
import { InputText } from 'primereact/inputtext';
|
import { InputText } from 'primereact/inputtext';
|
||||||
|
|
||||||
import { classificationType, protocolType } from '../../../../configData';
|
|
||||||
import AppointmentService from '../../../../service/appointment-service';
|
|
||||||
import set404FromErrorResponse from '../../../../helpers/set404FromErrorResponse';
|
|
||||||
import { storeSet } from '../../../../store';
|
|
||||||
import { Toast } from 'primereact/toast';
|
import { Toast } from 'primereact/toast';
|
||||||
|
|
||||||
const ArchiveDocument = ({ applicationId, ndg = '', fileId = 0, docAttachmentId = null }) => {
|
import { classificationType, protocolType } from '../../../../configData';
|
||||||
|
|
||||||
|
const ArchiveDocument = ({ applicationId, ndg = '', fileId = 0, docAttachmentId = null, updateFn = () => {} }) => {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [isVisibleDialog, setIsVisibleDialog] = useState(false);
|
const [isVisibleDialog, setIsVisibleDialog] = useState(false);
|
||||||
const [modalData, setModalData] = useState({});
|
const [modalData, setModalData] = useState({});
|
||||||
@@ -87,19 +90,29 @@ const ArchiveDocument = ({ applicationId, ndg = '', fileId = 0, docAttachmentId
|
|||||||
|
|
||||||
const submitCallback = (data) => {
|
const submitCallback = (data) => {
|
||||||
if (data.status === 'SUCCESS') {
|
if (data.status === 'SUCCESS') {
|
||||||
console.log(data.data);
|
if (toast.current && data.message) {
|
||||||
|
toast.current.show({
|
||||||
|
severity: 'success',
|
||||||
|
summary: '',
|
||||||
|
detail: data.message
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
const documentAttachmentId = pathOr('fake_id', ['documentAttachmentId'], data.data);
|
||||||
|
updateFn(documentAttachmentId);
|
||||||
|
}
|
||||||
|
setIsVisibleDialog(false);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const errSubmitCallback = (data) => {
|
const errSubmitCallback = (data) => {
|
||||||
if (toast.current && data.message) {
|
if (toast.current && data.message) {
|
||||||
toast.current.show({
|
toast.current.show({
|
||||||
severity: 'error',
|
severity: data.status === 'SUCCESS' ? 'info' : 'error',
|
||||||
summary: '',
|
summary: '',
|
||||||
detail: data.message
|
detail: data.message
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
setIsVisibleDialog(false);
|
||||||
set404FromErrorResponse(data);
|
set404FromErrorResponse(data);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@@ -119,7 +132,7 @@ const ArchiveDocument = ({ applicationId, ndg = '', fileId = 0, docAttachmentId
|
|||||||
setTypes(protocolType.map(o => ({ value: o.id, label: o.name })));
|
setTypes(protocolType.map(o => ({ value: o.id, label: o.name })));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (!isEmpty(ndg) && !docAttachmentId
|
return (!isEmpty(ndg) && !isNil(ndg) && !docAttachmentId
|
||||||
? <>
|
? <>
|
||||||
<Toast ref={toast}/>
|
<Toast ref={toast}/>
|
||||||
<Button icon="pi pi-file-export"
|
<Button icon="pi pi-file-export"
|
||||||
|
|||||||
@@ -4,22 +4,34 @@ import { __ } from '@wordpress/i18n';
|
|||||||
import { isNil } from 'ramda';
|
import { isNil } from 'ramda';
|
||||||
import ArchiveDocument from '../ArchiveDocument';
|
import ArchiveDocument from '../ArchiveDocument';
|
||||||
import renderHtmlContent from '../../../../helpers/renderHtmlContent';
|
import renderHtmlContent from '../../../../helpers/renderHtmlContent';
|
||||||
|
import uniqid from '../../../../helpers/uniqid';
|
||||||
|
|
||||||
const ListOfFiles = ({ files, updateFn, shouldDisableFieldFn, name, ndg, applicationId }) => {
|
const ListOfFiles = ({ files, updateFn, shouldDisableFieldFn, name, ndg, applicationId }) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ol className="appPageSection__list">
|
<ol className="appPageSection__list">
|
||||||
{files.map((o, i) => <li key={o.id} className="appPageSection__listItem">
|
{files.map((o, i) => <li key={`${o.id}_${uniqid('f')}`} className="appPageSection__listItem">
|
||||||
<div className="appPageSection__listItemRow">
|
<div className="appPageSection__listItemRow">
|
||||||
<div>{renderHtmlContent(o.label)}</div>
|
<div>{renderHtmlContent(o.label)}</div>
|
||||||
<div className="appPageSection__iconActions">
|
<div className="appPageSection__iconActions">
|
||||||
{o.fileDetail && o.fileDetail.length === 1
|
{o.fileDetail && o.fileDetail.length === 1
|
||||||
? <Button icon="pi pi-eye" rounded
|
? <>
|
||||||
|
<Button icon="pi pi-eye" rounded
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
window.open(o.fileDetail[0].filePath, '_blank').focus()
|
window.open(o.fileDetail[0].filePath, '_blank').focus()
|
||||||
}}
|
}}
|
||||||
outlined severity="info"
|
outlined severity="info"
|
||||||
aria-label={__('Mostra', 'gepafin')}/> : null}
|
aria-label={__('Mostra', 'gepafin')}/>
|
||||||
|
<ArchiveDocument
|
||||||
|
ndg={ndg}
|
||||||
|
applicationId={applicationId}
|
||||||
|
fileId={o.fileDetail[0].id}
|
||||||
|
updateFn={(val) => updateFn(
|
||||||
|
val,
|
||||||
|
[name, i, 'fileDetail', 0, 'documentAttachmentId']
|
||||||
|
)}
|
||||||
|
docAttachmentId={o.fileDetail[0].documentAttachmentId}/>
|
||||||
|
</> : null}
|
||||||
<Button icon="pi pi-thumbs-up" rounded outlined
|
<Button icon="pi pi-thumbs-up" rounded outlined
|
||||||
disabled={shouldDisableFieldFn(name)}
|
disabled={shouldDisableFieldFn(name)}
|
||||||
severity={!isNil(o.valid) && o.valid ? 'success' : 'secondary'}
|
severity={!isNil(o.valid) && o.valid ? 'success' : 'secondary'}
|
||||||
@@ -46,7 +58,7 @@ const ListOfFiles = ({ files, updateFn, shouldDisableFieldFn, name, ndg, applica
|
|||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
gap: '10px'
|
gap: '10px'
|
||||||
}}>
|
}}>
|
||||||
{o.fileDetail.map((k) => <li key={k.id} style={{
|
{o.fileDetail.map((k, ind) => <li key={k.id} style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
@@ -54,7 +66,14 @@ const ListOfFiles = ({ files, updateFn, shouldDisableFieldFn, name, ndg, applica
|
|||||||
}}>
|
}}>
|
||||||
<span>{k.name}</span>
|
<span>{k.name}</span>
|
||||||
<div className="appPageSection__iconActions">
|
<div className="appPageSection__iconActions">
|
||||||
<ArchiveDocument ndg={ndg} applicationId={applicationId} fileId={k.id}
|
<ArchiveDocument
|
||||||
|
ndg={ndg}
|
||||||
|
applicationId={applicationId}
|
||||||
|
fileId={k.id}
|
||||||
|
updateFn={(val) => updateFn(
|
||||||
|
val,
|
||||||
|
[name, i, 'fileDetail', ind, 'documentAttachmentId']
|
||||||
|
)}
|
||||||
docAttachmentId={k.documentAttachmentId}/>
|
docAttachmentId={k.documentAttachmentId}/>
|
||||||
<Button icon="pi pi-eye" rounded
|
<Button icon="pi pi-eye" rounded
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -71,12 +71,24 @@ const DomandaEditPreInstructor = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const updateFlagsForSoccorso = (data) => {
|
const updateFlagsForSoccorso = (data) => {
|
||||||
|
let nonRatedFilesLength = 0;
|
||||||
|
|
||||||
if (data.files) {
|
if (data.files) {
|
||||||
const nonRatedFiles = data.files
|
const nonRatedFiles = data.files
|
||||||
.map(el => el.valid)
|
.map(el => el.valid)
|
||||||
.filter(v => isNil(v));
|
.filter(v => isNil(v));
|
||||||
setAllFilesRated(nonRatedFiles.length === 0);
|
nonRatedFilesLength = nonRatedFiles.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data.amendmentDetails) {
|
||||||
|
const nonRatedFiles = data.amendmentDetails
|
||||||
|
.map(el => el.valid)
|
||||||
|
.filter(v => isNil(v));
|
||||||
|
nonRatedFilesLength = nonRatedFiles.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
setAllFilesRated(nonRatedFilesLength === 0);
|
||||||
|
|
||||||
if (data.checklist) {
|
if (data.checklist) {
|
||||||
const checkedChecklistItems = data.checklist
|
const checkedChecklistItems = data.checklist
|
||||||
.map(el => el.valid)
|
.map(el => el.valid)
|
||||||
@@ -380,7 +392,13 @@ const DomandaEditPreInstructor = () => {
|
|||||||
|
|
||||||
const getNdgCallback = (data) => {
|
const getNdgCallback = (data) => {
|
||||||
if (data.status === 'SUCCESS') {
|
if (data.status === 'SUCCESS') {
|
||||||
console.log('data', data.data);
|
if (toast.current && data.message) {
|
||||||
|
toast.current.show({
|
||||||
|
severity: 'success',
|
||||||
|
summary: '',
|
||||||
|
detail: data.message
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
storeSet.main.unsetAsyncRequest();
|
storeSet.main.unsetAsyncRequest();
|
||||||
}
|
}
|
||||||
@@ -388,7 +406,7 @@ const DomandaEditPreInstructor = () => {
|
|||||||
const errGetNdgCallback = (data) => {
|
const errGetNdgCallback = (data) => {
|
||||||
if (toast.current && data.message) {
|
if (toast.current && data.message) {
|
||||||
toast.current.show({
|
toast.current.show({
|
||||||
severity: 'error',
|
severity: data.status === 'SUCCESS' ? 'info' : 'error',
|
||||||
summary: '',
|
summary: '',
|
||||||
detail: data.message
|
detail: data.message
|
||||||
});
|
});
|
||||||
@@ -436,10 +454,47 @@ const DomandaEditPreInstructor = () => {
|
|||||||
!isEmpty(appointmentData.title) && !isEmpty(appointmentData.text) && !isEmpty(appointmentData.amount)
|
!isEmpty(appointmentData.title) && !isEmpty(appointmentData.text) && !isEmpty(appointmentData.amount)
|
||||||
&& !isEmpty(appointmentData.duration) && appointmentData.duration !== 0 && appointmentData.amount !== 0
|
&& !isEmpty(appointmentData.duration) && appointmentData.duration !== 0 && appointmentData.amount !== 0
|
||||||
) {
|
) {
|
||||||
console.log(appointmentData);
|
storeSet.main.setAsyncRequest();
|
||||||
|
const submitData = {
|
||||||
|
'importoBreveTermine': appointmentData.amount,
|
||||||
|
'durataMesiFinanziamento': appointmentData.duration,
|
||||||
|
'nota': {
|
||||||
|
'titolo': appointmentData.title,
|
||||||
|
'testo': appointmentData.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AppointmentService.createAppointment(id, submitData, getAppointemntCallback, errGetAppointemntCallback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const getAppointemntCallback = (data) => {
|
||||||
|
if (data.status === 'SUCCESS') {
|
||||||
|
if (toast.current && data.message) {
|
||||||
|
toast.current.show({
|
||||||
|
severity: 'success',
|
||||||
|
summary: '',
|
||||||
|
detail: data.message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setIsVisibleAppointmentDialog(false);
|
||||||
|
storeSet.main.unsetAsyncRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
const errGetAppointemntCallback = (data) => {
|
||||||
|
if (toast.current && data.message) {
|
||||||
|
toast.current.show({
|
||||||
|
severity: data.status === 'SUCCESS' ? 'info' : 'error',
|
||||||
|
summary: '',
|
||||||
|
detail: data.message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
setIsVisibleAppointmentDialog(false);
|
||||||
|
set404FromErrorResponse(data);
|
||||||
|
storeSet.main.unsetAsyncRequest();
|
||||||
|
}
|
||||||
|
|
||||||
const doMakeAdmisible = () => {
|
const doMakeAdmisible = () => {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
@@ -605,34 +660,17 @@ const DomandaEditPreInstructor = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="appPageSection">
|
{!isEmpty(data.amendmentDetails)
|
||||||
|
? <div className="appPageSection">
|
||||||
<h2>{__('Documenti di soccorso', 'gepafin')}</h2>
|
<h2>{__('Documenti di soccorso', 'gepafin')}</h2>
|
||||||
{data.amendmentDetails
|
<ListOfFiles
|
||||||
.map(o => {
|
files={data.amendmentDetails}
|
||||||
const aDocs = pathOr([],['amendmentDocuments'], o);
|
|
||||||
const aNotes = pathOr('',['amendmentNotes'], o);
|
|
||||||
const aValid = pathOr(null,['valid'], o);
|
|
||||||
const aDocsObj = {
|
|
||||||
id: o.amendmentId,
|
|
||||||
label: aNotes,
|
|
||||||
fileDetail: aDocs,
|
|
||||||
valid: aValid
|
|
||||||
}
|
|
||||||
const fDocs = pathOr([],['formFieldDocuments'], o);
|
|
||||||
|
|
||||||
return {
|
|
||||||
files: [aDocsObj, ...fDocs]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.map((o, i) => <ListOfFiles
|
|
||||||
key={`list_${i}`}
|
|
||||||
files={o.files}
|
|
||||||
updateFn={updateEvaluationValue}
|
updateFn={updateEvaluationValue}
|
||||||
shouldDisableFieldFn={shouldDisableField}
|
shouldDisableFieldFn={shouldDisableField}
|
||||||
name="amendmentDetails"
|
name="amendmentDetails"
|
||||||
ndg={data.ndg}
|
ndg={data.ndg}
|
||||||
applicationId={id}/>)}
|
applicationId={id}/>
|
||||||
</div>
|
</div> : null}
|
||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<h2>{__('Punteggi di valutazione', 'gepafin')}</h2>
|
<h2>{__('Punteggi di valutazione', 'gepafin')}</h2>
|
||||||
@@ -749,14 +787,14 @@ const DomandaEditPreInstructor = () => {
|
|||||||
onClick={() => doSaveDraft()}
|
onClick={() => doSaveDraft()}
|
||||||
label={__('Crea valutazione', 'gepafin')}
|
label={__('Crea valutazione', 'gepafin')}
|
||||||
icon="pi pi-save" iconPos="right"/>}
|
icon="pi pi-save" iconPos="right"/>}
|
||||||
{APP_EVALUATION_FLOW_ID === '1' && ['EVALUATION'].includes(data.applicationStatus)
|
{/*{APP_EVALUATION_FLOW_ID === '1' && ['EVALUATION'].includes(data.applicationStatus)
|
||||||
? <Button
|
? <Button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={!data.id || !allFilesRated || !allChecksChecked}
|
disabled={!data.id || !allFilesRated || !allChecksChecked}
|
||||||
onClick={doCheckNDG}
|
onClick={doCheckNDG}
|
||||||
label={__('Controlla NDG', 'gepafin')}
|
label={__('Controlla NDG', 'gepafin')}
|
||||||
/> : null}
|
/> : null}*/}
|
||||||
{APP_EVALUATION_FLOW_ID === '1' && ['EVALUATION'].includes(data.applicationStatus) && data.ndg
|
{APP_EVALUATION_FLOW_ID === '1' && ['NDG'].includes(data.applicationStatus) && data.ndg
|
||||||
? <Button
|
? <Button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={!data.id}
|
disabled={!data.id}
|
||||||
@@ -778,12 +816,19 @@ const DomandaEditPreInstructor = () => {
|
|||||||
onClick={initiateApproving}
|
onClick={initiateApproving}
|
||||||
label={__('Approva Domanda', 'gepafin')}
|
label={__('Approva Domanda', 'gepafin')}
|
||||||
icon="pi pi-check" iconPos="right"/> : null}
|
icon="pi pi-check" iconPos="right"/> : null}
|
||||||
{data.id
|
{/*{data.id
|
||||||
? <Button
|
? <Button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={APP_EVALUATION_FLOW_ID === '1' && !['ADMISSIBLE', 'APPOINTMENT'].includes(data.applicationStatus)}
|
disabled={APP_EVALUATION_FLOW_ID === '1' && !['ADMISSIBLE', 'APPOINTMENT'].includes(data.applicationStatus)}
|
||||||
onClick={initiateRejecting}
|
onClick={initiateRejecting}
|
||||||
label={__('Respingi Domanda', 'gepafin')}
|
label={__('Respingi Domanda', 'gepafin')}
|
||||||
|
icon="pi pi-times" iconPos="right"/> : null}*/}
|
||||||
|
{data.id
|
||||||
|
? <Button
|
||||||
|
type="button"
|
||||||
|
disabled={APP_EVALUATION_FLOW_ID === '1' && !['EVALUATION', 'ADMISSIBLE', 'APPOINTMENT'].includes(data.applicationStatus)}
|
||||||
|
onClick={initiateRejecting}
|
||||||
|
label={__('Respingi Domanda', 'gepafin')}
|
||||||
icon="pi pi-times" iconPos="right"/> : null}
|
icon="pi pi-times" iconPos="right"/> : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => {
|
|||||||
|
|
||||||
const actionsBodyTemplate = (rowData) => {
|
const actionsBodyTemplate = (rowData) => {
|
||||||
return <div className="appPageSection__tableActions lessGap">
|
return <div className="appPageSection__tableActions lessGap">
|
||||||
{openDialogFn && rowData.applicationStatus === 'SUBMIT'
|
{openDialogFn && rowData.status === 'SUBMIT'
|
||||||
? <Button severity="info"
|
? <Button severity="info"
|
||||||
onClick={() => openDialogFn(rowData.id)}
|
onClick={() => openDialogFn(rowData.id)}
|
||||||
label={__('Assegnare', 'gepafin')}
|
label={__('Assegnare', 'gepafin')}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { is, isEmpty, uniq } from 'ramda';
|
|||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
// store
|
// store
|
||||||
import { useStore } from '../../../../store';
|
import { useStore, storeGet } from '../../../../store';
|
||||||
|
|
||||||
// api
|
// api
|
||||||
import ApplicationService from '../../../../service/application-service';
|
import ApplicationService from '../../../../service/application-service';
|
||||||
@@ -33,7 +33,7 @@ const BeneficiarioDomandeTable = () => {
|
|||||||
const [statuses, setStatuses] = useState([]);
|
const [statuses, setStatuses] = useState([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isEmpty(chosenCompanyId) && chosenCompanyId !== 0) {
|
if (!isEmpty(chosenCompanyId) && chosenCompanyId !== 0 && !localAsyncRequest) {
|
||||||
setLocalAsyncRequest(true);
|
setLocalAsyncRequest(true);
|
||||||
ApplicationService.getApplications(getApplCallback, errGetApplCallback, [
|
ApplicationService.getApplications(getApplCallback, errGetApplCallback, [
|
||||||
['companyId', chosenCompanyId],
|
['companyId', chosenCompanyId],
|
||||||
|
|||||||
@@ -142,7 +142,9 @@ const SoccorsoEditPreInstructor = () => {
|
|||||||
});
|
});
|
||||||
return acc;
|
return acc;
|
||||||
}, []);
|
}, []);
|
||||||
const newAmendDocs = formValues.amendmentDocuments.map(o => o.id).join(',');
|
const newAmendDocs = formValues.amendmentDocuments
|
||||||
|
? formValues.amendmentDocuments.map(o => o.id).join(',')
|
||||||
|
: '';
|
||||||
|
|
||||||
const submitData = {
|
const submitData = {
|
||||||
applicationFormFields: newFormValues,
|
applicationFormFields: newFormValues,
|
||||||
|
|||||||
@@ -4,11 +4,15 @@ const API_BASE_URL = process.env.REACT_APP_API_EXECUTION_ADDRESS;
|
|||||||
|
|
||||||
export default class AppointmentService {
|
export default class AppointmentService {
|
||||||
|
|
||||||
static getNdg = (id, callback, errCallback, queryParams) => {
|
static getNdg = (applicationId, callback, errCallback, queryParams) => {
|
||||||
NetworkService.get(`${API_BASE_URL}/appointment/application/${id}/check-ndg`, callback, errCallback, queryParams);
|
NetworkService.get(`${API_BASE_URL}/appointment/application/${applicationId}/check-ndg`, callback, errCallback, queryParams);
|
||||||
};
|
};
|
||||||
|
|
||||||
static archiveDocument = (applicationId, documentId, body, callback, errCallback, queryParams) => {
|
static archiveDocument = (applicationId, documentId, body, callback, errCallback, queryParams) => {
|
||||||
NetworkService.post(`${API_BASE_URL}/appointment/application/${applicationId}/document/${documentId}`, body, callback, errCallback, queryParams);
|
NetworkService.post(`${API_BASE_URL}/appointment/document/${documentId}`, body, callback, errCallback, queryParams);
|
||||||
|
};
|
||||||
|
|
||||||
|
static createAppointment = (applicationId, body, callback, errCallback, queryParams) => {
|
||||||
|
NetworkService.post(`${API_BASE_URL}/appointment/application/${applicationId}`, body, callback, errCallback, queryParams);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user