Merged in feature/PMCORE-3195 (pull request #8052)

PMCORE-3195

Approved-by: Rodrigo Quelca
This commit is contained in:
Fabio Guachalla
2021-08-18 19:39:57 +00:00
committed by Rodrigo Quelca
3 changed files with 15 additions and 9 deletions

View File

@@ -230,7 +230,7 @@ export default {
tagPrefix: this.$i18n.t('ID_SEARCH_BY_CASE_NUMBER'),
items:[
{
id: "filterCases",
id: "caseNumber",
value: ""
}
],

View File

@@ -117,7 +117,7 @@ export default {
tagPrefix: this.$i18n.t("ID_SEARCH_BY_CASE_NUMBER"),
items: [
{
id: "filterCases",
id: "caseNumber",
value: "",
},
],
@@ -214,7 +214,10 @@ export default {
handler(newVal, oldVal) {
this.searchTags = [];
this.selected = [];
this.setFilters(newVal);
if (newVal.length) {
this.setFilters(newVal, oldVal);
this.searchClickHandler();
}
}
}
},
@@ -272,17 +275,20 @@ export default {
* Set Filters and make the tag labels
* @param {object} filters json to manage the query
*/
setFilters(filters) {
setFilters(filters, oldVal) {
let self = this;
_.forEach(filters, function (item, key) {
let component = _.find(self.filterItems, function (o) {
return o.id === item.fieldId;
});
if (component) {
self.searchTags.push(component.id);
self.selected = component.id;
self.itemModel[component.id] = component;
self.itemModel[component.id].autoShow = typeof item.autoShow !== "undefined" ? item.autoShow : true
self.searchTags.push(component.id);
self.selected.push(component.id);
self.itemModel[component.id] = component;
self.itemModel[component.id].autoShow = typeof item.autoShow !== "undefined" ? item.autoShow : true;
if (!oldVal.length) {
self.updateSearchTag(item);
}
}
if(item.fieldId === "processName") {
self.searchTags.push(self.processName.id);

View File

@@ -113,7 +113,7 @@ export default {
tagPrefix: this.$i18n.t('ID_SEARCH_BY_CASE_NUMBER'),
items:[
{
id: "filterCases",
id: "caseNumber",
value: ""
}
],