From 8d68afebbd4d2ac268ca1c7ff8146e32123b73e0 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Sun, 30 Aug 2026 00:18:15 +0530 Subject: [PATCH] feat(pwa): standardize hospital logo PWA icons and add in-app mobile module switcher --- app/Config/Routes.php | 1 + app/Controllers/Api/v1/NursingApi.php | 13 ++ app/Views/partials/header.php | 7 +- public/App/Doctor/index.html | 129 ++++++++++++++- public/App/Doctor/manifest.json | 14 +- public/App/Nursing/index.html | 129 ++++++++++++++- public/App/Nursing/manifest.json | 14 +- public/App/index.html | 221 ++++++++++++++++++++++++++ public/App/manifest.json | 22 +++ 9 files changed, 532 insertions(+), 18 deletions(-) create mode 100644 public/App/index.html create mode 100644 public/App/manifest.json diff --git a/app/Config/Routes.php b/app/Config/Routes.php index d1887cd..f395257 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -1563,6 +1563,7 @@ $routes->get('Document_Patient/health_document_fhir_preview/(:num)', 'DoctorDocu */ // Dedicated PWA Web App Endpoints (Serves React PWAs without touching standard CI4 web views) +$routes->get('app', 'Api\v1\NursingApi::hubIndex'); $routes->get('app/nursing', 'Api\v1\NursingApi::pwaIndex'); $routes->get('app/nursing/(:any)', 'Api\v1\NursingApi::pwaIndex'); $routes->get('app/doctor', 'Api\v1\DoctorApi::pwaIndex'); diff --git a/app/Controllers/Api/v1/NursingApi.php b/app/Controllers/Api/v1/NursingApi.php index 2554fde..30aa45f 100644 --- a/app/Controllers/Api/v1/NursingApi.php +++ b/app/Controllers/Api/v1/NursingApi.php @@ -26,6 +26,19 @@ class NursingApi extends BaseController $this->nurseModel = new NurseModel(); } + /** + * Serves the central Mobile Apps Hub entry point at /app + */ + public function hubIndex() + { + $hubPath = FCPATH . 'App/index.html'; + if (file_exists($hubPath)) { + return $this->response->setBody(file_get_contents($hubPath)); + } + + return redirect()->to(base_url('app/nursing')); + } + /** * Serves the React PWA app entry point at /app/nursing */ diff --git a/app/Views/partials/header.php b/app/Views/partials/header.php index bfa0310..a741144 100644 --- a/app/Views/partials/header.php +++ b/app/Views/partials/header.php @@ -293,8 +293,11 @@