fix: error

This commit is contained in:
Methapon2001 2025-01-27 10:44:11 +07:00
parent 7528e47bfd
commit 55a9d4850f

View file

@ -212,8 +212,10 @@ function handleCheck(
function disableCheckAll() {
if (!props.selectReady) return false;
const firstTemplate = props.rows[0]?._template.id;
const hasDifferent = props.rows.some((r) => r._template.id !== firstTemplate);
const firstTemplate = props.rows[0]?._template?.id;
const hasDifferent = props.rows.some(
(r) => r._template?.id !== firstTemplate,
);
return hasDifferent && selectedEmployee.value.length === 0;
}
@ -277,7 +279,7 @@ function disableCheckAll() {
(selectReady
? rows.filter(
(t) =>
t._template.id ===
t._template?.id ===
selectedEmployeeInTable[0]?._template?.id,
).length
: validate