From f1ec269a4a727691f40d84ea008ccec3d0764f97 Mon Sep 17 00:00:00 2001 From: venthon Date: Wed, 28 Aug 2024 11:09:08 +0700 Subject: [PATCH 1/5] bug ES-1342 Signed-off-by: venthon Signed-off-by: venthon --- .../KycProviderList/components/KycProviderCardLayout.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/signup-ui/src/pages/EkycVerificationPage/KycProviderList/components/KycProviderCardLayout.tsx b/signup-ui/src/pages/EkycVerificationPage/KycProviderList/components/KycProviderCardLayout.tsx index e0a6cbf9..3dfc49ce 100644 --- a/signup-ui/src/pages/EkycVerificationPage/KycProviderList/components/KycProviderCardLayout.tsx +++ b/signup-ui/src/pages/EkycVerificationPage/KycProviderList/components/KycProviderCardLayout.tsx @@ -73,13 +73,8 @@ export const KycProviderCardLayout = ({
{providerName}
-
-
- Supported Ids: -
-
Foundation 1, Foundation 2
-
+ From 6d8412134f045fa5b27a1012c0dcf0b8c6f492cd Mon Sep 17 00:00:00 2001 From: venthon Date: Fri, 6 Sep 2024 13:34:57 +0700 Subject: [PATCH 2/5] ES-1626 Signed-off-by: venthon --- signup-ui/src/pages/ResetPasswordPage/ResetPasswordPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/signup-ui/src/pages/ResetPasswordPage/ResetPasswordPage.tsx b/signup-ui/src/pages/ResetPasswordPage/ResetPasswordPage.tsx index 8d936f7b..84c36c3f 100644 --- a/signup-ui/src/pages/ResetPasswordPage/ResetPasswordPage.tsx +++ b/signup-ui/src/pages/ResetPasswordPage/ResetPasswordPage.tsx @@ -1,6 +1,6 @@ -import { useCallback, useEffect, useMemo } from "react"; import { yupResolver } from "@hookform/resolvers/yup"; import { isEqual } from "lodash"; +import { useCallback, useEffect, useMemo } from "react"; import { Resolver, useForm } from "react-hook-form"; import { useTranslation } from "react-i18next"; import * as yup from "yup"; @@ -60,7 +60,7 @@ export const ResetPasswordPage = ({ settings }: ResetPasswordPageProps) => { // Step 1 - UserInfo yup.object({ username: validateUsername(settings), - fullname: validateFullName(settings), + fullname: validateFullName(settings, t), captchaToken: validateCaptchaToken(settings), }), // Step 2 - Otp From f57ec17dbe47e28a3b4fa6cb2978e9fc1ead21c6 Mon Sep 17 00:00:00 2001 From: venthon Date: Fri, 6 Sep 2024 13:41:04 +0700 Subject: [PATCH 3/5] ES-1626 Signed-off-by: venthon --- signup-ui/src/pages/SignUpPage/SignUpPage.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/signup-ui/src/pages/SignUpPage/SignUpPage.tsx b/signup-ui/src/pages/SignUpPage/SignUpPage.tsx index ca7f5e44..c9e93030 100644 --- a/signup-ui/src/pages/SignUpPage/SignUpPage.tsx +++ b/signup-ui/src/pages/SignUpPage/SignUpPage.tsx @@ -1,12 +1,11 @@ -import { useCallback, useEffect, useMemo } from "react"; import { yupResolver } from "@hookform/resolvers/yup"; import { useMutationState } from "@tanstack/react-query"; import { isEqual } from "lodash"; +import { useCallback, useEffect, useMemo } from "react"; import { Resolver, useForm } from "react-hook-form"; import { useTranslation } from "react-i18next"; import * as yup from "yup"; -import { Button } from "~components/ui/button"; import { Form } from "~components/ui/form"; import { keys as mutationKeys } from "~pages/shared/mutations"; import { @@ -88,7 +87,7 @@ export const SignUpPage = ({ settings }: SignUpPageProps) => { // Step 4 - Account Setup Validation yup.object({ username: yup.string(), - fullNameInKhmer: validateFullName(settings), + fullNameInKhmer: validateFullName(settings, t), password: validatePassword(settings), confirmPassword: validateConfirmPassword("password", settings, true), consent: yup.bool().oneOf([true], t("terms_and_conditions_validation")), From 907c9d43abdb9115cb257229a22eaab9f68b976e Mon Sep 17 00:00:00 2001 From: venthon Date: Fri, 6 Sep 2024 13:42:12 +0700 Subject: [PATCH 4/5] ES-1626 Signed-off-by: venthon --- signup-ui/src/pages/shared/validation.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/signup-ui/src/pages/shared/validation.ts b/signup-ui/src/pages/shared/validation.ts index 164ac205..7a1c7da7 100644 --- a/signup-ui/src/pages/shared/validation.ts +++ b/signup-ui/src/pages/shared/validation.ts @@ -1,4 +1,4 @@ -import i18next from "i18next"; +import { TFunction } from "i18next"; import * as yup from "yup"; import { SettingsDto } from "~typings/types"; @@ -21,20 +21,20 @@ export const validateCaptchaToken = (settings: any) => settings.response.configs["send-challenge.captcha.required"] && yup.string().required("captcha_token_validation"); -export const validateFullName = (settings: SettingsDto) => +export const validateFullName = (settings: SettingsDto, t: TFunction<"translation", undefined>) => yup .string() .strict(true) .trim("full_name_all_spaces_validation") .min( settings.response.configs["fullname.length.min"], - i18next.t("full_name_min_validation", { + t("full_name_min_validation", { minLength: settings.response.configs["fullname.length.min"], }) ) .max( settings.response.configs["fullname.length.max"], - i18next.t("full_name_max_validation", { + t("full_name_max_validation", { maxLength: settings.response.configs["fullname.length.max"], }) ) From 7b175367a0dc42733b51fb57d7909ba8c76e519e Mon Sep 17 00:00:00 2001 From: venthon Date: Tue, 10 Sep 2024 10:23:25 +0700 Subject: [PATCH 5/5] ES-1626 Signed-off-by: venthon --- signup-ui/src/pages/ResetPasswordPage/ResetPasswordPage.tsx | 2 +- signup-ui/src/pages/SignUpPage/SignUpPage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/signup-ui/src/pages/ResetPasswordPage/ResetPasswordPage.tsx b/signup-ui/src/pages/ResetPasswordPage/ResetPasswordPage.tsx index 84c36c3f..f9e4fc80 100644 --- a/signup-ui/src/pages/ResetPasswordPage/ResetPasswordPage.tsx +++ b/signup-ui/src/pages/ResetPasswordPage/ResetPasswordPage.tsx @@ -60,7 +60,7 @@ export const ResetPasswordPage = ({ settings }: ResetPasswordPageProps) => { // Step 1 - UserInfo yup.object({ username: validateUsername(settings), - fullname: validateFullName(settings, t), + fullname: validateFullName(settings,t), captchaToken: validateCaptchaToken(settings), }), // Step 2 - Otp diff --git a/signup-ui/src/pages/SignUpPage/SignUpPage.tsx b/signup-ui/src/pages/SignUpPage/SignUpPage.tsx index c9e93030..c97b2309 100644 --- a/signup-ui/src/pages/SignUpPage/SignUpPage.tsx +++ b/signup-ui/src/pages/SignUpPage/SignUpPage.tsx @@ -87,7 +87,7 @@ export const SignUpPage = ({ settings }: SignUpPageProps) => { // Step 4 - Account Setup Validation yup.object({ username: yup.string(), - fullNameInKhmer: validateFullName(settings, t), + fullNameInKhmer: validateFullName(settings,t), password: validatePassword(settings), confirmPassword: validateConfirmPassword("password", settings, true), consent: yup.bool().oneOf([true], t("terms_and_conditions_validation")),