WIP Подтянула id клиента для медкарты

This commit is contained in:
Daria Golova
2022-12-26 20:03:33 +03:00
parent 7fb49d733c
commit 93cea24131
4 changed files with 18 additions and 3 deletions

View File

@@ -8,7 +8,7 @@
.button.keep-redaction.flex.gap-x-3 .button.keep-redaction.flex.gap-x-3
.icon-star-off.icon .icon-star-off.icon
span На ведение span На ведение
.button.keep-redaction.flex.gap-x-3(@click="createMedicalCard") .button.keep-redaction.flex.gap-x-3(@click="createMedicalCard(clientId)")
.icon-star-off.icon .icon-star-off.icon
span Мед. карта span Мед. карта
.button.delete.flex.gap-x-3( .button.delete.flex.gap-x-3(
@@ -29,6 +29,7 @@ export default {
openChangeData: Function, openChangeData: Function,
disabledDelete: Boolean, disabledDelete: Boolean,
createMedicalCard: Function, createMedicalCard: Function,
clientId: String,
}, },
methods: { methods: {
transmitDeleteClient() { transmitDeleteClient() {

View File

@@ -17,7 +17,7 @@
) )
.flex.flex-col.h-full.table-container.w-full.mt-8.mb-3 .flex.flex-col.h-full.table-container.w-full.mt-8.mb-3
base-modal(v-model="showMedicalCard") base-modal(v-model="showMedicalCard")
form-create-medical-card form-create-medical-card(:selected-client-id="selectedClientId")
clients-table-header(:check="selectedCheck" :is-check="selectAll") clients-table-header(:check="selectedCheck" :is-check="selectAll")
.flex.flex-col .flex.flex-col
clients-table-row( clients-table-row(
@@ -133,6 +133,7 @@ export default {
clearingTextSearch: false, clearingTextSearch: false,
showMedicalCard: false, showMedicalCard: false,
createdClientName: "", createdClientName: "",
selectedClientId: "",
}; };
}, },
computed: { computed: {
@@ -262,7 +263,8 @@ export default {
this.titleModal = "Создать мед.карту"; this.titleModal = "Создать мед.карту";
this.openModal(); this.openModal();
}, },
createMedicalCard() { createMedicalCard(id) {
this.selectedClientId = id;
this.showMedicalCard = true; this.showMedicalCard = true;
this.closeModal(); this.closeModal();
}, },

View File

@@ -21,6 +21,7 @@
clients-action-popup( clients-action-popup(
v-if="isOpenPopup", v-if="isOpenPopup",
:open-change-data="openChangeData", :open-change-data="openChangeData",
:client-id="client.id",
:disabled-delete="!!deletedClientId && !rowOverlay", :disabled-delete="!!deletedClientId && !rowOverlay",
@delete-client="transmitDeleteClient", @delete-client="transmitDeleteClient",
:create-medical-card="createMedicalCard" :create-medical-card="createMedicalCard"

View File

@@ -51,6 +51,9 @@ export default {
MedicalPolicyDocuments, MedicalPolicyDocuments,
BaseStepper, BaseStepper,
}, },
props: {
selectedClientId: String,
},
data() { data() {
return { return {
isBaseData: true, isBaseData: true,
@@ -93,6 +96,14 @@ export default {
}, },
finish() {}, finish() {},
}, },
watch: {
selectedClientId: {
immediate: true,
handler(newValue) {
console.log(newValue);
},
},
},
}; };
</script> </script>