diff --git a/src/pages/newCalendar/TheCalendar.vue b/src/pages/newCalendar/TheCalendar.vue
index add8028..a059a5d 100644
--- a/src/pages/newCalendar/TheCalendar.vue
+++ b/src/pages/newCalendar/TheCalendar.vue
@@ -5,6 +5,8 @@
calendar-wrapper.ml-2(:open-sidebar="isOpen")
base-modal(v-model="isShowForm", title="Создание записи", modal-padding)
record-creation-form(v-model="isShowForm", :close-form="closeForm")
+ base-modal(v-model="previewVisibility", :hideHeader="true", :modalPadding="true")
+ calendar-record-preview(v-model:preview-visibility="previewVisibility")
diff --git a/src/pages/newCalendar/components/CalendarColumn.vue b/src/pages/newCalendar/components/CalendarColumn.vue
index 5c3e70f..f5504fa 100644
--- a/src/pages/newCalendar/components/CalendarColumn.vue
+++ b/src/pages/newCalendar/components/CalendarColumn.vue
@@ -9,7 +9,8 @@
:key="record?.id",
:record="record",
:expanded-type="expandedDisplayType",
- :style="eventCardPosition(record.start, record.end)"
+ :style="eventCardPosition(record.start, record.end)",
+ @click="changeSelectedRecordId(record?.id)",
)
.footer.flex.items-center.justify-center.bg-white.h-9(v-if="!expandedDisplayType")
span.text-smm.color-grey 0 записей
@@ -20,6 +21,7 @@ import * as moment from "moment/moment";
import { recordList } from "@/pages/newCalendar/utils/calendarConfig.js";
import CalendarRecordCard from "@/pages/newCalendar/components/CalendarRecordCard.vue";
import { verifyTime } from "@/pages/newCalendar/utils/calendarFunctions.js";
+import { mapActions } from "vuex";
export default {
name: "CalendarColumn",
components: { CalendarRecordCard },
@@ -47,6 +49,9 @@ export default {
},
},
methods: {
+ ...mapActions({
+ changeSelectedRecordId: "changeSelectedRecordId",
+ }),
transformDayName(name) {
return name[0]?.toUpperCase() + name?.slice(1);
},
diff --git a/src/pages/newCalendar/components/CalendarRecordCard.vue b/src/pages/newCalendar/components/CalendarRecordCard.vue
index 9f1fd8c..1523bb0 100644
--- a/src/pages/newCalendar/components/CalendarRecordCard.vue
+++ b/src/pages/newCalendar/components/CalendarRecordCard.vue
@@ -37,7 +37,7 @@
.h-6.w-6.color-black.background-dark-grey.text-xxs.rounded.flex.items-center.justify-center(
v-if="collapsedDisplayCondition"
) +1
- span.text-xxs.self-end(v-if="servicesCount && bodyClass?.['flex-col']") {{`${servicesCount} услуги`}}
+ span.text-xxs.self-end(v-if="record?.services.length && bodyClass?.['flex-col']") {{`${record?.services.length} услуг`}}
+
+
diff --git a/src/pages/newCalendar/utils/calendarConfig.js b/src/pages/newCalendar/utils/calendarConfig.js
index e62b04f..4d5cc78 100644
--- a/src/pages/newCalendar/utils/calendarConfig.js
+++ b/src/pages/newCalendar/utils/calendarConfig.js
@@ -298,6 +298,7 @@ export const recordList = [
last_name: "Харитонова",
first_name: "Ольга",
patronymic: "Васильевна",
+ birth_date: "1990-03-12",
contacts: [
{
value: "+7 (910) 424–13–13",
@@ -313,6 +314,28 @@ export const recordList = [
medicalCard: {
status: "partially_filled",
},
+ services: [
+ {
+ title: "Чистка зубов",
+ cost: 500,
+ },
+ {
+ title: "Осмотр",
+ cost: 0,
+ },
+ {
+ title: "Лечение среднего кариеса",
+ cost: 2000,
+ },
+ {
+ title: "Изготовление коронки",
+ cost: 2700,
+ },
+ {
+ title: "Снятие слепков",
+ cost: 400,
+ },
+ ],
},
{
id: "ba931000-7140-4977-bd09-1ac212b8b8e5",
@@ -329,6 +352,7 @@ export const recordList = [
last_name: "Гаранова",
first_name: "Наталья",
patronymic: "Романовна",
+ birth_date: "1990-04-12",
contacts: [
{
value: "+7 (910) 424–13–13",
@@ -344,6 +368,28 @@ export const recordList = [
medicalCard: {
status: "not_filled",
},
+ services: [
+ {
+ title: "Чистка зубов",
+ cost: 500,
+ },
+ {
+ title: "Осмотр",
+ cost: 0,
+ },
+ {
+ title: "Лечение среднего кариеса",
+ cost: 2000,
+ },
+ {
+ title: "Изготовление коронки",
+ cost: 2700,
+ },
+ {
+ title: "Снятие слепков",
+ cost: 400,
+ },
+ ],
},
{
id: "4cd94bec-a0df-4a18-879d-f64cd6d7098e",
@@ -360,6 +406,7 @@ export const recordList = [
last_name: "Харитонова",
first_name: "Ольга",
patronymic: "Васильевна",
+ birth_date: "1990-05-12",
contacts: [
{
value: "+7 (910) 424–13–13",
@@ -371,5 +418,51 @@ export const recordList = [
medicalCard: {
status: "filled",
},
+ services: [
+ {
+ title: "Чистка зубов",
+ cost: 500,
+ },
+ {
+ title: "Осмотр",
+ cost: 0,
+ },
+ {
+ title: "Лечение среднего кариеса",
+ cost: 2000,
+ },
+ {
+ title: "Изготовление коронки",
+ cost: 2700,
+ },
+ {
+ title: "Снятие слепков",
+ cost: 400,
+ },
+ ],
+ },
+];
+
+export const recordPreviewConfig = [
+ {
+ title: "Статус",
+ data: "statusLabel",
+ icon: "statusIcon",
+ },
+ {
+ title: "Дата",
+ data: "date",
+ },
+ {
+ title: "Время",
+ data: "time",
+ },
+ {
+ title: "Медкарта",
+ data: null,
+ },
+ {
+ title: "Услуги",
+ data: null,
},
];
diff --git a/src/store/modules/calendar.js b/src/store/modules/calendar.js
index 2e59ac9..cad59b1 100644
--- a/src/store/modules/calendar.js
+++ b/src/store/modules/calendar.js
@@ -10,6 +10,7 @@ const state = () => ({
from: moment().clone().startOf("week"),
to: moment().clone().endOf("week"),
},
+ selectedRecordId: null,
});
const getters = {};
@@ -18,12 +19,18 @@ const actions = {
changeSelectedDates({ commit }, dates) {
commit("setSelectedDates", dates);
},
+ changeSelectedRecordId({ commit }, id) {
+ commit("setSelectedRecordId", id);
+ },
};
const mutations = {
setSelectedDates(state, data) {
state.selectedDates = { ...data };
},
+ setSelectedRecordId(state, id) {
+ state.selectedRecordId = id;
+ },
};
export default {