menu brand links test ready

This commit is contained in:
merdan 2022-09-23 16:27:39 +05:00
parent e36259c7ed
commit 2d951b9d26
1 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@
<div class="linked-product-search-result">
<ul>
<li v-for='(brand, index) in brands' v-if=brands.length' @click="addBrand(brand, key)">
<li v-for='(brand, index) in brands' v-if=brands.length' @click="addBrand(brand)">
@{{ brand.name }}
</li>
@ -104,16 +104,16 @@
.then (function(response) {
for (var index in response.data) {
if (response.data[index].id == this_this.productId) {
if (response.data[index].id == this_this.menuId) {
response.data.splice(index, 1);
}
}
if (this_this.addedBrands.length ) {
for (var brand in this_this.addedBrands) {
for (var productId in response.data) {
if (response.data[productId].id == this_this.addedBrands[brand].id) {
response.data.splice(productId, 1);
for (var menuId in response.data) {
if (response.data[menuId].id == this_this.addedBrands[brand].id) {
response.data.splice(menuId, 1);
}
}
}