From 20c46e54690f7c7befb7059960447935231d86be Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Sat, 25 Jul 2026 17:45:15 +0100 Subject: 2-col layout --- 174bg/manager/src/App.jsx | 98 +++++++++++----- 174bg/manager/src/components/Sidebar.jsx | 56 +++++++++ 174bg/manager/src/main.jsx | 5 +- 174bg/manager/src/pages/Overview.jsx | 11 ++ 174bg/manager/src/theme.css | 194 +++++++++++++++++++++++++++++-- 5 files changed, 324 insertions(+), 40 deletions(-) create mode 100644 174bg/manager/src/components/Sidebar.jsx create mode 100644 174bg/manager/src/pages/Overview.jsx (limited to '174bg/manager/src') diff --git a/174bg/manager/src/App.jsx b/174bg/manager/src/App.jsx index 5f455bb..095506a 100644 --- a/174bg/manager/src/App.jsx +++ b/174bg/manager/src/App.jsx @@ -1,7 +1,8 @@ import { useCallback, useEffect, useState } from "react"; +import { Navigate, Route, Routes } from "react-router-dom"; import { pb } from "./lib/pocketbase"; -import Welcome from "./components/Welcome.jsx"; -import RequiredInfo from "./components/RequiredInfo.jsx"; +import Sidebar from "./components/Sidebar.jsx"; +import Overview from "./pages/Overview.jsx"; import RolePreferences from "./components/RolePreferences.jsx"; import OnCallSchedule from "./components/OnCallSchedule.jsx"; import Ledger from "./components/Ledger.jsx"; @@ -143,40 +144,75 @@ export default function App() { return ( <> -

174th Battle Group: Manager

- {!loggedIn && ( -
-

You are not logged in. Please log in to access this site:

- -
- )} - - {oauthStatus.text && ( -

- {oauthStatus.text} -

+
+

174th Battle Group: Manager

+
+

You are not logged in. Please log in to access this site:

+ +
+ {oauthStatus.text && ( +

+ {oauthStatus.text} +

+ )} +
)} {loggedIn && ( -
- - - - - -
- -
-
+ )} ); } + +function DashboardLayout({ record, onLogout, onUpdate }) { + const [navOpen, setNavOpen] = useState(false); + + return ( +
+ setNavOpen(false)} + onLogout={onLogout} + /> +
+
+ + 174th Battle Group: Manager +
+
+ + } /> + + } + /> + } + /> + } /> + } /> + +
+
+
+ ); +} diff --git a/174bg/manager/src/components/Sidebar.jsx b/174bg/manager/src/components/Sidebar.jsx new file mode 100644 index 0000000..64f0cf5 --- /dev/null +++ b/174bg/manager/src/components/Sidebar.jsx @@ -0,0 +1,56 @@ +import { NavLink } from "react-router-dom"; + +const NAV_ITEMS = [ + { to: "/", label: "Overview", end: true }, + { to: "/preferences", label: "Role Preferences" }, + { to: "/oncall", label: "On-Call Schedule" }, + { to: "/ledger", label: "Ledger" }, +]; + +export default function Sidebar({ record, open, onClose, onLogout }) { + const name = record?.RSI_Handle || record?.name || "Pilot"; + + return ( + <> + {open && ( +