P-43 Допроверить данные

This commit is contained in:
iriska-gri committed 2024-05-27 16:59:42 +03:00
1 parent bd6fa2c94b
commit aeb322199c
6 files changed
+75 -8

No files matched your search

+1
View File
@@ -7,4 +7,5 @@ urlpatterns = [
path('calendarEvents/', CalendarEventsAPIView.as_view(), name='calendarEvents'),
path('get_calendars/', GetCalendars.as_view(), name='get_calendars'),
path('exclusionDatas/', ExclusionDatesAPIView.as_view(), name='exclusionDatas'),
path('createEvents/', CreateEventsAPIView.as_view(), name='createEvents')
]
+8 -1
View File
@@ -6,7 +6,7 @@ from rest_framework.generics import ListAPIView
from rest_framework.response import Response
import json
from django.db.models.functions import TruncYear
from userauth.serializers import *
class CalendarEventsAPIView(APIView):
@@ -74,3 +74,10 @@ class GetCalendars(ListAPIView):
def get(self, request):
queryset = Calendar.objects.filter(user=request.user)
return Response(CalendarSerializer(queryset, many=True).data)
class CreateEventsAPIView(APIView):
def get(self, request):
user = DictEmployee.objects.filter(deleted=0).order_by('id_dict_position__order_position','familyname')
resp = InfoUserCardSerializer(user, many=True).data
print(resp, 'ffffffffffffffffffffff')
return Response(resp)
@@ -4,7 +4,15 @@
<v-card class="h-100 rounded-0 d-flex flex-colmn" width="250">
<v-row no-gutters class="flex-column">
<v-col class="flex-grow-0">
<!-- <v-btn></v-btn> -->
<v-btn
type="submit"
class="text-subtitle-1 font-weight-light"
color="btn_text"
block
elevation="1"
@click="showDialog = true"
>Создать событие</v-btn
>
</v-col>
<v-col class="w100" lg="3">
<v-locale-provider locale="ru">
@@ -20,12 +28,7 @@
@update:month="getMonth"
@update:year="getYear"
>
</v-date-picker>
<pre>
{{ week }}
</pre>
</v-locale-provider>
</v-col>
<v-col></v-col>
@@ -48,6 +51,11 @@
rail
>
</v-navigation-drawer>
{{ showDialog }}
<event-create
@update:opendialog="showDialog = $event"
:opendialog="showDialog"
/>
</v-row>
</template>
@@ -56,10 +64,15 @@ import { axiosApiInstance } from "@/utils/axios-api";
import { ref, onMounted } from "vue";
import { useWeekendsStore } from "@/store/WeekendsStore";
import EventCreate from "@/components/calendar_of_events/event-create.vue";
// const burl = baseURL.slice(0, -1);
export default {
components: { EventCreate },
setup() {
const showDialog = ref(false);
const week = useWeekendsStore().week;
const drawer_right = ref(false);
const cal = ref(null);
@@ -130,6 +143,7 @@ export default {
weekendsData,
week,
CheckingStore,
showDialog,
};
},
};
@@ -0,0 +1,42 @@
<template>
<v-dialog v-model="dialog_create_event" max-width="700">
<v-card height="400"> hello </v-card>
</v-dialog>
</template>
<script>
import { computed, ref } from "vue";
import { axiosApiInstance } from "@/utils/axios-api";
export default {
props: {
opendialog: {
type: Boolean,
default: false,
},
},
setup(props, { emit }) {
const dialog_create_event = computed({
get: () => props.opendialog,
set: (value) => emit("update:opendialog", value),
});
const confirmation = () => {
axiosApiInstance
.get(`api/calendar_of_events/createEvents/`)
.then((data) => {
console.log(data.data, "datadatadatawwwwwwwwwwww");
});
};
confirmation()
return {
dialog_create_event,
};
},
};
</script>
<style></style>
@@ -123,6 +123,8 @@ import CKEditor from "@ckeditor/ckeditor5-vue";
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import "@ckeditor/ckeditor5-build-classic/build/translations/ru";
import EventDialogEditParticipant from "./event-dialog-edit-participant.vue";
import eventDialogEdit from "@/components/calendar_of_events/event-dialog-edit.vue";
export default {
props: {
event: {
@@ -20,9 +20,10 @@
/> -->
<!-- <event-dialog-info :event="event" v-else /> -->
<component
:is = "editEvent ? 'eventDialogEdit':'eventDialogInfo'"
:is = "editEvent ? 'eventDialogEdit':'eventDialogInfo'"
:event="event"
@returnUpdateData="returnUpdateData"
/>
</v-dialog>
</template>