Skip to content

feat(gp): PayrollAdminOnboardingFlow#1077

Open
hamzaremote wants to merge 3 commits into
mainfrom
pbyr-4044-featsdk-payrolladminonboardingflow
Open

feat(gp): PayrollAdminOnboardingFlow#1077
hamzaremote wants to merge 3 commits into
mainfrom
pbyr-4044-featsdk-payrolladminonboardingflow

Conversation

@hamzaremote

@hamzaremote hamzaremote commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Implements the full PayrollAdminOnboardingFlow for Global Payroll admin onboarding
  • Step sequence: Select Country → Contract Details → Administrative Details → Invite
  • Employment created via POST /v1/employments with type: global_payroll_employee
  • Subsequent steps use PUT /v2/employments/:id/contract_details and PUT /v2/employments/:id/administrative_details
  • All mutations via mutateAsyncOrThrow (no deprecated mutateAsync)
  • useStepSubmitHandler hook extracted to eliminate duplicated try/catch/navigate logic across form step components
  • Example app page added under "GP Admin Onboarding" using the same styles as the EOR Onboarding demo

Closes PBYR-4044 · Part of PBYR-3935

Test plan

  • npm run type-check passes
  • npm test -- --run passes (781 tests)
  • Lint: 0 errors
  • npm run check-format clean
  • Example app: "GP Admin Onboarding" tab shows country dropdown (225 countries), step nav bar, and card layout matching EOR Onboarding style
  • End-to-end: select a GP-supported country → schema loads → fill basic info → create employment → fill contract details → administrative details → send invitation (requires staging/partners env with GP schemas seeded)

🤖 Generated with Claude Code

@hamzaremote hamzaremote self-assigned this Jun 10, 2026
@hamzaremote hamzaremote added the enhancement New feature or request label Jun 10, 2026
Base automatically changed from pbyr-4043-gp-sdk-foundation-shared-hooks-and-flow-scaffolding to main June 11, 2026 12:32
hamzaremote and others added 2 commits June 11, 2026 15:01
…app (PBYR-4044)

- Add api.ts with useGPFormSchema, useGPCreateEmployment, useGPUpdateContractDetails,
  useGPUpdateAdministrativeDetails, useGPInviteEmployee (all via mutateAsyncOrThrow)
- Expand usePayrollAdminOnboarding hook with step-aware form schemas, mutations,
  handleValidation, parseFormValues, onSubmit, and sendInvite
- Implement SelectCountryStep, ContractDetailsStep, AdministrativeDetailsStep,
  InvitationStep, SubmitButton, BackButton, and PayrollAdminForm components
- Extract useStepSubmitHandler to eliminate duplicated try/catch/navigate logic
  across form-based step components
- Wire real components into PayrollAdminOnboardingFlow (replaces scaffolding stubs)
- Add PayrollAdminOnboardingForm demo page to the example app

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Addresses Jordi's review comment on PR #1076 — aligns with the pattern
used in the other flow contexts instead of asserting a redefined type.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@remotecom remotecom force-pushed the pbyr-4044-featsdk-payrolladminonboardingflow branch from ede84ee to a458469 Compare June 11, 2026 13:06
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 229.16 kB 220.8 kB +8.36 kB (+3.8%) 🔴
Total (raw) 614.49 kB 595.2 kB +19.28 kB (+3.2%) 🔴
CSS (gzip) 20.89 kB 20.89 kB 0 B (0%) 🟢
CSS (raw) 109.09 kB 109.09 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 229.16 kB / 250 kB (91.7%)
  • ✅ Total raw: 614.49 kB / 650 kB (94.5%)
  • ✅ CSS gzipped: 20.89 kB / 25 kB (83.5%)

Largest Files (Top 5)

  1. chunk-FYVYKBA2.js - 14 kB (new)
  2. styles.css - 10.44 kB (0 B (0%))
  3. index.css - 10.44 kB (0 B (0%))
  4. index.js - 6.37 kB (+79 B (+1.3%))
  5. chunk-XMMR52E2.js - 6.36 kB (new)
View All Files (356 total)
File Size (gzip) Change
chunk-FYVYKBA2.js 14 kB new
styles.css 10.44 kB 0 B (0%)
index.css 10.44 kB 0 B (0%)
index.js 6.37 kB +79 B (+1.3%)
chunk-XMMR52E2.js 6.36 kB new
chunk-LGIVCT33.js 6.09 kB new
chunk-RSOQH22S.js 4.76 kB new
chunk-MXOW7CAR.js 4.74 kB new
chunk-Y6RURXI3.js 4.48 kB new
chunk-IP2N42GF.js 3.89 kB new

✅ Bundle size check passed

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Report

⚠️ Coverage decreased

Metric Current Previous Change Status
Lines 85.71% 88.40% -2.69% 🔴
Statements 85.15% 87.80% -2.65% 🔴
Functions 83.21% 84.86% -1.64% 🔴
Branches 77.48% 79.62% -2.13% 🔴

Detailed Breakdown

Lines Coverage
  • Covered: 3802 / 4436
  • Coverage: 85.71%
  • Change: -2.69% (0 lines)
Statements Coverage
  • Covered: 3864 / 4538
  • Coverage: 85.15%
  • Change: -2.65% (0 statements)
Functions Coverage
  • Covered: 1031 / 1239
  • Coverage: 83.21%
  • Change: -1.64% (0 functions)
Branches Coverage
  • Covered: 2371 / 3060
  • Coverage: 77.48%
  • Change: -2.13% (0 branches)

✅ Coverage check passed

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-8fh74a3x5-remotecom.vercel.app
Latest Commit:5ada720

Deployed with vercel-action

The new flow brings total raw size to ~614 kB, exceeding the prior 600 kB
cap. Following the existing pattern of 50 kB bumps when new flows ship.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant