Skip to content

fix: phone field on Edit Proposal dialog #275

Description

@harshtandiya

Problem

ProposalEditDialog.vue renders the phone field as a plain FormControl type="tel" and saves the raw string via frappe.client.set_value:

  • No dial-code handling. The rest of the dashboard uses PhoneInput.vue (Combobox dial code + number, @/utils/phone formatPhone/parsePhone), which produces the {isd}-{number} format the backend expects.
  • A value saved without the isd- prefix renders blank in Desk's Phone field UI (same class of bug as Phone field prepends a duplicate "+91 +91" prefix, causing "Invalid Phone Number" on save #244).
  • Existing hyphen-formatted values (e.g. 91-9876543210) show up in the dialog as-is in a plain text box — editing them casually corrupts the format.

Fix

Swap the plain FormControl in ProposalEditDialog.vue for the shared PhoneInput component so dial code and number are edited separately and saved as {isd}-{number}.

Relevant files:

  • dashboard/src/components/ProposalEditDialog.vue (phone FormControl, save via updateResource.submit)
  • dashboard/src/components/PhoneInput.vue (existing shared component)
  • dashboard/src/utils/phone.ts

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions