Skip to content

feat(SDK-1119): add contractor profile management#2469

Merged
dmortal merged 8 commits into
mainfrom
sdk-1119-contractor-profile-management
Jul 24, 2026
Merged

feat(SDK-1119): add contractor profile management#2469
dmortal merged 8 commits into
mainfrom
sdk-1119-contractor-profile-management

Conversation

@dmortal

@dmortal dmortal commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a Contractor Profile management surface (mirroring the existing Employee Profile management pattern) for viewing and editing a contractor's basic details after onboarding: Profile, ProfileCard, and ProfileEditForm, orchestrated via a robot3 state machine.

Changes

  • Profile: orchestrator driving the read-view card and edit form via an internal state machine
  • ProfileCard: standalone read-only card fetching its own data via a new useContractorProfileSummary hook, with an Edit action
  • ProfileEditForm: standalone edit form for name/business name, start date, tax ID (SSN or EIN depending on contractor type), and email; an SSN/EIN already on file renders as a locked, masked value with a "Change" action
  • Fix: ProfileCard and ProfileEditForm now show the real (partially-masked) EIN value returned by the API instead of a hardcoded XX-XXXXXXX placeholder; SSN keeps its hardcoded mask since the Contractor model has no equivalent real SSN value field
  • New i18n namespace Contractor.Management.Profile, new component events (contractor/management/profile/editRequested|updated|editCancelled), docs regenerated
Screen.Recording.2026-07-24.at.10.29.34.AM.mov

Related

Testing

  • npm run test -- --run src/components/Contractor — 27 test files, 305 tests passing
  • npx tsc --noEmit -p . and npx eslint src/components/Contractor/Profile — clean

dmortal and others added 6 commits July 22, 2026 12:53
New events back the management ContractorProfile card and edit form's
edit/save/cancel/alert-dismiss transitions.
Adds useContractorProfileSummary, a read-only hook for the upcoming management
ProfileCard, mirroring useEmployeeProfileSummary. Extends the existing
useContractorDetailsForm with a showEmailField option so a management edit
form can always show Email regardless of the selfOnboarding toggle state,
which previously gated Email's visibility.
Adds a management surface for viewing and editing a contractor's basic
profile details after onboarding, mirroring Employee/Profile/management's
card + edit-form + state-machine structure. The edit form renders an
already-on-file SSN/EIN as a locked, masked value with a "Change" action
per the design prototype, instead of a blank editable input. Exported as
ContractorManagement.{Profile, ProfileCard, ProfileEditForm}.
…actor profile

ProfileCard and ProfileEditForm rendered a literal "XX-XXXXXXX" placeholder
for a business contractor's EIN instead of the partially-masked value the
API actually returns (e.g. "XX-XXX4879"). SSN keeps its hardcoded mask since
the Contractor model has no equivalent real SSN value field.
@dmortal
dmortal marked this pull request as ready for review July 24, 2026 14:30
@dmortal
dmortal requested a review from a team as a code owner July 24, 2026 14:30
…rofile-management

# Conflicts:
#	docs/reference/index.mdx
Comment thread src/components/Contractor/Profile/management/Profile.tsx
The hook was tagged @public but never re-exported from src/index.ts, so it
was unreachable as advertised. It's only ever used internally by
ProfileCard, matching the same read-only-summary-hook shape as the existing
@internal useStateTaxesSummary — downgrade the tags to match rather than
wire up a top-level export nothing currently needs.
dmortal added a commit that referenced this pull request Jul 24, 2026
Same fix as PR #2469's useContractorProfileSummary: it was tagged @public
but never re-exported from src/index.ts, and is only used internally by
AddressCard. Downgrade to @internal to match useStateTaxesSummary.
@dmortal
dmortal added this pull request to the merge queue Jul 24, 2026
Merged via the queue into main with commit 2585d9c Jul 24, 2026
40 checks passed
@dmortal
dmortal deleted the sdk-1119-contractor-profile-management branch July 24, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants