mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
feat(US-137): update API endpoints and default values in RecordingForm for production environment
This commit is contained in:
@@ -164,6 +164,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
|||||||
notes: stock.notes || '',
|
notes: stock.notes || '',
|
||||||
})),
|
})),
|
||||||
depletions: (values.depletions ?? []).map((depletion) => ({
|
depletions: (values.depletions ?? []).map((depletion) => ({
|
||||||
|
product_warehouse_id: 1,
|
||||||
total:
|
total:
|
||||||
typeof depletion.total === 'number'
|
typeof depletion.total === 'number'
|
||||||
? depletion.total
|
? depletion.total
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export const useRecordingFormHandlers = (initialValuesId?: number) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
toast.success(res?.message as string);
|
toast.success(res?.message as string);
|
||||||
router.push('/flock/recording');
|
router.push('/production/recording');
|
||||||
},
|
},
|
||||||
[router]
|
[router]
|
||||||
);
|
);
|
||||||
@@ -38,7 +38,7 @@ export const useRecordingFormHandlers = (initialValuesId?: number) => {
|
|||||||
}
|
}
|
||||||
toast.success(res?.message as string);
|
toast.success(res?.message as string);
|
||||||
router.refresh();
|
router.refresh();
|
||||||
router.push('/flock/recording');
|
router.push('/production/recording');
|
||||||
},
|
},
|
||||||
[router]
|
[router]
|
||||||
);
|
);
|
||||||
@@ -55,7 +55,7 @@ export const useRecordingFormHandlers = (initialValuesId?: number) => {
|
|||||||
deleteModal.closeModal();
|
deleteModal.closeModal();
|
||||||
toast.success('Successfully delete Recording!');
|
toast.success('Successfully delete Recording!');
|
||||||
setIsDeleteLoading(false);
|
setIsDeleteLoading(false);
|
||||||
router.push('/flock/recording');
|
router.push('/production/recording');
|
||||||
}, [deleteModal, initialValuesId, router]);
|
}, [deleteModal, initialValuesId, router]);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export const RecordingApi = new BaseApiService<
|
|||||||
Recording,
|
Recording,
|
||||||
CreateRecordingPayload,
|
CreateRecordingPayload,
|
||||||
UpdateRecordingPayload
|
UpdateRecordingPayload
|
||||||
>('/flock/recordings');
|
>('/production/recordings');
|
||||||
export const ChickinApi = new BaseApiService<
|
export const ChickinApi = new BaseApiService<
|
||||||
Chickin,
|
Chickin,
|
||||||
CreateChickinPayload,
|
CreateChickinPayload,
|
||||||
|
|||||||
Reference in New Issue
Block a user