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
|
* 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: {},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user