feat: Auto-populate the telephone code based on the browser timezone (#10146)
Fixes https://github.com/chatwoot/chatwoot/issues/6228 There is a country code selector for the phone input field. This is often a point of frustration. See the response below. > We are using the phone number field however this can be frustrating for customers, especially mobile users, to select the +1 US country code. Our users are typically local businesses and being able to default to +1 country code in the phone number field or the account would improve the interaction they have with customers. Most people who run local businesses don't need a country selector. However, to preserve the quality of the data we store, we need a country code. A balance between these two issues can be found with an auto-populating country code field based on the browser's timezone. This is what I did in this PR. Based on the browser timezone, we will resolve it to the closest country code.
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
"color2k": "^2.0.2",
|
||||
"company-email-validator": "^1.0.8",
|
||||
"core-js": "3.11.0",
|
||||
"countries-and-timezones": "^3.6.0",
|
||||
"date-fns": "2.21.1",
|
||||
"date-fns-tz": "^1.3.3",
|
||||
"dompurify": "2.2.7",
|
||||
@@ -74,6 +75,7 @@
|
||||
"postcss-loader": "^4.2.0",
|
||||
"semver": "7.5.3",
|
||||
"tailwindcss": "^3.3.2",
|
||||
"timezone-phone-codes": "^0.0.2",
|
||||
"tinykeys": "^2.1.0",
|
||||
"turbolinks": "^5.2.0",
|
||||
"url-loader": "^2.0.0",
|
||||
|
||||
Reference in New Issue
Block a user