fix calendar
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
.flex.items-center.gap-x-3(v-for="field in previewConfig", :key="field?.title")
|
||||
.field.color-grey.flex.items-center.justify-start.font-semibold {{ field?.title }}:
|
||||
.info.flex-1.rounded.h-full.py-2.px-4.flex.items-center.gap-x-1.color-dark-blue(v-if="field?.data")
|
||||
img.h-5.w-5(:src="field?.icon ? this[field?.icon] : ''", v-if="field?.icon")
|
||||
//img.h-5.w-5(:src="field?.icon ? this[field?.icon] : ''", v-if="field?.icon")
|
||||
span {{ field?.data ? this[field?.data] : "" }}
|
||||
.flex.gap-x-1.flex-1(v-if="field?.title === 'Медкарта'")
|
||||
.flex.gap-x-1.flex-1(v-if="field?.title === 'Пациент'")
|
||||
.nameplate.rounded.px-4.pt-2.pb-1.flex.gap-x-2.info.flex-1
|
||||
q-avatar(size="40px")
|
||||
img(:src="memberData?.photo")
|
||||
@@ -21,28 +21,28 @@
|
||||
q-btn.flex-1(
|
||||
color="primary",
|
||||
no-caps,
|
||||
label="Полная медкарта",
|
||||
label="Медкарта",
|
||||
:style="{'font-weight': 500}"
|
||||
size="14px"
|
||||
)
|
||||
q-icon.arrow.ml-1(name="app:long-arrow", size="20px")
|
||||
.flex.gap-x-1.flex-1.h-full(v-if="field?.title === 'Услуги'")
|
||||
.rounded.h-full.services.flex.flex-wrap.gap-1.p-1
|
||||
.py-2.px-4.color-dark-blue.rounded.h-7.relative(
|
||||
v-for="chip in services.list",
|
||||
:key="chip?.title",
|
||||
:id="chip?.title",
|
||||
:class="chipClass(chip?.title)"
|
||||
:style="{'background-color': chip?.color}"
|
||||
)
|
||||
span {{chip?.title}}
|
||||
.gradient.h-7.w-11.absolute.right-0(
|
||||
:id="chip?.title+'gradient'",
|
||||
:style="{background: `linear-gradient(270deg, ${chip?.color} 0%, rgba(255, 255, 255, 0.00) 100%)`}"
|
||||
)
|
||||
.info.color-dark-blue.rounded.h-7.px-4(v-if="services.remains > 0") +{{ services.remains }}
|
||||
.rounded.info.color-grey.h-full.cost.flex.items-center.justify-center {{ services.cost }} ₽
|
||||
|
||||
//.rounded.h-full.services.flex.flex-wrap.gap-1.p-1
|
||||
// .py-2.px-4.color-dark-blue.rounded.h-7.relative(
|
||||
// v-for="chip in services.list",
|
||||
// :key="chip?.title",
|
||||
// :id="chip?.title",
|
||||
// :class="chipClass(chip?.title)"
|
||||
// :style="{'background-color': chip?.color}"
|
||||
// )
|
||||
// span {{chip?.title}}
|
||||
// .gradient.h-7.w-11.absolute.right-0(
|
||||
// :id="chip?.title+'gradient'",
|
||||
// :style="{background: `linear-gradient(270deg, ${chip?.color} 0%, rgba(255, 255, 255, 0.00) 100%)`}"
|
||||
// )
|
||||
// .info.color-dark-blue.rounded.h-7.px-4(v-if="services.remains > 0") +{{ services.remains }}
|
||||
//.rounded.info.color-grey.h-full.cost.flex.items-center.justify-center {{ services.cost }} ₽
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -50,7 +50,6 @@ import * as moment from "moment/moment";
|
||||
import { mapState } from "vuex";
|
||||
import { trimName } from "@/pages/newCalendar/utils/calendarFunctions.js";
|
||||
import {
|
||||
recordList,
|
||||
recordPreviewConfig,
|
||||
statuses,
|
||||
} from "@/pages/newCalendar/utils/calendarConfig.js";
|
||||
@@ -76,9 +75,10 @@ export default {
|
||||
},
|
||||
...mapState({
|
||||
selectedRecordId: (state) => state.calendar.selectedRecordId,
|
||||
events: (state) => state.calendar.events || [],
|
||||
}),
|
||||
record() {
|
||||
return recordList?.find((elem) => elem.id === this.selectedRecordId);
|
||||
return this.events?.find((elem) => elem.id === this.selectedRecordId);
|
||||
},
|
||||
start() {
|
||||
return moment.parseZone(this.record?.start);
|
||||
@@ -94,29 +94,29 @@ export default {
|
||||
},
|
||||
statusLabel() {
|
||||
return statuses[0].data.find((elem) => elem.value === this.record?.status)
|
||||
.label;
|
||||
?.label;
|
||||
},
|
||||
statusIcon() {
|
||||
return statuses[0].data.find((elem) => elem.value === this.record?.status)
|
||||
.icon;
|
||||
?.icon;
|
||||
},
|
||||
memberData() {
|
||||
return this.record?.member;
|
||||
return this.record?.person;
|
||||
},
|
||||
birthday() {
|
||||
return moment(this.memberData?.birth_date)?.format("MM.DD.YYYY");
|
||||
},
|
||||
services() {
|
||||
let croppedServices = JSON.parse(JSON.stringify(this.record?.services));
|
||||
let remains = this.record?.services?.length - 3;
|
||||
if (remains > 0) croppedServices.length = 3;
|
||||
else remains = 0;
|
||||
return {
|
||||
list: croppedServices,
|
||||
remains: remains,
|
||||
cost: this.record?.services?.reduce((acc, curr) => acc + curr.cost, 0),
|
||||
};
|
||||
},
|
||||
// services() {
|
||||
// let croppedServices = JSON.parse(JSON.stringify(this.record?.services));
|
||||
// let remains = this.record?.services?.length - 3;
|
||||
// if (remains > 0) croppedServices.length = 3;
|
||||
// else remains = 0;
|
||||
// return {
|
||||
// list: croppedServices,
|
||||
// remains: remains,
|
||||
// cost: this.record?.services?.reduce((acc, curr) => acc + curr.cost, 0),
|
||||
// };
|
||||
// },
|
||||
},
|
||||
methods: {
|
||||
hidePreview() {
|
||||
|
||||
Reference in New Issue
Block a user