feat: coordinator tabs (Shifts, Contacts, Settings)

- pages.tsx: Layout shows a Coordinator tab row on every signed-in /admin
  page. Shifts covers the dashboard, events, shifts and templates; Contacts
  covers /admin/contacts; Settings covers /admin/settings and /admin/admins.
- admin-pages.tsx: remove the dashboard link cluster and the redundant
  Contacts/Settings breadcrumbs. Administrators moves under Settings, with a
  "Manage administrators" card. Routes are unchanged.
- app.css: .desk-tabs styles (white pill, gold underline on the current tab,
  48px tap targets, full width on phones, hidden in print); drop .desk-links.
- tests: admins.test.ts checks the tabs and the new Settings link.
This commit is contained in:
Cosmically Creative committed 2026-11-20 13:24:23 -06:00
1 parent 1230030e39
commit c4fe911969
4 files changed
+117 -14

No files matched your search

+11 -1
View File
@@ -37,12 +37,22 @@ describe('administrators', () => {
const { app, db } = await buildApp();
const cookie = await signIn(app, db, 'coordinator@example.invalid');
const home = await app.request('/admin', { headers: { cookie } });
expect(await home.text()).toContain('href="/admin/admins"');
const homeHtml = await home.text();
expect(homeHtml).toContain('<nav class="desk-tabs" aria-label="Coordinator">');
expect(homeHtml).toContain('<a href="/admin" aria-current="page">Shifts</a>');
expect(homeHtml).toContain('<a href="/admin/contacts">Contacts</a>');
expect(homeHtml).not.toContain('href="/admin/admins"');
const settings = await (await app.request('/admin/settings', { headers: { cookie } })).text();
expect(settings).toContain('<a href="/admin/settings" aria-current="page">Settings</a>');
expect(settings).toContain('href="/admin/admins"');
expect(settings).toContain('Manage administrators');
const first = await app.request('/admin/admins', { headers: { cookie } });
const firstHtml = await first.text();
expect(first.status).toBe(200);
expect(firstHtml).toContain('Administrator');
expect(firstHtml).toContain('<a href="/admin/settings" aria-current="true">Settings</a>');
expect(firstHtml).toContain('<a href="/admin/settings">Settings</a>');
expect(firstHtml).toContain('coordinator@example.invalid');
expect(firstHtml).toContain('>You</span>');
expect(firstHtml).toContain('This is the only administrator.');