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) => {
|
const cbstaff = (item, value) => {
|
||||||
|
|
||||||
item.forEach((e) => {
|
item.forEach((e) => {
|
||||||
|
if (e.id != accountStore.user.is_idEmployee) {
|
||||||
e.selected = value;
|
e.selected = value;
|
||||||
|
}
|
||||||
if ("employees" in e) {
|
if ("employees" in e) {
|
||||||
cbstaff(e.employees, value);
|
cbstaff(e.employees, value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const allman = () => {
|
const allman = () => {
|
||||||
@@ -156,7 +160,11 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function toggledep(item) {
|
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;
|
item.selected = !item.selected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,13 +120,21 @@ export default {
|
|||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const postParticant = {};
|
const postParticant = {};
|
||||||
const form_calendar = ref(null);
|
const form_calendar = ref(null);
|
||||||
const for_edit = ref([])
|
const for_editor = ref([])
|
||||||
|
|
||||||
const accountStore = useAccountStore();
|
const accountStore = useAccountStore();
|
||||||
|
|
||||||
const returnIdParticant = (idPart, selected) => {
|
const returnIdParticant = (idPart, selected) => {
|
||||||
|
|
||||||
// selected
|
selected.forEach((val, key) => {
|
||||||
|
for_editor.value[key] = val
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// for_edit = selected.slice()
|
||||||
|
|
||||||
|
// for_editor.value
|
||||||
// .forEach((e)=> {
|
// .forEach((e)=> {
|
||||||
|
|
||||||
// e.selected = false
|
// e.selected = false
|
||||||
@@ -146,6 +154,8 @@ export default {
|
|||||||
|
|
||||||
// })
|
// })
|
||||||
|
|
||||||
|
console.log(for_editor.value, 'for_edit.value')
|
||||||
|
|
||||||
postParticant.value = { ...props.calendar, participant: idPart };
|
postParticant.value = { ...props.calendar, participant: idPart };
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -198,6 +208,7 @@ export default {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
staff.value = res.data.filter((e) => e.employees.length > 0);
|
staff.value = res.data.filter((e) => e.employees.length > 0);
|
||||||
staff.value.forEach((e) => {
|
staff.value.forEach((e) => {
|
||||||
|
console.log(propsCalendar.value.participant, 'propsCalendar.value.participant')
|
||||||
if (propsCalendar.value.participant.length > 0) {
|
if (propsCalendar.value.participant.length > 0) {
|
||||||
e.employees.forEach((empl) => {
|
e.employees.forEach((empl) => {
|
||||||
|
|
||||||
@@ -207,6 +218,7 @@ export default {
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
empl.selected = true;
|
empl.selected = true;
|
||||||
|
// empl.editor =
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user