- added proper form fields for archiving document;

This commit is contained in:
Vitalii Kiiko
2024-12-06 16:29:48 +01:00
parent a36bb3fcaf
commit e65fb6bde2
4 changed files with 296 additions and 53 deletions

View File

@@ -35,6 +35,7 @@ import { InputText } from 'primereact/inputtext';
import DownloadApplicationArchive from './components/DownloadApplicationArchive';
import DownloadCompanyDelegation from './components/DownloadCompanyDelegation';
import DownloadSignedApplication from './components/DownloadSignedApplication';
import AppointmentService from '../../service/appointment-service';
const APP_EVALUATION_FLOW_ID = process.env.REACT_APP_EVALUATION_FLOW_ID;
@@ -360,7 +361,30 @@ const DomandaEditPreInstructor = () => {
}
const doCheckNDG = () => {
// TODO
storeSet.main.setAsyncRequest();
doSaveDraft();
setTimeout(() => {
AppointmentService.getNdg(id, getNdgCallback, errGetNdgCallback);
}, 100);
}
const getNdgCallback = (data) => {
if (data.status === 'SUCCESS') {
console.log('data', data.data);
}
storeSet.main.unsetAsyncRequest();
}
const errGetNdgCallback = (data) => {
if (toast.current && data.message) {
toast.current.show({
severity: 'error',
summary: '',
detail: data.message
});
}
set404FromErrorResponse(data);
storeSet.main.unsetAsyncRequest();
}
const doCreateAppointment = () => {
@@ -595,7 +619,7 @@ const DomandaEditPreInstructor = () => {
}}>
<span>{k.name}</span>
<div className="appPageSection__iconActions">
<ArchiveDocument ndg={data.ndg} fileId={k.id}/>
<ArchiveDocument ndg={data.ndg} applicationId={id} fileId={k.id}/>
<Button icon="pi pi-eye" rounded
onClick={() => {
window.open(encodeURI(k.filePath), '_blank').focus()