feat(pwa): standardize hospital logo PWA icons and add in-app mobile module switcher
This commit is contained in:
parent
2d68a19584
commit
8d68afebbd
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -293,8 +293,11 @@
|
|||
<div class="modal fade" id="hmsAppsLauncherModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content shadow-lg border-0">
|
||||
<div class="modal-header bg-primary text-white py-2">
|
||||
<h5 class="modal-title fs-6 fw-bold mb-0"><i class="bi bi-grid-3x3-gap-fill me-2"></i> HMS Mobile & PWA Apps Launcher</h5>
|
||||
<div class="modal-header bg-primary text-white py-2" style="background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;">
|
||||
<h5 class="modal-title fs-6 fw-bold mb-0 d-flex align-items-center gap-2">
|
||||
<img src="<?= base_url('assets/img/logo.png') ?>" alt="Logo" style="height:24px; width:auto; filter:brightness(0) invert(1);" onError="this.style.display='none'">
|
||||
<i class="bi bi-grid-3x3-gap-fill me-1 text-primary"></i> HMS Mobile & PWA Apps Launcher
|
||||
</h5>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body p-3">
|
||||
|
|
|
|||
|
|
@ -3,12 +3,13 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<title>Doctor EMR & Bedside Care PWA App</title>
|
||||
<title>Doctor EMR & Bedside Care - HMS Mobile</title>
|
||||
<link rel="manifest" href="/App/Doctor/manifest.json">
|
||||
<meta name="theme-color" content="#0f172a">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<link rel="apple-touch-icon" href="https://cdn-icons-png.flaticon.com/512/3774/3774299.png">
|
||||
<link rel="icon" href="/assets/img/logo.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/assets/img/logo.png">
|
||||
|
||||
<!-- Google Fonts & Bootstrap 5 CSS & Icons -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
|
|
@ -286,7 +287,113 @@
|
|||
const DOC_DEVICE_AUTH_KEY = 'doctor_pwa_device_auth_v1';
|
||||
const THIRTY_DAYS_MS = 30 * 24 * 60 * 60 * 1000;
|
||||
|
||||
const MobileAppsModal = ({ show, onClose, currentApp }) => {
|
||||
if (!show) return null;
|
||||
|
||||
const navigateToApp = (appKey) => {
|
||||
if (appKey === currentApp) {
|
||||
onClose();
|
||||
return;
|
||||
}
|
||||
if (appKey === 'doctor') {
|
||||
window.location.href = '/app/doctor';
|
||||
} else if (appKey === 'nursing') {
|
||||
window.location.href = '/app/nursing';
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="modal fade show d-block" style={{ backgroundColor: 'rgba(15, 23, 42, 0.7)', zIndex: 1055, backdropFilter: 'blur(4px)' }} tabIndex="-1">
|
||||
<div className="modal-dialog modal-dialog-centered px-2">
|
||||
<div className="modal-content border-0 shadow-lg rounded-4 overflow-hidden">
|
||||
<div className="modal-header text-white p-3" style={{ background: 'linear-gradient(135deg, #0f172a 0%, #1e293b 100%)' }}>
|
||||
<div className="d-flex align-items-center gap-2">
|
||||
<img src="/assets/img/logo.png" alt="Hospital Logo" style={{ height: '28px', width: 'auto', filter: 'brightness(0) invert(1)' }} onError={(e) => { e.target.style.display = 'none'; }} />
|
||||
<h6 className="modal-title fw-bold mb-0 text-white" style={{ fontSize: '15px' }}>
|
||||
<i className="bi bi-grid-fill me-1 text-primary"></i> HMS Mobile & PWA Apps Launcher
|
||||
</h6>
|
||||
</div>
|
||||
<button type="button" className="btn-close btn-close-white" onClick={onClose}></button>
|
||||
</div>
|
||||
<div className="modal-body p-3 bg-light">
|
||||
<label className="form-label fw-bold small text-secondary mb-2" style={{ letterSpacing: '0.5px' }}>
|
||||
1. SELECT APPLICATION
|
||||
</label>
|
||||
<div className="row g-2 mb-3">
|
||||
<div className="col-4">
|
||||
<div
|
||||
className={`card p-2 text-center h-100 ${currentApp === 'nursing' ? 'border-2 border-primary bg-primary-subtle shadow-sm' : 'border bg-white text-dark'}`}
|
||||
style={{ cursor: 'pointer', borderRadius: '12px' }}
|
||||
onClick={() => navigateToApp('nursing')}
|
||||
>
|
||||
<div className="my-1">
|
||||
<i className="bi bi-heart-pulse-fill fs-3 text-primary"></i>
|
||||
</div>
|
||||
<div className="fw-bold small text-truncate" style={{ fontSize: '12px' }}>Nursing Care</div>
|
||||
{currentApp === 'nursing' ? (
|
||||
<span className="badge bg-primary mt-1" style={{ fontSize: '9px' }}>● Active App</span>
|
||||
) : (
|
||||
<span className="badge bg-info-subtle text-info-emphasis border border-info-subtle mt-1" style={{ fontSize: '9px' }}>Active PWA</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="col-4">
|
||||
<div
|
||||
className={`card p-2 text-center h-100 ${currentApp === 'doctor' ? 'border-2 border-primary bg-primary-subtle shadow-sm' : 'border bg-white text-dark'}`}
|
||||
style={{ cursor: 'pointer', borderRadius: '12px' }}
|
||||
onClick={() => navigateToApp('doctor')}
|
||||
>
|
||||
<div className="my-1">
|
||||
<i className="bi bi-person-badge-fill fs-3 text-primary"></i>
|
||||
</div>
|
||||
<div className="fw-bold small text-truncate" style={{ fontSize: '12px' }}>Doctor App</div>
|
||||
{currentApp === 'doctor' ? (
|
||||
<span className="badge bg-primary mt-1" style={{ fontSize: '9px' }}>● Active App</span>
|
||||
) : (
|
||||
<span className="badge bg-success mt-1" style={{ fontSize: '9px' }}>Active PWA</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="col-4">
|
||||
<div
|
||||
className="card p-2 text-center border bg-white text-muted opacity-75 h-100"
|
||||
style={{ borderRadius: '12px', cursor: 'not-allowed' }}
|
||||
>
|
||||
<div className="my-1">
|
||||
<i className="bi bi-capsule fs-3 text-secondary"></i>
|
||||
</div>
|
||||
<div className="fw-bold small text-truncate" style={{ fontSize: '12px' }}>Pharmacy App</div>
|
||||
<span className="badge bg-secondary mt-1" style={{ fontSize: '9px' }}>Coming Soon</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="p-3 bg-white rounded-3 border text-center shadow-sm">
|
||||
<div className="d-flex align-items-center justify-content-center gap-2 mb-2">
|
||||
<img src="/assets/img/logo.png" alt="Logo" style={{ height: '28px' }} onError={(e) => e.target.style.display = 'none'} />
|
||||
<div className="text-start">
|
||||
<div className="fw-bold small text-dark">HMS Unified Mobile Portal</div>
|
||||
<div className="small text-muted" style={{ fontSize: '10px' }}>Domain: {window.location.host}</div>
|
||||
</div>
|
||||
</div>
|
||||
<p className="small text-muted mb-2" style={{ fontSize: '11px' }}>
|
||||
Tap any active app card above to switch between modules in your mobile app.
|
||||
</p>
|
||||
<a href="/app" className="btn btn-outline-primary btn-sm w-100 fw-bold rounded-pill" style={{ fontSize: '12px' }}>
|
||||
<i className="bi bi-house-door me-1"></i> Open Mobile App Hub
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
function DoctorApp() {
|
||||
const [showAppsModal, setShowAppsModal] = useState(false);
|
||||
const [doctors, setDoctors] = useState([]);
|
||||
const [myIpdPatients, setMyIpdPatients] = useState([]);
|
||||
const [allIpdPatients, setAllIpdPatients] = useState([]);
|
||||
|
|
@ -786,9 +893,19 @@
|
|||
if (!authenticatedDoctor) {
|
||||
return (
|
||||
<div className="lock-screen-overlay">
|
||||
<MobileAppsModal show={showAppsModal} onClose={() => setShowAppsModal(false)} currentApp="doctor" />
|
||||
<div className="lock-card">
|
||||
<div className="p-4 text-center bg-primary text-white" style={{background: 'linear-gradient(135deg, #0f172a 0%, #1e293b 100%)'}}>
|
||||
<i className="bi bi-person-badge-fill display-4 d-block mb-2 text-primary"></i>
|
||||
<div className="p-4 text-center bg-primary text-white position-relative" style={{background: 'linear-gradient(135deg, #0f172a 0%, #1e293b 100%)'}}>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-sm btn-outline-light position-absolute top-0 end-0 m-2 rounded-circle"
|
||||
style={{width: '32px', height: '32px', padding: 0}}
|
||||
onClick={() => setShowAppsModal(true)}
|
||||
title="HMS Mobile & PWA Apps Launcher"
|
||||
>
|
||||
<i className="bi bi-grid-3x3-gap-fill" style={{fontSize: '12px'}}></i>
|
||||
</button>
|
||||
<img src="/assets/img/logo.png" alt="Hospital Logo" className="d-block mx-auto mb-2" style={{maxHeight: '40px', filter: 'brightness(0) invert(1)'}} onError={(e) => { e.target.style.display = 'none'; }} />
|
||||
<h5 className="fw-bold mb-1">Doctor EMR Mobile Portal</h5>
|
||||
<small className="opacity-75">30-Day Device Authentication Security</small>
|
||||
</div>
|
||||
|
|
@ -875,6 +992,7 @@
|
|||
// -------------------------------------------------------------
|
||||
return (
|
||||
<div>
|
||||
<MobileAppsModal show={showAppsModal} onClose={() => setShowAppsModal(false)} currentApp="doctor" />
|
||||
{/* Top Doctor Header */}
|
||||
<header className="doctor-header d-flex justify-content-between align-items-center">
|
||||
<div className="d-flex align-items-center gap-2">
|
||||
|
|
@ -889,6 +1007,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div className="d-flex align-items-center gap-2">
|
||||
<button className="btn btn-sm btn-outline-light rounded-circle p-2" style={{width: '36px', height: '36px'}} onClick={() => setShowAppsModal(true)} title="HMS Mobile & PWA Apps Launcher">
|
||||
<i className="bi bi-grid-3x3-gap-fill"></i>
|
||||
</button>
|
||||
<button className="btn btn-sm btn-outline-light rounded-circle p-2" style={{width: '36px', height: '36px'}} onClick={() => { fetchOpdAppointments(authenticatedDoctor.id, opdDateMode); fetchIpdPatients(authenticatedDoctor.id); }} title="Refresh Queue">
|
||||
<i className="bi bi-arrow-clockwise"></i>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
{
|
||||
"short_name": "Doctor EMR",
|
||||
"name": "E-Atria Doctor EMR & Bedside Care PWA",
|
||||
"short_name": "HMS Mobile",
|
||||
"name": "HMS Mobile Care - Doctor EMR",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https://cdn-icons-png.flaticon.com/512/3774/3774299.png",
|
||||
"src": "/assets/img/logo.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
"sizes": "512x512",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/assets/img/apple-touch-icon.png",
|
||||
"type": "image/png",
|
||||
"sizes": "180x180"
|
||||
}
|
||||
],
|
||||
"start_url": "/app/doctor",
|
||||
|
|
|
|||
|
|
@ -3,12 +3,13 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<title>Nursing Care EMR & Bedside PWA App</title>
|
||||
<title>Nursing Care - HMS Mobile</title>
|
||||
<link rel="manifest" href="/App/Nursing/manifest.json">
|
||||
<meta name="theme-color" content="#0f172a">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<link rel="apple-touch-icon" href="https://cdn-icons-png.flaticon.com/512/3304/3304567.png">
|
||||
<link rel="icon" href="/assets/img/logo.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/assets/img/logo.png">
|
||||
|
||||
<!-- Google Fonts & Bootstrap 5 CSS & Icons -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
|
|
@ -223,7 +224,113 @@
|
|||
const DEVICE_AUTH_KEY = 'nursing_pwa_device_auth_v1';
|
||||
const THIRTY_DAYS_MS = 30 * 24 * 60 * 60 * 1000;
|
||||
|
||||
const MobileAppsModal = ({ show, onClose, currentApp }) => {
|
||||
if (!show) return null;
|
||||
|
||||
const navigateToApp = (appKey) => {
|
||||
if (appKey === currentApp) {
|
||||
onClose();
|
||||
return;
|
||||
}
|
||||
if (appKey === 'doctor') {
|
||||
window.location.href = '/app/doctor';
|
||||
} else if (appKey === 'nursing') {
|
||||
window.location.href = '/app/nursing';
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="modal fade show d-block" style={{ backgroundColor: 'rgba(15, 23, 42, 0.7)', zIndex: 1055, backdropFilter: 'blur(4px)' }} tabIndex="-1">
|
||||
<div className="modal-dialog modal-dialog-centered px-2">
|
||||
<div className="modal-content border-0 shadow-lg rounded-4 overflow-hidden">
|
||||
<div className="modal-header text-white p-3" style={{ background: 'linear-gradient(135deg, #0f172a 0%, #1e293b 100%)' }}>
|
||||
<div className="d-flex align-items-center gap-2">
|
||||
<img src="/assets/img/logo.png" alt="Hospital Logo" style={{ height: '28px', width: 'auto', filter: 'brightness(0) invert(1)' }} onError={(e) => { e.target.style.display = 'none'; }} />
|
||||
<h6 className="modal-title fw-bold mb-0 text-white" style={{ fontSize: '15px' }}>
|
||||
<i className="bi bi-grid-fill me-1 text-primary"></i> HMS Mobile & PWA Apps Launcher
|
||||
</h6>
|
||||
</div>
|
||||
<button type="button" className="btn-close btn-close-white" onClick={onClose}></button>
|
||||
</div>
|
||||
<div className="modal-body p-3 bg-light">
|
||||
<label className="form-label fw-bold small text-secondary mb-2" style={{ letterSpacing: '0.5px' }}>
|
||||
1. SELECT APPLICATION
|
||||
</label>
|
||||
<div className="row g-2 mb-3">
|
||||
<div className="col-4">
|
||||
<div
|
||||
className={`card p-2 text-center h-100 ${currentApp === 'nursing' ? 'border-2 border-primary bg-primary-subtle shadow-sm' : 'border bg-white text-dark'}`}
|
||||
style={{ cursor: 'pointer', borderRadius: '12px' }}
|
||||
onClick={() => navigateToApp('nursing')}
|
||||
>
|
||||
<div className="my-1">
|
||||
<i className="bi bi-heart-pulse-fill fs-3 text-primary"></i>
|
||||
</div>
|
||||
<div className="fw-bold small text-truncate" style={{ fontSize: '12px' }}>Nursing Care</div>
|
||||
{currentApp === 'nursing' ? (
|
||||
<span className="badge bg-primary mt-1" style={{ fontSize: '9px' }}>● Active App</span>
|
||||
) : (
|
||||
<span className="badge bg-info-subtle text-info-emphasis border border-info-subtle mt-1" style={{ fontSize: '9px' }}>Active PWA</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="col-4">
|
||||
<div
|
||||
className={`card p-2 text-center h-100 ${currentApp === 'doctor' ? 'border-2 border-primary bg-primary-subtle shadow-sm' : 'border bg-white text-dark'}`}
|
||||
style={{ cursor: 'pointer', borderRadius: '12px' }}
|
||||
onClick={() => navigateToApp('doctor')}
|
||||
>
|
||||
<div className="my-1">
|
||||
<i className="bi bi-person-badge-fill fs-3 text-primary"></i>
|
||||
</div>
|
||||
<div className="fw-bold small text-truncate" style={{ fontSize: '12px' }}>Doctor App</div>
|
||||
{currentApp === 'doctor' ? (
|
||||
<span className="badge bg-primary mt-1" style={{ fontSize: '9px' }}>● Active App</span>
|
||||
) : (
|
||||
<span className="badge bg-success mt-1" style={{ fontSize: '9px' }}>Active PWA</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="col-4">
|
||||
<div
|
||||
className="card p-2 text-center border bg-white text-muted opacity-75 h-100"
|
||||
style={{ borderRadius: '12px', cursor: 'not-allowed' }}
|
||||
>
|
||||
<div className="my-1">
|
||||
<i className="bi bi-capsule fs-3 text-secondary"></i>
|
||||
</div>
|
||||
<div className="fw-bold small text-truncate" style={{ fontSize: '12px' }}>Pharmacy App</div>
|
||||
<span className="badge bg-secondary mt-1" style={{ fontSize: '9px' }}>Coming Soon</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="p-3 bg-white rounded-3 border text-center shadow-sm">
|
||||
<div className="d-flex align-items-center justify-content-center gap-2 mb-2">
|
||||
<img src="/assets/img/logo.png" alt="Logo" style={{ height: '28px' }} onError={(e) => e.target.style.display = 'none'} />
|
||||
<div className="text-start">
|
||||
<div className="fw-bold small text-dark">HMS Unified Mobile Portal</div>
|
||||
<div className="small text-muted" style={{ fontSize: '10px' }}>Domain: {window.location.host}</div>
|
||||
</div>
|
||||
</div>
|
||||
<p className="small text-muted mb-2" style={{ fontSize: '11px' }}>
|
||||
Tap any active app card above to switch between modules in your mobile app.
|
||||
</p>
|
||||
<a href="/app" className="btn btn-outline-primary btn-sm w-100 fw-bold rounded-pill" style={{ fontSize: '12px' }}>
|
||||
<i className="bi bi-house-door me-1"></i> Open Mobile App Hub
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
function NursingApp() {
|
||||
const [showAppsModal, setShowAppsModal] = useState(false);
|
||||
const [mainTab, setMainTab] = useState('ipd'); // 'ipd' or 'opd'
|
||||
const [beds, setBeds] = useState([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
|
@ -701,9 +808,19 @@
|
|||
if (!authenticatedNurse) {
|
||||
return (
|
||||
<div className="lock-screen-overlay">
|
||||
<MobileAppsModal show={showAppsModal} onClose={() => setShowAppsModal(false)} currentApp="nursing" />
|
||||
<div className="lock-card">
|
||||
<div className="p-4 text-center text-white" style={{background: 'linear-gradient(135deg, #0f172a 0%, #1e293b 100%)'}}>
|
||||
<i className="bi bi-shield-lock-fill display-4 d-block mb-2 text-success"></i>
|
||||
<div className="p-4 text-center text-white position-relative" style={{background: 'linear-gradient(135deg, #0f172a 0%, #1e293b 100%)'}}>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-sm btn-outline-light position-absolute top-0 end-0 m-2 rounded-circle"
|
||||
style={{width: '32px', height: '32px', padding: 0}}
|
||||
onClick={() => setShowAppsModal(true)}
|
||||
title="HMS Mobile & PWA Apps Launcher"
|
||||
>
|
||||
<i className="bi bi-grid-3x3-gap-fill" style={{fontSize: '12px'}}></i>
|
||||
</button>
|
||||
<img src="/assets/img/logo.png" alt="Hospital Logo" className="d-block mx-auto mb-2" style={{maxHeight: '40px', filter: 'brightness(0) invert(1)'}} onError={(e) => { e.target.style.display = 'none'; }} />
|
||||
<h5 className="fw-bold mb-1">Nursing Care Mobile App</h5>
|
||||
<small className="opacity-75">30-Day Device Security Authentication</small>
|
||||
</div>
|
||||
|
|
@ -790,6 +907,7 @@
|
|||
// -------------------------------------------------------------
|
||||
return (
|
||||
<div>
|
||||
<MobileAppsModal show={showAppsModal} onClose={() => setShowAppsModal(false)} currentApp="nursing" />
|
||||
{/* Header Topbar */}
|
||||
<header className="nursing-header d-flex justify-content-between align-items-center">
|
||||
<div className="d-flex align-items-center gap-2">
|
||||
|
|
@ -804,6 +922,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div className="d-flex align-items-center gap-2">
|
||||
<button className="btn btn-sm btn-outline-light rounded-circle p-2" style={{width: '36px', height: '36px'}} onClick={() => setShowAppsModal(true)} title="HMS Mobile & PWA Apps Launcher">
|
||||
<i className="bi bi-grid-3x3-gap-fill"></i>
|
||||
</button>
|
||||
<button className="btn btn-sm btn-outline-light rounded-circle p-2" style={{width: '36px', height: '36px'}} onClick={() => { fetchBeds(); fetchOpdAppointments(opdDateMode); }} title="Refresh">
|
||||
<i className="bi bi-arrow-clockwise"></i>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
{
|
||||
"short_name": "Nursing Care",
|
||||
"name": "E-Atria IPD Bedside Nursing Care PWA",
|
||||
"short_name": "HMS Mobile",
|
||||
"name": "HMS Mobile Care - Nursing Care",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https://cdn-icons-png.flaticon.com/512/3304/3304567.png",
|
||||
"src": "/assets/img/logo.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
"sizes": "512x512",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/assets/img/apple-touch-icon.png",
|
||||
"type": "image/png",
|
||||
"sizes": "180x180"
|
||||
}
|
||||
],
|
||||
"start_url": "/app/nursing",
|
||||
|
|
|
|||
221
public/App/index.html
Normal file
221
public/App/index.html
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<title>HMS Mobile & PWA Apps Hub</title>
|
||||
<link rel="manifest" href="/App/manifest.json">
|
||||
<meta name="theme-color" content="#0f172a">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<link rel="icon" href="/assets/img/logo.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="/assets/img/logo.png">
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: #0f172a;
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
color: #f8fafc;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.hub-card {
|
||||
background: #ffffff;
|
||||
color: #1e293b;
|
||||
border-radius: 24px;
|
||||
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
|
||||
max-width: 480px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hub-header {
|
||||
background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
|
||||
color: #ffffff;
|
||||
padding: 28px 24px;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.app-option-card {
|
||||
background: #f8fafc;
|
||||
border: 2px solid #e2e8f0;
|
||||
border-radius: 16px;
|
||||
padding: 16px;
|
||||
transition: all 0.2s ease-in-out;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.app-option-card:hover, .app-option-card:active {
|
||||
border-color: #2563eb;
|
||||
background: #eff6ff;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.app-option-card.disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
background: #f1f5f9;
|
||||
border-color: #cbd5e1;
|
||||
}
|
||||
|
||||
.app-icon-circle {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
border-radius: 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.btn-install {
|
||||
background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
|
||||
color: white;
|
||||
font-weight: 700;
|
||||
border-radius: 12px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="hub-card shadow-lg">
|
||||
<div class="hub-header">
|
||||
<img src="/assets/img/logo.png" alt="Hospital Logo" style="height: 52px; width: auto; filter: brightness(0) invert(1);" class="mb-2 d-block mx-auto" onError="this.style.display='none'" />
|
||||
<h4 className="fw-extrabold mb-1" style="font-weight: 800; letter-spacing: -0.5px;">HMS Hospital Mobile Apps</h4>
|
||||
<span class="badge bg-primary-subtle text-primary border border-primary-subtle px-3 py-1 rounded-pill small">Unified PWA & Bedside Portal</span>
|
||||
</div>
|
||||
|
||||
<div class="p-4">
|
||||
<div class="d-flex align-items-center justify-content-between mb-3">
|
||||
<label class="form-label fw-bold text-secondary small mb-0" style="letter-spacing: 0.5px;">
|
||||
SELECT MOBILE APPLICATION
|
||||
</label>
|
||||
<span class="badge bg-success-subtle text-success border border-success-subtle rounded-pill" style="font-size: 10px;">
|
||||
● Single Domain PWA
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-column gap-3 mb-4">
|
||||
<!-- Nursing Care App -->
|
||||
<a href="/app/nursing" class="app-option-card">
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<div class="app-icon-circle bg-primary-subtle text-primary">
|
||||
<i class="bi bi-heart-pulse-fill"></i>
|
||||
</div>
|
||||
<div class="flex-grow-1">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h6 class="fw-bold mb-0 text-dark">Nursing Care App</h6>
|
||||
<span class="badge bg-primary" style="font-size: 10px;">Active PWA</span>
|
||||
</div>
|
||||
<small class="text-muted d-block mt-1" style="font-size: 12px;">
|
||||
IPD Bedside Vitals, Intake/Output & Scan Documents
|
||||
</small>
|
||||
</div>
|
||||
<i class="bi bi-chevron-right text-muted"></i>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<!-- Doctor App -->
|
||||
<a href="/app/doctor" class="app-option-card">
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<div class="app-icon-circle bg-success-subtle text-success">
|
||||
<i class="bi bi-person-badge-fill"></i>
|
||||
</div>
|
||||
<div class="flex-grow-1">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h6 class="fw-bold mb-0 text-dark">Doctor EMR App</h6>
|
||||
<span class="badge bg-success" style="font-size: 10px;">Active PWA</span>
|
||||
</div>
|
||||
<small class="text-muted d-block mt-1" style="font-size: 12px;">
|
||||
OPD Prescriptions & IPD Clinical Treatment Notes
|
||||
</small>
|
||||
</div>
|
||||
<i class="bi bi-chevron-right text-muted"></i>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<!-- Pharmacy App (Coming Soon) -->
|
||||
<div class="app-option-card disabled">
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<div class="app-icon-circle bg-secondary-subtle text-secondary">
|
||||
<i class="bi bi-capsule"></i>
|
||||
</div>
|
||||
<div class="flex-grow-1">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h6 class="fw-bold mb-0 text-secondary">Pharmacy App</h6>
|
||||
<span class="badge bg-secondary" style="font-size: 10px;">Coming Soon</span>
|
||||
</div>
|
||||
<small class="text-muted d-block mt-1" style="font-size: 12px;">
|
||||
Counter Sales, Medicine Dispense & Stock Check
|
||||
</small>
|
||||
</div>
|
||||
<i class="bi bi-lock-fill text-muted"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Install Banner -->
|
||||
<div id="pwa_install_banner" class="p-3 bg-light rounded-4 border text-center" style="display: none;">
|
||||
<i class="bi bi-phone-vibrate text-primary fs-3 d-block mb-1"></i>
|
||||
<div class="fw-bold small text-dark">Install Application on Mobile</div>
|
||||
<p class="small text-muted mb-2" style="font-size: 11px;">
|
||||
Install this application on your home screen for fast one-tap access to all hospital modules.
|
||||
</p>
|
||||
<button id="btn_install_pwa" class="btn btn-install btn-sm w-100 py-2">
|
||||
<i class="bi bi-download me-1"></i> Install HMS Mobile App
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-light p-3 border-top text-center">
|
||||
<small class="text-muted" style="font-size: 11px;">
|
||||
HMS Unified Mobile Care • Domain App Switcher Enabled
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let deferredPrompt;
|
||||
window.addEventListener('beforeinstallprompt', (e) => {
|
||||
e.preventDefault();
|
||||
deferredPrompt = e;
|
||||
const banner = document.getElementById('pwa_install_banner');
|
||||
if (banner) banner.style.display = 'block';
|
||||
});
|
||||
|
||||
const btnInstall = document.getElementById('btn_install_pwa');
|
||||
if (btnInstall) {
|
||||
btnInstall.addEventListener('click', async () => {
|
||||
if (deferredPrompt) {
|
||||
deferredPrompt.prompt();
|
||||
const { outcome } = await deferredPrompt.userChoice;
|
||||
if (outcome === 'accepted') {
|
||||
document.getElementById('pwa_install_banner').style.display = 'none';
|
||||
}
|
||||
deferredPrompt = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('/App/Doctor/sw.js').catch(err => console.log(err));
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
22
public/App/manifest.json
Normal file
22
public/App/manifest.json
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"short_name": "HMS Mobile",
|
||||
"name": "HMS Hospital Mobile Care",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/assets/img/logo.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "/assets/img/apple-touch-icon.png",
|
||||
"type": "image/png",
|
||||
"sizes": "180x180"
|
||||
}
|
||||
],
|
||||
"start_url": "/app",
|
||||
"background_color": "#0f172a",
|
||||
"theme_color": "#0f172a",
|
||||
"display": "standalone",
|
||||
"orientation": "portrait"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user