From 8f6ca8e4372f5990c62f850e63e6e28cb1f9cf58 Mon Sep 17 00:00:00 2001 From: Daria Golova Date: Mon, 26 Jun 2023 18:03:05 +0300 Subject: [PATCH] =?UTF-8?q?WIP=20=D0=90=D0=B4=D0=B0=D0=BF=D1=82=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=BA=D0=B0=D1=80=D1=82?= =?UTF-8?q?=D0=BE=D1=87=D0=BA=D0=B8=20=D0=BF=D0=BE=D0=B4=20=D0=BA=D0=B0?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B4=D0=B0=D1=80=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newCalendar/components/CalendarColumn.vue | 20 +++- .../components/CalendarOpenSidebar.vue | 7 +- .../components/CalendarRecordCard.vue | 87 ++++++++++++-- .../components/CalendarSidebar.vue | 7 +- src/pages/newCalendar/utils/calendarConfig.js | 109 ++++++++++++++++++ .../newCalendar/utils/calendarFunctions.js | 6 + 6 files changed, 212 insertions(+), 24 deletions(-) diff --git a/src/pages/newCalendar/components/CalendarColumn.vue b/src/pages/newCalendar/components/CalendarColumn.vue index dcbaf44..d23c7ac 100644 --- a/src/pages/newCalendar/components/CalendarColumn.vue +++ b/src/pages/newCalendar/components/CalendarColumn.vue @@ -1,15 +1,22 @@ @@ -75,15 +129,24 @@ export default { height: 30px & > div background-color: var(--bg-light-grey) + display: flex + align-items: center .first-item border-top-left-radius: 4px border-bottom-left-radius: 4px +.expanded width: 130px +.collapsed + width: 30px +.expanded-time + width: 138px .last-item border-top-right-radius: 4px border-bottom-right-radius: 4px .background-grey background-color: var(--bg-light-grey) +.background-dark-grey + background-color: var(--border-light-grey-color) .color-black color: var(--font-dark-blue-color) .color-grey diff --git a/src/pages/newCalendar/components/CalendarSidebar.vue b/src/pages/newCalendar/components/CalendarSidebar.vue index 375d6e4..a2f352b 100644 --- a/src/pages/newCalendar/components/CalendarSidebar.vue +++ b/src/pages/newCalendar/components/CalendarSidebar.vue @@ -114,6 +114,7 @@ import BaseInput from "@/components/base/BaseInput.vue"; import { patientData } from "@/pages/newCalendar/utils/calendarConfig.js"; import { patientList } from "@/pages/newCalendar/utils/calendarConfig.js"; import CalendarSidebarSvg from "@/pages/newCalendar/components/CalendarSidebarSvg.vue"; +import { trimName } from "@/pages/newCalendar/utils/calendarFunctions.js"; export default { name: "CalendarSidebar", @@ -131,6 +132,7 @@ export default { foundPerson: "", sortData: [], sort: false, + trimOwnerName: trimName, }; }, computed: { @@ -152,11 +154,6 @@ export default { return { ...e, active: false }; }); }, - trimOwnerName(lastName, firstName, patronymic) { - let checkedFirstName = firstName !== null ? firstName[0] + "." : ""; - let checkedPatronymic = patronymic !== null ? patronymic[0] + "." : ""; - return `${lastName} ${checkedFirstName}${checkedPatronymic}`; - }, checkPerson(index, arr) { arr.map((e) => { if (e.id === index) e.check = !e.check; diff --git a/src/pages/newCalendar/utils/calendarConfig.js b/src/pages/newCalendar/utils/calendarConfig.js index d88ab25..19e0814 100644 --- a/src/pages/newCalendar/utils/calendarConfig.js +++ b/src/pages/newCalendar/utils/calendarConfig.js @@ -7,6 +7,49 @@ import filled from "@/assets/icons/medcard_filled.svg"; import partially_filled from "@/assets/icons/medcard_partially_filled.svg"; import not_filled from "@/assets/icons/medcard_not_filled.svg"; +export const recordingStatuses = [ + { + label: "Не принят", + icon: not_accepted, + value: "not_accepted", + }, + { + label: "Принят", + icon: accepted, + value: "accepted", + }, + { + label: "Отказ", + icon: rejected, + value: "rejected", + }, + { + label: "На приеме", + icon: reception, + value: "reception", + }, +]; + +export const medicalСardStatuses = [ + { + label: "Не заполнена", + icon: not_filled, + value: "not_filled", + }, + { + label: "Частично заполнена", + icon: partially_filled, + value: "partially_filled", + }, + { + label: "Заполнена", + icon: filled, + value: "filled", + }, +]; + +// TODO Статусы приема и статусы заполнения медкарты должны быть общими, чтобы не дублировать в каждом экспорте. Исправить +// TODO patientList - исправить название export const patientList = [ { label: "Статус приема", @@ -203,3 +246,69 @@ export const patientData = { { name: "group", text: "Пациенты", active: false }, ], }; + +export const recordList = [ + { + id: "c3df0a95-8093-41f1-9584-5b70ee05e71c", + start: "2023-06-26T10:00:00Z", + end: "2023-06-26T11:00:00Z", + employee: { + id: "464101e6-b4e6-46a4-8ef6-08ecb2921493", + last_name: "Каневский", + first_name: "Леонид", + patronymic: "Семенович", + }, + member: { + id: "3e6e54e4-2706-47d3-8b54-b841ee8f0943", + last_name: "Харитонова", + first_name: "Ольга", + patronymic: "Васильевна", + }, + status: "not_accepted", + medicalCard: { + status: "partially_filled", + }, + }, + { + id: "ba931000-7140-4977-bd09-1ac212b8b8e5", + start: "2023-06-28T15:00:00Z", + end: "2023-06-28T15:30:00Z", + employee: { + id: "464101e6-b4e6-46a4-8ef6-08ecb2921493", + last_name: "Каневский", + first_name: "Леонид", + patronymic: "Семенович", + }, + member: { + id: "d340d344-4fc7-4fbe-9db8-b7562b70438d", + last_name: "Гаранова", + first_name: "Наталья", + patronymic: "Романовна", + }, + status: "accepted", + medicalCard: { + status: "not_filled", + }, + }, + { + id: "4cd94bec-a0df-4a18-879d-f64cd6d7098e", + start: "2023-06-30T13:00:00Z", + end: "2023-06-30T14:30:00Z", + employee: { + id: "464101e6-b4e6-46a4-8ef6-08ecb2921493", + last_name: "Каневский", + first_name: "Леонид", + patronymic: "Семенович", + }, + member: { + id: "0b2d1db1-6aab-4e29-b857-fc7c9777280f", + last_name: "Харитонова", + first_name: "Ольга", + patronymic: "Васильевна", + }, + status: "reception", + medicalCard: { + status: "filled", + }, + }, +]; diff --git a/src/pages/newCalendar/utils/calendarFunctions.js b/src/pages/newCalendar/utils/calendarFunctions.js index 9e39924..7ecb007 100644 --- a/src/pages/newCalendar/utils/calendarFunctions.js +++ b/src/pages/newCalendar/utils/calendarFunctions.js @@ -1,3 +1,9 @@ export function convertTime(str, startIndex, endIndex) { return parseInt(str?.slice(startIndex, endIndex), 10); } + +export function trimName(lastName, firstName, patronymic) { + let checkedFirstName = firstName !== null ? firstName[0] + ". " : ""; + let checkedPatronymic = patronymic !== null ? patronymic[0] + "." : ""; + return `${lastName} ${checkedFirstName}${checkedPatronymic}`; +}