From 65796d1bceebbf2cf94214fc90ac5a3d2b9fe2b3 Mon Sep 17 00:00:00 2001 From: Daria Golova Date: Wed, 5 Apr 2023 17:12:41 +0300 Subject: [PATCH] =?UTF-8?q?WIP=20=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5,=20br?= =?UTF-8?q?eadcrumbs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../clients/components/ClientsTableRow.vue | 10 +-- .../cells/TableCellBodyPriority.vue | 4 +- src/pages/newMedicalCard/TheMedicalCard.vue | 25 ++++++- .../components/MedicalCardHeader.vue | 49 +++++-------- .../components/MedicalCardRemoveModal.vue | 45 ++++++++++++ .../components/MedicalCardSidebar.vue | 39 +--------- .../newMedicalCard/utils/configMedical.js | 72 +++++++++++++++++++ src/store/index.js | 1 + src/store/modules/medicalCard.js | 13 ++++ 9 files changed, 182 insertions(+), 76 deletions(-) create mode 100644 src/pages/newMedicalCard/components/MedicalCardRemoveModal.vue diff --git a/src/pages/clients/components/ClientsTableRow.vue b/src/pages/clients/components/ClientsTableRow.vue index 1b9b2c8..1b5177c 100644 --- a/src/pages/clients/components/ClientsTableRow.vue +++ b/src/pages/clients/components/ClientsTableRow.vue @@ -410,7 +410,7 @@ export default { "handler-click-popup", "medical", this.client.id, - this.client?.medical_history[0]?.id + this.client?.medical_history?.find((elem) => elem?.id)?.id ); }, transmitDeleteClient() { @@ -453,7 +453,7 @@ export default { this.lackAttachments = this.dataAttachments[0]?.id ? true : false; }, saveNote(data) { - this.dataNotes = data?.note.filter((e) => e?.deleted_flg === false); + this.dataNotes = data?.note.filter((e) => !e?.deleted_flg); if (this.dataNotes[0]) { this.lackNotes = true; } else { @@ -715,7 +715,7 @@ export default { (el) => el.priority === this.client.priority || this.client.priority === el.id - ).text, + )?.text, phone: { id: this.client.contacts.find((el) => el.kind === "PHONE")?.id || @@ -741,8 +741,8 @@ export default { avatar: this.client.first_name ? this.client.last_name[0] + this.client.first_name[0] : this.client.last_name.substr(0, 2), - color: this.client.color, - photo: this.client.photo, + color: this.client?.color, + photo: this.client?.photo, }; } }, diff --git a/src/pages/clients/components/cells/TableCellBodyPriority.vue b/src/pages/clients/components/cells/TableCellBodyPriority.vue index bac3fe5..655309d 100644 --- a/src/pages/clients/components/cells/TableCellBodyPriority.vue +++ b/src/pages/clients/components/cells/TableCellBodyPriority.vue @@ -1,8 +1,8 @@