diff --git a/resources/assets/js/home/Home.vue b/resources/assets/js/home/Home.vue index 6ef3c84fa..f272713b8 100644 --- a/resources/assets/js/home/Home.vue +++ b/resources/assets/js/home/Home.vue @@ -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"; diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Home.php b/workflow/engine/src/ProcessMaker/Services/Api/Home.php index 5887546f7..65922ddaf 100644 --- a/workflow/engine/src/ProcessMaker/Services/Api/Home.php +++ b/workflow/engine/src/ProcessMaker/Services/Api/Home.php @@ -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; }