From c866662384ea10cf7a7ae4a79f06c408bb6bb56a Mon Sep 17 00:00:00 2001 From: Daria Golova Date: Wed, 16 Aug 2023 14:04:21 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=D0=B0=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=20=D0=B4=D0=B0=D1=82,=20=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D1=82=D1=83=D1=81=D0=BE=D0=B2,=20=D0=B2=D1=80=D0=B0?= =?UTF-8?q?=D1=87=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newCalendar/components/CalendarHeader.vue | 8 ++-- .../components/CalendarRecordCard.vue | 39 ++++++++++++------- src/pages/newCalendar/utils/calendarConfig.js | 25 ++++++++++-- .../MedicalProtocolCreateModal.vue | 13 ++++--- .../MedicalProtocolsList.vue | 4 +- 5 files changed, 62 insertions(+), 27 deletions(-) diff --git a/src/pages/newCalendar/components/CalendarHeader.vue b/src/pages/newCalendar/components/CalendarHeader.vue index 0318466..04a2b62 100644 --- a/src/pages/newCalendar/components/CalendarHeader.vue +++ b/src/pages/newCalendar/components/CalendarHeader.vue @@ -22,10 +22,10 @@ ) base-input.search( size="M" - :width="350", + :width="386", v-model="currentWeek", ) - .h-5.w-5.flex.items-center.justify-center + .h-5.w-5.flex.items-center.justify-center.ml-3 q-icon.calendar-icon.text.cursor-pointer( :name="calendarVisibility ? 'app:cancel-mini' : 'app:calendar'", size="20px", @@ -36,7 +36,7 @@ transition-show="scale", transition-hide="scale" self="top middle", - :offset="[140, 8]" + :offset="[160, 8]" ) base-calendar( v-model="dates", @@ -103,7 +103,7 @@ export default { currentWeek() { return `${this.dates?.from?.format( "D MMMM YYYY" - )} - ${this.dates?.to?.format("D MMMM YYYY")}`; + )} — ${this.dates?.to?.format("D MMMM YYYY")}`; }, ...mapState({ selectedDates: (state) => state.calendar.selectedDates, diff --git a/src/pages/newCalendar/components/CalendarRecordCard.vue b/src/pages/newCalendar/components/CalendarRecordCard.vue index 6fca76f..8ac6d7f 100644 --- a/src/pages/newCalendar/components/CalendarRecordCard.vue +++ b/src/pages/newCalendar/components/CalendarRecordCard.vue @@ -15,14 +15,17 @@ size="20px", @click.stop="changeTimeDisplay(true)" ) - .color-black.pl-4.flex-1.font-semibold.py-6px.relative( + .color-black.pl-4.flex-1.font-semibold.py-6px.relative.cursor-default( :class="{'pl-6px collapsed-name': expandedTime}" ) {{trimPatientName(record?.person?.last_name, record?.person?.first_name, record?.person?.patronymic)}} .gradient.absolute.w-5.h-full.right-0(v-if="expandedTime") - .info-block.justify-center - img.w-5.h-5(:src="recordingStatus?.icon") - .last-item.info-block.justify-center(v-if="expandedType") - img.w-5.h-5(:src="medicalСardStatus?.icon") + .info-block.justify-center(v-if="expandedType") + q-icon( + :name="record?.person?.has_medical_card ? 'app:medcard-green' : 'app:medcard'", + size="20px", + ) + .last-item.info-block.justify-center + .recording-status(:class="recordingStatus?.class") .body.background-grey.flex.flex-col.justify-between.pl-4.pr-2.color-grey( :style="bodyHeight", :class="bodyPadding" @@ -33,8 +36,8 @@ :key="contact.value", ) q-icon.network-icon(:name="contact.icon", size="16px") - .text-xxs {{ contact.value }} - .h-6.w-6.color-black.background-dark-grey.text-xxs.rounded.flex.items-center.justify-center( + .text-xxs.cursor-default {{ contact.value }} + .h-6.w-6.color-black.background-dark-grey.text-xxs.rounded.flex.items-center.justify-center.cursor-default( v-if="collapsedDisplayCondition" ) +1 @@ -80,14 +83,10 @@ export default { return !this.bodyClass?.["flex-col"] && !this.expandedType; }, recordingStatus() { - return statuses[0].data.find( + const status = statuses[0].data.find( (elem) => elem.value === this.record?.status ); - }, - medicalСardStatus() { - return statuses[1].data.find( - (elem) => elem.value === this.record?.medicalCard?.status - ); + return status || statuses[0].data[0]; }, startTime() { return moment.parseZone(this.record?.start); @@ -205,4 +204,18 @@ export default { fill: var(--font-dark-blue-color) .time-icon :deep(path) fill: var(--font-grey-color) +.recording-status + border-radius: 9999px + width: 17px + height: 17px +.not-accepted + border: 1.2px solid var(--font-grey-color) +.accepted + background-color: var(--system-color-green) +.rejected + background-color: var(--system-color-red) +.reception + background-color: var(--btn-blue-color) +span + cursor: default diff --git a/src/pages/newCalendar/utils/calendarConfig.js b/src/pages/newCalendar/utils/calendarConfig.js index 73681e5..05c8366 100644 --- a/src/pages/newCalendar/utils/calendarConfig.js +++ b/src/pages/newCalendar/utils/calendarConfig.js @@ -48,10 +48,29 @@ export const statuses = [ label: "Не принят", icon: not_accepted, value: "not_accepted", + class: "not-accepted", + }, + { + id: 1, + label: "Принят", + icon: accepted, + value: "accepted", + class: "accepted", + }, + { + id: 2, + label: "Отказ", + icon: rejected, + value: "rejected", + class: "rejected", + }, + { + id: 3, + label: "На приеме", + icon: reception, + value: "reception", + class: "reception", }, - { id: 1, label: "Принят", icon: accepted, value: "accepted" }, - { id: 2, label: "Отказ", icon: rejected, value: "rejected" }, - { id: 3, label: "На приеме", icon: reception, value: "reception" }, ], }, { diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolCreateModal.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolCreateModal.vue index c6f8807..faa7ce6 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolCreateModal.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolCreateModal.vue @@ -17,17 +17,17 @@ ) .flex.flex-col.gap-y-6px span.color-grey.line-height.text-sm.font-semibold Врач - .flex.gap-x-2 + .flex.gap-x-2.items-center base-avatar(:size="40") img.object-cover.h-full( - v-if="userData?.photo", - :src="userData?.photo", + v-if="userData?.avatar", + :src="url + userData?.avatar", alt="avatar" ) - span.text-sm.color-blue(v-else) {{ avatar }} + span.text-sm.text-dark(v-else) {{ avatar }} .flex.flex-col - span.text-sm.color-blue.line-height.mb-2px {{ employeeName }} - span.color-grey.line-height.text-sm {{ userData?.job_title ? userData?.job_title : "Терапевт" }} + span.text-sm.text-dark.line-height.mb-2px.font-medium {{ employeeName }} + span.color-grey.line-height.text-xsx.font-medium {{ userData?.job_title ? userData?.job_title : "Терапевт" }} .flex.gap-2.mt-8 base-button( type="secondary", @@ -67,6 +67,7 @@ export default { date: null, startTime: null, }, + url: "https://astra-dev.dopcore.com/api/store/", }; }, computed: { diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsList.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsList.vue index 08431db..17f4f2f 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsList.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolsList.vue @@ -7,7 +7,7 @@ @click="changeShownCreateModal(true)", v-if="createInspection" ) - q-icon(name="app:plus", size="18px") + q-icon.plus-icon(name="app:big-plus", size="24px") .p-4.rounded.background.list.flex.flex-col.gap-y-6 .flex base-select( @@ -157,4 +157,6 @@ export default { color: var(--default-white) .color-grey color: var(--font-grey-color) +.plus-icon :deep(path) + fill: white From 7f655dcdc9cfed38e6f2b511f379a12c8f6612d4 Mon Sep 17 00:00:00 2001 From: Daria Golova Date: Wed, 16 Aug 2023 14:26:13 +0300 Subject: [PATCH 2/3] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=D0=B0=20undefined=20=D0=B2=20=D1=85=D0=B5=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=20=D0=BC=D0=B5=D0=B4=D0=BA=D0=B0=D1=80=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/newMedicalCard/components/MedicalHeader.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/newMedicalCard/components/MedicalHeader.vue b/src/pages/newMedicalCard/components/MedicalHeader.vue index 7945ea7..6a9d217 100644 --- a/src/pages/newMedicalCard/components/MedicalHeader.vue +++ b/src/pages/newMedicalCard/components/MedicalHeader.vue @@ -9,7 +9,7 @@ color="grey", ) q-breadcrumbs-el(:label="routes[routingHistory.state.back]") - q-breadcrumbs-el(:label="`${routes[routingHistory.state.current]} #${medicalCardData?.number}`") + q-breadcrumbs-el(:label="`Медкарта #${medicalCardData?.number}`") q-btn( flat, text-color="grey", From dcbbf20916dd2376ab14d1cecfaa3a96fc48bb00 Mon Sep 17 00:00:00 2001 From: Daria Golova Date: Wed, 16 Aug 2023 23:26:10 +0300 Subject: [PATCH 3/3] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=D0=B0=20url=20=D0=BA=D0=B0=D1=80=D1=82=D0=B8=D0=BD=D0=BE?= =?UTF-8?q?=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LoggedInLayout.vue | 8 ++++++-- src/pages/newCalendar/components/CalendarRecordCard.vue | 4 ++-- .../MedicalProtocolCreateModal.vue | 6 ++++-- src/store/index.js | 1 + 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/components/LoggedInLayout.vue b/src/components/LoggedInLayout.vue index 74337e7..5b015b4 100644 --- a/src/components/LoggedInLayout.vue +++ b/src/components/LoggedInLayout.vue @@ -25,7 +25,7 @@ import TheHeader from "@/components/TheHeader"; import TheSidebar from "@/components/TheSidebar"; import TheNotificationProvider from "@/components/Notifications/TheNotificationProvider"; - +import { mapState } from "vuex"; export default { name: "LoggedInLayout", components: { TheNotificationProvider, TheHeader, TheSidebar }, @@ -33,10 +33,14 @@ export default { return { isOpenForm: false, updatedClients: false, - url: "https://astra-dev.dopcore.com/api/store/", createdClientId: "", }; }, + computed: { + ...mapState({ + url: (state) => state.imgUrl, + }), + }, methods: { openForm() { this.isOpenForm = true; diff --git a/src/pages/newCalendar/components/CalendarRecordCard.vue b/src/pages/newCalendar/components/CalendarRecordCard.vue index 8ac6d7f..7822534 100644 --- a/src/pages/newCalendar/components/CalendarRecordCard.vue +++ b/src/pages/newCalendar/components/CalendarRecordCard.vue @@ -83,10 +83,10 @@ export default { return !this.bodyClass?.["flex-col"] && !this.expandedType; }, recordingStatus() { - const status = statuses[0].data.find( + const status = statuses?.[0]?.data?.find( (elem) => elem.value === this.record?.status ); - return status || statuses[0].data[0]; + return status || statuses?.[0]?.data?.[0]; }, startTime() { return moment.parseZone(this.record?.start); diff --git a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolCreateModal.vue b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolCreateModal.vue index faa7ce6..0cd2512 100644 --- a/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolCreateModal.vue +++ b/src/pages/newMedicalCard/components/InitialInspectionProtocol/MedicalProtocolCreateModal.vue @@ -47,7 +47,7 @@ import BaseAvatar from "@/components/base/BaseAvatar.vue"; import BaseInputDate from "@/components/base/BaseInputDate.vue"; import BaseInputTime from "@/components/base/BaseInputTime.vue"; import * as moment from "moment/moment"; -import { mapGetters, mapActions } from "vuex"; +import { mapGetters, mapActions, mapState } from "vuex"; import BaseButton from "@/components/base/BaseButton.vue"; export default { name: "MedicalProtocolCreateModal", @@ -67,10 +67,12 @@ export default { date: null, startTime: null, }, - url: "https://astra-dev.dopcore.com/api/store/", }; }, computed: { + ...mapState({ + url: (state) => state.imgUrl, + }), ...mapGetters({ userData: "getUserData", }), diff --git a/src/store/index.js b/src/store/index.js index 130b499..b32e450 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -5,6 +5,7 @@ import calendar from "./modules/calendar"; export default createStore({ state: { url: "https://astra-dev.dopcore.com", + imgUrl: "https://astra-dev.dopcore.com/api/store/", routingHistory: window.history, userData: {}, },