PMCORE-2473:Case Archive: Title does appear when the menu was collapsed
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user