No description
Find a file
Dave edc9f3da74 feat(settings): add user management, fix totals and mobile layout
Adds a Settings > Users screen where members can be added, turned off
and removed, and fixes three defects found while auditing the app on
a phone.

User management
- Settings is a real page with a Users section: add a member (name,
  email, password), flip "Can sign in" to block or restore access
  without deleting their history, or remove them outright.
- The app has no roles - membership is just the active flag - so the
  Settings route no longer requires the "admin" role, which left it
  unreachable for every real member. Settings is now in the sidebar.
- New members are created with active: true. AuthContext refuses to
  sign in a user whose active flag is false, and the field had no
  default, so previously created users were locked out of the app.

Live PocketBase rules for the `users` collection (see
scripts/fix-users-collection.mjs):
- createRule was "" which means PUBLIC - any anonymous visitor could
  create an account on the instance. It now requires an authenticated
  member.
- listRule was "id = @request.auth.id", so a member could only ever
  see their own record and no member list could be rendered. It now
  matches every other collection in the app: @request.auth.id != "".

Totals always showed R0.00
- form.watch("items") returns the same array instance that
  react-hook-form mutates in place, so the useMemo keyed on it never
  recomputed. Both the quote and purchase order totals stayed at zero
  however many items were added. Switched to useWatch with compute,
  which re-runs whenever the watched field really changes.

Mobile layout
- The page was zoomed out on phones: flex items default to
  min-width:auto, so a wide table stretched the layout past the
  viewport. Added min-w-0 to the layout chain.
- The sr-only labels inside the tables are position:absolute with no
  positioned ancestor, so they escaped the table's overflow-x-auto
  clip and stretched the document. Made the scroll containers
  relative.
- DialogContent was w-full plus an mx-4 gutter, which overflowed the
  viewport by 16px and clipped the right edge of every form. The
  component now owns the gutter itself.

Verified at 390x844: all pages and the quote, purchase order and add
user dialogs fit the viewport with no horizontal overflow.
2026-10-21 03:13:01 +02:00
.cursor feat(po): add MCP server, agent-friendly PO API, and PDF rendering 2026-09-07 11:12:13 +02:00
.playwright-mcp UI: style polish, charts, tables, forms, PDF fix 2026-05-16 00:07:52 +02:00
backup Fixed login 2025-09-25 00:15:35 +02:00
docs feat(po): add MCP server, agent-friendly PO API, and PDF rendering 2026-09-07 11:12:13 +02:00
n8n feat(automation): add PO-to-invoice pipeline 2026-09-06 23:40:33 +02:00
pocketbase fix(quotes,po): repair item storage, totals and PDF line items 2026-10-20 20:13:46 +02:00
public feat(purchase-orders): add edit functionality and improve form validation 2026-01-14 09:01:49 +02:00
scripts feat(settings): add user management, fix totals and mobile layout 2026-10-21 03:13:01 +02:00
server feat(po): add MCP server, agent-friendly PO API, and PDF rendering 2026-09-07 11:12:13 +02:00
src feat(settings): add user management, fix totals and mobile layout 2026-10-21 03:13:01 +02:00
.env.example feat(automation): add PO-to-invoice pipeline 2026-09-06 23:40:33 +02:00
.gitignore chore: untrack .env and pb_data, update gitignore 2026-09-01 07:45:02 +02:00
.mcp.json feat(automation): add PO-to-invoice pipeline 2026-09-06 23:40:33 +02:00
AI_RULES.md Updated AI_RULES.md 2025-09-19 12:19:47 +02:00
app-overview.png UI: style polish, charts, tables, forms, PDF fix 2026-05-16 00:07:52 +02:00
components.json
dashboard-updated.png UI: style polish, charts, tables, forms, PDF fix 2026-05-16 00:07:52 +02:00
eslint.config.js
index.html Add icon generation script and new icons for PWA and favicons 2025-09-25 00:50:36 +02:00
LOGGING_IMPLEMENTATION.md Fixed login 2025-09-25 00:15:35 +02:00
login-mobile-final.png UI: style polish, charts, tables, forms, PDF fix 2026-05-16 00:07:52 +02:00
login-mobile.png UI: style polish, charts, tables, forms, PDF fix 2026-05-16 00:07:52 +02:00
login-page-final.png UI: style polish, charts, tables, forms, PDF fix 2026-05-16 00:07:52 +02:00
login-page.png UI: style polish, charts, tables, forms, PDF fix 2026-05-16 00:07:52 +02:00
nixpacks.json Update nixpacks.json 2025-12-29 14:15:05 +02:00
package-lock.json feat(po): add MCP server, agent-friendly PO API, and PDF rendering 2026-09-07 11:12:13 +02:00
package.json feat(po): add MCP server, agent-friendly PO API, and PDF rendering 2026-09-07 11:12:13 +02:00
postcss.config.js
quote-dialog.png Add quotes feature and PO attachments 2026-05-15 07:11:07 +02:00
quote-fixed.png Add quotes feature and PO attachments 2026-05-15 07:11:07 +02:00
quote-form.png Add quotes feature and PO attachments 2026-05-15 07:11:07 +02:00
quote-page.png Add quotes feature and PO attachments 2026-05-15 07:11:07 +02:00
quote-page2.png Add quotes feature and PO attachments 2026-05-15 07:11:07 +02:00
quote-screenshot.png Add quotes feature and PO attachments 2026-05-15 07:11:07 +02:00
README.md
setup-users.js Fixed login 2025-09-25 00:15:35 +02:00
tailwind.config.js [dyad] Changed all blue UI elements to #ffc905 with black text - wrote 2 file(s) 2025-09-11 11:16:50 +02:00
tailwind.config.ts [dyad] Updated the dashboard with a new color palette - wrote 6 file(s) 2025-09-09 01:14:51 +02:00
test-logging.js Fixed login 2025-09-25 00:15:35 +02:00
tsconfig.app.json
tsconfig.json
tsconfig.node.json
vercel.json
vite.config.ts ci(vite): add allowedHosts to preview config 2026-01-13 10:28:14 +02:00

Welcome to your Dyad app