diff --git a/public/locales/en/completionForm.json b/public/locales/en/completionForm.json
new file mode 100644
index 0000000..4ffaedd
--- /dev/null
+++ b/public/locales/en/completionForm.json
@@ -0,0 +1,31 @@
+{
+ "completion": {
+ "title": "Completion of user account information",
+ "description": "Enter your business information",
+ "name": "Name",
+ "familyName": "Family Name",
+ "gender": "Gender",
+ "optionalNationalCode": "National Code(Optional)",
+ "determinePassword": "Determine Password",
+ "password": "Password",
+ "passwordRepetition": "Repeat password",
+ "determineEmail": "Connect your email",
+ "email": "Email",
+ "vericationCodeButton": "Send verification code",
+ "verificationCode": "verification code",
+ "checkCodeButton": "Check code",
+ "registerButton": "Confirm and Register",
+ "man": "male",
+ "woman": "female",
+ "hasNumber": "includes number",
+ "hasMinLength": "at least 8 characters",
+ "hasUpperAndLower": "includes a lowercase and uppercase letter",
+ "hasSpecialChar": "includes sign (!@#$%^&*)",
+ "notCompatibility": "does not match",
+ "emailCorrectForm": "Enter the correct email form.",
+ "agreementPart1": "By continuing the registration process, you agree to the",
+ "agreementLinkText": " Harmony Terms and Conditions",
+ "agreementPart2": ".",
+ "sent": "sent"
+ }
+}
diff --git a/public/locales/fa/completionForm.json b/public/locales/fa/completionForm.json
index bd9a9bd..0f7e883 100644
--- a/public/locales/fa/completionForm.json
+++ b/public/locales/fa/completionForm.json
@@ -25,6 +25,7 @@
"emailCorrectForm": "فرم درست ایمیل را وارد کنید",
"agreementPart1": " ادامه فرایند ثبت نام به منزله تایید و قبول",
"agreementLinkText": " قوانین و مقررات هارمونی",
- "agreementPart2": "می باشد."
+ "agreementPart2": "می باشد.",
+ "sent": "ارسال شد!"
}
}
diff --git a/src/App.tsx b/src/App.tsx
index f1bd30e..dcc2651 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -9,6 +9,7 @@ import {
import './App.css';
import { useTranslation } from 'react-i18next';
import { LanguageManager } from './components/LanguageManager';
+import { UserCompletionForm } from './features/authentication/components/UserCompletionForm';
function App() {
const { t } = useTranslation();
@@ -18,6 +19,7 @@ function App() {
<>
+
{t('helloWorld')}
-
+
{t('completion.determineEmail')}
@@ -89,33 +78,45 @@ export function EmailSection({
}}
InputProps={{
startAdornment:
- buttonState === 'counting' ? (
-
-
-
-
+ !isVerifyingCode && emailVerified ? (
+
+
) : null,
endAdornment:
- !isVerifyingCode && emailVerified ? (
-
+ buttonState === 'counting' ? (
+
+
+
+
+
) : null,
}}
+ inputProps={{
+ style: {
+ paddingLeft: buttonState === 'counting' ? '0px' : undefined,
+ },
+ }}
/>
- {email && (
-
- {correctEmail ? '' : t('completion.emailCorrectForm')}
-
- )}
{!isVerifyingCode && !emailVerified && (
) : (
t('completion.checkCodeButton')
diff --git a/src/features/authentication/components/PasswordSection.tsx b/src/features/authentication/components/PasswordSection.tsx
index 507bc17..3194b07 100644
--- a/src/features/authentication/components/PasswordSection.tsx
+++ b/src/features/authentication/components/PasswordSection.tsx
@@ -45,6 +45,8 @@ export function PasswordSection({
}: PasswordSectionProps) {
const { t } = useTranslation('completionForm');
const [showPasswordText, setShowPasswordText] = useState(false);
+ const [showPasswordRepititonText, setShowPasswordRepetitionText] =
+ useState(false);
const handleTogglePasswordSection = (
e: React.ChangeEvent,
@@ -56,6 +58,10 @@ export function PasswordSection({
setShowPasswordText((prev) => !prev);
};
+ const handleTogglePasswordRepetitionEye = () => {
+ setShowPasswordRepetitionText((prev) => !prev);
+ };
+
return (
<>
@@ -63,14 +69,10 @@ export function PasswordSection({
-
+
{t('completion.determinePassword')}
@@ -88,25 +90,45 @@ export function PasswordSection({
sx={{ width: '309px' }}
InputProps={{
endAdornment: (
-
- {validPassword && (
-
- )}
-
- {showPasswordText ? (
-
- ) : (
-
+
+
+ {validPassword && (
+
)}
-
+
+ {showPasswordText ? (
+
+ ) : (
+
+ )}
+
+
),
}}
+ inputProps={{
+ style: {
+ paddingRight: validPassword ? '48px' : '20px',
+ },
+ }}
/>
{password && (
@@ -147,28 +169,48 @@ export function PasswordSection({
: ' '
}
sx={{ width: '309px' }}
- type={showPasswordText ? 'text' : 'password'}
+ type={showPasswordRepititonText ? 'text' : 'password'}
InputProps={{
endAdornment: (
-
- {confirmPassword.length > 0 && matchPassword && (
-
- )}
-
- {showPasswordText ? (
-
- ) : (
-
+
+
+ {confirmPassword.length > 0 && matchPassword && (
+
)}
-
+
+ {showPasswordRepititonText ? (
+
+ ) : (
+
+ )}
+
+
),
}}
+ inputProps={{
+ style: {
+ paddingRight: validPassword ? '48px' : '20px',
+ },
+ }}
/>
)}
diff --git a/src/features/authentication/components/PasswordValidation.tsx b/src/features/authentication/components/PasswordValidation.tsx
index 97154fe..9625d2c 100644
--- a/src/features/authentication/components/PasswordValidation.tsx
+++ b/src/features/authentication/components/PasswordValidation.tsx
@@ -14,7 +14,7 @@ export function PasswordValidationItem({
diff --git a/src/features/authentication/components/PersonalInfoFields.tsx b/src/features/authentication/components/PersonalInfoFields.tsx
index fab1045..dd895bd 100644
--- a/src/features/authentication/components/PersonalInfoFields.tsx
+++ b/src/features/authentication/components/PersonalInfoFields.tsx
@@ -44,10 +44,8 @@ export function PersonalInfoFields({ sex, setSex }: PersonalInfoFieldsProps) {
- {t('completion.gender')}
+ {t('completion.gender')}