Commit graph

63 commits

Author SHA1 Message Date
d2603bca99 Fix session-expiry redirect losing return-to-app + wire up inactivity timer
Login.tsx only read the return path from router state, which a hard
cross-document navigation (a child app bouncing the whole shell here
on session expiry) can never carry — so re-authenticating always
landed on the Dashboard instead of back in whatever app you were
using. Login.tsx now also accepts a ?from= query param for that case.

Also wired up AuthGate's inactivity auto-logout timer, which was
defined (getInactivityMs) but never actually called — so the
per-device timeout configurable in Admin Settings had no effect.
Disabled for installed PWAs as intended.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 17:07:21 +00:00
58b64c5450 Add DollarSign to AppIcon map (wages app icon)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-23 10:01:12 +00:00
f89600a135 Force desktop width on AdminMonitor — admin tool not suited to mobile layout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 09:37:56 +00:00
b3c02adf76 Add PageShell — collapsed sidebar strip on Dashboard and all admin pages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 09:15:12 +00:00
de49df70b0 Listen for hnf:viewport postMessage — resize iframe to 1280px for desktop-forced pages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 09:00:37 +00:00
9e5c415685 Fix app switching — remount AppFrame on slug change so iframe src recomputes 2026-07-15 18:10:56 +00:00
24b08012e8 Use UtensilsCrossed icon for Table Bookings app
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 17:41:13 +00:00
e7063049f0 Add Armchair to AppIcon map for Table Bookings app
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 17:33:29 +00:00
e76753f92f Fix hosted_tables isConfigured — check site_url config field not secrets
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 17:22:58 +00:00
880cd9793d Add auth secret reveal panel to Hosted Tables integration card
Admin clicks 'Auth secret', re-enters their password, and sees CENTRAL_AUTH_SECRET
with a copy button. Secret auto-clears after 60 seconds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 15:46:41 +00:00
279872364c Add site_url field label for Hosted Tables integration card
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 15:41:53 +00:00
51c99f1ee9 Persist iframe sub-page in URL hash so refresh returns to the same page
On every iframe load, mirror its current path to the portal URL hash
(e.g. /app/cashup#/reports). On mount, initialSrc reads that hash and
restores the correct page after a refresh. Hash is cleared when
switching apps so it doesn't bleed across slugs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 10:51:23 +00:00
2b4de33289 Re-check session on tab focus to fix stale user name in sidebar footer
If a different user logs into a child app while the portal tab is open,
the portal cookie changes but the in-memory user state goes stale. Now
AuthGate re-fetches /api/auth/me on visibilitychange and focus events,
updating state only when the user identity actually changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 10:48:52 +00:00
d0fb78da51 Show commits-behind badge on Updates tab
Displays a gold badge next to the latest commit hash when the backend
returns a commitsBehind count greater than zero.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 09:24:31 +00:00
4cff59f8ca Collapse user permissions into expandable section on admin users page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 15:55:08 +00:00
bcd91f1c50 Show custom success message from test result if present
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 13:55:34 +00:00
03b241ec74 Add Rebuild button to Updates tab — triggers rebuild without git pull 2026-07-14 13:22:58 +00:00
3562c178d7 Add FIELD_LABELS for SambaPOS split SQL/GraphQL credential fields
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 13:09:09 +00:00
8a8c4073e5 Add Nextcloud directory browser to backup_path field in Settings
The Backup Directory field in the Nextcloud integration card gains a
Browse button that opens an inline panel with: breadcrumb navigation,
scrollable directory list, and a Select button to pick the current path.
Falls back to manual text entry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 11:09:47 +00:00
3cfa092f73 Add Backups tab to AdminMonitor, backup_path label to Settings
Backups tab shows last-run status, expandable run history with per-item
breakdown (db/vol, size, status), and a Run Now trigger button.
Settings Nextcloud card gains a Backup Directory field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 11:03:52 +00:00
c40d7617f4 Add Shell tab to AdminMonitor — run commands on app containers via SSH
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 09:27:45 +00:00
43a54e8b4c Rename Uptime tab to States; add RAM/disk progress bars per service
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 09:04:23 +00:00
f36fd83196 Replace hotel emoji on login screen with Lucide Hotel icon; add sidebar scrollbar styles
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 08:17:51 +00:00
567e5bf73e Add History icon to AppIcon registry
Portal sidebar was rendering nothing for the history app entry because
History was missing from the Lucide icon map.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-13 15:44:36 +00:00
63b6240c22 Add This Device tab to portal admin settings 2026-07-13 12:48:06 +00:00
af810f14c7 Configurable inactivity timeout — disabled automatically in PWA/standalone mode 2026-07-13 12:29:03 +00:00
b280d391e8 Add shared device inactivity timeout to AuthGate 2026-07-13 11:53:06 +00:00
9a7d7dd5b4 Add Monitor icon to AppIcon map for KDS app
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 12:48:57 +00:00
905a447760 Fix issue #7: add Wrench and BarChart2 to portal AppIcon map
Maintenance (Wrench) and Reports (BarChart2) icons were missing from
the hardcoded iconMap, causing those app tiles to show no icon.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-08 12:10:05 +00:00
5b11a0d4aa Register: add confirm password field with mismatch highlight
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 15:54:13 +00:00
817e5f905d AdminSettings: labels for from and reply_to SMTP fields
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 15:47:11 +00:00
dd022f80bb AdminSettings: restore location name display in dropdown
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 13:14:11 +00:00
4e5a9f6466 AdminSettings: show team names in location dropdown
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 13:11:17 +00:00
28e470433a AdminSettings: show error message when location fetch fails
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 13:03:57 +00:00
f902e87e25 Add App Settings tab to admin settings — per-app session timeout UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 12:57:17 +00:00
1ccaaed8be AdminSettings: Workforce location picker with fetch button
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 12:52:37 +00:00
1dcf8bfbcb AdminDepartments: light theme, group by location, location_name support
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 12:42:50 +00:00
f3d46b8c80 Add bearer_token and other missing Workforce field labels
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 12:35:01 +00:00
0857e9b998 Add PWA manifest icons + favicon — fixes 404s on /icons/icon-192.png and /favicon.ico
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 13:34:59 +00:00
9451de5a6c feat(monitor): show commit timestamps in updates tab
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 15:58:42 +00:00
7667551f07 feat(portal): collapsible sidebar in app frame
When an app is open, the sidebar collapses to a 44px strip with a
chevron button. Clicking it opens the full sidebar as a fixed overlay
with a backdrop that closes on click. Also closes automatically when
the user interacts with / navigates within the iframe (window blur).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 15:56:04 +00:00
b08291aefe Add CalendarClock to AppIcon map (hk-planner icon)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 14:29:58 +00:00
f5969b0001 Admin UI: manage per-app granular capabilities
- AdminRoles: capability sub-toggles under each granted app
- AdminUsers: per-app direct capability grants; role-derived
  capabilities shown read-only as "(role)"
- types: Role.capabilities + Capability interface

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 14:19:16 +00:00
bababbfc1a Fix dark-theme CSS variables on Roles and Users admin pages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 00:31:45 +00:00
fa32ea84ee Add self-registration, role management, and department mapping UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 00:24:05 +00:00
e9cd40c80a Add Settings admin page and settings service proxy
Wire /admin/settings route and sidebar link; proxy /settings/api/ to the
new settings service at 10.10.10.116. Admin can configure integration
credentials and manage Newbook room ordering from the portal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 18:56:27 +00:00
affb1368ac Add category grouping to sidebar and dashboard
Sidebar now renders uncategorised apps flat and categorised apps in
collapsible accordion sections; active category stays expanded. Dashboard
groups tiles under category section headings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 18:26:09 +00:00
15c2064483 Add design system documentation
Covers CSS variables, colour usage, typography, card/input/button
patterns, icon conventions, VITE_HOTEL_NAME setup, and new app checklist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 18:16:17 +00:00
092c4fda31 Restyle to light content theme with Lucide icons
- index.css: light body (#f4f5f7), white cards, sidebar stays dark navy
- AppIcon.tsx: Lucide icon lookup component for app tiles and nav
- Sidebar.tsx: Lucide nav icons (LayoutGrid, Users, Activity, LogOut)
- Dashboard.tsx: white cards with shadows, coloured Lucide app icons
- AdminMonitor.tsx: light theme throughout, Lucide tab icons,
  better status colours for light backgrounds

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 18:09:51 +00:00
ead0313561 Add vite-env.d.ts so TypeScript knows about import.meta.env
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 17:52:23 +00:00