refactor: streamline access control for task order actions in the table component
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 8s

This commit is contained in:
puriphatt 2025-07-04 16:31:17 +07:00
parent 942449e373
commit 9dcec6b4c6

View file

@ -216,10 +216,9 @@ const emit = defineEmits<{
/>
<KebabAction
v-if="
canAccess('related', 'edit') &&
!receive &&
props.row.taskOrderStatus === TaskOrderStatus.Pending
!receive && props.row.taskOrderStatus === TaskOrderStatus.Pending
"
:hide-delete="!canAccess('related', 'edit')"
:idName="`btn-kebab-${props.row.taskName}`"
status="'ACTIVE'"
hide-toggle
@ -268,6 +267,7 @@ const emit = defineEmits<{
:status="$t(taskOrderStatus(props.row.taskOrderStatus, 'status'))"
:badge-color="taskOrderStatus(props.row.taskOrderStatus, 'color')"
hide-preview
:hideKebabDelete="!canAccess('related', 'edit')"
:hide-action="
receive || props.row.taskOrderStatus !== TaskOrderStatus.Pending
"