P-42
This commit is contained in:
1 parent
ec98f90fd5
commit
a478dae14e
2 files changed
+23
-3
No files matched your search
@@ -142,12 +142,16 @@ export default {
|
||||
});
|
||||
|
||||
const cbstaff = (item, value) => {
|
||||
|
||||
item.forEach((e) => {
|
||||
if (e.id != accountStore.user.is_idEmployee) {
|
||||
e.selected = value;
|
||||
}
|
||||
if ("employees" in e) {
|
||||
cbstaff(e.employees, value);
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
const allman = () => {
|
||||
@@ -156,7 +160,11 @@ export default {
|
||||
};
|
||||
|
||||
function toggledep(item) {
|
||||
item.employees.forEach((e) => (e.selected = !item.selected));
|
||||
item.employees.forEach((e) => {
|
||||
if (e.id != accountStore.user.is_idEmployee) {
|
||||
e.selected = !item.selected;
|
||||
}
|
||||
});
|
||||
item.selected = !item.selected;
|
||||
}
|
||||
|
||||
|
||||
@@ -120,13 +120,21 @@ export default {
|
||||
setup(props, { emit }) {
|
||||
const postParticant = {};
|
||||
const form_calendar = ref(null);
|
||||
const for_edit = ref([])
|
||||
const for_editor = ref([])
|
||||
|
||||
const accountStore = useAccountStore();
|
||||
|
||||
const returnIdParticant = (idPart, selected) => {
|
||||
|
||||
selected.forEach((val, key) => {
|
||||
for_editor.value[key] = val
|
||||
|
||||
})
|
||||
|
||||
|
||||
// selected
|
||||
// for_edit = selected.slice()
|
||||
|
||||
// for_editor.value
|
||||
// .forEach((e)=> {
|
||||
|
||||
// e.selected = false
|
||||
@@ -145,6 +153,8 @@ export default {
|
||||
// }
|
||||
|
||||
// })
|
||||
|
||||
console.log(for_editor.value, 'for_edit.value')
|
||||
|
||||
postParticant.value = { ...props.calendar, participant: idPart };
|
||||
};
|
||||
@@ -198,6 +208,7 @@ export default {
|
||||
.then((res) => {
|
||||
staff.value = res.data.filter((e) => e.employees.length > 0);
|
||||
staff.value.forEach((e) => {
|
||||
console.log(propsCalendar.value.participant, 'propsCalendar.value.participant')
|
||||
if (propsCalendar.value.participant.length > 0) {
|
||||
e.employees.forEach((empl) => {
|
||||
|
||||
@@ -207,6 +218,7 @@ export default {
|
||||
)
|
||||
) {
|
||||
empl.selected = true;
|
||||
// empl.editor =
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user