Merged in bugfix/PMCORE-3429 (pull request #8223)
PMCORE-3429 Approved-by: Rodrigo Quelca
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
7f2e2102aa
@@ -108,46 +108,46 @@ export default {
|
|||||||
dataLoaded: false,
|
dataLoaded: false,
|
||||||
filterItems: [
|
filterItems: [
|
||||||
{
|
{
|
||||||
type: "CaseNumber",
|
type: "CaseNumber",
|
||||||
id: "caseNumber",
|
id: "caseNumber",
|
||||||
title: `${this.$i18n.t("ID_FILTER")}: ${this.$i18n.t(
|
title: `${this.$i18n.t("ID_FILTER")}: ${this.$i18n.t(
|
||||||
"ID_BY_CASE_NUMBER"
|
"ID_BY_CASE_NUMBER"
|
||||||
)}`,
|
)}`,
|
||||||
optionLabel: this.$i18n.t("ID_BY_CASE_NUMBER"),
|
optionLabel: this.$i18n.t("ID_BY_CASE_NUMBER"),
|
||||||
detail: this.$i18n.t("ID_PLEASE_SET_THE_CASE_NUMBER_TO_BE_SEARCHED"),
|
detail: this.$i18n.t("ID_PLEASE_SET_THE_CASE_NUMBER_TO_BE_SEARCHED"),
|
||||||
tagText: "",
|
tagText: "",
|
||||||
tagPrefix: this.$i18n.t("ID_SEARCH_BY_CASE_NUMBER"),
|
tagPrefix: this.$i18n.t("ID_SEARCH_BY_CASE_NUMBER"),
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
id: "filterCases",
|
id: "filterCases",
|
||||||
value: "",
|
value: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
autoShow: true,
|
||||||
|
makeTagText: function (params, data) {
|
||||||
|
return `${params.tagPrefix}: ${data[0].value}`;
|
||||||
},
|
},
|
||||||
],
|
|
||||||
autoShow: true,
|
|
||||||
makeTagText: function (params, data) {
|
|
||||||
return `${params.tagPrefix}: ${data[0].value}`;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "CaseTitle",
|
type: "CaseTitle",
|
||||||
id: "caseTitle",
|
|
||||||
title: `${this.$i18n.t("ID_FILTER")}: ${this.$i18n.t(
|
|
||||||
"ID_BY_CASE_THREAD_TITLE"
|
|
||||||
)}`,
|
|
||||||
optionLabel: this.$i18n.t("ID_BY_CASE_THREAD_TITLE"),
|
|
||||||
tagPrefix: this.$i18n.t("ID_SEARCH_BY_CASE_THREAD_TITLE"),
|
|
||||||
detail: "",
|
|
||||||
tagText: "",
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
id: "caseTitle",
|
id: "caseTitle",
|
||||||
value: "",
|
title: `${this.$i18n.t("ID_FILTER")}: ${this.$i18n.t(
|
||||||
|
"ID_BY_CASE_THREAD_TITLE"
|
||||||
|
)}`,
|
||||||
|
optionLabel: this.$i18n.t("ID_BY_CASE_THREAD_TITLE"),
|
||||||
|
tagPrefix: this.$i18n.t("ID_SEARCH_BY_CASE_THREAD_TITLE"),
|
||||||
|
detail: "",
|
||||||
|
tagText: "",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
id: "caseTitle",
|
||||||
|
value: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
autoShow: true,
|
||||||
|
makeTagText: function (params, data) {
|
||||||
|
return `${this.tagPrefix} ${data[0].value}`;
|
||||||
},
|
},
|
||||||
],
|
|
||||||
autoShow: true,
|
|
||||||
makeTagText: function (params, data) {
|
|
||||||
return `${this.tagPrefix} ${data[0].value}`;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "DateFilter",
|
type: "DateFilter",
|
||||||
@@ -182,6 +182,7 @@ export default {
|
|||||||
placeholder: this.$i18n.t('ID_USER_NAME'),
|
placeholder: this.$i18n.t('ID_USER_NAME'),
|
||||||
tagText: "",
|
tagText: "",
|
||||||
tagPrefix: this.$i18n.t('ID_SEARCH_BY_SEND_BY'),
|
tagPrefix: this.$i18n.t('ID_SEARCH_BY_SEND_BY'),
|
||||||
|
autoShow: true,
|
||||||
items:[
|
items:[
|
||||||
{
|
{
|
||||||
id: "sendBy",
|
id: "sendBy",
|
||||||
@@ -195,27 +196,27 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "TaskTitle",
|
type: "TaskTitle",
|
||||||
id: "taskTitle",
|
id: "taskTitle",
|
||||||
title: `${this.$i18n.t("ID_FILTER")}: ${this.$i18n.t(
|
title: `${this.$i18n.t("ID_FILTER")}: ${this.$i18n.t(
|
||||||
"ID_TASK_NAME"
|
"ID_TASK_NAME"
|
||||||
)}`,
|
)}`,
|
||||||
optionLabel: this.$i18n.t("ID_BY_TASK"),
|
optionLabel: this.$i18n.t("ID_BY_TASK"),
|
||||||
detail: "",
|
detail: "",
|
||||||
tagText: "",
|
tagText: "",
|
||||||
tagPrefix: this.$i18n.t("ID_SEARCH_BY_TASK_NAME"),
|
tagPrefix: this.$i18n.t("ID_SEARCH_BY_TASK_NAME"),
|
||||||
autoShow: true,
|
autoShow: true,
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
id: "task",
|
id: "task",
|
||||||
value: "",
|
value: "",
|
||||||
options: [],
|
options: [],
|
||||||
placeholder: this.$i18n.t("ID_TASK_NAME"),
|
placeholder: this.$i18n.t("ID_TASK_NAME"),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
makeTagText: function (params, data) {
|
||||||
|
return `${this.tagPrefix}: ${data[0].label || ""}`;
|
||||||
},
|
},
|
||||||
],
|
|
||||||
makeTagText: function (params, data) {
|
|
||||||
return `${this.tagPrefix}: ${data[0].label || ""}`;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
processName: {
|
processName: {
|
||||||
@@ -226,7 +227,7 @@ export default {
|
|||||||
detail: "",
|
detail: "",
|
||||||
tagText: "",
|
tagText: "",
|
||||||
tagPrefix: this.$i18n.t('ID_SEARCH_BY_PROCESS_NAME'),
|
tagPrefix: this.$i18n.t('ID_SEARCH_BY_PROCESS_NAME'),
|
||||||
autoShow: false,
|
autoShow: true,
|
||||||
items:[
|
items:[
|
||||||
{
|
{
|
||||||
id: "process",
|
id: "process",
|
||||||
@@ -236,7 +237,6 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
makeTagText: function (params, data) {
|
makeTagText: function (params, data) {
|
||||||
|
|
||||||
return `${this.tagPrefix} ${data[0].options && data[0].options.label || ''}`;
|
return `${this.tagPrefix} ${data[0].options && data[0].options.label || ''}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -297,6 +297,11 @@ export default {
|
|||||||
}
|
}
|
||||||
//adding process name filter
|
//adding process name filter
|
||||||
if (self.byProcessName !== "") {
|
if (self.byProcessName !== "") {
|
||||||
|
if (element !== undefined) {
|
||||||
|
this.processName.autoShow = false;
|
||||||
|
} else {
|
||||||
|
this.processName.autoShow = true;
|
||||||
|
}
|
||||||
initialFilters =[...new Set([...initialFilters,...this.prepareFilterItems(this.processName.items, self.byProcessName, true)])];
|
initialFilters =[...new Set([...initialFilters,...this.prepareFilterItems(this.processName.items, self.byProcessName, true)])];
|
||||||
}
|
}
|
||||||
this.$emit("onUpdateFilters", {params: initialFilters, refresh: false});
|
this.$emit("onUpdateFilters", {params: initialFilters, refresh: false});
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ export default {
|
|||||||
byProcessName: "",
|
byProcessName: "",
|
||||||
criteriaItemsRadio: [],
|
criteriaItemsRadio: [],
|
||||||
criteriaItemsCheckbox: [],
|
criteriaItemsCheckbox: [],
|
||||||
|
showProcessName: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -169,18 +170,22 @@ export default {
|
|||||||
return o.id === self.selectedRadio;
|
return o.id === self.selectedRadio;
|
||||||
});
|
});
|
||||||
if (element) {
|
if (element) {
|
||||||
|
this.showProcessName = false;
|
||||||
initialFilters = this.prepareFilterItems(
|
initialFilters = this.prepareFilterItems(
|
||||||
element,
|
element,
|
||||||
this.selectedRadio,
|
this.selectedRadio,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
this.showProcessName = true;
|
||||||
}
|
}
|
||||||
self.selectedCheckbox.forEach((item) => {
|
self.selectedCheckbox.forEach((item) => {
|
||||||
element = _.find(this.filterItems, function(o) {
|
element = _.find(this.filterItems, function(o) {
|
||||||
return o.id === item;
|
return o.id === item;
|
||||||
});
|
});
|
||||||
if (element) {
|
if (element) {
|
||||||
initialFilters =[...new Set([...initialFilters,...this.prepareFilterItems(element, item, true)])];
|
element.autoShow = self.showProcessName;
|
||||||
|
initialFilters =[...new Set([...initialFilters,...this.prepareFilterItems(element, item, true)])];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.$emit("onUpdateFilters", {
|
this.$emit("onUpdateFilters", {
|
||||||
@@ -213,7 +218,7 @@ export default {
|
|||||||
value: "",
|
value: "",
|
||||||
label: "",
|
label: "",
|
||||||
options: [],
|
options: [],
|
||||||
autoShow: true,
|
autoShow: element.autoShow,
|
||||||
};
|
};
|
||||||
initialFilters.push(item);
|
initialFilters.push(item);
|
||||||
}
|
}
|
||||||
@@ -310,6 +315,7 @@ export default {
|
|||||||
});
|
});
|
||||||
if (tag === "processName") {
|
if (tag === "processName") {
|
||||||
this.byProcessName = "";
|
this.byProcessName = "";
|
||||||
|
this.selectedCheckbox = [];
|
||||||
}
|
}
|
||||||
this.$emit("onUpdateFilters", { params: temp, refresh: true });
|
this.$emit("onUpdateFilters", { params: temp, refresh: true });
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ export default {
|
|||||||
detail: "",
|
detail: "",
|
||||||
tagText: "",
|
tagText: "",
|
||||||
tagPrefix: this.$i18n.t('ID_SEARCH_BY_PROCESS_NAME'),
|
tagPrefix: this.$i18n.t('ID_SEARCH_BY_PROCESS_NAME'),
|
||||||
autoShow: false,
|
autoShow: true,
|
||||||
items:[
|
items:[
|
||||||
{
|
{
|
||||||
id: "process",
|
id: "process",
|
||||||
@@ -276,7 +276,14 @@ export default {
|
|||||||
initialFilters = this.prepareFilterItems(element.items, this.selected, true);
|
initialFilters = this.prepareFilterItems(element.items, this.selected, true);
|
||||||
}
|
}
|
||||||
//adding process name filter
|
//adding process name filter
|
||||||
initialFilters =[...new Set([...initialFilters,...this.prepareFilterItems(this.processName.items, self.byProcessName, true)])];
|
if (self.byProcessName !== "") {
|
||||||
|
if (element !== undefined) {
|
||||||
|
this.processName.autoShow = false;
|
||||||
|
} else {
|
||||||
|
this.processName.autoShow = true;
|
||||||
|
}
|
||||||
|
initialFilters =[...new Set([...initialFilters,...this.prepareFilterItems(this.processName.items, self.byProcessName, true)])];
|
||||||
|
}
|
||||||
this.$emit("onUpdateFilters", {params: initialFilters, refresh: false});
|
this.$emit("onUpdateFilters", {params: initialFilters, refresh: false});
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<SearchPopover :target="tag" @savePopover="onOk" :title="info.title">
|
<SearchPopover
|
||||||
|
:target="tag"
|
||||||
|
@savePopover="onOk"
|
||||||
|
:title="info.title"
|
||||||
|
:autoShow="info.autoShow || false"
|
||||||
|
>
|
||||||
<template v-slot:body>
|
<template v-slot:body>
|
||||||
<p>{{ info.detail }}</p>
|
<p>{{ info.detail }}</p>
|
||||||
<form ref="form" @submit.stop.prevent="handleSubmit">
|
<form ref="form" @submit.stop.prevent="handleSubmit">
|
||||||
|
|||||||
Reference in New Issue
Block a user