fix: allow saving optional phone number and improve visibility conditions (#408) - #409
Conversation
Summary of ChangesHello @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
🧠 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 AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
This PR addresses the issue where the user cannot save changes when removing the facility phone number in the Facility Details address modal.
Changes
isTelecomNumberUpdated()inFacilityAddressModal.vueto remove a falsy check, allowing empty contact numbers to be detected as valid updates.FacilityAddressModal.vueto hide the country code prefix when the contact number input is empty.FacilityDetails.vueto 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.