[WIP] Фикс сетей

This commit is contained in:
megavrilinvv
2022-12-13 12:54:54 +03:00
parent 61dcd5c6a2
commit 1bb81c9352
2 changed files with 10 additions and 5 deletions

View File

@@ -272,8 +272,10 @@ export default {
contacts.push(this.dataClient.phone); contacts.push(this.dataClient.phone);
let mapCreateContacts = this.client.contacts.map((el) => el.kind); let mapCreateContacts = this.client.contacts.map((el) => el.kind);
let mapDeleteContacts = contacts.map((el) => el.kind); let mapDeleteContacts = contacts.map((el) => el.kind);
let createContacts = contacts.filter( let createContacts = contacts.filter((el) =>
(el) => !mapCreateContacts.includes(el.kind) el.kind === "EMAIL" || el.kind === "PHONE"
? !mapCreateContacts.includes(el.kind)
: el.kind
); );
let deleteContacts = this.client.contacts.filter( let deleteContacts = this.client.contacts.filter(
(el) => !mapDeleteContacts.includes(el.kind) (el) => !mapDeleteContacts.includes(el.kind)
@@ -604,7 +606,10 @@ export default {
this.client.contacts.find((el) => el.kind === "EMAIL") this.client.contacts.find((el) => el.kind === "EMAIL")
?.username || "", ?.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 avatar: this.client.first_name
? this.client.last_name[0] + this.client.first_name[0] ? this.client.last_name[0] + this.client.first_name[0]
: this.client.last_name.substr(0, 2), : this.client.last_name.substr(0, 2),

View File

@@ -23,7 +23,7 @@
base-popup.right-3.top-6.z-20( base-popup.right-3.top-6.z-20(
v-if="isOpenPopupAdding", v-if="isOpenPopupAdding",
@click.stop, @click.stop,
v-click-outside.stop="closePopup", v-click-outside="closePopup",
:width="485" :width="485"
) )
base-adding-network( base-adding-network(
@@ -76,7 +76,7 @@ export default {
computed: { computed: {
getNetworks() { getNetworks() {
return this.networks.filter( return this.networks.filter(
(el) => el.kind !== "EMAIL" && el.kind !== "PHONE" && !el.deleted_flg (el) => el.kind !== "EMAIL" && el.kind !== "PHONE"
); );
}, },
getSelectedIcon() { getSelectedIcon() {