feat(gp): PayrollAdminOnboardingFlow#1077
Open
hamzaremote wants to merge 3 commits into
Open
Conversation
Base automatically changed from
pbyr-4043-gp-sdk-foundation-shared-hooks-and-flow-scaffolding
to
main
June 11, 2026 12:32
…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>
ede84ee to
a458469
Compare
Contributor
📦 Bundle Size Report
Size Limits
Largest Files (Top 5)
View All Files (356 total)
✅ Bundle size check passed |
Contributor
📊 Coverage Report
|
| 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
Contributor
|
Deploy preview for remote-flows ready!
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PayrollAdminOnboardingFlowfor Global Payroll admin onboardingPOST /v1/employmentswithtype: global_payroll_employeePUT /v2/employments/:id/contract_detailsandPUT /v2/employments/:id/administrative_detailsmutateAsyncOrThrow(no deprecatedmutateAsync)useStepSubmitHandlerhook extracted to eliminate duplicated try/catch/navigate logic across form step componentsCloses PBYR-4044 · Part of PBYR-3935
Test plan
npm run type-checkpassesnpm test -- --runpasses (781 tests)npm run check-formatclean🤖 Generated with Claude Code