fix(leave):approveCheck logic for commander approval status
This commit is contained in:
parent
b82b489a8b
commit
aff177e2f1
1 changed files with 3 additions and 4 deletions
|
|
@ -166,10 +166,9 @@ const commanderList = computed(() => {
|
|||
|
||||
// เช็คว่าผู้ใช้มีสิทธิ์อนุมัติหรือไม่
|
||||
const approveCheck = computed(() => {
|
||||
return (
|
||||
rows.value?.commanders?.every(
|
||||
(commander) => commander.approveStatus === "APPROVE"
|
||||
) ?? false
|
||||
const commanders = rows.value?.commanders;
|
||||
return Array.isArray(commanders) && commanders.length > 0 && commanders.every(
|
||||
(commander) => commander.approveStatus === "APPROVE"
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue