feat(contacts): admin-editable Company Industries lookup + combobox source (PMS-601) #392

Merged
longjacksonle merged 4 commits from feat/PMS-601-company-industries-lookup into main 2026-06-30 19:14:04 +02:00

PMS-601 (frontend half)

Makes the company Industry suggestion list admin-editable, sourced from the new tenant-scoped lookup endpoint instead of a hardcoded constant. Industry stays free text.

Commits (small, logical)

  1. Settings admin page: CompanyIndustriesSettingsPage + form modal (Name + Active), reusing save_lookup / delete_lookup against /contacts/company-industries. Mirrors the Asset Types editor.
  2. Routing/nav: SettingsCompanyIndustries route + component, and a Settings hub entry under "Service & Asset Types".
  3. Wire the company Industry combobox to fetch active suggestions from the lookup, and remove the COMPANY_INDUSTRIES constant.

Depends on

mokosh-server PR #412 (the /contacts/company-industries endpoint). The dev server is already running that branch, so this is testable end to end now.

Test

  • Settings > Company Industries: list shows the seeded defaults; add / edit / delete works; a duplicate name is rejected (409).
  • Companies > New/edit > Industry: the combobox suggests the lookup's active values; typing a custom value is still allowed.

🤖 Generated with Claude Code

## PMS-601 (frontend half) Makes the company Industry suggestion list admin-editable, sourced from the new tenant-scoped lookup endpoint instead of a hardcoded constant. Industry stays free text. ## Commits (small, logical) 1. Settings admin page: `CompanyIndustriesSettingsPage` + form modal (Name + Active), reusing `save_lookup` / `delete_lookup` against `/contacts/company-industries`. Mirrors the Asset Types editor. 2. Routing/nav: `SettingsCompanyIndustries` route + component, and a Settings hub entry under "Service & Asset Types". 3. Wire the company Industry combobox to fetch active suggestions from the lookup, and remove the `COMPANY_INDUSTRIES` constant. ## Depends on mokosh-server PR #412 (the `/contacts/company-industries` endpoint). The dev server is already running that branch, so this is testable end to end now. ## Test - Settings > Company Industries: list shows the seeded defaults; add / edit / delete works; a duplicate name is rejected (409). - Companies > New/edit > Industry: the combobox suggests the lookup's active values; typing a custom value is still allowed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Settings admin screen to list / add / edit / delete the company-industry lookup, mirroring the Asset Types page but Name + Active only. Reuses save_lookup / delete_lookup against /contacts/company-industries. Admin-gated like the other lookup editors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add the SettingsCompanyIndustries route (/settings/company-industries) + component and a Settings hub nav entry under Service & Asset Types.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(contacts): source Industry suggestions from the lookup (PMS-601)
Some checks failed
Check / fmt + clippy + tests (pull_request) Failing after 6s
e1734374e5
The company Industry combobox now fetches its suggestions from the tenant's editable /contacts/company-industries lookup (active rows only) instead of the hardcoded COMPANY_INDUSTRIES constant, which is removed. Industry stays free text, so values outside the list are still accepted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
style(settings): single-line industries fetch path (PMS-601)
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 1m22s
Create release / Create release from merged PR (pull_request) Has been skipped
83f2904996
CI rustfmt keeps this format! on one line (it fits under max_width); my local rustfmt is older and wrapped it, which failed the Check / formatting gate on #392. Match CI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch feat/PMS-601-company-industries-lookup 2026-06-30 19:14:05 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!392
No description provided.