Merge branch 'master' into UC-162

This commit is contained in:
frontgavrilin
2022-12-09 17:04:45 +03:00
committed by GitHub
8 changed files with 48 additions and 31 deletions

View File

@@ -3,7 +3,7 @@
class="py-2.5", class="py-2.5",
:style="{ minWidth: widthInput + 'px' }" :style="{ minWidth: widthInput + 'px' }"
) )
input.input.w-full.outline-0.not-italic.date( input.input.w-full.outline-0.not-italic.date.cursor-text(
:value="value", :value="value",
type="date", type="date",
@input="$emit('update:value', $event.target.value)", @input="$emit('update:value', $event.target.value)",

View File

@@ -3,7 +3,7 @@
class="py-2.5" class="py-2.5"
:style="{ minWidth: widthInput + 'px' }" :style="{ minWidth: widthInput + 'px' }"
) )
input.input.w-full.outline-0.not-italic( input.input.w-full.outline-0.not-italic.cursor-text(
:value="value" :value="value"
type="time" type="time"
@input="$emit('update:value', $event.target.value)" @input="$emit('update:value', $event.target.value)"

View File

@@ -37,14 +37,14 @@
.flex.gap-x-2.items-center .flex.gap-x-2.items-center
.flex.flex-col(class="gap-y-1.5") .flex.flex-col(class="gap-y-1.5")
span.text-xs.opacity-40.font-bold.leading-3 Начало span.text-xs.opacity-40.font-bold.leading-3 Начало
base-input-time.item-input.text-base.cursor-text.select( base-input-time.item-input.text-base.select(
v-model:value="startTime", v-model:value="startTime",
:width-input="72" :width-input="72"
) )
span.mt-4 span.mt-4
.flex.flex-col(class="gap-y-1.5") .flex.flex-col(class="gap-y-1.5")
span.text-xs.opacity-40.font-bold.leading-3 Конец span.text-xs.opacity-40.font-bold.leading-3 Конец
base-input-time.item-input.text-base.cursor-text.select( base-input-time.item-input.text-base.select(
v-model:value="endTime", v-model:value="endTime",
:width-input="72" :width-input="72"
) )

View File

@@ -256,7 +256,7 @@ export default {
} }
if (this.section === "addresses") { if (this.section === "addresses") {
if (!this.addressId) { if (!this.addressId) {
if (this.sectionInfo.join_adress === "") this.isAddress = false; if (this.sectionInfo.full_address === "") this.isAddress = false;
this.createAddress(); this.createAddress();
} else this.updateAddress(); } else this.updateAddress();
} }

View File

@@ -1,5 +1,5 @@
<template lang="pug"> <template lang="pug">
.w-full.h-fit.pt-4.flex.gap-x-4(class="px-[52px] pb-[30px]") .w-full.h-fit.flex.gap-x-4
client-detail-info-section( client-detail-info-section(
v-model:section-info="dataDocument", v-model:section-info="dataDocument",
section="pass", section="pass",

View File

@@ -7,7 +7,7 @@
:change-clearing-text-search="changeClearingTextSearch", :change-clearing-text-search="changeClearingTextSearch",
@search="filterDataClients", @search="filterDataClients",
) )
.flex.flex-col.h-full.gap-y-2.table-container.w-full.mt-8.mb-3 .flex.flex-col.h-full.table-container.w-full.mt-8.mb-3
clients-table-header(:check="selectedCheck" :is-check="selectAll") clients-table-header(:check="selectedCheck" :is-check="selectAll")
.flex.flex-col .flex.flex-col
clients-table-row( clients-table-row(

View File

@@ -5,7 +5,7 @@
) )
button.recover-btn(@click="stopTimer") Восстановить button.recover-btn(@click="stopTimer") Восстановить
.countdown 0:{{ countdown }} .countdown 0:{{ countdown }}
.row-wrapper.flex.flex-col.w-full .row-wrapper.flex.flex-col.w-full(:class="closedDetail")
.row-body.flex.w-full.cursor-pointer( .row-body.flex.w-full.cursor-pointer(
:id="id", :id="id",
@click="(e) => openDetailInfo(e)", @click="(e) => openDetailInfo(e)",
@@ -105,6 +105,24 @@
:address-id="addressId", :address-id="addressId",
:doc-id="docId", :doc-id="docId",
) )
client-detail-info-wrapper.detail.px-52px(
:class="{'pb-[30px] pt-4': isOpenDetailInfo}"
:data-address="dataAddress",
:data-detail="dataDetail",
:data-attachments="dataAttachments",
:data-document="dataIdentityDocument",
:save-new-doc="saveNewDoc",
:delete-doc="deleteDoc",
:update-document="postUpdateIdentityDocument",
:update-address="postUpdateAddress",
:lack-data="lackData",
:lack-address="lackAddress",
:dope-address="dopeAddress",
:lack-attachments="lackAttachments",
:create-address="postCreateAddress",
:create-document="postCreateIdentityDocument",
:address-id="addressId",
:doc-id="docId",
</template> </template>
<script> <script>
@@ -186,6 +204,11 @@ export default {
rowOverlay() { rowOverlay() {
return this.deletedClientId === this.client.id; return this.deletedClientId === this.client.id;
}, },
closedDetail() {
return {
"closed-detail": !this.isOpenDetailInfo,
};
},
}, },
methods: { methods: {
stopTimer() { stopTimer() {
@@ -345,7 +368,7 @@ export default {
addNotification(new Date().getTime(), title, message, "success", 5000); addNotification(new Date().getTime(), title, message, "success", 5000);
}, },
addErrorNotification(title, message) { addErrorNotification(title, message) {
addNotification(title, title, message, "error", 0); addNotification(title, title, message, "error", 5000);
}, },
fetchClientDetail(id) { fetchClientDetail(id) {
fetchWrapper fetchWrapper
@@ -425,15 +448,15 @@ export default {
}, },
saveAddress(data) { saveAddress(data) {
this.addressId = data?.id; this.addressId = data?.id;
if (data?.join_adress && data?.join_adress.substr(0, 4) !== "None") { if (data?.full_address) {
this.dataAddress = { this.dataAddress = {
join_adress: data?.join_adress, full_address: data.full_address,
}; };
this.lackAddress = true; this.lackAddress = true;
} else { } else {
this.lackAddress = false; this.lackAddress = false;
this.dataAddress = { this.dataAddress = {
join_adress: "", full_address: "",
}; };
} }
}, },
@@ -460,7 +483,8 @@ export default {
postUpdateAddress() { postUpdateAddress() {
fetchWrapper fetchWrapper
.post(`general/address/${this.addressId}/update/`, { .post(`general/address/${this.addressId}/update/`, {
full_address: this.mergeFullAddress() || this.dataAddress.join_adress, full_address:
this.mergeFullAddress() || this.dataAddress.full_address,
}) })
.then((response) => { .then((response) => {
this.fetchClientDetail(this.id); this.fetchClientDetail(this.id);
@@ -506,7 +530,8 @@ export default {
fetchWrapper fetchWrapper
.post("general/address/create/", { .post("general/address/create/", {
person_id: this.id, person_id: this.id,
full_address: this.mergeFullAddress() || this.dataAddress.join_adress, full_address:
this.mergeFullAddress() || this.dataAddress.full_address,
}) })
.then((response) => { .then((response) => {
this.fetchClientDetail(this.id); this.fetchClientDetail(this.id);
@@ -616,9 +641,7 @@ export default {
.row-wrapper .row-wrapper
border-bottom: 1px solid var(--border-light-grey-color) border-bottom: 1px solid var(--border-light-grey-color)
min-width: 1556px min-width: 1556px
.row-wrapper:hover .detail .row-wrapper:hover
background-color: var(--bg-hover-row-table)
.row-wrapper:hover .row-body
background-color: var(--bg-hover-row-table) background-color: var(--bg-hover-row-table)
.row-body .row-body
color: var(--font-dark-blue-color) color: var(--font-dark-blue-color)
@@ -649,18 +672,10 @@ export default {
color: var(--btn-blue-color) color: var(--btn-blue-color)
.countdown .countdown
color: var(--font-grey-color ) color: var(--font-grey-color )
.detail-enter-from .detail
opacity: 0 max-height: 560px
transform: translateY(-2px) transition: 0.3s ease all
pointer-events: none overflow: hidden
.detail-enter-active .closed-detail .detail
transition: 0.1s ease max-height: 0
.detail-leave-to
opacity: 0
transform: translateY(-2px)
pointer-events: none
.detail-leave-active
transition: 0.1s ease
.detail-move
transition: 0.1s ease
</style> </style>

View File

@@ -44,7 +44,9 @@ module.exports = {
"22px": "22px", "22px": "22px",
"23px": "23px", "23px": "23px",
"29_25px": "29.25px", "29_25px": "29.25px",
"30px": "30px",
"45px": "45px", "45px": "45px",
"52px": "52px",
"74px": "74px", "74px": "74px",
"148px": "148px", "148px": "148px",
}, },