Assist_Design/docs/plans/2026-02-24-whmcs-migration-simplification-design.md

44 lines
1.9 KiB
Markdown
Raw Normal View History

2026-02-24 11:09:35 +09:00
# WHMCS Migration Form Simplification
## Problem
WHMCS migration users (account status `whmcs_unmapped`) are asked for date of birth and gender during the migrate-account step. However, WHMCS already has this data on file. Only a password is needed to create the portal account.
## Decision
Remove DOB and gender fields from the WHMCS migration form. Keep password, terms, and marketing consent. Continue showing pre-filled read-only info (name, email, phone, address).
## Changes
### 1. Domain Schema (`packages/domain/get-started/schema.ts`)
Make `dateOfBirth` and `gender` optional on `migrateWhmcsAccountRequestSchema`.
### 2. BFF Workflow (`apps/bff/src/modules/auth/infra/workflows/get-started-workflow.service.ts`)
- `migrateWhmcsAccount()`: destructure `dateOfBirth`/`gender` as optional
- `updateWhmcsClientForMigration()`: skip custom field updates when values not provided
- Method signature: make `dateOfBirth` and `gender` optional params
### 3. Frontend — MigrateAccountStep (`apps/portal/src/features/get-started/components/GetStartedForm/steps/MigrateAccountStep.tsx`)
- Remove DOB input field
- Remove gender radio buttons
- Remove local state for `dateOfBirth` and `gender`
- Remove DOB/gender from validation and `canSubmit`
- Remove DOB/gender from `updateFormData` call
### 4. Store (`apps/portal/src/features/get-started/stores/get-started.store.ts`)
- Stop sending `dateOfBirth`/`gender` in the `migrateWhmcsAccount` API call
### 5. Account Status Step (`apps/portal/src/features/get-started/components/GetStartedForm/steps/AccountStatusStep.tsx`)
- Update WHMCS summary card: remove "date of birth" from the "still needed" list
### 6. UAT Docs (`docs/uat/01-signup-and-account-creation.md`)
- Update Step 3 Outcome C: remove "date of birth" from needed items
- Update Step 4b: remove DOB and gender from the form fields list
- Update WHMCS verification: note DOB/gender are not updated during migration