diff --git a/src/qqq/pages/apps/Home.tsx b/src/qqq/pages/apps/Home.tsx index c3e0775..bb53faf 100644 --- a/src/qqq/pages/apps/Home.tsx +++ b/src/qqq/pages/apps/Home.tsx @@ -34,6 +34,7 @@ import Grid from "@mui/material/Grid"; import React, {useContext, useEffect, useState} from "react"; import {Link, useLocation} from "react-router-dom"; import QContext from "QContext"; +import colors from "qqq/assets/theme/base/colors"; import MDTypography from "qqq/components/legacy/MDTypography"; import ProcessLinkCard from "qqq/components/processes/ProcessLinkCard"; import DashboardWidgets from "qqq/components/widgets/DashboardWidgets"; @@ -180,9 +181,6 @@ function AppHome({app}: Props): JSX.Element } }, [qInstance, location]); - const widgetCount = widgets ? widgets.length : 0; - - // eslint-disable-next-line no-nested-ternary const tileSizeLg = 3; const hasTablePermission = (tableName: string) => @@ -200,10 +198,63 @@ function AppHome({app}: Props): JSX.Element return reports.find(r => r.name === reportName && r.hasPermission); }; + const widgetCount = widgets ? widgets.length : 0; + const sectionCount = app.sections ? app.sections.length : 0; + + ////////////////////////////////////////////////////////////////////////////////////////////////////// + // if our app has no widgets or sections, but it does have child apps, then return those child apps // + ////////////////////////////////////////////////////////////////////////////////////////////////////// + if(widgetCount == 0 && sectionCount == 0 && childApps && childApps.length > 0) + { + return ( + + + + + + Apps + + + {childApps.map((childApp) => ( + + + + + + + {childApp.iconName || app.iconName} + + + + + {childApp.label} + + + + + + + ))} + + + + + + ) + } + return ( - {app.widgets && ( + {app.widgets && app.widgets.length > 0 && (