- This PO has no vendor assigned. Use “Request Vendor ID” to route it for vendor selection, or assign a vendor via the Edit PO form.
+ This PO has no vendor assigned. Use “Request Vendor ID” to route it for vendor selection, or assign a vendor via the Edit PO form on desktop.
)}
-
+ {/* Direct field editing is desktop-only */}
+
);
diff --git a/App/pelagia-portal/app/(portal)/layout.tsx b/App/pelagia-portal/app/(portal)/layout.tsx
index bae3fe7..77b6567 100644
--- a/App/pelagia-portal/app/(portal)/layout.tsx
+++ b/App/pelagia-portal/app/(portal)/layout.tsx
@@ -3,6 +3,12 @@ import { db } from "@/lib/db";
import { redirect } from "next/navigation";
import { Sidebar } from "@/components/layout/sidebar";
import { Header } from "@/components/layout/header";
+import { MobileHeader } from "@/components/layout/mobile-header";
+import { MobileBottomNav } from "@/components/layout/mobile-bottom-nav";
+import { DesktopRequired } from "@/components/layout/desktop-required";
+
+// Roles that have a useful mobile experience (approval queue + PO review)
+const MOBILE_ROLES = ["MANAGER", "SUPERUSER"] as const;
export default async function PortalLayout({
children,
@@ -12,6 +18,8 @@ export default async function PortalLayout({
const session = await auth();
if (!session?.user) redirect("/login");
+ const hasMobile = (MOBILE_ROLES as readonly string[]).includes(session.user.role);
+
const [notifications, unreadCount] = await Promise.all([
db.notification.findMany({
where: { userId: session.user.id },
@@ -32,14 +40,38 @@ export default async function PortalLayout({
return (
-
+ {/* Desktop sidebar — hidden on small screens */}
+
+
+
+
-
- {children}
+
+ {/* Desktop top bar — hidden on small screens */}
+
+
+
+
+ {/* Page content — add bottom padding on mobile to clear the bottom nav */}
+
+ {children}
+
+
+ {/* Mobile bottom nav — managers/superusers only */}
+ {hasMobile && }
+
+ {/* Full-screen overlay for roles without a mobile experience */}
+ {!hasMobile && }
);
diff --git a/App/pelagia-portal/components/layout/desktop-required.tsx b/App/pelagia-portal/components/layout/desktop-required.tsx
new file mode 100644
index 0000000..0aa55ef
--- /dev/null
+++ b/App/pelagia-portal/components/layout/desktop-required.tsx
@@ -0,0 +1,19 @@
+import { Monitor } from "lucide-react";
+
+export function DesktopRequired() {
+ return (
+
+
+
+
+
Desktop Required
+
+ PPMS is designed for use on a desktop or laptop browser. Please switch to a larger screen to
+ access all features.
+