Фикс окна создания клиента
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
},
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user