Skip to content

Conversation

@maria-aluko
Copy link
Contributor

This pull request introduces improvements to the cart checkout flow and user profile completion checks. The main changes ensure that users must have both a name and an address on their profile before booking, and restrict checkout access based on user roles. Additionally, the UI now provides clearer feedback for disabled checkout actions and improves accessibility.

Profile Completion Logic:

  • Updated useProfileCompletion hook to require both name and address for profile completion, adding hasAddress to the status and updating missing fields logic. [1] [2] [3]
  • The profile completion modal now reflects the address requirement in its UI.

Role-Based Checkout Restrictions:

  • Added logic to disable checkout for certain user roles (e.g., super_admin, non-global users) and display an appropriate error message. [1] [2] [3] [4]

User Interface Enhancements:

  • Checkout button now shows a tooltip explaining why checkout is disabled, improving user feedback. [1] [2]
  • Improved layout and styling for modal footer and button variants for better accessibility and consistency. [1] [2]

Data Loading Improvements:

  • Ensured user addresses are loaded for profile completion checks by dispatching getUserAddresses when the cart page is loaded.

@supabase
Copy link

supabase bot commented Sep 26, 2025

This pull request has been ignored for the connected project rcbddkhvysexkvgqpcud because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@JonathanGian JonathanGian self-assigned this Sep 29, 2025
@JonathanGian JonathanGian merged commit a541810 into develop Sep 29, 2025
5 checks passed
@JonathanGian JonathanGian deleted the CON2-397-Put-the-address-completion-back-when-checking-out branch September 29, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants