mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +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
|
||||
</Button>
|
||||
|
||||
{type === 'detail' && !isRecordingApproved(initialValues) && (
|
||||
{type === 'detail' && !isRecordingApproved(initialValues) && (!isLayingCategory || hasGradingData(initialValues)) && (
|
||||
<div className='flex flex-row gap-2'>
|
||||
<Button
|
||||
variant='outline'
|
||||
@@ -2678,7 +2678,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
||||
|
||||
{/* Approve Confirmation Modal */}
|
||||
{(type as 'add' | 'edit' | 'detail') === 'detail' &&
|
||||
!isRecordingApproved(initialValues) && (
|
||||
!isRecordingApproved(initialValues) && (!isLayingCategory || hasGradingData(initialValues)) && (
|
||||
<ConfirmationModal
|
||||
ref={approveModal.ref}
|
||||
type='success'
|
||||
@@ -2697,7 +2697,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
||||
|
||||
{/* Reject Confirmation Modal */}
|
||||
{(type as 'add' | 'edit' | 'detail') === 'detail' &&
|
||||
!isRecordingApproved(initialValues) && (
|
||||
!isRecordingApproved(initialValues) && (!isLayingCategory || hasGradingData(initialValues)) && (
|
||||
<ConfirmationModal
|
||||
ref={rejectModal.ref}
|
||||
type='error'
|
||||
|
||||
Reference in New Issue
Block a user