Фикс окна создания клиента

This commit is contained in:
megavrilinvv
2022-11-18 16:40:01 +03:00
parent ace6b2ec75
commit 9b2885c594
5 changed files with 31 additions and 5 deletions

View File

@@ -8,7 +8,11 @@
)
.flex.flex-auto
the-sidebar
router-view(:open-form="openForm", :current-year="currentYear")
router-view(
:open-form="openForm",
:is-open-form="isOpenForm",
:current-year="currentYear"
)
</template>
<script>

View File

@@ -1,5 +1,9 @@
<template lang="pug">
clients-wrapper(:open-form="openForm", :current-year="currentYear")
clients-wrapper(
:open-form="openForm",
:is-open-form="isOpenForm",
:current-year="currentYear"
)
</template>
<script>
@@ -10,6 +14,7 @@ export default {
props: {
openForm: Function,
currentYear: Number,
isOpenForm: Boolean,
},
};
</script>

View File

@@ -13,7 +13,7 @@
:client="client",
:fetch-data-clients="fetchDataClients",
:current-year="currentYear"
)
)
</template>
<script>
@@ -35,6 +35,7 @@ export default {
props: {
openForm: Function,
currentYear: Number,
isOpenForm: Boolean,
},
data() {
@@ -74,6 +75,17 @@ export default {
}
},
},
watch: {
isOpenForm: {
immediate: true,
handler(newValue) {
if (newValue === false) {
console.log("work");
this.fetchDataClients();
}
},
},
},
mounted() {
this.fetchDataClients();
},

View File

@@ -1,6 +1,10 @@
<template lang="pug">
.wrapper.flex.w-full.relative.mx-6
clients-table(:open-form="openForm", :current-year="currentYear")
clients-table(
:open-form="openForm",
:is-open-form="isOpenForm"
:current-year="currentYear"
)
</template>
<script>
@@ -11,6 +15,7 @@ export default {
props: {
openForm: Function,
currentYear: Number,
isOpenForm: Boolean,
},
};
</script>

View File

@@ -1,6 +1,6 @@
<template lang="pug">
.flex.box-border.px-4.items-center.w-full.text-sm(:style="{ minWidth : width + 'px' }")
span.text-sm(v-if="!isOpenChange") {{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")
</template>