brand: implement MediAsset AI identity and XYZ Hospital palette

This commit is contained in:
Antigravity
2026-11-18 18:16:20 +05:30
parent 13556aa423
commit 5740e9281c
13 changed files with 316 additions and 49 deletions
+17 -12
View File
@@ -95,29 +95,33 @@ export function Sidebar({ mobileOpen, onClose }: SidebarProps = {}) {
const asideContent = (
<aside
aria-label="Primary Navigation"
className="w-56 lg:w-64 shrink-0 min-h-screen bg-[#1e3a8a] text-white flex flex-col"
className="w-56 lg:w-64 shrink-0 min-h-screen bg-[#102C52] text-white flex flex-col"
>
{/* Logo */}
<div className="px-4 py-4 border-b border-blue-700 space-y-2 relative">
<div className="px-4 py-4 border-b border-[#2E5C9A]/40 space-y-2 relative">
{onClose && (
<button
type="button"
onClick={onClose}
aria-label="Close navigation menu"
className="lg:hidden absolute right-2 top-2 p-1 rounded text-blue-200 hover:text-white hover:bg-blue-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white"
className="lg:hidden absolute right-2 top-2 p-1 rounded text-blue-200 hover:text-white hover:bg-[#2E5C9A] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white"
>
<X className="h-4 w-4" />
</button>
)}
<div className="bg-white rounded-lg p-2">
<div className="bg-white rounded-lg p-2 shadow-sm border border-[#E8EFF7]">
<img
src="/logo.jpg"
alt="Poona Hospital and Research Centre"
src="/logo.svg"
alt="XYZ Hospital"
onError={(e) => {
(e.target as HTMLImageElement).src = "/logo.jpg";
}}
className="w-full h-16 object-contain"
/>
</div>
<div className="text-xs text-blue-200 text-center">
Asset Management &amp; Maintenance
<div className="flex items-center justify-center gap-1.5 text-xs text-[#E8EFF7] text-center font-medium">
<span className="w-1.5 h-1.5 rounded-full bg-[#008E95]"></span>
<span>Asset Management &amp; Maintenance</span>
</div>
</div>
@@ -133,8 +137,8 @@ export function Sidebar({ mobileOpen, onClose }: SidebarProps = {}) {
cn(
"flex items-center gap-3 px-3 py-2.5 rounded-md text-sm transition-colors group focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white",
isActive
? "bg-blue-700 text-white"
: "text-blue-100 hover:bg-blue-700/50 hover:text-white"
? "bg-[#2E5C9A] text-white font-medium shadow-sm border-l-4 border-[#008E95]"
: "text-slate-200 hover:bg-[#2E5C9A]/50 hover:text-white"
)
}
>
@@ -146,8 +150,9 @@ export function Sidebar({ mobileOpen, onClose }: SidebarProps = {}) {
</nav>
{/* Footer */}
<div className="px-4 py-3 border-t border-blue-700 text-xs text-blue-300">
Poona Hospital AMS • v1.0
<div className="px-4 py-3 border-t border-[#2E5C9A]/40 text-xs text-[#E8EFF7]/90 flex items-center justify-between">
<span>XYZ Hospital AMS • v1.0</span>
<span className="px-1.5 py-0.5 rounded text-[10px] font-semibold bg-[#008E95]/20 text-[#008E95]">MediAsset AI</span>
</div>
</aside>
);
+8 -2
View File
@@ -4,10 +4,16 @@
@layer base {
:root {
--brand: #1e3a8a;
--brand: #102C52;
--brand-navy: #102C52;
--brand-blue: #2E5C9A;
--brand-teal: #008E95;
--brand-pale: #E8EFF7;
--brand-cloud: #F8FAFC;
}
body {
@apply bg-gray-50 text-gray-900 antialiased;
@apply bg-[#F8FAFC] text-[#102C52] antialiased;
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Calibri", sans-serif;
}
}
+29 -17
View File
@@ -75,20 +75,27 @@ export function LoginPage() {
}
return (
<div className="min-h-screen bg-gradient-to-br from-blue-50 via-gray-50 to-indigo-50 flex items-center justify-center p-4">
<div className="min-h-screen bg-gradient-to-br from-[#E8EFF7] via-[#F8FAFC] to-[#E8EFF7]/60 flex items-center justify-center p-4">
<div className="w-full max-w-md space-y-5">
<div className="bg-white rounded-xl shadow-md border border-gray-200 p-6 sm:p-8">
<div className="bg-white rounded-xl shadow-md border border-[#E8EFF7] p-6 sm:p-8">
{/* Hospital Branding */}
<div className="text-center mb-6">
<img
src="/logo.jpg"
alt="Poona Hospital and Research Centre"
src="/logo.svg"
alt="XYZ Hospital"
onError={(e) => {
(e.target as HTMLImageElement).src = "/logo.jpg";
}}
className="h-20 mx-auto object-contain mb-3"
/>
<h1 className="text-xl font-bold text-[#1e3a8a]">
Poona Hospital &amp; Research Centre
<h1 className="text-xl font-bold text-[#102C52]">
XYZ Hospital
</h1>
<p className="text-sm text-gray-500 mt-0.5">
<div className="inline-flex items-center gap-1.5 mt-1 px-2.5 py-0.5 rounded-full bg-[#E8EFF7] text-xs font-semibold text-[#008E95]">
<span className="w-1.5 h-1.5 rounded-full bg-[#008E95]"></span>
<span>MediAsset AI</span>
</div>
<p className="text-xs text-gray-500 mt-1">
Asset Management &amp; Maintenance System
</p>
</div>
@@ -105,7 +112,7 @@ export function LoginPage() {
<form onSubmit={handleSubmit(onSubmit)} className="space-y-4" noValidate>
<div>
<label htmlFor="email" className="block text-sm font-medium text-gray-700 mb-1">
<label htmlFor="email" className="block text-sm font-medium text-[#102C52] mb-1">
Email Address
</label>
<input
@@ -114,7 +121,7 @@ export function LoginPage() {
autoComplete="email"
placeholder="you@poona.demo"
{...register("email")}
className="w-full px-3 py-2 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
className="w-full px-3 py-2 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#2E5C9A]"
/>
{errors.email && (
<p className="text-xs text-red-600 mt-1">{errors.email.message}</p>
@@ -122,7 +129,7 @@ export function LoginPage() {
</div>
<div>
<label htmlFor="password" className="block text-sm font-medium text-gray-700 mb-1">
<label htmlFor="password" className="block text-sm font-medium text-[#102C52] mb-1">
Password
</label>
<input
@@ -131,14 +138,14 @@ export function LoginPage() {
autoComplete="current-password"
placeholder="Enter your password"
{...register("password")}
className="w-full px-3 py-2 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
className="w-full px-3 py-2 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#2E5C9A]"
/>
{errors.password && (
<p className="text-xs text-red-600 mt-1">{errors.password.message}</p>
)}
</div>
<Button type="submit" className="w-full" loading={isSubmitting}>
<Button type="submit" className="w-full bg-[#2E5C9A] hover:bg-[#102C52] text-white transition-colors" loading={isSubmitting}>
<LogIn className="h-4 w-4 mr-2" />
Sign In
</Button>
@@ -146,9 +153,9 @@ export function LoginPage() {
</div>
{/* Quick Demo Login Panel */}
<div className="bg-white rounded-xl shadow-sm border border-gray-200 p-4">
<div className="flex items-center gap-1.5 text-xs font-semibold text-gray-600 uppercase tracking-wide mb-2.5">
<ShieldCheck className="h-4 w-4 text-[#1e3a8a]" />
<div className="bg-white rounded-xl shadow-sm border border-[#E8EFF7] p-4">
<div className="flex items-center gap-1.5 text-xs font-semibold text-[#102C52] uppercase tracking-wide mb-2.5">
<ShieldCheck className="h-4 w-4 text-[#008E95]" />
Quick Demo Login (Password: Demo@123)
</div>
<div className="grid grid-cols-1 sm:grid-cols-2 gap-2">
@@ -158,12 +165,12 @@ export function LoginPage() {
type="button"
disabled={isSubmitting || quickLoadingEmail !== null}
onClick={() => handleQuickLogin(acct.email)}
className="text-left px-3 py-2 rounded-md border border-gray-200 hover:border-[#1e3a8a] hover:bg-blue-50/50 transition-colors disabled:opacity-50"
className="text-left px-3 py-2 rounded-md border border-gray-200 hover:border-[#2E5C9A] hover:bg-[#E8EFF7]/50 transition-colors disabled:opacity-50"
>
<div className="text-xs font-semibold text-gray-800 flex items-center justify-between">
<span>{acct.label}</span>
{quickLoadingEmail === acct.email && (
<span className="text-[10px] text-blue-600">Signing in…</span>
<span className="text-[10px] text-[#2E5C9A] font-medium">Signing in…</span>
)}
</div>
<div className="text-[11px] text-gray-500 truncate">{acct.email}</div>
@@ -171,6 +178,11 @@ export function LoginPage() {
))}
</div>
</div>
{/* Brand & Clearance Disclaimer */}
<div className="text-center text-[11px] text-gray-400">
The name, tagline, logo concept, and palette are proposed brand assets and remain subject to clearance.
</div>
</div>
</div>
);
+1 -1
View File
@@ -20,7 +20,7 @@ describe("LoginPage", () => {
</MemoryRouter>
);
expect(screen.getByAltText("Poona Hospital and Research Centre")).toBeInTheDocument();
expect(screen.getByAltText("XYZ Hospital")).toBeInTheDocument();
expect(screen.getByLabelText("Email Address")).toBeInTheDocument();
expect(screen.getByLabelText("Password")).toBeInTheDocument();
expect(screen.getByRole("button", { name: /Sign In/i })).toBeInTheDocument();
+4 -4
View File
@@ -24,16 +24,16 @@ describe("Phase 1 Frontend Smoke Tests", () => {
});
});
it("renders Sidebar with Poona Hospital logo, subtitle, and all admin navigation links", () => {
it("renders Sidebar with XYZ Hospital logo, subtitle, and all admin navigation links", () => {
render(
<MemoryRouter>
<Sidebar />
</MemoryRouter>
);
const logo = screen.getByAltText("Poona Hospital and Research Centre") as HTMLImageElement;
const logo = screen.getByAltText("XYZ Hospital") as HTMLImageElement;
expect(logo).toBeInTheDocument();
expect(logo.getAttribute("src")).toBe("/logo.jpg");
expect(logo.getAttribute("src")).toBe("/logo.svg");
expect(screen.getByText("Asset Management & Maintenance")).toBeInTheDocument();
const labels = [
@@ -55,7 +55,7 @@ describe("Phase 1 Frontend Smoke Tests", () => {
for (const label of labels) {
expect(screen.getByText(label)).toBeInTheDocument();
}
expect(screen.getByText("Poona Hospital AMS • v1.0")).toBeInTheDocument();
expect(screen.getByText("XYZ Hospital AMS • v1.0")).toBeInTheDocument();
});
it("hides Masters, Settings, and Department Visits for department_user and coordinator", () => {