-
Notifications
You must be signed in to change notification settings - Fork 1
fix(account): Fixed Vat ID in personal data form #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(account): Fixed Vat ID in personal data form #176
Conversation
## Walkthrough
The changes standardize the handling of the VAT IDs field across the account profile components and composables. The VAT IDs field key is renamed from `'vatIds[]'` to `vatIds` in form schemas and template slots, and the value is converted to an array before being sent to the API, ensuring compatibility with backend expectations.
## Changes
| File(s) | Change Summary |
|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
| components/account/page/AccountPageProfile.vue | Converts `vatIds` from a string to an array before API call in `doUpdatePersonalData`. |
| components/account/page/AccountPageProfileInner.vue | Corrects Vue template slot name from `vatIds[]` to `vatIds`. |
| composables/usePondForm.ts | Renames form schema key from `'vatIds[]'` to `vatIds` in `getPersonalDataForm` and dependencies. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant User
participant AccountPageProfile
participant API
User->>AccountPageProfile: Submit personal data form (vatIds as string)
AccountPageProfile->>AccountPageProfile: Convert vatIds string to array
AccountPageProfile->>API: updatePersonalInfo({ ...personalDataForm, vatIds: [vatIds] })
API-->>AccountPageProfile: Response
AccountPageProfile-->>User: Show result
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🔭 Outside diff range comments (2)
composables/usePondForm.ts (1)
80-80
: Critical inconsistency: Update dependency target field name.The dependency configuration still references
'vatIds[]'
but the schema field was renamed tovatIds
on line 44. This will break the conditional hiding logic for the VAT ID field.Apply this diff to fix the inconsistency:
- targetField: 'vatIds[]', + targetField: 'vatIds',components/account/page/AccountPageProfileInner.vue (1)
94-94
: Critical inconsistency: Update field config key to match template slot.The field config still references
'vatIds[]'
for the label, but the template slot was renamed tovatIds
on line 159. This inconsistency will prevent the label from being properly associated with the field.Apply this diff to fix the inconsistency:
- 'vatIds[]': { label: $t('account.customer.vat') }, + vatIds: { label: $t('account.customer.vat') },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
components/account/page/AccountPageProfile.vue
(1 hunks)components/account/page/AccountPageProfileInner.vue
(1 hunks)composables/usePondForm.ts
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: review-app
🔇 Additional comments (2)
composables/usePondForm.ts (1)
44-44
: LGTM! Field naming standardized.The schema field key has been correctly updated from
'vatIds[]'
tovatIds
to standardize the naming convention.components/account/page/AccountPageProfileInner.vue (1)
159-159
: LGTM! Template slot name corrected.The template slot name has been correctly updated from
vatIds[]
tovatIds
to align with the standardized field naming.
Summary by CodeRabbit