WIP Поправила запрос

This commit is contained in:
Daria Golova
2023-08-14 18:16:19 +03:00
parent 4408b48906
commit 6b951a5af2
5 changed files with 110 additions and 28 deletions

View File

@@ -5,7 +5,7 @@
)
q-avatar(size="36px")
img(:src="avatar")
span.font-semibold.text-dark {{medcardInfo?.person?.full_name}}
span.font-semibold.text-dark {{patientName}}
.field(:style="headerStyle(headerConfig[1])")
span.text-dark {{ convertDate(medcardInfo?.person?.birth_date) }} г.
.field.gap-x-2(:style="headerStyle(headerConfig[2])")
@@ -22,7 +22,7 @@
.field.gap-x-3(:style="headerStyle(headerConfig[5])")
.track.h-2.flex-1.rounded
.thumb.h-full.rounded(:style="thumbStyle")
span.grey-color {{ medcardInfo?.filling_percentage }}%
span.grey-color {{ medcardInfo?.filling_percentage || 0 }}%
.field(:style="{...headerStyle(headerConfig[6])}")
q-icon.medcard.cursor-pointer(name="app:medcard", size="20px")
</template>
@@ -55,11 +55,11 @@ export default {
},
patientPriority() {
return priorityList?.find(
({ priority }) => this.medcardInfo.priority === priority
({ priority }) => (this.medcardInfo.priority || null) === priority
);
},
thumbStyle() {
let percentage = this.medcardInfo?.filling_percentage;
let percentage = this.medcardInfo?.filling_percentage || 0;
return {
width: `calc(${percentage}%)`,
"background-color":
@@ -73,9 +73,7 @@ export default {
},
methods: {
convertDate(date) {
return moment(date?.split(".")?.reverse()?.join("-"))?.format(
"DD MMMM YYYY"
);
return moment(date)?.format("DD MMMM YYYY");
},
copyValue(text) {
navigator.clipboard.writeText(text);