P-42 Рабочая версия редактирования календаря

This commit is contained in:
iriska-gri committed 2024-06-25 13:33:23 +03:00
1 parent b982e01c16
commit d4ebc14212
5 files changed
+131 -136

No files matched your search

@@ -1,6 +1,12 @@
<template>
<v-expansion-panels class="calendar" variant="accordion" flat tile static v-model="openGroup">
<v-expansion-panels
class="calendar"
variant="accordion"
flat
tile
static
v-model="openGroup"
>
<v-expansion-panel elevation="0" flat tile static>
<v-expansion-panel-title flat tile static class="py-0 px-3">
<div @click.stop="">
@@ -18,54 +24,53 @@
</v-expansion-panel-title>
<v-expansion-panel-text flat tile static>
<template v-if="Object.keys(calendars).length > 0">
<v-list-item
v-for="(x, i) in calendars"
:key="i"
:value="x.cl_name"
@mouseenter="hover=i"
@mouseleave="hover=null"
:class="{'trasitlist': hover===i,
}"
class="pa-0 cursor-default"
>
<template v-slot:prepend>
<v-checkbox-btn
class="text-caption"
:class="`text-${x.cl_color}`"
v-model="x.visible"
:color="x.cl_color"
@update:modelValue="chekUpdate(x)"
></v-checkbox-btn>
</template>
<template v-slot:title>
<span class="text-body-2"> {{ x.cl_name }} </span>
</template>
<v-list-item
v-for="(x, i) in calendars"
:key="i"
:value="x.cl_name"
@mouseenter="hover = i"
@mouseleave="hover = null"
:class="{ trasitlist: hover === i }"
class="pa-0 cursor-default"
>
<template v-slot:prepend>
<v-checkbox-btn
class="text-caption"
:class="`text-${x.cl_color}`"
v-model="x.visible"
:color="x.cl_color"
@update:modelValue="chekUpdate(x)"
></v-checkbox-btn>
</template>
<template v-slot:title>
<span class="text-body-2"> {{ x.cl_name }} </span>
</template>
<template v-slot:append>
<!-- <my-helper :pretext = x /> -->
<transition name="fade">
<v-btn
v-if="
(x.author == accountStore.user.is_idEmployee) ||
(x.participant.some(
(e) =>
e.editor == true &&
e.participant_calendar == accountStore.user.is_idEmployee
))
"
size="x-small"
icon="mdi-pen"
variant="text"
class="transitbtn"
@click.stop="editCreatedCalendar(x)"
></v-btn>
</transition>
</template>
</v-list-item>
<template v-slot:append>
<!-- <my-helper :pretext = x /> -->
<transition name="fade">
<v-btn
v-if="
x.author == accountStore.user.is_idEmployee ||
x.participant.some(
(e) =>
e.editor == true &&
e.participant_calendar ==
accountStore.user.is_idEmployee
)
"
size="x-small"
icon="mdi-pen"
variant="text"
class="transitbtn"
@click.stop="editCreatedCalendar(x)"
></v-btn>
</transition>
</template>
</v-list-item>
</template>
<template v-else>
<div class="text-caption text-grey text-center">Календарей нет</div>
<div class="text-caption text-grey text-center">Календарей нет</div>
</template>
</v-expansion-panel-text>
</v-expansion-panel>
@@ -73,7 +78,7 @@
@update:opendialog="showDialog = $event"
:opendialog="showDialog"
:calendar="calendar"
@getCalendar="$emit('getCalendar')"
/>
</v-expansion-panels>
</template>
@@ -103,7 +108,7 @@ export default {
const calendar = ref({});
const openGroup = ref([0]);
const trans = ref(false);
const hover = ref(0)
const hover = ref(0);
@@ -130,7 +135,8 @@ export default {
accountStore,
openGroup,
trans,
hover
hover,
};
},
};
@@ -148,11 +154,10 @@ export default {
}
.calendar .v-expansion-panel-text__wrapper {
padding: 0!important;
padding-right: 10px!important;
padding: 0 !important;
padding-right: 10px !important;
}
.trasitlist:hover .transitbtn {
animation-fill-mode: forwards;
/* transition: opacity 0.1s; */
animation-duration: 0.5s;
@@ -173,12 +178,9 @@ export default {
.transitbtn {
opacity: 0;
/* animation-direction: reverse; */
/* animation-duration: 0.1s;
animation-name: filli; */
}
</style>