Repository navigation
feat(account): handle german customer master data on account creation - #23357
Closed
AlexisAfonso wants to merge 1 commit into
Closed
AlexisAfonso wants to merge 1 commit into
AlexisAfonso wants to merge 1 commit into
Conversation
- 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
requested review from
MehdiZaghouani,
achrafHafedh and
aottr
and
a balanced review from Copilot
and removed request for
a team
November 25, 2026 16:22
Copilot stopped reviewing on behalf of
AlexisAfonso due to an error
November 25, 2026 16:39
Contributor
There was a problem hiding this comment.
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, | ||
| ), |
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.

denamespaceref: #MANAGER-23141