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 @@