diff --git a/src/pages/clients/components/ClientDetailInfoSection.vue b/src/pages/clients/components/ClientDetailInfoSection.vue
index 713bb97..a483d14 100644
--- a/src/pages/clients/components/ClientDetailInfoSection.vue
+++ b/src/pages/clients/components/ClientDetailInfoSection.vue
@@ -41,35 +41,37 @@
:save-additional="saveDocs"
)
.section-body.w-full.flex.flex-col.px-4.pt-3.pb-4.gap-y-4
- .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"
- :sharp="settings[section].sharps[key]"
- )
- .copy.icon-copy.cursor-pointer(
- v-if="item.copy",
- @click="() => copyValue(item)"
+ .flex.flex-col(class="gap-y-1.5")
+ .flex.flex-col(v-for="(item, key) in sectionInfo" v-if="lackPass || lackAddress" 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"
)
- .flex(v-if="settings[section].options && !isChange")
- span.text-sm.w-fit(:style="{fontWeight:key === 'numba'&&600}") {{item}}
- .copy.icon-copy.cursor-pointer.pl-4(
- v-if="key === 'numba'",
- @click="() => copyValue(item)"
- )
- .flex(v-if="item.name && !isChange")
- span.text-sm.w-fit {{item.title}}
- .flex.items-center(v-if="item.title")
- .icon-cancel.cancel.cursor-pointer.pr-3.text-xsm(
- v-if="isChange",
- :id="item.id",
- @click="(e) => deleteDoc(e)"
- )
- span.text-sm {{item.title}}
+ .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}}
+ .copy.icon-copy.cursor-pointer.pl-4(
+ v-if="key === 'numba'",
+ @click="() => copyValue(item)"
+ )
+ .flex(v-if="item.name && !isChange")
+ span.text-sm.w-fit {{item.title}}
+ .flex.items-center(v-if="item.title")
+ .icon-cancel.cancel.cursor-pointer.pr-3.text-xsm(
+ v-if="isChange",
+ :id="item.id",
+ @click="(e) => deleteDoc(e)"
+ )
+ span.text-sm {{item.title}}
+ .flex.justify-center.items.center(v-else)
+ .flex(@click="!lackPass") Добавить данные
diff --git a/src/pages/clients/components/ClientDetailInput.vue b/src/pages/clients/components/ClientDetailInput.vue
index 95348da..b52006e 100644
--- a/src/pages/clients/components/ClientDetailInput.vue
+++ b/src/pages/clients/components/ClientDetailInput.vue
@@ -1,10 +1,10 @@
.input-wrapper.flex.gap-x-2.px-3.box-border.w-max-fit(class="py-2.5")
- input.place-input.w-full.outline-0.text-sm.not-italic.resize-none(
+ textarea.place-input.w-full.outline-0.text-sm.not-italic.resize-none(
:rows="Math.ceil(value.length/heightInput)"
:value="value"
@input="$emit('update:value', $event.target.value)"
- v-mask="sharp"
+
)
slot
diff --git a/src/pages/clients/components/ClientsTableRow.vue b/src/pages/clients/components/ClientsTableRow.vue
index 55d8b0b..9798f2a 100644
--- a/src/pages/clients/components/ClientsTableRow.vue
+++ b/src/pages/clients/components/ClientsTableRow.vue
@@ -24,6 +24,8 @@
:delete-doc="deleteDoc"
:update-document="postUpdateIdentityDocument"
:update-address="postUpdateAddress"
+ :lack-pass="lackPass"
+ :lack-address="lackAddress"
)
@@ -73,6 +75,8 @@ export default {
dataClient: {},
docId: "",
addressId: "",
+ lackPass: true,
+ lackAddress: true,
};
},
props: {
@@ -215,17 +219,32 @@ export default {
this.saveAddress(data.address[0]);
this.saveAttachments([...data.attachments]);
},
+ addDoc() {
+ this.lackPass = false;
+ },
+
saveIdentityDocument(data) {
- this.dataIdentityDocument = {
- numba:
- data?.series && data?.numba
- ? data?.series + " " + data?.numba || ""
+ if (
+ data?.series ||
+ data?.numba ||
+ data?.issued_by_org ||
+ data?.issued_by_org_code ||
+ data?.issued_by_date
+ ) {
+ this.dataIdentityDocument = {
+ numba:
+ data.series && data.numba ? data?.series + " " + data?.numba : "",
+ issued_by_org: data.issued_by_org ? data?.issued_by_org : "",
+ issued_by_org_code: data.issued_by_org_code
+ ? data?.issued_by_org_code
: "",
- issued_by_org: data?.issued_by_org || "",
- issued_by_org_code: data?.issued_by_org_code || "",
- issued_by_date:
- data?.issued_by_date.split("-").reverse().join(".") || "",
- };
+ issued_by_date: data.issued_by_date
+ ? data?.issued_by_date.split("-").reverse().join(".")
+ : "",
+ };
+ } else {
+ this.lackPass = false;
+ }
this.docId = data?.id;
},
postUpdateIdentityDocument() {
@@ -243,9 +262,16 @@ export default {
.then(() => this.fetchClientDetail(this.id));
},
saveAddress(data) {
- this.dataAddress = {
- join_adress: data?.join_adress || "",
- };
+ if (data?.join_adress) {
+ this.dataAddress = {
+ join_adress: data?.join_adress
+ ? data?.join_adress
+ : (this.lackAddress = false),
+ };
+ } else {
+ this.lackAddress = false;
+ }
+
this.addressId = data?.id;
},
postUpdateAddress() {