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 @@
+ HMS Mobile & PWA Apps Launcher
+
{ e.target.style.display = 'none'; }} />
+
e.target.style.display = 'none'} />
+ + Tap any active app card above to switch between modules in your mobile app. +
+ + Open Mobile App Hub + +
{ e.target.style.display = 'none'; }} />
{ e.target.style.display = 'none'; }} />
+
e.target.style.display = 'none'} />
+ + Tap any active app card above to switch between modules in your mobile app. +
+ + Open Mobile App Hub + +
{ e.target.style.display = 'none'; }} />
+ + Install this application on your home screen for fast one-tap access to all hospital modules. +
+ +