fix: error
This commit is contained in:
parent
7528e47bfd
commit
55a9d4850f
1 changed files with 5 additions and 3 deletions
|
|
@ -212,8 +212,10 @@ function handleCheck(
|
||||||
|
|
||||||
function disableCheckAll() {
|
function disableCheckAll() {
|
||||||
if (!props.selectReady) return false;
|
if (!props.selectReady) return false;
|
||||||
const firstTemplate = props.rows[0]?._template.id;
|
const firstTemplate = props.rows[0]?._template?.id;
|
||||||
const hasDifferent = props.rows.some((r) => r._template.id !== firstTemplate);
|
const hasDifferent = props.rows.some(
|
||||||
|
(r) => r._template?.id !== firstTemplate,
|
||||||
|
);
|
||||||
|
|
||||||
return hasDifferent && selectedEmployee.value.length === 0;
|
return hasDifferent && selectedEmployee.value.length === 0;
|
||||||
}
|
}
|
||||||
|
|
@ -277,7 +279,7 @@ function disableCheckAll() {
|
||||||
(selectReady
|
(selectReady
|
||||||
? rows.filter(
|
? rows.filter(
|
||||||
(t) =>
|
(t) =>
|
||||||
t._template.id ===
|
t._template?.id ===
|
||||||
selectedEmployeeInTable[0]?._template?.id,
|
selectedEmployeeInTable[0]?._template?.id,
|
||||||
).length
|
).length
|
||||||
: validate
|
: validate
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue