feat(forms): autocomplete CompanyPicker on Project + billing forms + conventions doc (PMS-367) #255

Merged
nrupard merged 1 commit from feat/pms-367-company-picker-and-form-conventions into main 2026-06-17 17:15:36 +02:00
Owner

What

Finishes the create-form consistency sweep (PMS-367). PMS-352 (merged) already moved Asset + Contract onto the autocomplete CompanyPicker; this converts the remaining native company dropdowns and documents the conventions.

Company picker (AC1) - every call site now uses CompanyPicker

Form Before After
Ticket, Contact autocomplete unchanged
Asset, Contract (create) autocomplete (PMS-352) unchanged
Project native Select CompanyPicker (required: false - company is optional on a project)
Invoice native Select CompanyPicker (required)
Record Payment native Select CompanyPicker (required); onselect clears the dependent invoice like the old onchange did
Contract (edit) disabled Select unchanged - company is immutable post-create (not a drift)

The payment invoice picker (with the "(Unapplied payment)" option) stays a Select - it is an invoice picker, not a company picker.

Other reference pickers (AC2)

Audited: assignee/User pickers and the fixed lookups (work type, status, priority, tax rate, payment term) stay native Select - small bounded lists where autocomplete buys nothing. AssetPicker and ContactPicker (large lists) are already autocomplete. The full rationale + every call site is in the doc.

Convention doc (AC3)

dev-docs/form-conventions.md: (1) autocomplete-vs-native-Select picker rule + every Company picker call site, and (2) the modal-vs-full-page convention (top-level entity creates = full pages; child-of-parent creates = modals). The sweep found the app already follows the modal/full-page split - no mismatch to fix (AC4).

Documented follow-up (AC4)

The time-entry Work Item picker (a dual-source ticket/project Select on Log Time) stays native: it needs a new combined autocomplete component and the open-ticket list is usually modest. Recorded in the doc rather than blocking this PR.

Verification

wasm cargo check, cargo clippy --target wasm32-unknown-unknown --lib -- -D warnings, and cargo fmt --all --check all pass.

#PMS-367

## What Finishes the create-form consistency sweep (PMS-367). PMS-352 (merged) already moved Asset + Contract onto the autocomplete `CompanyPicker`; this converts the remaining native company dropdowns and documents the conventions. ## Company picker (AC1) - every call site now uses `CompanyPicker` | Form | Before | After | | --- | --- | --- | | Ticket, Contact | autocomplete | unchanged | | Asset, Contract (create) | autocomplete (PMS-352) | unchanged | | **Project** | native `Select` | `CompanyPicker` (required: false - company is optional on a project) | | **Invoice** | native `Select` | `CompanyPicker` (required) | | **Record Payment** | native `Select` | `CompanyPicker` (required); onselect clears the dependent invoice like the old onchange did | | Contract (edit) | disabled `Select` | unchanged - company is immutable post-create (not a drift) | The payment **invoice** picker (with the "(Unapplied payment)" option) stays a `Select` - it is an invoice picker, not a company picker. ## Other reference pickers (AC2) Audited: assignee/User pickers and the fixed lookups (work type, status, priority, tax rate, payment term) stay native `Select` - small bounded lists where autocomplete buys nothing. `AssetPicker` and `ContactPicker` (large lists) are already autocomplete. The full rationale + every call site is in the doc. ## Convention doc (AC3) `dev-docs/form-conventions.md`: (1) autocomplete-vs-native-Select picker rule + every Company picker call site, and (2) the modal-vs-full-page convention (top-level entity creates = full pages; child-of-parent creates = modals). The sweep found the app already follows the modal/full-page split - no mismatch to fix (AC4). ## Documented follow-up (AC4) The time-entry **Work Item** picker (a dual-source ticket/project `Select` on Log Time) stays native: it needs a new combined autocomplete component and the open-ticket list is usually modest. Recorded in the doc rather than blocking this PR. ## Verification wasm `cargo check`, `cargo clippy --target wasm32-unknown-unknown --lib -- -D warnings`, and `cargo fmt --all --check` all pass. #PMS-367
feat(forms): autocomplete CompanyPicker on Project + billing forms, form-conventions doc (PMS-367)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m51s
Create release / Create release from merged PR (pull_request) Has been skipped
bf7c12699d
External review found the Company field used a search-autocomplete on some forms and a native dropdown on others, and that the modal-vs-full-page choice was an undocumented convention. PMS-352 already moved Asset and Contract onto the autocomplete CompanyPicker; this finishes the company-picker sweep and documents the conventions.

- Project create form: native company Select -> CompanyPicker (required: false, since company is optional on a project; inline-create on).
- Invoice create form: company Select -> CompanyPicker (required).
- Record Payment form: company Select -> CompanyPicker (required); onselect clears the dependent invoice selection just like the old onchange did. The invoice picker (with its "(Unapplied payment)" option) stays a Select - it is an invoice picker, not a company picker.
- dev-docs/form-conventions.md: documents (1) which reference fields use an autocomplete picker (Company/Asset/Contact - large lists) vs a native Select (User/assignee + fixed lookups - small), with every Company picker call site, and (2) the modal-vs-full-page convention (top-level entity creates are full pages; child-of-parent creates are modals). The sweep found the app already follows the modal/full-page split, so nothing to fix there.

Documented follow-up: the time-entry Work Item picker (a dual-source ticket/project Select on Log Time) stays native for now - it needs a new combined autocomplete component, and the open-ticket list is usually modest. Noted in the doc per AC4.

#PMS-367
nrupard deleted branch feat/pms-367-company-picker-and-form-conventions 2026-06-17 17:15:36 +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!255
No description provided.