Store tagGroups on catalog url
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
f94728845e
commit
538c217b59
|
@ -55,8 +55,8 @@ class Controller extends Section {
|
||||||
if (this.$params.typeId)
|
if (this.$params.typeId)
|
||||||
this.typeId = parseInt(this.$params.typeId);
|
this.typeId = parseInt(this.$params.typeId);
|
||||||
|
|
||||||
/* if (this.$params.tags)
|
if (this.$params.tagGroups)
|
||||||
this.tags = JSON.parse(this.$params.tags); */
|
this.tagGroups = JSON.parse(this.$params.tagGroups);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,23 +288,28 @@ class Controller extends Section {
|
||||||
if (this.typeId)
|
if (this.typeId)
|
||||||
params.typeId = this.typeId;
|
params.typeId = this.typeId;
|
||||||
|
|
||||||
params.tagGrops = undefined;
|
params.tagGroups = undefined;
|
||||||
if (this.tagGrops.length) {
|
if (this.tagGroups && this.tagGroups.length) {
|
||||||
const tagGrops = [];
|
const tagGroups = [];
|
||||||
for (let tag of this.tagGrops) {
|
for (let tagGroup of this.tagGroups) {
|
||||||
const tagParam = {value: tag.value};
|
const tagParam = {values: []};
|
||||||
|
|
||||||
if (tag.tagSelection) {
|
for (let tagValue of tagGroup.values)
|
||||||
tagParam.tagFk = tag.tagFk;
|
tagParam.values.push({value: tagValue.value});
|
||||||
|
|
||||||
|
if (tagGroup.tagFk)
|
||||||
|
tagParam.tagFk = tagGroup.tagFk;
|
||||||
|
|
||||||
|
if (tagGroup.tagSelection) {
|
||||||
tagParam.tagSelection = {
|
tagParam.tagSelection = {
|
||||||
name: tag.tagSelection.name
|
name: tagGroup.tagSelection.name
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
tags.push(tagParam);
|
tagGroups.push(tagParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
params.tags = JSON.stringify(tags);
|
params.tagGroups = JSON.stringify(tagGroups);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$state.go(this.$state.current.name, params);
|
this.$state.go(this.$state.current.name, params);
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
"order": "$ctrl.order"
|
"order": "$ctrl.order"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"url": "/catalog?q&categoryId&typeId&tags",
|
"url": "/catalog?q&categoryId&typeId&tagGroups",
|
||||||
"state": "order.card.catalog",
|
"state": "order.card.catalog",
|
||||||
"component": "vn-order-catalog",
|
"component": "vn-order-catalog",
|
||||||
"description": "Catalog",
|
"description": "Catalog",
|
||||||
|
|
Loading…
Reference in New Issue