WIP Переключение на клиента после создания

This commit is contained in:
Daria Golova
2022-12-14 17:46:24 +03:00
parent 1666e7f806
commit 86d64bc771
8 changed files with 56 additions and 13 deletions

View File

@@ -11,6 +11,7 @@
)
.icon-search
base-button.font-semibold(
v-if="createdClientName === ''",
@click="searchLastName",
:size=40
) Поиск
@@ -43,6 +44,7 @@ export default {
isOpenActions: Number,
clearingTextSearch: Boolean,
changeClearingTextSearch: Function,
createdClientName: String,
},
data() {
return {
@@ -51,7 +53,7 @@ export default {
},
methods: {
searchLastName() {
if (this.searchClient.length >= 3)
if (this.searchClient.length >= 3 && !this.createdClientName)
this.$emit("search", this.searchClient);
},
resetLastName() {
@@ -59,6 +61,9 @@ export default {
},
},
watch: {
createdClientName() {
if (this.createdClientName) this.searchClient = this.createdClientName;
},
searchClient() {
if (!this.searchClient && !this.clearingTextSearch) {
this.$emit("search");
@@ -76,5 +81,5 @@ export default {
<style lang="sass" scoped>
.input
width: 280px
min-width: 280px
</style>