PMCORE-2726: 'Search by Task Name' filter does not list Tasks according to 'Process Name' filter

code style

code style 2

code style 3
This commit is contained in:
Rodrigo Quelca
2021-01-19 14:39:56 +00:00
parent 496a9cd9c6
commit d74a28abc3
4 changed files with 17 additions and 6 deletions

View File

@@ -72,11 +72,12 @@ export let filters = {
/** /**
* Service to get the users list * Service to get the users list
*/ */
taskList(query) { taskList(params) {
return Api.get({ return Api.get({
service: "TASKS", service: "TASKS",
params: { params: {
text: query, text: params.query,
proId: params.proId
}, },
keys: {}, keys: {},
}); });

View File

@@ -127,6 +127,7 @@
{{ tagContent(tag) }} {{ tagContent(tag) }}
</div> </div>
<component <component
:filters="filters"
v-bind:is="tagComponent(tag)" v-bind:is="tagComponent(tag)"
v-bind:info="tagInfo(tag)" v-bind:info="tagInfo(tag)"
v-bind:tag="tag" v-bind:tag="tag"

View File

@@ -39,7 +39,7 @@ export default {
SearchPopover, SearchPopover,
Multiselect Multiselect
}, },
props: ["tag", "info", "filter"], props: ["tag", "info", "filters", "filter"],
data() { data() {
return { return {
taks: [], taks: [],
@@ -53,9 +53,12 @@ export default {
*/ */
asyncFind(query) { asyncFind(query) {
this.isLoading = true; let params = {};
this.isLoading = true;
params.proId = this.getProcess();
params.query = query;
api.filters api.filters
.taskList(query) .taskList(params)
.then((response) => { .then((response) => {
this.taks = response.data; this.taks = response.data;
this.isLoading = false; this.isLoading = false;
@@ -64,6 +67,13 @@ export default {
console.error(err); console.error(err);
}); });
}, },
/**
* Get the process id to manage the dependency
*/
getProcess() {
let component = _.find(this.filters, function(o) { return o.fieldId === "processName"; });
return component ? component.value : null;
},
/** /**
* Form validations review * Form validations review
*/ */

View File

@@ -13,7 +13,6 @@ export default {
format: '(@lastName, @firstName) @userName' format: '(@lastName, @firstName) @userName'
}; };
_.assignIn(defaultValues, params); _.assignIn(defaultValues, params);
console.log(defaultValues);
aux = defaultValues.format; aux = defaultValues.format;
aux = aux.replace('@userName',defaultValues.userName); aux = aux.replace('@userName',defaultValues.userName);
aux = aux.replace('@firstName',defaultValues.firstName); aux = aux.replace('@firstName',defaultValues.firstName);