Skip to content

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

Merged
merged 6 commits into from
Jun 24, 2025

Conversation

JacquelineKlimmek
Copy link
Contributor

@JacquelineKlimmek JacquelineKlimmek commented Jun 19, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Corrected the handling of VAT IDs in the personal data form to ensure data is sent in the correct array format.
    • Fixed a template slot naming issue for the VAT IDs field to improve form rendering.
    • Updated the VAT IDs field key in the form schema for consistency and proper validation.

Copy link

coderabbitai bot commented Jun 19, 2025

## 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

<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between b13563ac6ed8ff47f783cd80347438bfad6f0086 and 2d8e14ce4aab69d369be0d53f08426f647e43a96.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `components/account/page/AccountPageProfileInner.vue` (2 hunks)
* `composables/usePondForm.ts` (2 hunks)

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (1)</summary>

* components/account/page/AccountPageProfileInner.vue

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* composables/usePondForm.ts

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary>

* GitHub Check: review-app

</details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEejqANiS4AzeAA8AFGgZNsGXAEouAMQd1IADVqSABJABEULG5KRHwMNAtIWmo0SBt8CmYDADlsZgFKLgBGAHYANgMAVUQiyAApFwBHbBILeHIAaXbWEgBrI31jcCgyenwbHAJiMmUaeiZejy5efmFRcSkZeSYlKlV1LR0hkyg4VFRMKcJScip5hSXOSCoAd0hEfOY0Cnk5BT2KjUmm0ujAhmGpgMi248XYiAA9C43B4Edw0KQEQBBVz4dy4AAKGJIBIoE3gVg0ElaHAMACIGQYAMRMyBY0IzO7UAKfVg/eQTRiwTCkRBmWAkIUiyXYbgpGjIXASyAAA1o+Cqcu5BNi8US4VSKvQiFkGAYsDJGDxyBs7jE8HikH+aFotA6RHQCgwbvEeqSAgs+AYfUgSpCZE+FGkoeVKok1FCtEQRrsbXoHRjkpVMQocQSFgNuDQPkyzCNqAyWWoDzQyCuPyofxIlclDES7QwHqVWdl8pJuvzoQwGSNWIJoQ0kAAyjEGPA7G2LBZZAAaFCTOMJpNGkj2JC4OvelB1j64CjutfqY+QV5UbgxdMefCexDuqxgNokNgedAURsAbnXVV41wRNk2vGxEhNS9cGvWpYIIdAsC/bhcHkBs0FkSdzjrWghGwRB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5Ty/F8phQLv5YuJVS6hQrpFQYkBYoLwSikg6ZEEi4FytGfOhdio8HyeXSqldkCOC/rUTu3pf5rhVBYnUuY/SFmLKWFUIT+n0MGXmfUqRwgSLvmaSKKpGE1TYvVYBkAADyGBlxRHsvmWB5894oOQGsyUUYcGNUZA3CEpwKrjEmGgVWc17gBEWMRLgbwPiLSnv8XYygDggmOOCAw9yPnqAAPrwCTJCqMEhzI1VoJCwiPxYJDDBSMJ0NhigqAAEzFHKAAFhdHi9GAgiUkoELQPFaAAAMABOYoRK6XFAABwMrbESglbKACsvK8VsrBIYe5qhXB0vKDYIlGi6Vsr5UShltAADMDAbClBsLygQdLBVKoZRypVxQGW8rpSQJVKrhWYogE6YoSreXlCVS4codA2X8yJeq0obKVW0DZXSpVbqiVKrZQISCtBJV0tleUC19y8XepIMy9GJKVDlEVUq5NhQ6W0F5UqmwsruWSuJaUEgAa0AMsjRi8FLBmBQphYgOFJAEUkCRZCsYwqgA -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=basecom/pond&utm_content=176):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

Copy link

@coderabbitai coderabbitai bot left a 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 to vatIds 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 to vatIds 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3c420d4 and bf1ab21.

📒 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[]' to vatIds 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[] to vatIds to align with the standardized field naming.

@JacquelineKlimmek JacquelineKlimmek marked this pull request as draft June 19, 2025 11:40
@JacquelineKlimmek JacquelineKlimmek marked this pull request as ready for review June 19, 2025 12:02
@aheartforspinach aheartforspinach changed the title fix(profile): Fixed Vat ID in personal data form fix(account): Fixed Vat ID in personal data form Jun 20, 2025
@JacquelineKlimmek JacquelineKlimmek merged commit bf45699 into release/v0.2 Jun 24, 2025
4 checks passed
@JacquelineKlimmek JacquelineKlimmek deleted the bugfix/POND-43-account-your-profile branch June 24, 2025 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

3 participants