ref
This commit is contained in:
1 parent
15170d594a
commit
26d994b1a9
1 file changed
+4
-2
@@ -302,18 +302,20 @@ export default {
|
|||||||
text: employee.id,
|
text: employee.id,
|
||||||
image: null
|
image: null
|
||||||
}));
|
}));
|
||||||
|
selectedEmployees.value = groupedEmployees.value.map(employee => employee.id);
|
||||||
} else if (
|
} else if (
|
||||||
selected.length === groupedEmployees.value.length &&
|
selected.length === groupedEmployees.value.length &&
|
||||||
!selected.includes("all")
|
!selected.includes("all")
|
||||||
) {
|
) {
|
||||||
currentQuestion.value.answers = selected.map((id) => ({ text: id, image: null }));
|
currentQuestion.value.answers = selected.map((id) => ({ text: id, image: null }));
|
||||||
|
selectedEmployees.value = groupedEmployees.value.map(employee => employee.id);
|
||||||
} else {
|
} else {
|
||||||
currentQuestion.value.answers = selected.map((id) => ({ text: id, image: null }));
|
currentQuestion.value.answers = selected.map((id) => ({ text: id, image: null }));
|
||||||
|
selectedEmployees.value = groupedEmployees.value.map(employee => employee.id);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const isAllSelected = computed(
|
const isAllSelected = computed(() => currentQuestion.value.answers.length === groupedEmployees.value.length);
|
||||||
() => currentQuestion.value.answers.length === groupedEmployees.value.length);
|
|
||||||
|
|
||||||
const addQuestion = () => {
|
const addQuestion = () => {
|
||||||
form.value.questions.push({
|
form.value.questions.push({
|
||||||
|
|||||||
Reference in new issue
Block a user