P-43 Допроверить данные
This commit is contained in:
1 parent
bd6fa2c94b
commit
aeb322199c
6 files changed
+75
-8
No files matched your search
@@ -7,4 +7,5 @@ urlpatterns = [
|
|||||||
path('calendarEvents/', CalendarEventsAPIView.as_view(), name='calendarEvents'),
|
path('calendarEvents/', CalendarEventsAPIView.as_view(), name='calendarEvents'),
|
||||||
path('get_calendars/', GetCalendars.as_view(), name='get_calendars'),
|
path('get_calendars/', GetCalendars.as_view(), name='get_calendars'),
|
||||||
path('exclusionDatas/', ExclusionDatesAPIView.as_view(), name='exclusionDatas'),
|
path('exclusionDatas/', ExclusionDatesAPIView.as_view(), name='exclusionDatas'),
|
||||||
|
path('createEvents/', CreateEventsAPIView.as_view(), name='createEvents')
|
||||||
]
|
]
|
||||||
@@ -6,7 +6,7 @@ from rest_framework.generics import ListAPIView
|
|||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
import json
|
import json
|
||||||
from django.db.models.functions import TruncYear
|
from django.db.models.functions import TruncYear
|
||||||
|
from userauth.serializers import *
|
||||||
|
|
||||||
class CalendarEventsAPIView(APIView):
|
class CalendarEventsAPIView(APIView):
|
||||||
|
|
||||||
@@ -74,3 +74,10 @@ class GetCalendars(ListAPIView):
|
|||||||
def get(self, request):
|
def get(self, request):
|
||||||
queryset = Calendar.objects.filter(user=request.user)
|
queryset = Calendar.objects.filter(user=request.user)
|
||||||
return Response(CalendarSerializer(queryset, many=True).data)
|
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-card class="h-100 rounded-0 d-flex flex-colmn" width="250">
|
||||||
<v-row no-gutters class="flex-column">
|
<v-row no-gutters class="flex-column">
|
||||||
<v-col class="flex-grow-0">
|
<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>
|
||||||
<v-col class="w100" lg="3">
|
<v-col class="w100" lg="3">
|
||||||
<v-locale-provider locale="ru">
|
<v-locale-provider locale="ru">
|
||||||
@@ -20,12 +28,7 @@
|
|||||||
@update:month="getMonth"
|
@update:month="getMonth"
|
||||||
@update:year="getYear"
|
@update:year="getYear"
|
||||||
>
|
>
|
||||||
|
|
||||||
</v-date-picker>
|
</v-date-picker>
|
||||||
<pre>
|
|
||||||
{{ week }}
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
</v-locale-provider>
|
</v-locale-provider>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col></v-col>
|
<v-col></v-col>
|
||||||
@@ -48,6 +51,11 @@
|
|||||||
rail
|
rail
|
||||||
>
|
>
|
||||||
</v-navigation-drawer>
|
</v-navigation-drawer>
|
||||||
|
{{ showDialog }}
|
||||||
|
<event-create
|
||||||
|
@update:opendialog="showDialog = $event"
|
||||||
|
:opendialog="showDialog"
|
||||||
|
/>
|
||||||
</v-row>
|
</v-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -56,10 +64,15 @@ import { axiosApiInstance } from "@/utils/axios-api";
|
|||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useWeekendsStore } from "@/store/WeekendsStore";
|
import { useWeekendsStore } from "@/store/WeekendsStore";
|
||||||
|
|
||||||
|
import EventCreate from "@/components/calendar_of_events/event-create.vue";
|
||||||
|
|
||||||
// const burl = baseURL.slice(0, -1);
|
// const burl = baseURL.slice(0, -1);
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: { EventCreate },
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
|
const showDialog = ref(false);
|
||||||
const week = useWeekendsStore().week;
|
const week = useWeekendsStore().week;
|
||||||
const drawer_right = ref(false);
|
const drawer_right = ref(false);
|
||||||
const cal = ref(null);
|
const cal = ref(null);
|
||||||
@@ -130,6 +143,7 @@ export default {
|
|||||||
weekendsData,
|
weekendsData,
|
||||||
week,
|
week,
|
||||||
CheckingStore,
|
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 ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
||||||
import "@ckeditor/ckeditor5-build-classic/build/translations/ru";
|
import "@ckeditor/ckeditor5-build-classic/build/translations/ru";
|
||||||
import EventDialogEditParticipant from "./event-dialog-edit-participant.vue";
|
import EventDialogEditParticipant from "./event-dialog-edit-participant.vue";
|
||||||
|
import eventDialogEdit from "@/components/calendar_of_events/event-dialog-edit.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
event: {
|
event: {
|
||||||
|
|||||||
@@ -20,9 +20,10 @@
|
|||||||
/> -->
|
/> -->
|
||||||
<!-- <event-dialog-info :event="event" v-else /> -->
|
<!-- <event-dialog-info :event="event" v-else /> -->
|
||||||
<component
|
<component
|
||||||
:is = "editEvent ? 'eventDialogEdit':'eventDialogInfo'"
|
:is = "editEvent ? 'eventDialogEdit':'eventDialogInfo'"
|
||||||
:event="event"
|
:event="event"
|
||||||
@returnUpdateData="returnUpdateData"
|
@returnUpdateData="returnUpdateData"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in new issue
Block a user