WIP Подтянула данные в форму мед.карты

This commit is contained in:
Daria Golova
2023-01-09 17:23:08 +03:00
parent c0cce0f4a1
commit 2e3ff2e3d6
10 changed files with 265 additions and 112 deletions

View File

@@ -260,20 +260,20 @@ export default {
openModal() {
this.showModal = true;
},
async handlerClickPopup(action, id) {
async handlerClickPopup(action, clientId, medicalId) {
this.modalConfig = this.modalConfig.map((el) => {
return el.name === action
? { ...el, view: true }
: { ...el, view: false };
});
this.clientId = clientId;
if (action === "delete") {
this.clientId = id;
this.titleModal = "Удалить клиента";
this.openModal();
}
if (action === "medical") {
if (id) {
localStorage.setItem("medicalId", id);
if (medicalId) {
localStorage.setItem("medicalId", medicalId);
this.$router.push("medical-card");
} else {
this.titleModal = "Создать мед.карту";
@@ -281,8 +281,8 @@ export default {
}
}
},
createMedicalCard(id) {
this.selectedClientId = id;
createMedicalCard() {
this.selectedClientId = this.clientId;
this.showMedicalCard = true;
this.closeModal();
},