storage url o'zgartirildi
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="category">Категория</label>
|
||||
<select id="category" class="form-control" v-model="category_id">
|
||||
<select id="category" class="form-control" v-model="category_id" @change="SearchProduct('')">
|
||||
<option value="0">Все</option>
|
||||
<option v-for="category in categories" :value="category.id">
|
||||
{{ category.name.ru }}
|
||||
@@ -194,19 +194,17 @@
|
||||
async SearchProduct(query) {
|
||||
let name = query;
|
||||
|
||||
if (name.length > 0) {
|
||||
axios.post('/dashboard/compilations/product/search', { name: name})
|
||||
.then((response) => {
|
||||
if (response.data.status) {
|
||||
this.products = response.data.products;
|
||||
}
|
||||
}).catch((error) => {
|
||||
if (error.response) {
|
||||
this.error = true;
|
||||
this.errors = error.response.data.errors;
|
||||
axios.post('/dashboard/compilations/product/search', { name: name, category_id: this.category_id})
|
||||
.then((response) => {
|
||||
if (response.data.status) {
|
||||
this.products = response.data.products;
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch((error) => {
|
||||
if (error.response) {
|
||||
this.error = true;
|
||||
this.errors = error.response.data.errors;
|
||||
}
|
||||
});
|
||||
|
||||
console.log(query);
|
||||
},
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label for="category">Категория</label>
|
||||
<select id="category" class="form-control" v-model="category_id">
|
||||
<select id="category" class="form-control" v-model="category_id" @change="SearchProduct('')">
|
||||
<option value="0">Все</option>
|
||||
<option v-for="category in categories" :value="category.id">
|
||||
{{ category.name.ru }}
|
||||
@@ -196,19 +196,17 @@
|
||||
async SearchProduct(query) {
|
||||
let name = query;
|
||||
|
||||
if (name.length > 0) {
|
||||
axios.post('/dashboard/compilations/product/search', { name: name})
|
||||
.then((response) => {
|
||||
if (response.data.status) {
|
||||
this.products = response.data.products;
|
||||
}
|
||||
}).catch((error) => {
|
||||
if (error.response) {
|
||||
this.error = true;
|
||||
this.errors = error.response.data.errors;
|
||||
axios.post('/dashboard/compilations/product/search', { name: name, category_id: this.category_id})
|
||||
.then((response) => {
|
||||
if (response.data.status) {
|
||||
this.products = response.data.products;
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch((error) => {
|
||||
if (error.response) {
|
||||
this.error = true;
|
||||
this.errors = error.response.data.errors;
|
||||
}
|
||||
});
|
||||
|
||||
console.log(query);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user