From cedce99986b6117224f191c11a12b97d1e94dede Mon Sep 17 00:00:00 2001 From: mehrzadghdev Date: Sat, 6 Sep 2025 15:51:41 +0330 Subject: [PATCH 1/3] fix: auto zero remove aded to phone number input --- .../components/AuthenticationSteps/CompleteSignUp.tsx | 11 ++++++++++- .../AuthenticationSteps/LoginRegiserForm.tsx | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/features/authentication/components/AuthenticationSteps/CompleteSignUp.tsx b/src/features/authentication/components/AuthenticationSteps/CompleteSignUp.tsx index 6b63783..69a6e97 100644 --- a/src/features/authentication/components/AuthenticationSteps/CompleteSignUp.tsx +++ b/src/features/authentication/components/AuthenticationSteps/CompleteSignUp.tsx @@ -67,6 +67,15 @@ export const CompleteSignUp = ({ } }; + const handleChange = (e: React.ChangeEvent) => { + let newValue = e.target.value; + if (newValue.startsWith('09')) { + newValue = newValue.substring(1); + } + + setValue(newValue); + }; + return ( @@ -85,7 +94,7 @@ export const CompleteSignUp = ({ inputRef={inputRef} label={t('completeSignUp.phoneNumber')} value={value} - onChange={(e) => setValue(e.target.value)} + onChange={handleChange} onBlur={handleBlur} error={inputError} helperText={inputError ? error : ''} diff --git a/src/features/authentication/components/AuthenticationSteps/LoginRegiserForm.tsx b/src/features/authentication/components/AuthenticationSteps/LoginRegiserForm.tsx index dceb8b5..0cb6978 100644 --- a/src/features/authentication/components/AuthenticationSteps/LoginRegiserForm.tsx +++ b/src/features/authentication/components/AuthenticationSteps/LoginRegiserForm.tsx @@ -53,7 +53,11 @@ export function LoginRegisterForm({ ); const handleInputChange = (event: React.ChangeEvent) => { - const newValue = event.target.value; + let newValue = event.target.value; + if (newValue.startsWith('09')) { + newValue = newValue.substring(1); + } + setLoginRegisterValue(newValue); // If the new value contains only digits (or is empty), it's a phone number From 6385a543b54f15d2c711fb08a11d5fbbaff95e08 Mon Sep 17 00:00:00 2001 From: mehrzadghdev Date: Sat, 6 Sep 2025 15:52:38 +0330 Subject: [PATCH 2/3] fix: zero remove for password reset --- .../components/ForgetPassword/ForgettedPasswordInfo.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/features/authentication/components/ForgetPassword/ForgettedPasswordInfo.tsx b/src/features/authentication/components/ForgetPassword/ForgettedPasswordInfo.tsx index 6000dd8..0ab10ab 100644 --- a/src/features/authentication/components/ForgetPassword/ForgettedPasswordInfo.tsx +++ b/src/features/authentication/components/ForgetPassword/ForgettedPasswordInfo.tsx @@ -45,7 +45,10 @@ export function ForgettedPasswordInfo({ } = useApi(sendForgetPassCode); const handleInputChange = (event: React.ChangeEvent) => { - const newValue = event.target.value; + let newValue = event.target.value; + if (newValue.startsWith('09')) { + newValue = newValue.substring(1); + } setForgettedPasswordInfo(newValue); // If the new value contains only digits (or is empty), it's a phone number From e12a6b2dbaba93e37079c2aa05906240606af795 Mon Sep 17 00:00:00 2001 From: mehrzadghdev Date: Sat, 13 Sep 2025 21:34:36 +0330 Subject: [PATCH 3/3] hotfix: urls return --- .env | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 28a64fc..61681a6 100644 --- a/.env +++ b/.env @@ -1,8 +1,8 @@ VITE_GOOGLE_CLIENT_ID=https://272098283932-bft2gvlgjn8edopg0lnqjq1i9ekdmipt.apps.googleusercontent.com VITE_DEFUALT_AUTH_RETURN_URL=/setting/profile -VITE_APP_URL=https://accounts.business-harmony.com -VITE_API_URL=https://accounts.business-harmony.com/apiapp/api -VITE_IDENTITY_URL=https://accounts.business-harmony.com/apiapp/connect/token +VITE_APP_URL=https://account.business-harmony.com +VITE_API_URL=https://accounts.business-harmony.com/api +VITE_IDENTITY_URL=https://accounts.business-harmony.com/connect/token VITE_IDENTITY_CLIENT_ID=harmony_identity VITE_IDENTITY_SCOPE=openid profile offline_access IMAGE_BASE_URL=https://accounts.business-harmony.com/uploads/