From c1bfb4fab6af5b0fc62ca8ceb6ad41709ebc4a0c Mon Sep 17 00:00:00 2001 From: megavrilinvv Date: Thu, 10 Nov 2022 19:30:24 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=B0=D0=B4=D1=80=D0=B5=D1=81=D0=BE=D0=B2=20=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=B0=D1=81=D0=BF=D0=BE=D1=80=D1=82=D0=BD=D1=8B=D1=85=20=D0=B4?= =?UTF-8?q?=D0=B0=D0=BD=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ClientDetailInfoSection.vue | 16 +++++- .../components/ClientDetailInfoWrapper.vue | 9 +++- .../clients/components/ClientDetailInput.vue | 11 +++- .../clients/components/ClientsTableRow.vue | 51 ++++++++++++++----- src/pages/clients/utils/tableConfig.js | 6 +++ 5 files changed, 77 insertions(+), 16 deletions(-) diff --git a/src/pages/clients/components/ClientDetailInfoSection.vue b/src/pages/clients/components/ClientDetailInfoSection.vue index 25a91db..7e2eb82 100644 --- a/src/pages/clients/components/ClientDetailInfoSection.vue +++ b/src/pages/clients/components/ClientDetailInfoSection.vue @@ -15,7 +15,13 @@ .flex.flex-col(v-for="(item, key) in sectionInfo" class="gap-y-1.5") span.title-section.font-semibold.text-xs(v-if="settings[section].options") {{settings[section].options[key]}} span.title-section.font-semibold.text-xs(v-if="item.header") {{item.header}} - client-detail-input.text-sm.text-sm.w-max-fit(v-if="section!=='docs' && isChange" :style="{fontWeight:key === 'numba'&&600}" v-model:value="sectionInfo[key]" :width="settings[section].width") + client-detail-input.text-sm.text-sm.w-max-fit( + :sharp="settings[section].sharps[key]" + v-if="section!=='docs' && isChange" + :style="{fontWeight:key === 'numba'&&600}" + v-model:value="sectionInfo[key]" + :width="settings[section].width" + ) .copy.icon-copy.cursor-pointer(v-if="item.copy" @click="() => copyValue(item)") .flex(v-if="settings[section].options && !isChange") span.text-sm.w-fit(:style="{fontWeight:key === 'numba'&&600}") {{item}} @@ -47,7 +53,9 @@ export default { section: String, deleteDoc: Function, updateDocument: Function, + updateAddress: Function, }, + data() { return { additionalData: { @@ -76,7 +84,11 @@ export default { saveChange() { this.isOpenChange = false; this.isChange = false; - this.updateDocument(); + if (this.section === "pass") { + this.updateDocument(); + } else if (this.section === "addresses") { + this.updateAddress(); + } }, openAddingWrap() { this.isOpenAddingWrap = true; diff --git a/src/pages/clients/components/ClientDetailInfoWrapper.vue b/src/pages/clients/components/ClientDetailInfoWrapper.vue index 0467561..9c5c751 100644 --- a/src/pages/clients/components/ClientDetailInfoWrapper.vue +++ b/src/pages/clients/components/ClientDetailInfoWrapper.vue @@ -3,9 +3,14 @@ client-detail-info-section( v-model:section-info="dataDocument" section="pass" + :update-document="updateDocument" ) .flex.flex-col - client-detail-info-section(:section-info="dataAddress" section="addresses") + client-detail-info-section( + :section-info="dataAddress" + section="addresses" + :update-address="updateAddress" + ) .flex.flex-col client-detail-info-section( :section-info="dataAttachments" @@ -27,6 +32,8 @@ export default { saveNewDoc: Function, deleteDoc: Function, dataDocument: Object, + updateDocument: Function, + updateAddress: Function, }, }; diff --git a/src/pages/clients/components/ClientDetailInput.vue b/src/pages/clients/components/ClientDetailInput.vue index ef80414..95348da 100644 --- a/src/pages/clients/components/ClientDetailInput.vue +++ b/src/pages/clients/components/ClientDetailInput.vue @@ -1,16 +1,25 @@