storage url o'zgartirildi

This commit is contained in:
2026-04-28 15:02:06 +05:00
parent 3aa4601229
commit bb733d14c1
37 changed files with 282 additions and 407 deletions

View File

@@ -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);
},

View File

@@ -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);
},