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:
@@ -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: {},
|
||||
});
|
||||
|
||||
@@ -127,6 +127,7 @@
|
||||
{{ tagContent(tag) }}
|
||||
</div>
|
||||
<component
|
||||
:filters="filters"
|
||||
v-bind:is="tagComponent(tag)"
|
||||
v-bind:info="tagInfo(tag)"
|
||||
v-bind:tag="tag"
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user