mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
refactor(FE-170,175): update approval logic in RecordingForm to consider grading data for LAYING category
This commit is contained in:
@@ -1345,7 +1345,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
|||||||
Kembali
|
Kembali
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
{type === 'detail' && !isRecordingApproved(initialValues) && (
|
{type === 'detail' && !isRecordingApproved(initialValues) && (!isLayingCategory || hasGradingData(initialValues)) && (
|
||||||
<div className='flex flex-row gap-2'>
|
<div className='flex flex-row gap-2'>
|
||||||
<Button
|
<Button
|
||||||
variant='outline'
|
variant='outline'
|
||||||
@@ -2678,7 +2678,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
|||||||
|
|
||||||
{/* Approve Confirmation Modal */}
|
{/* Approve Confirmation Modal */}
|
||||||
{(type as 'add' | 'edit' | 'detail') === 'detail' &&
|
{(type as 'add' | 'edit' | 'detail') === 'detail' &&
|
||||||
!isRecordingApproved(initialValues) && (
|
!isRecordingApproved(initialValues) && (!isLayingCategory || hasGradingData(initialValues)) && (
|
||||||
<ConfirmationModal
|
<ConfirmationModal
|
||||||
ref={approveModal.ref}
|
ref={approveModal.ref}
|
||||||
type='success'
|
type='success'
|
||||||
@@ -2697,7 +2697,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
|||||||
|
|
||||||
{/* Reject Confirmation Modal */}
|
{/* Reject Confirmation Modal */}
|
||||||
{(type as 'add' | 'edit' | 'detail') === 'detail' &&
|
{(type as 'add' | 'edit' | 'detail') === 'detail' &&
|
||||||
!isRecordingApproved(initialValues) && (
|
!isRecordingApproved(initialValues) && (!isLayingCategory || hasGradingData(initialValues)) && (
|
||||||
<ConfirmationModal
|
<ConfirmationModal
|
||||||
ref={rejectModal.ref}
|
ref={rejectModal.ref}
|
||||||
type='error'
|
type='error'
|
||||||
|
|||||||
Reference in New Issue
Block a user