diff --git a/src/pages/clients/components/ClientsTableRow.vue b/src/pages/clients/components/ClientsTableRow.vue
index f68cf5b..e24b6a7 100644
--- a/src/pages/clients/components/ClientsTableRow.vue
+++ b/src/pages/clients/components/ClientsTableRow.vue
@@ -37,7 +37,7 @@
)
table-cell-body-priority(
v-if="!rowOverlay",
- :value="dataClient.priority",
+ :value="dataClient",
:choose-priority="choosePriority",
:is-open-change="isOpenChange",
:width="columnBody.find(el => el.name === 'priority').width"
@@ -207,11 +207,19 @@ export default {
}
},
postUpdateClient() {
- fetchWrapper.post(`general/person/${this.client.id}/update/`, {
- full_name: this.dataClient.fullName,
- birth_date: this.dataClient.age,
- priority: this.dataClient.priority,
- });
+ let foundElement = this.prioritySettings.settings.find(
+ (el) => el.text === this.dataClient.priority
+ );
+ let data = {};
+ if (this.dataClient.age) {
+ data.birth_date = this.dataClient.age;
+ }
+ if (
+ this.dataClient.priority !== this.client.priority &&
+ this.dataClient.priority
+ ) {
+ data.priority = foundElement.priority;
+ }
},
postContactsClient() {
let contacts = [...this.dataClient.contacts];
diff --git a/src/pages/clients/components/cells/TableCellBodyPhone.vue b/src/pages/clients/components/cells/TableCellBodyPhone.vue
index d103605..2b49c62 100644
--- a/src/pages/clients/components/cells/TableCellBodyPhone.vue
+++ b/src/pages/clients/components/cells/TableCellBodyPhone.vue
@@ -1,11 +1,20 @@
.flex.box-border.px-4.items-center.w-full.text-sm(:style="{ minWidth : width + 'px' }")
- span.text-sm(v-if="!isOpenChange") {{value.phone.username.replace(/\+7(\d{3})(\d{3})(\d{2})(\d{2})/, '+7 ($1) $2-$3-$4')}}
- base-input(v-if="isOpenChange" :width-input="154" v-model:value="value.phone.username" :placeholder="value.phone.username")
+ span.text-sm(
+ v-if="!isOpenChange"
+ ) {{value.phone.username.replace(/\+7(\d{3})(\d{3})(\d{2})(\d{2})/, '+7 ($1) $2-$3-$4')}}
+ base-input(
+ v-if="isOpenChange",
+ :width-input="154",
+ v-model:value="value.phone.username",
+ :placeholder="value.phone.username",
+ v-mask="'+7 (###) ###-##-##'"
+ )
diff --git a/src/pages/clients/components/cells/TableCellBodyPriority.vue b/src/pages/clients/components/cells/TableCellBodyPriority.vue
index 6c0f4ce..ce80425 100644
--- a/src/pages/clients/components/cells/TableCellBodyPriority.vue
+++ b/src/pages/clients/components/cells/TableCellBodyPriority.vue
@@ -1,10 +1,10 @@
.flex.box-border.px-4.items-center.w-full.gap-x-2(:style="{ minWidth : width + 'px' }")
.flex.gap-x-2.items-center(v-if="!isOpenChange")
- .dot.w-2.h-2(:style="{ backgroundColor : settings.settings.find((el) => el.text == value).color }")
- span.text-sm(:style="{ color : settings.settings.find((el) => el.text == value).color }") {{value}}
+ .dot.w-2.h-2(:style="{ backgroundColor: prioritySettings.settings.find((el) => el.text == value.priority).color }")
+ span.text-sm(:style="{ color: prioritySettings.settings.find((el) => el.text == value.priority).color }") {{value.priority}}
.flex.gap-x-2.text-sm(class="w-[164px]")
- base-select(v-if="isOpenChange", :items="getPriorityList", v-model="value")
+ base-select(v-if="isOpenChange", :items="getPriorityList", v-model="value.priority")