PMCORE-2473:Case Archive: Title does appear when the menu was collapsed

This commit is contained in:
fabio
2021-01-21 14:09:50 -04:00
parent c0017b922a
commit 121806cb15
2 changed files with 17 additions and 2 deletions

View File

@@ -137,7 +137,7 @@ export default {
.get()
.then((response) => {
this.setDefaultCasesMenu(response.data);
this.menu = this.mappingMenu(response.data);
this.menu = this.mappingMenu(this.setDefaultIcon(response.data));
this.setCounter();
})
.catch((e) => {
@@ -175,6 +175,19 @@ export default {
}
return newData;
},
/**
* Set a default icon if the item doesn't have one
*/
setDefaultIcon(data){
var i,
auxData = data;
for (i = 0; i < auxData.length; i += 1) {
if (auxData[i].icon !== undefined && auxData[i].icon === "") {
auxData[i].icon = "fas fa-bars";
}
}
return auxData;
},
OnClickSidebarItem(item) {
if (item.item.page && item.item.page === "/advanced-search") {
this.page = "advanced-search";

View File

@@ -554,7 +554,9 @@ class Home extends Api
// Adding filters to the "Advanced Search" option
$option->child = $child;
}
if ($menuInstance->Id[$i] === 'ID_CASE_ARCHIVE_SEARCH') {
$option->icon = "fas fa-archive";
}
// Add option to the menu
$menuHome[] = $option;
}