Merge pull request #194 from dderbentsov/UC-161

[WIP] Скрыл окно функций, фикс отображения окошка сетей и самого отображения
This commit is contained in:
frontgavrilin
2022-12-13 14:49:28 +03:00
committed by GitHub
5 changed files with 18 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
<template lang="pug">
.button.relative.w-8.h-8.flex.justify-center.items-center.cursor-pointer
.prompt.absolute.w-fit.left-1.px-2.py-3.bottom-10.bg-amber-600
.prompt.fixed.w-fit.left-1.px-2.py-3.bottom-10.bg-amber-600
span.text-sm {{prompt}}
img(:src="img" :alt="prompt")
</template>

View File

@@ -20,7 +20,7 @@
@click="resetLastName",
:size=40
) Сбросить
clients-table-header-actions(v-if="!!isOpenActions", :is-selected-one="isOpenActions===1")
//- clients-table-header-actions(v-if="!!isOpenActions", :is-selected-one="isOpenActions===1")
.flex.w-fit.h-fit.gap-x-2
base-button(left-icon="icon-download", :icon-left-size="16", :size="40", :outlined="true")
base-button(left-icon="icon-plus", :icon-left-size="13", :size="40", @click="openForm")

View File

@@ -20,7 +20,7 @@ export default {
dataBtn: [
{
img: group,
prompt: "сгрупировать",
prompt: "сгруппировать",
},
{
img: edit,

View File

@@ -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)
@@ -316,7 +318,9 @@ export default {
.then(() => this.fetchDataClients());
},
postDeleteContact(contact) {
fetchWrapper.del(`general/contact/${contact.id}/delete/`);
fetchWrapper
.del(`general/contact/${contact.id}/delete/`)
.then(() => this.fetchDataClients());
},
addNetwork(network) {
this.dataClient.contacts.push(network);
@@ -602,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),

View File

@@ -20,10 +20,10 @@
:size="24"
)
.icon-plus(class="pt-[2px]")
base-popup.right-3.top-6(
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,8 +76,7 @@ export default {
computed: {
getNetworks() {
return this.networks.filter(
(el) =>
el.kind !== "EMAIL" && el.kind !== "PHONE" && el.deleted_flg !== true
(el) => el.kind !== "EMAIL" && el.kind !== "PHONE"
);
},
getSelectedIcon() {