fix phone imports
This commit is contained in:
2
.env
2
.env
@ -16,6 +16,8 @@ DATABASE_PROVIDER=mysql
|
||||
DATABASE_URL=mysql://root:Zelen0ku4e@192.168.0.10:3306/cart_dev
|
||||
# DATABASE_URL=mysql://cart:cartpw@20.101.62.76:3307/cart
|
||||
|
||||
#DATABASE_URL=mysql://cart:cartpw@localhost:3306/cart # migrate deploy #dev
|
||||
|
||||
APPLE_ID=
|
||||
APPLE_TEAM_ID=
|
||||
APPLE_PRIVATE_KEY=
|
||||
|
@ -10,6 +10,7 @@ SSL_ENABLED=true
|
||||
SSL_KEY=./certificates/localhost-key.pem
|
||||
SSL_CERT=./certificates/localhost.pem
|
||||
|
||||
DATABASE_URL=mysql://root:Zelen0ku4e@192.168.0.10:3306/cart_dev
|
||||
# DATABASE_URL=mysql://root:Zelen0ku4e@192.168.0.10:3306/cart_dev
|
||||
DATABASE_URL=mysql://cart:cartpw@localhost:3306/cart
|
||||
|
||||
TELEGRAM_BOT=true
|
@ -155,7 +155,7 @@ export default function ImportPage() {
|
||||
//phone = phone.replace(/(?!^\+)\D/g, '');
|
||||
phone = phone.replace(/[^+\d]/g, '');
|
||||
if (phone.startsWith('8') || phone.startsWith('9')) {
|
||||
phone = '+359' + phone.substring(1); // Assumes all numbers starting with 8 are Bulgarian and should have +359
|
||||
phone = '+359' + phone
|
||||
} else if (!phone.startsWith('+')) {
|
||||
phone = '+' + phone; // Add + if it's missing, assuming the number is complete
|
||||
}
|
||||
|
Reference in New Issue
Block a user