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
*/
taskList(query) {
taskList(params) {
return Api.get({
service: "TASKS",
params: {
text: query,
text: params.query,
proId: params.proId
},
keys: {},
});

View File

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

View File

@@ -39,7 +39,7 @@ export default {
SearchPopover,
Multiselect
},
props: ["tag", "info", "filter"],
props: ["tag", "info", "filters", "filter"],
data() {
return {
taks: [],
@@ -53,9 +53,12 @@ export default {
*/
asyncFind(query) {
this.isLoading = true;
let params = {};
this.isLoading = true;
params.proId = this.getProcess();
params.query = query;
api.filters
.taskList(query)
.taskList(params)
.then((response) => {
this.taks = response.data;
this.isLoading = false;
@@ -64,6 +67,13 @@ export default {
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
*/

View File

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