feat(companies): move add/edit from dialog to dedicated pages #49

Merged
shad0w merged 3 commits from feat/company-form-pages into master 2026-06-20 20:38:11 +00:00
Owner

What & why

The company add/edit form outgrew the modal once the branding (logo / stamp) section landed (PR #48). This moves add/edit onto their own routes so the form has room to breathe.

Changes

  • New pages: /admin/companies/new and /admin/companies/[id]/edit (auth-gated, manage_vessels_accounts).
  • company-form.tsx is now a full-page CompanyForm (details card + a separate Branding card); the AdminDialog versions are removed.
  • createCompany returns the new id; the create flow redirects to the new company's edit page so the logo/stamp can be uploaded immediately.
  • List page: + Add Company is a link; row Edit navigates to the edit page.
  • List page no longer mints a presigned logo/stamp URL per company (only the edit page needs them).

Verification

  • pnpm type-check clean, pnpm test green (174 passed).
  • Driven live against the dev server as admin: list (Add link), /new (200, "Create the company first" until saved), and /[id]/edit (200, fields prefilled, Logo + Stamp uploaders present).

Note

Stacked on top of PR #48 (branding), which is already merged to master — this PR is just the dialog→page refactor (6 files).

🤖 Generated with Claude Code

## What & why The company add/edit form outgrew the modal once the branding (logo / stamp) section landed (PR #48). This moves add/edit onto their own routes so the form has room to breathe. ## Changes - New pages: `/admin/companies/new` and `/admin/companies/[id]/edit` (auth-gated, `manage_vessels_accounts`). - `company-form.tsx` is now a full-page `CompanyForm` (details card + a separate Branding card); the `AdminDialog` versions are removed. - `createCompany` returns the new `id`; the create flow redirects to the new company's edit page so the logo/stamp can be uploaded immediately. - List page: **+ Add Company** is a link; row **Edit** navigates to the edit page. - List page no longer mints a presigned logo/stamp URL per company (only the edit page needs them). ## Verification - `pnpm type-check` clean, `pnpm test` green (174 passed). - Driven live against the dev server as admin: list (Add link), `/new` (200, "Create the company first" until saved), and `/[id]/edit` (200, fields prefilled, Logo + Stamp uploaders present). ## Note Stacked on top of PR #48 (branding), which is already merged to master — this PR is just the dialog→page refactor (6 files). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
shad0w added 1 commit 2026-06-20 20:17:38 +00:00
feat(companies): move add/edit from dialog to dedicated pages
Some checks failed
PR checks / checks (pull_request) Failing after 3s
bad67f66c4
The company form outgrew the modal once the branding (logo/stamp) section
was added. Add/edit now live on their own routes:
- /admin/companies/new
- /admin/companies/[id]/edit

- createCompany returns the new id and the create flow lands on the edit
  page so logo/stamp can be uploaded immediately
- list "+ Add Company" is a link; row "Edit" navigates to the edit page
- branding is its own card on the edit page (independent uploads)
- list page no longer mints a presigned URL per company (moved to edit)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
shad0w added 1 commit 2026-06-20 20:35:44 +00:00
test(companies): cover createCompany/updateCompany actions
All checks were successful
PR checks / checks (pull_request) Successful in 32s
6137d11e5f
Satisfies the contribution-policy test gate for the add/edit-page refactor.
Covers: createCompany returns the new id, code upper-casing, duplicate-code
rejection, updateCompany in-place edit, and manage_vessels_accounts gating.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
shad0w added 1 commit 2026-06-20 20:37:38 +00:00
Merge branch 'master' into feat/company-form-pages
All checks were successful
PR checks / checks (pull_request) Successful in 31s
e388ec917e
shad0w merged commit 4712fafb4b into master 2026-06-20 20:38:11 +00:00
Sign in to join this conversation.
No description provided.