mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
refactor(FE): Update button visibility logic in TransferToLayingsTable
This commit is contained in:
@@ -48,11 +48,11 @@ const RowOptionsMenu = ({
|
|||||||
popoverPosition: 'bottom' | 'top';
|
popoverPosition: 'bottom' | 'top';
|
||||||
deleteClickHandler: () => void;
|
deleteClickHandler: () => void;
|
||||||
}) => {
|
}) => {
|
||||||
const showEditButton =
|
const showEditButton = props.row.original.approval.action !== 'APPROVED';
|
||||||
props.row.original.approval.action !== 'APPROVED' &&
|
|
||||||
props.row.original.approval.action !== 'REJECTED';
|
|
||||||
|
|
||||||
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 popoverId = `transferToLaying#${props.row.original.id}`;
|
||||||
const popoverAnchorName = `--anchor-transferToLaying#${props.row.original.id}`;
|
const popoverAnchorName = `--anchor-transferToLaying#${props.row.original.id}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user