PMCORE-3283:The delete search and save search are not working

This commit is contained in:
fabio
2021-09-08 11:47:24 -04:00
parent 07492799cf
commit 516b3a3d47
4 changed files with 10 additions and 6 deletions

View File

@@ -175,7 +175,8 @@ class Api {
headers: {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ` + credentials.accessToken
"Authorization": `Bearer ` + credentials.accessToken,
"Accept-Language": lang
}
});
}

View File

@@ -29,9 +29,10 @@ export let filters = {
put(data) {
return Api.put({
service: "PUT_MY_FILTERS",
id: data.id,
data,
keys: {},
keys: {
id: data.id,
},
});
},
/**

View File

@@ -60,7 +60,7 @@
UNASSIGNED_LIST: "/home/unassigned",
MY_FILTERS: "/cases/advanced-search/filters",
POST_MY_FILTERS: "/cases/advanced-search/filter",
PUT_MY_FILTERS: "/cases/advanced-search/filter/",
PUT_MY_FILTERS: "/cases/advanced-search/filter/{id}",
DELETE_MY_FILTERS: "/cases/advanced-search/filter/",
SEARCH: "/home/search",
PROCESSES: "/home/processes",

View File

@@ -608,7 +608,7 @@ export default {
this.handleJumpTo();
},
onClick() {
if (this.id) {
if (this.id && this.id !== 'CASES_SEARCH') {
this.updateData(this.id);
} else {
this.$refs['saveFilter'].show();
@@ -619,7 +619,9 @@ export default {
* Delete Search handler
*/
onDeleteSearch() {
this.$emit("onRemoveFilter", this.id);
if (this.id && this.id !== 'CASES_SEARCH') {
this.$emit("onRemoveFilter", this.id);
}
},
checkFormValidity() {
const valid = this.$refs.form.checkValidity();