Skip to content

chore: replace FormControl with PhoneInput component for phone field#287

Open
harshtandiya wants to merge 1 commit into
developfrom
claude/issue-275-fix-ctcgwb
Open

chore: replace FormControl with PhoneInput component for phone field#287
harshtandiya wants to merge 1 commit into
developfrom
claude/issue-275-fix-ctcgwb

Conversation

@harshtandiya

Copy link
Copy Markdown
Collaborator

Summary

Refactored the phone number input field in the ProposalEditDialog to use a dedicated PhoneInput component instead of a generic FormControl with type="tel".

Changes

  • Replaced FormControl with PhoneInput component for the phone number field in ProposalEditDialog
  • Added import for the new PhoneInput component from @/components/PhoneInput.vue
  • Removed the type="tel" attribute (now handled by the specialized component)
  • Maintained all existing props: v-if, :label, :placeholder, and v-model binding

Implementation Details

This change improves code organization by using a purpose-built component for phone input handling, which likely includes phone-specific validation, formatting, or accessibility features that were previously missing with the generic FormControl approach.

https://claude.ai/code/session_01FZ7AVqnfjnXPQbHQd3RVkK

Swap the plain FormControl (type=tel) phone field in ProposalEditDialog.vue
for the shared PhoneInput component so the dial code and number are edited
separately and saved in Frappe's canonical {isd}-{number} format.

This fixes values being saved without the isd- prefix (which render blank
in Desk's Phone field, same class of bug as #244) and prevents casual edits
of existing hyphen-formatted values from corrupting the format.

Fixes #275

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FZ7AVqnfjnXPQbHQd3RVkK

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

harshtandiya has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@harshtandiya harshtandiya changed the title Replace FormControl with PhoneInput component for phone field chore: replace FormControl with PhoneInput component for phone field Jul 24, 2026
@harshtandiya harshtandiya linked an issue Jul 24, 2026 that may be closed by this pull request
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.

fix: phone field on Edit Proposal dialog

2 participants