PMCORE-2816: Direct link is not opening the case, after the task is being routed to the next task

complete pause unnassigned

fix unnassigned

PMCORE-2816: after open link the draft menu does not work correctly

fix case informtaion in open case

fix code style 2

remove debugger

fix CR notes
This commit is contained in:
Rodrigo Quelca
2021-01-28 19:49:35 +00:00
parent d7e0e359b9
commit d8ca76dd8d
6 changed files with 48 additions and 2 deletions

View File

@@ -141,6 +141,7 @@ export default {
APP_UID: params.app_uid, APP_UID: params.app_uid,
DEL_INDEX: params.del_index DEL_INDEX: params.del_index
}); });
this.$emit("cleanDefaultOption");
} }
} }
}, },

View File

@@ -31,6 +31,7 @@
@onUpdateDataCase="onUpdateDataCase" @onUpdateDataCase="onUpdateDataCase"
@onLastPage="onLastPage" @onLastPage="onLastPage"
@onUpdateFilters="onUpdateFilters" @onUpdateFilters="onUpdateFilters"
@cleanDefaultOption="cleanDefaultOption"
></component> ></component>
</div> </div>
</div> </div>
@@ -72,7 +73,7 @@ export default {
data() { data() {
return { return {
lastPage: "MyCases", lastPage: "MyCases",
page: "MyCases", page: null,
menu: [], menu: [],
dataCase: {}, dataCase: {},
hideToggle: true, hideToggle: true,
@@ -86,6 +87,7 @@ export default {
filters: null, filters: null,
menuMap: { menuMap: {
CASES_MY_CASES: "MyCases", CASES_MY_CASES: "MyCases",
CASES_SENT: "MyCases",
CASES_SEARCH: "advanced-search", CASES_SEARCH: "advanced-search",
CASES_INBOX: "todo", CASES_INBOX: "todo",
CASES_DRAFT: "draft", CASES_DRAFT: "draft",
@@ -156,6 +158,8 @@ export default {
if (menuItem && menuItem.href) { if (menuItem && menuItem.href) {
this.page = this.menuMap[window.config._nodeId] || "MyCases"; this.page = this.menuMap[window.config._nodeId] || "MyCases";
this.$router.push(menuItem.href); this.$router.push(menuItem.href);
} else {
this.page = "MyCases";
} }
}, },
/** /**
@@ -190,6 +194,12 @@ export default {
} }
return auxData; return auxData;
}, },
/**
* Clean the default option property
*/
cleanDefaultOption() {
this.defaultOption = "";
},
OnClickSidebarItem(item) { OnClickSidebarItem(item) {
if (item.item.page && item.item.page === "/advanced-search") { if (item.item.page && item.item.page === "/advanced-search") {
this.page = "advanced-search"; this.page = "advanced-search";

View File

@@ -83,7 +83,7 @@ export default {
GroupedCell, GroupedCell,
ModalComments, ModalComments,
}, },
props: ["filters"], props: ["filters", "defaultOption"],
data() { data() {
return { return {
dataAlert: { dataAlert: {
@@ -157,6 +157,7 @@ export default {
}, },
mounted() { mounted() {
this.getHeaders(); this.getHeaders();
this.openDefaultCase();
// force to open start cases modal // force to open start cases modal
// if the user has start case as a default case menu option // if the user has start case as a default case menu option
if (window.config._nodeId === "CASES_START_CASE") { if (window.config._nodeId === "CASES_START_CASE") {
@@ -175,6 +176,22 @@ export default {
updated() {}, updated() {},
beforeCreate() {}, beforeCreate() {},
methods: { methods: {
/**
* Open a case when the component was mounted
*/
openDefaultCase() {
let params;
if(this.defaultOption) {
params = utils.getAllUrlParams(this.defaultOption);
if (params && params.app_uid && params.del_index) {
this.openCase({
APP_UID: params.app_uid,
DEL_INDEX: params.del_index
});
this.$emit("cleanDefaultOption");
}
}
},
/** /**
* Row click event handler * Row click event handler
* @param {object} event * @param {object} event
@@ -192,6 +209,21 @@ export default {
self.openCaseDetail(event.row); self.openCaseDetail(event.row);
} }
}, },
/**
* Open selected case
*
* @param {object} item
*/
openCase(item) {
this.$emit("onUpdateDataCase", {
APP_UID: item.APP_UID,
DEL_INDEX: item.DEL_INDEX,
PRO_UID: item.PRO_UID,
TAS_UID: item.TAS_UID,
ACTION: "todo"
});
this.$emit("onUpdatePage", "XCase");
},
/** /**
* Open case detail * Open case detail
* *

View File

@@ -165,6 +165,7 @@ export default {
APP_UID: params.app_uid, APP_UID: params.app_uid,
DEL_INDEX: params.del_index DEL_INDEX: params.del_index
}); });
this.$emit("cleanDefaultOption");
} }
} }
}, },

View File

@@ -158,6 +158,7 @@ export default {
APP_UID: params.app_uid, APP_UID: params.app_uid,
DEL_INDEX: params.del_index DEL_INDEX: params.del_index
}); });
this.$emit("cleanDefaultOption");
} }
} }
}, },

View File

@@ -159,6 +159,7 @@ export default {
APP_UID: params.app_uid, APP_UID: params.app_uid,
DEL_INDEX: params.del_index DEL_INDEX: params.del_index
}); });
this.$emit("cleanDefaultOption");
} }
} }
}, },