Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default address country 🗺️ & Phone prefix ☎️ #8614

Merged
merged 31 commits into from
Dec 2, 2024
Merged

Conversation

guillim
Copy link
Contributor

@guillim guillim commented Nov 20, 2024

Default address 🗺️ country & Phone ☎️ country

We add the ability to add a Default address country and a default Phone country for fields in the Data model.

fix #8081

@guillim guillim self-assigned this Nov 20, 2024
@guillim guillim marked this pull request as ready for review November 26, 2024 16:08
@twentyhq twentyhq deleted a comment from github-actions bot Nov 26, 2024
@twentyhq twentyhq deleted a comment from github-actions bot Nov 27, 2024
@guillim
Copy link
Contributor Author

guillim commented Nov 27, 2024

Left to be done :

  • this guy SettingsOptionCardContentSelect has an onChange typing issue I did not manage to solve so far
  • PhonesFieldInput does not load in table mode the default phone country. Still WIP
  • error detected when opening address field, selecting "No country" and clicking outside : it writes 'Afghanistan' when the default country for the address is Afghanistan

@twentyhq twentyhq deleted a comment from github-actions bot Nov 27, 2024
@guillim guillim enabled auto-merge (squash) December 2, 2024 12:23
@guillim guillim merged commit 0527bc2 into main Dec 2, 2024
19 checks passed
@guillim guillim deleted the feature-8081 branch December 2, 2024 12:34
Copy link

github-actions bot commented Dec 2, 2024

Thanks @guillim for your contribution!
This marks your 12th PR on the repo. You're top 3% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

guillim added a commit that referenced this pull request Dec 5, 2024
Fixes #8838 

1. Summary
It seems [this PR](#8614) caused
the issue. We added a plus sign on front-end when the
[callingCode](https://github.com/twentyhq/twenty/blob/c735026f6c4f011e82e80713f1554b5cdb4fda5b/packages/twenty-front/src/modules/ui/field/display/components/PhonesDisplay.tsx#L70)
retrieved from back-end already has a plus sign.

2. Solution
@guillim Please let me know if I missed a case where the plus sign is
not there for the `callingCode`. If so, I think we should check whether
or not `callingCode` has a leading plus sign on front-end before adding
it. For now, I just removed the code that appends a plus sign on
front-end.

3. Screenshots

![localhost_3001_objects_people_view=f4aee583-9d0c-4961-a6e1-fd66bc51dfd5](https://github.com/user-attachments/assets/9fe8b361-47b9-4e3f-82b7-570713cf430c)

---------

Co-authored-by: guillim <[email protected]>
Co-authored-by: Guillim <[email protected]>
Co-authored-by: Weiko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add ability to select a default country for the Address and Phone fields
2 participants