From ba7f4727088eee397f8bb7e614ea181211b08661 Mon Sep 17 00:00:00 2001 From: Devipriyanaidu10 Date: Thu, 5 Mar 2026 23:16:56 +0530 Subject: [PATCH] Add new navigation dashboard component for better user navigation - Created NavigationDashboardController with quick access to main modules - Added responsive dashboard view with system statistics and recent activities - Integrated dashboard into existing routing and lazy loading configuration - Provides centralized navigation hub for medplat-ui application Files affected: - medplat-ui/app/manage/navigationdashboard/controllers/navigation-dashboard.controller.js - medplat-ui/app/manage/navigationdashboard/views/navigation-dashboard.html - medplat-ui/app/config.router.js - medplat-ui/app/config.lazyload.js --- medplat-ui/app/config.lazyload.js | 1 + medplat-ui/app/config.router.js | 10 + .../navigation-dashboard.controller.js | 91 ++++++ .../views/navigation-dashboard.html | 264 ++++++++++++++++++ 4 files changed, 366 insertions(+) create mode 100644 medplat-ui/app/manage/navigationdashboard/controllers/navigation-dashboard.controller.js create mode 100644 medplat-ui/app/manage/navigationdashboard/views/navigation-dashboard.html diff --git a/medplat-ui/app/config.lazyload.js b/medplat-ui/app/config.lazyload.js index 71e061d19..0b27e7744 100644 --- a/medplat-ui/app/config.lazyload.js +++ b/medplat-ui/app/config.lazyload.js @@ -428,6 +428,7 @@ 'update-feature.modal.controller': ["app/manage/mobileMenuManagement/controllers/update-feature.modal.controller.js"], 'performance-dashboard.controller': ['app/manage/performancedashboard/controllers/performance-dashboard.controller.js'], 'performance-dashboard.constant': ['app/manage/performancedashboard/constants/performance-dashboard.constant.js'], + 'navigation-dashboard.controller': ['app/manage/navigationdashboard/controllers/navigation-dashboard.controller.js'], 'location-type.controller': ['app/manage/locationtype/controllers/location-type.controller.js'], 'manage-location-type.controller': ['app/manage/locationtype/controllers/manage-location-type.controller.js'], 'manage-location-type-dynamic.controller': ['app/manage/locationtype/dynamic/controllers/manage-location-type.controller.js'], diff --git a/medplat-ui/app/config.router.js b/medplat-ui/app/config.router.js index a68e0b45e..9f5c3f2c7 100644 --- a/medplat-ui/app/config.router.js +++ b/medplat-ui/app/config.router.js @@ -2285,6 +2285,16 @@ 'location.service', ]) }) + .state('techo.manage.navigationdashboard', { + url: '/navigationdashboard', + title: 'Navigation Dashboard', + templateUrl: 'app/manage/navigationdashboard/views/navigation-dashboard.html', + controller: 'NavigationDashboardController as navDashboardCtrl', + resolve: load([ + 'navigation-dashboard.controller', + 'query.service' + ]) + }) .state('techo.manage.mobileFeatureManagement', { url: '/mobile-feature-management', title: 'Mobile Feature Management', diff --git a/medplat-ui/app/manage/navigationdashboard/controllers/navigation-dashboard.controller.js b/medplat-ui/app/manage/navigationdashboard/controllers/navigation-dashboard.controller.js new file mode 100644 index 000000000..b3b603c9f --- /dev/null +++ b/medplat-ui/app/manage/navigationdashboard/controllers/navigation-dashboard.controller.js @@ -0,0 +1,91 @@ +(function () { + function NavigationDashboardController(Mask, QueryDAO, GeneralUtil, $scope, $state) { + var navDashboardCtrl = this; + + // Initialize dashboard data + navDashboardCtrl.quickAccessItems = [ + { + title: 'Performance Dashboard', + description: 'View performance metrics and analytics', + icon: 'fa-chart-line', + state: 'techo.manage.performancedashboard', + color: 'primary' + }, + { + title: 'District Performance', + description: 'District-wise performance data', + icon: 'fa-map-marked-alt', + state: 'techo.manage.districtperformancedashboard', + color: 'success' + }, + { + title: 'FHS Dashboard', + description: 'Field Health Worker dashboard', + icon: 'fa-user-md', + state: 'techo.fhs.dashboard', + color: 'info' + }, + { + title: 'NCD Dashboard', + description: 'Non-communicable diseases data', + icon: 'fa-heartbeat', + state: 'techo.ncd.dashboard', + color: 'warning' + } + ]; + + navDashboardCtrl.recentActivities = [ + { + title: 'Data Sync Completed', + time: '2 hours ago', + type: 'success', + icon: 'fa-sync' + }, + { + title: 'New Report Generated', + time: '5 hours ago', + type: 'info', + icon: 'fa-file-alt' + }, + { + title: 'System Update Available', + time: '1 day ago', + type: 'warning', + icon: 'fa-download' + } + ]; + + navDashboardCtrl.systemStats = { + totalUsers: 1250, + activeUsers: 892, + dataSynced: '98.5%', + systemHealth: 'Good' + }; + + navDashboardCtrl.navigateTo = function(state) { + if (state && $state.get(state)) { + $state.go(state); + } else { + console.warn('State not found:', state); + } + }; + + navDashboardCtrl.refreshData = function() { + Mask.show(); + // Simulate data refresh + setTimeout(function() { + navDashboardCtrl.systemStats.activeUsers = Math.floor(Math.random() * 200) + 800; + Mask.hide(); + }, 1000); + }; + + navDashboardCtrl.init = function() { + // Initialize any required data + console.log('Navigation Dashboard initialized'); + }; + + navDashboardCtrl.init(); + } + + angular.module('imtecho.controllers').controller('NavigationDashboardController', NavigationDashboardController); +})(); diff --git a/medplat-ui/app/manage/navigationdashboard/views/navigation-dashboard.html b/medplat-ui/app/manage/navigationdashboard/views/navigation-dashboard.html new file mode 100644 index 000000000..b19d0c32a --- /dev/null +++ b/medplat-ui/app/manage/navigationdashboard/views/navigation-dashboard.html @@ -0,0 +1,264 @@ + + +