Merge branch 'develop' into 22_about_inspection

This commit is contained in:
iriska-gri committed 2024-05-07 09:37:04 +03:00
commit b10128405a
24 files changed
+834 -374

No files matched your search

+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "front",
"version": "0.0.61",
"version": "0.0.63",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "front",
"version": "0.0.61",
"version": "0.0.63",
"dependencies": {
"-": "^0.0.1",
"@mdi/font": "7.0.96",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "front",
"version": "0.0.61",
"version": "0.0.63",
"scripts": {
"dev": "vite",
"build": "vite build",
@@ -70,7 +70,7 @@
<v-col
class="text-h6 pt-8 text-grey text-center align-self-center text--lighten-1 font-weight-light"
>
За выбранный период активных критиков нет
За выбранный период комментариев нет
</v-col>
</v-row>
@@ -23,7 +23,7 @@
/>
</div>
<div class="text-caption font-weight-regular">
({{nStaff}} человек в штате)
({{nStaff}} активных учетных записей)
</div>
</v-toolbar>
</template>
@@ -1,224 +0,0 @@
<template>
<v-row>
<v-col class="flex-column pr-0">
<v-card class="h-100">
<vue-cal
locale="ru"
xsmall
:time="false"
hide-view-selector
:disable-views="['years', 'year', 'week', 'day']"
events-count-on-year-view
active-view="month"
:events="events"
todayButton
@cell-focus="selectedDate = $event"
>
<template #arrow-prev>
<v-icon icon="mdi-menu-left"></v-icon>
</template>
<template #arrow-next>
<v-icon icon="mdi-menu-right"></v-icon>
</template>
<template #today-button>
<v-tooltip text="Сегодня" location="bottom">
<template v-slot:activator="{ props }">
<v-icon
@click="selectedDate = new Date()"
v-bind="props"
icon="mdi-crosshairs-gps"
size="x-small"
class="pt-1 pr-3"
color="more_details_btn"
/>
</template>
</v-tooltip>
</template>
</vue-cal>
</v-card>
</v-col>
<v-col>
<v-card class="h-100">
<v-card-title class="text-center"
>События на {{ dayformat(selectedDate) }}</v-card-title
>
<vue-cal
locale="ru"
xsmall
:time="false"
hide-view-selector
hideTitleBar
split
header-format="DD"
:events="events"
active-view="day"
:disable-views="['years', 'year', 'month', 'week']"
:selected-date="selectedDate"
>
<template #arrow-prev>
<v-icon icon="mdi-menu-left"></v-icon>
</template>
<template #arrow-next>
<v-icon icon="mdi-menu-right"></v-icon>
</template>
<template #today-button>
</template>
</vue-cal>
</v-card>
</v-col>
</v-row>
</template>
<script>
import VueCal from "vue-cal";
import "vue-cal/dist/vuecal.css";
import { ref, onMounted } from "vue";
import { axiosApiInstance } from "@/utils/axios-api";
export default {
components: { VueCal },
setup() {
const events = ref([]);
function f_generalvacation() {
axiosApiInstance
.get("api/general_vacation/generalvacation/")
.then((data) => {
for (let x in data.data) {
if (x == "План-график") {
data.data[x].map((e) => {
events.value.push({
name: e.name,
start: e.start_work_period,
end: e.end_work_period,
content: e.name,
});
});
}
}
});
}
onMounted(() => {
f_generalvacation();
});
const selectedDate = ref(null);
function dayformat(days) {
const d = new Date(days);
let mess = "сегодня";
if (d.getFullYear() != "1970") {
mess = `${d.getDate()} число`;
}
return mess;
}
return { events, selectedDate, f_generalvacation, dayformat };
},
};
</script>
<style>
/* Dot indicator */
.vuecal__cell-events-count {
width: 20px;
min-width: 0;
height: 11px;
padding: 0;
color: transparent;
}
.vuecal {
border-radius: 6px;
}
.vuecal__title-bar {
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
.vuecal__title-bar {
background: var(--cards);
/* background: linear-gradient(to top right, rgba(19,84,122,.8), rgba(128,208,199,.8)); */
}
.vuecal__flex .vuecal__title {
font-family: sans-serif;
}
.vuecal__cell-events-count {
position: absolute;
left: 50%;
top: 65%;
transform: translate(-50%);
min-width: 15px;
height: 15px;
line-height: 15px;
padding: 0;
background: linear-gradient(
to top right,
rgba(19, 84, 122, 0.8),
rgba(128, 208, 199, 0.8)
);
color: #f8fff9 !important;
border-radius: 12px;
font-size: 10px;
box-sizing: border-box;
}
.vuecal__event {
color: #666;
background-color: transparent;
padding: 10px;
position: relative;
box-sizing: border-box;
left: 0;
width: 100%;
z-index: 1;
transition: box-shadow 0.3s, left 0.3s, width 0.3s;
overflow: hidden;
text-align: justify;
}
.vuecal--rounded-theme .vuecal__cell-content {
width: 30px;
height: 30px;
flex-grow: 0;
border: 1px solid #00a5bc00;
background: #c2e9d78c;
border-radius: 30px;
color: #333;
}
.vuecal__cell-content {
cursor: pointer;
}
.vuecal__body {
position: relative;
overflow: auto;
height: 0;
}
.vuecal--no-time .vuecal__event {
min-height: 20px;
}
.vuecal__cell--selected:before {
border-color: rgba(30, 65, 49, 0.5);
}
.vuecal__cell--today,
.vuecal__cell--current {
background-color: rgba(238, 181, 214, 0.548);
}
.vuecal__cell--selected:before {
border-color: rgba(30, 65, 49, 0);
}
.vuecal__cell--selected {
background-color: #3a97694a;
z-index: 2;
}
</style>
@@ -52,7 +52,6 @@
<info-user-card
:author="author"
:opendialog = open
:loging="author.login"
@update:opendialog="open = $event"
/>
</div>
@@ -1,86 +1,91 @@
<template>
<div class="align-center d-flex flex-column py-1">
<v-btn
variant="text"
v-for="x in onlineuser"
:key="x"
height="50"
>
<v-avatar
size="36px"
>
<v-img
:src="checkremote( `${spravURL}${x}.jpg`)"
@click="whatuser(x)"
/>
<v-btn variant="text" v-for="x in onlineuser" :key="x" height="50">
<v-avatar size="36px">
<v-img :src="checkremote(`${spravURL}${x}.jpg`)" @click="whatuser(x)" />
</v-avatar>
</v-btn>
<info-user-card
:opendialog = open
:loging="loging"
<info-user-card
:author="author"
:opendialog="open"
@update:opendialog="open = $event"
/>
</div>
</div>
</template>
<script>
import { ref,watch } from 'vue'
import { baseWS } from '@/utils/axios-api'
import {useAccountStore} from '@/store/AccountStore'
import { spravURL } from '@/utils/axios-api'
import {checkremote} from '@/utils/universal_functions'
import { ref, watch } from "vue";
import { baseWS } from "@/utils/axios-api";
import { useAccountStore } from "@/store/AccountStore";
import { spravURL } from "@/utils/axios-api";
import { checkremote } from "@/utils/universal_functions";
import { axiosApiInstance } from "@/utils/axios-api";
export default {
setup() {
const author = ref({});
const open = ref(false);
const wsfuncs = {
onliner: function (data) {
let newset = new Set(data);
let arr = Array.from(newset);
arr.splice(
arr.findIndex((e) => e == accountStore.user.login),
1
);
onlineuser.value = arr;
},
};
const accountStore = useAccountStore();
let onlineuser = ref([]);
setup(){
const loging = ref('')
const open = ref(false)
const wsfuncs={onliner:function(data){
let newset = new Set(data)
let arr= Array.from(newset)
arr.splice(arr.findIndex(e=> e == accountStore.user.login), 1)
onlineuser.value = arr
}}
const accountStore = useAccountStore()
let onlineuser= ref([])
const connect = new WebSocket(baseWS+"ws/watcher/?token="+localStorage.access)
const whatuser=(x)=> {
loging.value = x
open.value = true
const connect = new WebSocket(
baseWS + "ws/watcher/?token=" + localStorage.access
);
const whatuser = (x) => {
open.value = true;
axiosApiInstance
.get(`api/accounts/getuser/?userlogin=${x}`)
.then((data) => {
author.value = {
department: data.data.department,
fio: data.data.fio,
post: data.data.post,
email: data.data.email,
tel: data.data.tel,
room: data.data.room,
login: data.data.login,
};
});
};
connect.onmessage = (e) => {
let data = JSON.parse(e.data);
wsfuncs[data["message"]["action"]](data.message.data);
};
watch(
() => accountStore.cod2user,
function () {
if (!accountStore.cod2user.value) {
connect.close();
}
}
);
connect.onmessage=(e)=>{
let data = JSON.parse(e.data)
wsfuncs[data['message']['action']](data.message.data)
}
watch(()=>accountStore.cod2user,function(){
if (!accountStore.cod2user.value){
connect.close()
}
})
return {
loging,
author,
open,
onlineuser,
checkremote,
spravURL,
whatuser,
accountStore
}
}
}
accountStore,
};
},
};
</script>
<style>
</style>
<style></style>
@@ -11,7 +11,6 @@
<info-user-card
:author=author
:opendialog = open
:loging="author.login"
@update:opendialog="open = $event"
/>
</div>
@@ -0,0 +1,71 @@
# Календарь событий
Пример объекта
```
const events = ref([
{
start: '2024-04-15 14:00',
end: '2024-04-25 18:00',
title: 'Need to go shopping',
icon: 'shopping_cart', // Custom attribute.
content: 'Click to see my shopping list',
contentFull: 'My shopping list is rather long:<br><ul><li>Avocados</li><li>Tomatoes</li><li>Potatoes</li><li>Mangoes</li></ul>', // Custom attribute.
class: 'leisure',
repeat: {
every: 'week', // You can repeat on multiple days of the week.
until: '2024-05-30' // Don't need a time here as it will take the same as original event date.
}
},
{
start: '2024-04-15 10:00',
end: '2024-04-25 15:00',
title: 'Golf with John',
icon: 'golf_course', // Custom attribute.
content: 'Do I need to tell how many holes?',
contentFull: 'Okay.<br>It will be a 18 hole golf course.', // Custom attribute.
class: 'sport'
}
])
```
Повторяющиеся события
Когда это будет готово, вот как это будет работать.
Вы можете повторить событие:
Каждый день - предоставляя свойство every: "день".
Каждую неделю - предоставляя каждую: "неделю" свойство.
Каждый месяц - путем предоставления каждого: свойства "месяц".
Каждый год - путем предоставления каждого: "годового" объекта недвижимости.
Для каждого конкретного дня недели - путем предоставления массива дней недели, содержащего номера дней недели (от 1 до 7 для воскресенья).
Каждые x дней - путем предоставления свойства every: x, где x является целым числом.
Навсегда; Или до истечения срока действия, если вы предоставляете свойство until: {String | Date}.
Будь то однодневный, многодневный, фоновый, на весь день, со временем или вне времени.
repeat: {
weekdays: [1, 3], // You can repeat on multiple days of the week.
until: '2020-11-30' // Don't need a time here as it will take the same as original event date.
}
repeat: {
weekdays: [5] // If original event day is not in these days, original event will still show up.
// Without `until` property, it will go on forever.
}
repeat: {
every: 'week',
until: new Date('2019/06/01') // You can also use a Javascript Date.
}
repeat: {
every: 14,
until: '2019-01-20'
}
repeat: {
every: 'month',
until: '2019-12-26'
}
repeat: {
every: 'year'
}
@@ -0,0 +1,397 @@
<template>
<v-row>
<v-col class="flex-column pr-0">
<v-card class="h-100">
<!-- <my-helper :pretext="selectedEvent" /> -->
<vue-cal
locale="ru"
xsmall
:selected-date="new Date()"
:time-from="8 * 60"
:time-to="23 * 60"
hide-view-selector
events-count-on-year-view
editable-events
show-all-day-events
todayButton
:events="events"
:on-event-click="onEventClick"
active-view="month"
:disable-views="['years', 'year', 'week', 'day']"
@cell-focus="selectedDate = $event"
@event-drag-create="showEventCreationDialog = true"
>
<template #arrow-prev>
<v-icon icon="mdi-menu-left"></v-icon>
</template>
<template #arrow-next>
<v-icon icon="mdi-menu-right"></v-icon>
</template>
<template #today-button>
<v-tooltip text="Сегодня" location="bottom">
<template v-slot:activator="{ props }">
<v-icon
@click="selectedDate = new Date()"
v-bind="props"
icon="mdi-crosshairs-gps"
size="x-small"
class="pt-1 pr-3"
color="more_details_btn"
/>
</template>
</v-tooltip>
</template>
</vue-cal>
<event-dialog
:event="selectedEvent"
:opendialog="showDialog"
@update:opendialog="showDialog = $event"
/>
<!-- <v-dialog
v-model="showEventCreationDialog"
:persistent="true"
max-width="420"
>
<v-card>
<v-card-title>
</v-card-title>
<v-card-text>
<v-input
v-model="selectedEvent.title"
label="Event Title"
/>
<v-textarea
v-model="selectedEvent.content"
placeholder="Event Content"
/>
<v-textarea
v-model="selectedEvent.content"
placeholder="Event Content"
/>
<v-flex>
<v-select
:items="eventsCssClasses"
placeholder="Event CSS Class"
@change="selectedEvent.class = $event"
:value="selectedEvent.class"
/>
<v-switch
v-model="selectedEvent.background"
label="background Event"
/>
</v-flex>
<v-flex>
<v-btn @click="cancelEventCreation()">Cancel</v-btn>
<v-btn @click="closeCreationDialog()">Save</v-btn>
</v-flex>
</v-card-text>
</v-card>
</v-dialog> -->
</v-card>
</v-col>
<v-col>
<v-card class="h-100">
<v-card-title class="text-center"
>События на {{ dayformat(selectedDate) }}</v-card-title
>
<vue-cal
locale="ru"
hideTitleBar
split
header-format="DD"
active-view="day"
:disable-views="['years', 'year', 'month', 'week']"
:selected-date="selectedDate"
small
:time-from="8 * 60"
:time-to="20 * 60"
hide-view-selector
hide-title-bar
hide-weekends
:events="events"
:on-event-create="onEventCreate"
:on-event-click="onEventClick"
@event-drag-create="showEventCreationDialog = true"
>
</vue-cal>
</v-card>
</v-col>
</v-row>
</template>
<script>
import VueCal from "vue-cal";
import "vue-cal/dist/vuecal.css";
import { ref } from "vue";
import { axiosApiInstance } from "@/utils/axios-api";
import { formaDashTime } from "@/utils/universal_functions";
import EventDialog from "@/components/calendar_of_events/event-dialog.vue";
export default {
components: { VueCal, EventDialog },
setup() {
const selectedEvent = ref({});
const selectedEventCreate = ref(null);
const eventsCssClasses = ["bg-red", "bg-blue", "bg-green"];
const showDialog = ref(false);
const showEventCreationDialog = ref(false);
const events = ref([
// {
// start: '2024-04-15 14:00',
// end: '2024-04-25 18:00',
// title: 'Need to go shopping',
// icon: 'shopping_cart', // Custom attribute.
// content: 'Click to see my shopping list',
// contentFull: 'My shopping list is rather long:<br><ul><li>Avocados</li><li>Tomatoes</li><li>Potatoes</li><li>Mangoes</li></ul>', // Custom attribute.
// class: 'leisure',
// repeat: {
// every: 'week', // You can repeat on multiple days of the week.
// until: '2024-05-30' // Don't need a time here as it will take the same as original event date.
// }
// },
// {
// start: '2024-04-15 10:00',
// end: '2024-04-25 15:00',
// title: 'Golf with John',
// icon: 'golf_course', // Custom attribute.
// content: 'Do I need to tell how many holes?',
// contentFull: 'Okay.<br>It will be a 18 hole golf course.', // Custom attribute.
// class: 'sport'
// }
]);
const onEventClick = (event, e) => {
selectedEvent.value = event;
showDialog.value = true;
e.stopPropagation();
};
const onEventCreate = (event, deleteEventFunction) => {
console.log(event, deleteEventFunction, "event, deleteEventFunction");
selectedEvent.value = event;
showEventCreationDialog.value = true;
deleteEventFunction.value = deleteEventFunction;
return event;
};
const cancelEventCreation = () => {
closeCreationDialog();
deleteEventFunction();
};
const closeCreationDialog = () => {
showEventCreationDialog.value = false;
selectedEvent.value = {};
};
function f_generalvacation() {
axiosApiInstance
.get("api/calendar_of_events/calendarEvents/")
.then((data) => {
for (let key in data.data) {
for (let x in data.data[key].event) {
events.value.push({
start: formaDashTime(data.data[key].event[x].cdate),
end: formaDashTime(data.data[key].event[x].enddate),
title: data.data[key].event[x].name,
contentFull: data.data[key].event[x].description,
icon: "mdi-book-open",
class: "bg-indigo-lighten-5 border-sm",
});
}
}
// {
// start: '2024-04-15 14:00',
// end: '2024-04-25 18:00',
// title: 'Need to go shopping',
// icon: 'shopping_cart', // Custom attribute.
// content: 'Click to see my shopping list',
// contentFull: 'My shopping list is rather long:<br><ul><li>Avocados</li><li>Tomatoes</li><li>Potatoes</li><li>Mangoes</li></ul>', // Custom attribute.
// class: 'leisure',
// repeat: {
// every: 'week', // You can repeat on multiple days of the week.
// until: '2024-05-30' // Don't need a time here as it will take the same as original event date.
// }
// console.log(data.data, "dataaaaaaaaaaaaa");
});
// for (let x in data.data) {
// if (x == "План-график") {
// data.data[x].map((e) => {
// events.value.push({
// name: e.name,
// start: e.start_work_period,
// end: e.end_work_period,
// content: e.name,
// });
// });
// }
// }
// });
}
f_generalvacation();
const selectedDate = ref(null);
function dayformat(days) {
const d = new Date(days);
let mess = "сегодня";
if (d.getFullYear() != "1970") {
mess = `${d.getDate()} число`;
}
return mess;
}
return {
selectedEvent,
events,
selectedDate,
f_generalvacation,
dayformat,
showDialog,
onEventClick,
showEventCreationDialog,
eventsCssClasses,
onEventCreate,
closeCreationDialog,
cancelEventCreation,
};
},
};
</script>
<style>
/* Dot indicator */
.vuecal__cell-events-count {
width: 20px;
min-width: 0;
height: 11px;
padding: 0;
color: transparent;
}
.vuecal {
border-radius: 6px;
}
.vuecal__title-bar {
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
.vuecal__title-bar {
background: var(--cards);
}
.vuecal__flex .vuecal__title {
font-family: sans-serif;
}
.vuecal__cell-events-count {
position: absolute;
left: 50%;
top: 65%;
transform: translate(-50%);
min-width: 15px;
height: 15px;
line-height: 15px;
padding: 0;
background: linear-gradient(
to top right,
rgba(19, 84, 122, 0.8),
rgba(128, 208, 199, 0.8)
);
color: #f8fff9 !important;
border-radius: 12px;
font-size: 10px;
box-sizing: border-box;
}
/* .vuecal__event {
color: #666;
background-color: transparent;
padding: 10px;
position: relative;
box-sizing: border-box;
left: 0;
width: 100%;
z-index: 1;
transition: box-shadow 0.3s, left 0.3s, width 0.3s;
overflow: hidden;
text-align: justify;
} */
.vuecal--rounded-theme .vuecal__cell-content {
width: 30px;
height: 30px;
flex-grow: 0;
border: 1px solid #00a5bc00;
background: #c2e9d78c;
border-radius: 30px;
color: #333;
}
.vuecal__cell-content {
cursor: pointer;
}
.vuecal__body {
position: relative;
overflow: auto;
height: 0;
}
.vuecal--no-time .vuecal__event {
min-height: 20px;
}
.vuecal__cell--selected:before {
border-color: rgba(30, 65, 49, 0.5);
}
.vuecal__cell--today,
.vuecal__cell--current {
background-color: rgba(238, 181, 214, 0.548);
}
.vuecal__cell--selected:before {
border-color: rgba(30, 65, 49, 0);
}
.vuecal__cell--selected {
background-color: #3a97694a;
z-index: 2;
}
.vuecal__event {
cursor: pointer;
}
.vuecal__event-title {
font-size: 1.2em;
font-weight: bold;
margin: 4px 0 8px;
}
.vuecal__event-time {
display: inline-block;
margin-bottom: 12px;
padding-bottom: 12px;
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.vuecal__event-content {
font-style: italic;
}
</style>
@@ -0,0 +1,46 @@
<template>
<v-card>
<v-card-title>
<v-text-field v-model="event.title" placeholder="Заголовок" />
</v-card-title>
<v-card-subtitle>
<v-text-field v-model="event.start" placeholder="время" />
<!-- <strong>{{ event.start && event.start.format("DD.MM.YYYY") }}</strong> -->
</v-card-subtitle>
<v-card-text class="pt-2">
<p class="pb-3" v-html="event.contentFull" />
<strong>Время:</strong>
<ul class="pl-5">
<li>
Начало:
{{ event.start && event.start.formatTime() }}
</li>
<li>
Окончание:
{{ event.end && event.end.formatTime() }}
</li>
</ul>
</v-card-text>
</v-card>
</template>
<script>
export default {
props: {
event: {
type: Object,
default: () => {},
},
},
}
</script>
<style>
</style>
@@ -0,0 +1,45 @@
<template>
<v-card>
<v-card-title>
<v-icon color="indigo-darken-3" class="pb-1">{{ event.icon }}</v-icon>
<span class="pl-3"> {{ event.title }}</span>
</v-card-title>
<v-card-subtitle>
<strong>{{ event.start && event.start.format("DD.MM.YYYY") }}</strong>
</v-card-subtitle>
<v-card-text class="pt-2">
<p class="pb-3" v-html="event.contentFull" />
<strong>Время:</strong>
<ul class="pl-5">
<li>
Начало:
{{ event.start && event.start.formatTime() }}
</li>
<li>
Окончание:
{{ event.end && event.end.formatTime() }}
</li>
</ul>
</v-card-text>
</v-card>
</template>
<script>
export default {
props: {
event: {
type: Object,
default: () => {},
},
},
}
</script>
<style>
</style>
@@ -0,0 +1,58 @@
<template>
<v-dialog v-model="mydialog" max-width="700">
<v-card>
<v-card-title>
<v-icon
:icon="editEvent?'mdi-check':'mdi-pencil'"
color="indigo-darken-3"
class="pb-1"
@click="editEvent?editEvent = false:editEvent = true"
/>
</v-card-title>
</v-card>
<event-dialog-edit :event="event" v-if="editEvent" />
<event-dialog-info :event="event" v-else />
</v-dialog>
</template>
<script>
import { computed, ref } from "vue";
import eventDialogEdit from '@/components/calendar_of_events/event-dialog-edit.vue';
import eventDialogInfo from '@/components/calendar_of_events/event-dialog-info.vue';
export default {
components: { eventDialogEdit, eventDialogInfo },
props: {
opendialog: {
type: Boolean,
default: false,
},
event: {
type: Object,
default: () => {},
},
},
setup(props, { emit }) {
const editEvent = ref(false);
const mydialog = computed({
get: () => props.opendialog,
set: (value) => emit("update:opendialog", value),
});
// const editEvent = () => {
// console.log('hello')
// }
return {
mydialog,
editEvent,
};
},
};
</script>
<style></style>
@@ -1,25 +1,22 @@
<template>
<div>
<!-- <my-helper :pretext="kl" /> -->
<v-btn @click="useICalReader"> ical</v-btn>
<v-btn @click="useICalReader"> ical</v-btn>
</div>
</template>
<script>
// import {useICalReader} from '@/utils/universal_functions'
import { baseURL, axiosApiInstance } from '@/utils/axios-api'
import { ref } from 'vue';
import { baseURL, axiosApiInstance } from "@/utils/axios-api";
import { ref } from "vue";
import ical from "ical.js";
import { formatDash } from '@/utils/universal_functions'
const burl = baseURL.slice(0,-1)
const burl = baseURL.slice(0, -1);
export default {
setup() {
const participant = ref('')
const calendar = ref('')
const participant = ref("");
const calendar = ref("");
const useICalReader = async () => {
const response = await fetch(`${burl}/media/ical/calendar.ics`);
const data = await response.text();
@@ -32,6 +29,11 @@ export default {
.map((vevent) => new ical.Event(vevent));
const calendarEvents = events.map((event) => {
let attendees = [];
event.attendees.map((att) => {
attendees.push(att.jCal[1].cn);
});
return {
summary: event.summary,
description: event.description,
@@ -39,50 +41,30 @@ export default {
start: event.startDate.toJSDate(),
end: event.endDate.toJSDate(),
location: event.location,
attendees: event.attendees
}
})
participant.value = name
calendar.value = calendarEvents
console.log(name, 'name')
console.log(calendarEvents, 'calendarEventse')
f_feedbackdata()
// return {
// type: "calendar",
// title: name,
// calendar: calendarEvents,
// }
}
attendees: attendees,
};
});
participant.value = name;
calendar.value = calendarEvents;
f_feedbackdata();
};
// const s= useICalReader(`${burl}/media/ical/calendar.ics`)
// console.log(s.value, 'ddddddddd')
function f_feedbackdata() {
axiosApiInstance.post(`api/calendar_of_events/calendarEvents/`, {
participants: participant.value,
calendar: calendar.value
})
.then(data => {
console.log(data,'datas')
}
)
axiosApiInstance
.post(`api/calendar_of_events/calendarEvents/`, {
participants: participant.value,
calendar: calendar.value,
})
.then((data) => {
console.log(data, "datas");
});
}
return {
useICalReader
}
}
}
useICalReader,
};
},
};
</script>
<style>
</style>
<style></style>
+9 -3
View File
@@ -6,9 +6,10 @@
height="450"
hide-delimiters
hide-delimiter-background
show-arrows="hover"
:show-arrows="carous.length<2?false:'hover'"
color="white"
>
<v-carousel-item
v-for="(x, i) in carous"
:key="i"
@@ -16,6 +17,7 @@
cover
eager
>
<v-container
fill-height
fluid
@@ -78,7 +80,7 @@ export default {
setup() {
const burl = baseURL.slice(0, -1);
const carous = ref([{ link: "newsimage/default.jpg" }]);
const carous = ref([{ link: `/media/newsimage/scales.jpg`, "title": null, "text": "" }]);
const feedalert = useAlertStore().alert;
const getfromserver = () => {
@@ -89,7 +91,11 @@ export default {
feedalert.color = "red-darken-2";
feedalert.ico = "mdi-alert-outline";
}
carous.value = result.data.result;
if (result.data.result.length > 0) {
carous.value = result.data.result;
}
});
};
+1 -1
View File
@@ -45,7 +45,7 @@
</v-card>
<v-card
v-else class="h-100 w-100 d-flex justify-center flex-column"
:image="`${burl}/media/default/sea.jpg`">
:image="`${burl}/media/default/didjlenta.jpg`">
<v-row class="flex-grow-0">
<v-col class="py-0">
+5 -1
View File
@@ -21,11 +21,15 @@ export function formaComaTime(date) {
return moment(date).format("DD.MM.YYYY H:mm");
}
export function formaDashTime(date) {
return moment(date).format("YYYY-MM-DD H:mm");
}
export function checking_for_entry(where, what) {
if (!where.includes(what)) {
where.push(what);
}
}
}
export function getfromserver(path, reactive) {
try {
+2 -2
View File
@@ -117,13 +117,13 @@ setup(){
"br": {
"title": "Отказы",
"abb": "(BR)",
"tooltip": "Термин в веб-аналитике, обозначающий процентное соотношение количества посетителей, покинувших сайт прямо со страницы входа или просмотревших не более одной страницы сайта к общему количеству посетителей",
"tooltip": "Bounce Rate - термин в веб-аналитике, обозначающий процентное соотношение количества посетителей, покинувших сайт прямо со страницы входа или просмотревших не более одной страницы сайта к общему количеству посетителей",
"data": 0
},
"ppv": {
"title": "Страниц за визит",
"abb": "(PPV)",
"tooltip": "Глубина просмотра страниц — поведенческая метрика, которая показывает, сколько страниц на сайте в среднем просматривает пользователь",
"tooltip": "Pages Per Visit - глубина просмотра страниц. Поведенческая метрика, которая показывает, сколько страниц на сайте в среднем просматривает пользователь",
"data": 0
}
+1 -1
View File
@@ -116,7 +116,7 @@
import DigitalLetna from '@/components/digital-letna.vue'
import { axiosApiInstance } from '@/utils/axios-api'
import EventCalendar from '@/components/UI/event-calendar.vue'
import EventCalendar from '@/components/calendar_of_events/event-calendar.vue'
export default {