mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat(FE-170): update daily recording form to redirect to grading form after successful submission
This commit is contained in:
@@ -1089,7 +1089,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
||||
type='button'
|
||||
color='primary'
|
||||
onClick={() => {
|
||||
toast.success('Akan dialihkan ke form Grading');
|
||||
router.push(`/production/recording/grading/add?recording_id=${initialValues?.id}`);
|
||||
}}
|
||||
>
|
||||
Lanjut ke Grading
|
||||
@@ -2192,7 +2192,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
||||
hasExceededStock || !formik.isValid || formik.isSubmitting
|
||||
}
|
||||
onClick={async () => {
|
||||
await formik.submitForm();
|
||||
const result = await formik.submitForm();
|
||||
if (
|
||||
formik.isValid &&
|
||||
!formik.isSubmitting &&
|
||||
@@ -2201,8 +2201,10 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
||||
toast.success(
|
||||
'Recording berhasil disimpan! Mengalihkan ke form Grading...'
|
||||
);
|
||||
// TODO: Redirect ke grading form setelah submit berhasil
|
||||
// router.push('/production/grading/add?recording_id=xxx');
|
||||
// Redirect ke grading form setelah submit berhasil
|
||||
setTimeout(() => {
|
||||
router.push('/production/recording/grading/add?recording_id=new');
|
||||
}, 1000);
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user