[WIP] Добавил переход на медкарту, возможность редактирования основных данных

This commit is contained in:
megavrilinvv
2023-08-16 16:44:03 +03:00
parent 37f5520796
commit b7af4b15ca
5 changed files with 81 additions and 24 deletions

View File

@@ -24,7 +24,7 @@
.thumb.h-full.rounded(:style="thumbStyle")
span.grey-color {{ medcardInfo?.filling_percentage || 0 }}%
.field(:style="{...headerStyle(headerConfig[6])}")
q-icon.medcard.cursor-pointer(name="app:medcard", size="20px")
q-icon.medcard.cursor-pointer(name="app:medcard", size="20px", @click="openMedicalCard")
</template>
<script>
@@ -36,6 +36,7 @@ import * as moment from "moment/moment";
import TheNotificationProvider from "@/components/Notifications/TheNotificationProvider";
import { addNotification } from "@/components/Notifications/notificationContext";
import avatar from "@/assets/images/person.png";
import { mapActions } from "vuex";
export default {
name: "MedicalCardSearchRow",
components: { TheNotificationProvider },
@@ -72,6 +73,15 @@ export default {
},
},
methods: {
...mapActions({
getMedicalCardData: "getMedicalCardDataByPersonId",
}),
openMedicalCard() {
this.getMedicalCardData({
personId: this.medcardInfo.person_id,
successCallback: (id) => this.$router.push("medical-card/" + id),
});
},
convertDate(date) {
return moment(date)?.format("DD MMMM YYYY");
},