Skip to content

feat(account): handle german customer master data on account creation - #23357

Closed
AlexisAfonso wants to merge 1 commit into
release/gcj-w48from
feat/MANAGER-23141-account-creation-gcj-w48
Closed

AlexisAfonso wants to merge 1 commit into
release/gcj-w48from
feat/MANAGER-23141-account-creation-gcj-w48

Conversation

@AlexisAfonso

Copy link
Copy Markdown
Contributor
  • German organisations follow /newAccount/rules for which identifiers show, whether they are mandatory and their formats; the register id is checked as its EUID
  • Register id typed as a court of GET /me/suggest/germanRegistersByCourt and a number, sent as one EUID; "no USt-IdNr." choice; Company "at least one identifier" rule; identifiers the legal form drops sent empty
  • Helpers ported from the manager-gcj-account account-rules de namespace
  • The national identification number asterisk reads its own rule

ref: #MANAGER-23141

- German organisations follow /newAccount/rules for which identifiers
  show, whether they are mandatory and their formats; the register id is
  checked as its EUID
- Register id typed as a court of GET /me/suggest/germanRegistersByCourt
  and a number, sent as one EUID; "no USt-IdNr." choice; Company "at
  least one identifier" rule; identifiers the legal form drops sent empty
- Helpers ported from the manager-gcj-account account-rules `de` namespace
- The national identification number asterisk reads its own rule

ref: #MANAGER-23141

Signed-off-by: Alexis Afonso <alexis.afonso@ovhcloud.com>
@AlexisAfonso
AlexisAfonso requested a review from a team as a code owner November 25, 2026 16:22
@AlexisAfonso
AlexisAfonso requested review from MehdiZaghouani, achrafHafedh and aottr and a balanced review from Copilot and removed request for a team November 25, 2026 16:22
@AlexisAfonso
AlexisAfonso deleted the feat/MANAGER-23141-account-creation-gcj-w48 branch November 25, 2026 16:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to run its full agentic suite in this review.

Copilot review overview

3 open issues
What changed in this PR

Adds Germany-specific account-creation behavior for identifiers (W-IdNr., register id → EUID, VAT opt-out) and integrates a new court list suggestion endpoint to drive register court selection.

Changes:

  • Introduces German register court/types models + API/hook to fetch /me/suggest/germanRegistersByCourt.
  • Adds Germany helper logic (EUID building, court filtering, “at least one identifier” rule, dropped identifiers handling).
  • Updates Account Details form UI/validation and adds comprehensive tests for German account creation flows.
File Description
packages/​manager/​apps/​account-creation/​src/​types/​suggestion.ts Adds types/enums for German register courts and register types returned by suggestion API.
packages/​manager/​apps/​account-creation/​src/​pages/​accountDetails/​germanRegisterId/​GermanRegisterId.component.tsx New component to select a German register court and input register number/type.
packages/​manager/​apps/​account-creation/​src/​pages/​accountDetails/​accountDetails.page.tsx Integrates German-specific identifier UI/logic, VAT opt-out, EUID building, and submit blocking.
packages/​manager/​apps/​account-creation/​src/​pages/​accountDetails/​accountDetails.page.spec.tsx Adds end-to-end-ish tests covering German identifier flows and submission payloads.
packages/​manager/​apps/​account-creation/​src/​helpers/​germany/​germanyHelper.ts New helper utilities for German scope, identifiers, court filtering, and EUID formatting.
packages/​manager/​apps/​account-creation/​src/​helpers/​germany/​germanyHelper.spec.ts Unit tests for the Germany helper utilities.
packages/​manager/​apps/​account-creation/​src/​data/​hooks/​useGermanRegisterCourts.ts New React Query hook for fetching German register courts once when needed.
packages/​manager/​apps/​account-creation/​src/​data/​api/​suggestion.ts Adds getGermanRegistersByCourt() API call.
packages/​manager/​apps/​account-creation/​public/​translations/​account-details/​Messages_fr_FR.json Adds FR translations for newly introduced Germany-specific UI strings.

Review effort: Lite

// (never on mount, an untouched field shows no error).
useEffect(() => {
if (noVatSwitched.current) trigger('vat');
}, [noVat]);
}
hasError={!!errors[name]}
onOdsChange={germanScope ? toIdentifier(onChange) : onChange}
onBlur={onBlur}
Comment on lines +974 to +979
onChange(
germany.toEuid(
next.court,
next.number,
germany.REGISTER_TYPES,
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants