diff --git a/src/pages/09_task-order/TableEmployee.vue b/src/pages/09_task-order/TableEmployee.vue index 1ae6a0fa..33e685bf 100644 --- a/src/pages/09_task-order/TableEmployee.vue +++ b/src/pages/09_task-order/TableEmployee.vue @@ -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