mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE-170,174): clean up grading redirect in RecordingTable action
This commit is contained in:
@@ -27,7 +27,6 @@ import { useTableFilter } from '@/services/hooks/useTableFilter';
|
||||
import toast from 'react-hot-toast';
|
||||
import Badge from '@/components/Badge';
|
||||
import CheckboxInput from '@/components/input/CheckboxInput';
|
||||
import TextArea from '@/components/input/TextArea';
|
||||
import { BaseApproval, BaseApiResponse } from '@/types/api/api-general';
|
||||
|
||||
const RowOptionsMenu = ({
|
||||
@@ -79,17 +78,6 @@ const RowOptionsMenu = ({
|
||||
<Icon icon='mdi:pencil-outline' width={16} height={16} />
|
||||
Edit
|
||||
</Button>
|
||||
{isLayingCategory && !isGradingDone && (
|
||||
<Button
|
||||
variant='ghost'
|
||||
color='info'
|
||||
className={`justify-start text-sm`}
|
||||
href={`/production/recording/grading/add?recording_id=${props.row.original.id}`}
|
||||
>
|
||||
<Icon icon='material-symbols:egg' width={16} height={16} />
|
||||
Grading
|
||||
</Button>
|
||||
)}
|
||||
{!isApproved && !(isLayingCategory && !isGradingDone) && (
|
||||
<Button
|
||||
onClick={approveClickHandler}
|
||||
@@ -467,10 +455,7 @@ const RecordingTable = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const approveResponse = await RecordingApi.approve(
|
||||
eligibleRowIds,
|
||||
notes
|
||||
);
|
||||
const approveResponse = await RecordingApi.approve(eligibleRowIds, notes);
|
||||
|
||||
if (isResponseSuccess(approveResponse)) {
|
||||
toast.success(
|
||||
@@ -500,10 +485,7 @@ const RecordingTable = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const rejectResponse = await RecordingApi.reject(
|
||||
eligibleRowIds,
|
||||
notes
|
||||
);
|
||||
const rejectResponse = await RecordingApi.reject(eligibleRowIds, notes);
|
||||
|
||||
if (isResponseSuccess(rejectResponse)) {
|
||||
toast.success(`Berhasil reject ${eligibleRowIds.length} data recording!`);
|
||||
|
||||
Reference in New Issue
Block a user