Skip to content

fix: allow saving optional phone number and improve visibility conditions (#408) - #409

Merged
ymaheshwari1 merged 2 commits into
hotwax:mainfrom
AjinkyaM1:phone-number-saving-fix
Jan 30, 2026
Merged

ymaheshwari1 merged 2 commits into
hotwax:mainfrom
AjinkyaM1:phone-number-saving-fix

Conversation

@AjinkyaM1

Copy link
Copy Markdown

This PR addresses the issue where the user cannot save changes when removing the facility phone number in the Facility Details address modal.

Changes

  1. Fix Validation: Updated isTelecomNumberUpdated() in FacilityAddressModal.vue to remove a falsy check, allowing empty contact numbers to be detected as valid updates.
  2. Improve UI Logic:
    • Updated FacilityAddressModal.vue to hide the country code prefix when the contact number input is empty.
    • Updated FacilityDetails.vue to hide the phone line entirely if the contact number is missing.

Issue

Closes #408

Verification

Please refer to the issue description for detailed verification steps.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @AjinkyaM1, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves a critical bug preventing users from saving changes when removing a facility's phone number. Additionally, it enhances the user interface by ensuring that phone number related fields and displays are only visible when an actual contact number is provided, improving clarity and reducing visual clutter across the application.

Highlights

  • Validation Fix: The validation logic for telecom numbers in FacilityAddressModal.vue has been updated to correctly detect changes when a phone number is removed, resolving an issue where users couldn't save such changes.
  • UI Improvement (Address Modal): The country code prefix in the FacilityAddressModal.vue is now conditionally displayed, appearing only when a contact number is present, leading to a cleaner UI.
  • UI Improvement (Facility Details): The FacilityDetails.vue component now hides the entire phone number line if the contact number is empty, preventing the display of incomplete or placeholder phone numbers.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request correctly addresses an issue with saving an optional phone number by adjusting the validation logic in isTelecomNumberUpdated. The UI has also been improved to conditionally display the country code and the entire phone number line based on whether a number is present. The changes are logical and well-implemented. I've provided a couple of suggestions to further enhance code quality: one for a more robust comparison logic using Object.is, and another to prevent potential display issues with undefined values in the phone number.

Comment thread src/components/FacilityAddressModal.vue Outdated
Comment thread src/views/FacilityDetails.vue Outdated
@AjinkyaM1 AjinkyaM1 self-assigned this Jan 30, 2026
@ymaheshwari1
ymaheshwari1 merged commit 5f65797 into hotwax:main Jan 30, 2026
2 checks 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

Development

Successfully merging this pull request may close these issues.

Unable to save when removing facility phone number

2 participants