My Account

Profile

Description

  • The User Profile page allows users to view, update, and manage their personal and account-related details.
  • Built using Composition API, TailwindCSS, Pinia Store, and Nuxt 3.
  • Fully responsive with conditional rendering and modal/drawer switching based on screen size.

Purpose

  • Let users modify personal details such as name, contact information, company data, and VAT number.
  • Provide the ability to update the password and username securely.
  • Offer access to address management and the option to delete the account.

Use Cases

  • Edit Personal Information: Update fields like name, email, mobile, telephone, company, etc.
  • Change Password: Securely change the current password after verifying the old one.
  • Edit Username: Allow username changes via modal (desktop) or drawer (mobile).
  • Manage Addresses: Navigate to address management for viewing or editing saved addresses.
  • Delete Account: Trigger a confirmation modal for permanent account deletion.

Expectations

  • Display fallback spinner (TsLoadingCircularSpinner) while user profile is loading.
  • Render editable form fields with validation for required and formatted data.
  • Show disabled username field; edits are triggered via modal or drawer.
  • Save button is disabled if there are validation errors or during form submission.
  • Username and address edit cards open appropriate interfaces (modal/drawer/navigation).
  • Change password section behaves as accordion with conditional steps (verify old passwordinput new password).
  • Show confirmation modal before account deletion with final warning.

Developer Strategies

  • Lazy-load components like TsModalUserNameUpdate, TsDrawer, TsAccordion, etc., via defineAsyncComponent.
  • Clone and store user profile locally in accountStore for isolated form management.
  • Use watch() to observe form error states and control the save button.
  • Validation methods (validateEmail, handleTextValidation, handleNumValidation) ensure input correctness.
  • Use useTranslation() for i18n string rendering across all fields and labels.
  • Toggle between TsModal and TsDrawer for username editing based on isMobile.

TODOs for Developer

  • Add input masking for phone fields.
  • Improve error summary for all form validation feedback.
  • Add toast feedback on success/failure of profile update or password change.
  • Add rate limiting or debounce to prevent spamming update requests.
  • Improve accessibility (ARIA roles for modal, drawer, form labels).
  • Implement username availability check before update.
  • Add confirmation step before password change if needed.

API Endpoints

ActionEndpointDescription
updateCustomer()"/customers/" + accountStore.profile.idUpdates user profile fields.
updateUserName()/customers/${customerId}Updates the username.
verifyCurrentPassword()/customers/auth/loginVerifies if the current password is valid.
changePassword()"/customers/" + accountStore.profile.id + "/password"Changes the password using new credentials.
deleteCustomer()/customers/${accountStore.profile.id}/request-account-deletionDeletes the account from the system.

Components Used

Component | Description

ActionEndpoint
TsNuxtCardCard layout used for grouping form sections and UI blocks.
TsTypographyUsed for headings and inline text.
TsLabelCustom label wrapper with floating support.
TsInputForm input field with variant-based styling.
TsSelectBoxDropdown select component for titles.
TsButtonButtons for form actions and interactions.
TsIconIcon utility used across modals and drawers.
TsDrawerDrawer UI used on mobile devices.
TsModalModal UI for desktop interactions.
TsAccordion, TsAccordionTabExpandable sections used for password change flow.
TsLoadingCircularSpinnerSpinner shown when profile data is loading.
TsModalUserNameUpdateModal content component for username updates.

Flow Summary

Step: 1

  • Show TsLoadingCircularSpinner if accountStore.profile is not yet loaded. Loader

Step: 2

  • Render a profile form inside TsNuxtCard with sections for personal and business data. Form Profile

Step: 3

  • Include interactive elements like select dropdown for titles and floating labels with validation feedback. Validation lables

Step: 4

  • Show separate clickable cards for username edit (via modal/drawer) and address management navigation. Cards Clickable

Step: 5

  • Use TsAccordion for password change flow: verify → change → confirm. Accordion

Step: 6

  • When you type wrong Password, validation message seen. Password Change Fail
  • When user type password correct : Password Change Success

Step: 7

  • Render confirmation modal before account deletion with clear call-to-action. Confirmation Modal

Copyright © 2026