P-47
This commit is contained in:
1 parent
a170ae017a
commit
21c0216d67
1 file changed
+25
-15
@@ -31,8 +31,20 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
<v-col>
|
<v-col>
|
||||||
<calendar-create-select
|
<calendar-create-select
|
||||||
|
v-if="calendar.length > 0"
|
||||||
:staff="newStaff"
|
:staff="newStaff"
|
||||||
@returnIdParticant="returnIdParticant"
|
@returnIdParticant="returnIdParticant"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<v-autocomplete
|
||||||
|
v-else
|
||||||
|
label="Выберите из списка или найдите по ФИО"
|
||||||
|
variant="outlined"
|
||||||
|
density="compact"
|
||||||
|
hide-details
|
||||||
|
class="max-height-select py-3"
|
||||||
|
disabled
|
||||||
|
return-object
|
||||||
/> </v-col
|
/> </v-col
|
||||||
></v-row>
|
></v-row>
|
||||||
|
|
||||||
@@ -206,26 +218,26 @@ export default {
|
|||||||
const accountStore = useAccountStore();
|
const accountStore = useAccountStore();
|
||||||
const newStaff = computed({
|
const newStaff = computed({
|
||||||
get() {
|
get() {
|
||||||
|
let ns = [];
|
||||||
let ns = []
|
let indCal = propsEvent.value.mycalendars.findIndex(
|
||||||
let indCal = propsEvent.value.mycalendars.findIndex(e=>e.id ==propsEvent.value.event.calendar )
|
(e) => e.id == propsEvent.value.event.calendar
|
||||||
|
);
|
||||||
|
console.log(indCal);
|
||||||
|
|
||||||
staff.value.forEach((e) => {
|
staff.value.forEach((e) => {
|
||||||
let emp = { ...e };
|
let emp = { ...e };
|
||||||
emp.employees = e.employees.filter((n) =>
|
emp.employees = e.employees.filter((n) => {
|
||||||
{
|
if (n.id == accountStore.user.is_idEmployee) {
|
||||||
if (n.id ==accountStore.user.is_idEmployee) {
|
n.selected = true;
|
||||||
n.selected = true
|
|
||||||
}
|
|
||||||
|
|
||||||
return propsEvent.value.mycalendars[indCal].participant.some(part => part.id === n.id)
|
|
||||||
// == n.id
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return propsEvent.value.mycalendars[indCal].participant.some(
|
||||||
|
(part) => part.id === n.id
|
||||||
);
|
);
|
||||||
|
// == n.id
|
||||||
|
});
|
||||||
|
|
||||||
if (emp.employees.length > 0) ns.push(emp)
|
if (emp.employees.length > 0) ns.push(emp);
|
||||||
|
|
||||||
// if (propsEvent.value.event.participant.length > 0) {
|
// if (propsEvent.value.event.participant.length > 0) {
|
||||||
// e.employees.forEach((empl) => {
|
// e.employees.forEach((empl) => {
|
||||||
@@ -347,7 +359,6 @@ export default {
|
|||||||
|
|
||||||
// propsEvent.value.event.participant.push(e.id)
|
// propsEvent.value.event.participant.push(e.id)
|
||||||
);
|
);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const dateEvent = computed({
|
const dateEvent = computed({
|
||||||
@@ -370,7 +381,6 @@ export default {
|
|||||||
let postEvent = new FormData();
|
let postEvent = new FormData();
|
||||||
postEvent.append("event", JSON.stringify({ ...propsEvent.value.event }));
|
postEvent.append("event", JSON.stringify({ ...propsEvent.value.event }));
|
||||||
if (propsEvent.value.event.files !== null) {
|
if (propsEvent.value.event.files !== null) {
|
||||||
|
|
||||||
files.value.forEach((e) => postEvent.append("files", e));
|
files.value.forEach((e) => postEvent.append("files", e));
|
||||||
// postEvent.append("files", propsEvent.value.event.files[0]);
|
// postEvent.append("files", propsEvent.value.event.files[0]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user