Skip to content

Conversation

@sorrell
Copy link
Contributor

@sorrell sorrell commented Jul 31, 2025

Contact Management Improvements

This PR improves contact management with phone number formatting and UX enhancements to the contact form.

Changes

Phone Number Formatting (bfcc011)

  1. E164 Storage Format - Phone numbers are now stored in E164 format for consistency
  2. Country-aware Display - Phone numbers display in national format for US/Canada, international format for others
  3. Improved Validation - New ValidPhoneNumber rule that handles international numbers with + prefix
  4. Utility Classes - Added FormatPhoneForE164 and FormatPhoneForCountry for consistent formatting

Contact Form UX Improvements

  1. Default contact type to "General" (97eedee) - When adding a contact from the customer page, the contact type now defaults to "General" automatically since it's the only available option for customers. Users no longer need to manually select it.

  2. Keyboard shortcuts (73e267b) - Added keyboard support to the contact form dialog:

    • Enter key: Submits the form (creates or updates the contact)
    • Esc key: Closes the dialog (already handled by Dialog component)
  3. Form clearing (95b082c) - Fixed an issue where form data persisted between uses. The form now properly clears all fields:

    • After successful submission (both create and update)
    • When clicking the Cancel button
    • When closing the dialog (Esc key or clicking outside)

Fixes

@sorrell sorrell requested a review from adrenallen July 31, 2025 19:14
@sorrell sorrell merged commit 5075d2c into main Aug 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants