refactor(FE): Update button visibility logic in TransferToLayingsTable

This commit is contained in:
rstubryan
2026-03-08 16:17:20 +07:00
parent b6629b0bbb
commit e5e9b517fd
@@ -48,11 +48,11 @@ const RowOptionsMenu = ({
popoverPosition: 'bottom' | 'top';
deleteClickHandler: () => void;
}) => {
const showEditButton =
props.row.original.approval.action !== 'APPROVED' &&
props.row.original.approval.action !== 'REJECTED';
const showEditButton = props.row.original.approval.action !== 'APPROVED';
const showDeleteButton = showEditButton;
const showDeleteButton =
props.row.original.approval.action === 'APPROVED' ||
props.row.original.approval.step_name.toLowerCase() === 'pengajuan';
const popoverId = `transferToLaying#${props.row.original.id}`;
const popoverAnchorName = `--anchor-transferToLaying#${props.row.original.id}`;