diff --git a/src/pages/clients/components/ClientsTableRow.vue b/src/pages/clients/components/ClientsTableRow.vue index ac8061e..a6f82be 100644 --- a/src/pages/clients/components/ClientsTableRow.vue +++ b/src/pages/clients/components/ClientsTableRow.vue @@ -272,8 +272,10 @@ export default { contacts.push(this.dataClient.phone); let mapCreateContacts = this.client.contacts.map((el) => el.kind); let mapDeleteContacts = contacts.map((el) => el.kind); - let createContacts = contacts.filter( - (el) => !mapCreateContacts.includes(el.kind) + let createContacts = contacts.filter((el) => + el.kind === "EMAIL" || el.kind === "PHONE" + ? !mapCreateContacts.includes(el.kind) + : el.kind ); let deleteContacts = this.client.contacts.filter( (el) => !mapDeleteContacts.includes(el.kind) @@ -604,7 +606,10 @@ export default { this.client.contacts.find((el) => el.kind === "EMAIL") ?.username || "", }, - contacts: [...this.client.contacts], + contacts: this.client.contacts.filter( + (el) => + !el.deleted_flg && el.kind !== "EMAIL" && el.kind !== "PHONE" + ), avatar: this.client.first_name ? this.client.last_name[0] + this.client.first_name[0] : this.client.last_name.substr(0, 2), diff --git a/src/pages/clients/components/cells/TableCellBodyNetworks.vue b/src/pages/clients/components/cells/TableCellBodyNetworks.vue index 10c9ba7..d078425 100644 --- a/src/pages/clients/components/cells/TableCellBodyNetworks.vue +++ b/src/pages/clients/components/cells/TableCellBodyNetworks.vue @@ -23,7 +23,7 @@ base-popup.right-3.top-6.z-20( v-if="isOpenPopupAdding", @click.stop, - v-click-outside.stop="closePopup", + v-click-outside="closePopup", :width="485" ) base-adding-network( @@ -76,7 +76,7 @@ export default { computed: { getNetworks() { return this.networks.filter( - (el) => el.kind !== "EMAIL" && el.kind !== "PHONE" && !el.deleted_flg + (el) => el.kind !== "EMAIL" && el.kind !== "PHONE" ); }, getSelectedIcon() {