- updated templates of application evaluation;

This commit is contained in:
Vitalii Kiiko
2025-02-19 11:56:41 +01:00
parent f9622bac0d
commit 589d91ed6c
2 changed files with 16 additions and 4 deletions

View File

@@ -695,11 +695,11 @@ const DomandaEditInstructorManager = () => {
} }
} }
AppointmentService.createAppointment(id, submitData, getAppointemntCallback, errGetAppointemntCallback); AppointmentService.createAppointment(id, submitData, getAppointmentCallback, errGetAppointemntCallback);
} }
} }
const getAppointemntCallback = (data) => { const getAppointmentCallback = (data) => {
if (data.status === 'SUCCESS') { if (data.status === 'SUCCESS') {
if (toast.current && data.message) { if (toast.current && data.message) {
toast.current.show({ toast.current.show({
@@ -708,6 +708,12 @@ const DomandaEditInstructorManager = () => {
detail: data.message detail: data.message
}); });
} }
if (data.data.appointmentId) {
setData({
...data,
appointmentId: data.data.appointmentId
});
}
} }
setIsVisibleAppointmentDialog(false); setIsVisibleAppointmentDialog(false);
storeSet.main.unsetAsyncRequest(); storeSet.main.unsetAsyncRequest();

View File

@@ -697,11 +697,11 @@ const DomandaEditPreInstructor = () => {
} }
} }
AppointmentService.createAppointment(id, submitData, getAppointemntCallback, errGetAppointemntCallback); AppointmentService.createAppointment(id, submitData, getAppointmentCallback, errGetAppointemntCallback);
} }
} }
const getAppointemntCallback = (data) => { const getAppointmentCallback = (data) => {
if (data.status === 'SUCCESS') { if (data.status === 'SUCCESS') {
if (toast.current && data.message) { if (toast.current && data.message) {
toast.current.show({ toast.current.show({
@@ -710,6 +710,12 @@ const DomandaEditPreInstructor = () => {
detail: data.message detail: data.message
}); });
} }
if (data.data.appointmentId) {
setData({
...data,
appointmentId: data.data.appointmentId
});
}
} }
setIsVisibleAppointmentDialog(false); setIsVisibleAppointmentDialog(false);
storeSet.main.unsetAsyncRequest(); storeSet.main.unsetAsyncRequest();