From fcc4c3374d85b33755f852bcc559db0a8eb5115a Mon Sep 17 00:00:00 2001 From: Blaster4385 Date: Thu, 25 Aug 2022 11:44:08 +0530 Subject: Misc changes and add more translation --- client/src/pages/Update/Address/Address.jsx | 18 ++++------------ client/src/pages/Update/Agreement/Agreement.jsx | 24 +++++++++++----------- client/src/pages/Update/Biometric/Biometric.jsx | 2 +- .../Update/BiometricSelect/BiometricSelect.jsx | 10 +++------ .../Update/DocumentScanner/DocumentScanner.jsx | 19 ++++++++--------- client/src/pages/Update/FormOne/FormOne.jsx | 24 ++++------------------ client/src/pages/Update/Otp/Otp.jsx | 20 +++++++----------- .../src/pages/Update/PhotoCapture/PhotoCapture.jsx | 15 ++++---------- 8 files changed, 44 insertions(+), 88 deletions(-) (limited to 'client/src/pages/Update') diff --git a/client/src/pages/Update/Address/Address.jsx b/client/src/pages/Update/Address/Address.jsx index 0af60a5..39d3f13 100644 --- a/client/src/pages/Update/Address/Address.jsx +++ b/client/src/pages/Update/Address/Address.jsx @@ -55,28 +55,18 @@ const Address = () => { setEditable2(!editable2) } + const description = ['UPDATE_THE_REQUIRED_DETAILS_IN_THE_RELEVANT_FIELDS_BY_CLICKING_THE_EDIT_BUTTON', 'IF_REQUIRED_SELECT_THE_STATE_YOU_BELONG_TO_FROM_THE_DROPDOWN_LIST', 'IF_REQUIRED_SELECT_THE_DISTRICT_YOU_BELONG_TO_FROM_THE_DROPDOWN_LIST_THIS_WONT_SHOW_ANY_OPTIONS_UNTIL_YOU_HAVE_SELECTED_THE_STATE'] + return ( <>
    -
  • - Update the required details in the relevant fields by clicking - the edit button -
  • -
  • - If required, select the state you belong to. from the dropdown - list -
  • -
  • - If required, select the district you belong to. from the - dropdown list. This won't show any options until you have - selected the state -
  • + {description.map((item) => (
  • {t(item)}
  • ))}
} diff --git a/client/src/pages/Update/Agreement/Agreement.jsx b/client/src/pages/Update/Agreement/Agreement.jsx index 22ffa80..720d8a0 100644 --- a/client/src/pages/Update/Agreement/Agreement.jsx +++ b/client/src/pages/Update/Agreement/Agreement.jsx @@ -13,6 +13,8 @@ import { useMutation } from 'react-query' import { ToastContainer, toast } from 'react-toastify' import PopUpModal from '../../../components/Modal/Modal' import 'react-toastify/dist/ReactToastify.css' +import Error from '../../Error/Error' +import Spinner from '../../../components/Spinner/Spinner' const Agreement = () => { const { t } = useTranslation() @@ -32,6 +34,12 @@ const Agreement = () => { mobile: `+91${userData.mobile}`, id: userData._id }) + }, + onLoading: () => { + return + }, + onError: () => { + return } } ) @@ -73,6 +81,8 @@ const Agreement = () => { }, 30000) } + const description = ['CLICK_ON_SEND_OTP', 'YOU_WILL_RECIEVE_AN_OTP_ON_YOUR_MOBILE_NUMBER', 'YOU_CAN_RESEND_THE_OTP_AFTER_30_SECONDS_IF_YOU_HAVENT_RECEIVED_IT_YET', 'CLICK_ON_VERIFY_OTP_TO_VERIFY_YOUR_MOBILE_NUMBER'] + return ( <> { />
    -
  • Click on "SEND OTP"
  • -
  • - You will recieve an OTP on your entered mobile number -
  • -
  • - You can "RESEND" the OTP after 30 seconds, if you - haven't received it yet. -
  • -
  • - Click on "VERIFY OTP" to verify your mobile number -
  • + {description.map((item) => (
  • {t(item)}
  • ))}
} diff --git a/client/src/pages/Update/Biometric/Biometric.jsx b/client/src/pages/Update/Biometric/Biometric.jsx index 10b2776..f8bf028 100644 --- a/client/src/pages/Update/Biometric/Biometric.jsx +++ b/client/src/pages/Update/Biometric/Biometric.jsx @@ -82,7 +82,7 @@ const Biometric = () => { setUserData({ ...userData, photo: oriUserData.photo }) } else if ( predictions[0].class === 'person' && - predictions[0].score > 0.8 + predictions[0].score > 0.7 ) { setPage(4) } else { diff --git a/client/src/pages/Update/BiometricSelect/BiometricSelect.jsx b/client/src/pages/Update/BiometricSelect/BiometricSelect.jsx index a942aef..89d2bfb 100644 --- a/client/src/pages/Update/BiometricSelect/BiometricSelect.jsx +++ b/client/src/pages/Update/BiometricSelect/BiometricSelect.jsx @@ -8,21 +8,17 @@ import { useTranslation } from 'react-i18next' const BiometricSelect = ({ page, setPage }) => { const { t } = useTranslation() + const description = ['CLICK_ON_THE_EDIT_BUTTON_TO_UPDATE_THE_REQUIRED_BIOMETRICS', 'YOU_CAN_EDIT_YOUR_PHOTOGRAPH_/_FINGERPRINTS_/_IRIS_SCANS'] return ( <>
    -
  • - Click on the edit button to update the required biometrics -
  • -
  • - You can edit your Photograph/Fingerprints/Iris Scans -
  • + {description.map((item) => (
  • {t(item)}
  • ))}
} diff --git a/client/src/pages/Update/DocumentScanner/DocumentScanner.jsx b/client/src/pages/Update/DocumentScanner/DocumentScanner.jsx index c4f8ad6..e4bffc9 100644 --- a/client/src/pages/Update/DocumentScanner/DocumentScanner.jsx +++ b/client/src/pages/Update/DocumentScanner/DocumentScanner.jsx @@ -199,31 +199,30 @@ const DocumentScanner = () => { return ( <>
-
  • - Consists of 3 steps : + {t('CONSISTS_OF_3_STEPS')}
      -
    • Proof of Identity:
    • -
    • Proof of Address:
    • -
    • Proof of Date of Birth:
    • +
    • {t('PROOF_OF_IDENTITY')}
    • +
    • {t(t('PROOF_OF_ADDRESS'))}
    • +
    • {t('PROOF_OF_DOB')}
  • - Ensure that your documents are in the center of the frame + {t('ENSURE_THAT_YOUR_DOCUMENTS_ARE_IN_THE_CENTER_OF_THE_FRAME')}
  • - You won't be able to proceed until you have scanned all the - required documents + {t('YOU_WONT_BE_ABLE_TO_PROCEED_UNTIL_YOU_HAVE_SCANNED_ALL_THE_REQUIRED_DOCUMENTS')}
} - /> + />)}
diff --git a/client/src/pages/Update/FormOne/FormOne.jsx b/client/src/pages/Update/FormOne/FormOne.jsx index 2c61fb9..fc7ec1c 100644 --- a/client/src/pages/Update/FormOne/FormOne.jsx +++ b/client/src/pages/Update/FormOne/FormOne.jsx @@ -32,34 +32,18 @@ const FormOne = () => { } }, [userData.gender]) + const description = ['SELECT_YOUR_RESIDENCY_BY_SELECTING_THE_APPROPRIATE_CHECKBOX', 'ENTER_YOUR_FULL_NAME_WITHOUT_ANY_TITLE_OR_SALUTATION', 'SELECT_YOUR_GENDER_BY_CLICKING_ON_THE_APPROPRIATE_CARD', 'SELECT_YOUR_DATE_OF_BIRTH_FROM_THE_PROVIDED_CALENDER'] + return ( <>
    -
  • - Select your residency by selecting the appropriate checkbox -
  • -
  • - Enter your full name without any title or salutation -
  • -
  • - Select your gender by clicking on the appropriate card -
  • -
  • - Select your date of birth from the provided calender -
  • -
  • - Enter your 10 digit mobile number without any prefix or country - code -
  • -
  • - Enter your email address in proper format -
  • + {description.map((item) => (
  • {t(item)}
  • ))}
} diff --git a/client/src/pages/Update/Otp/Otp.jsx b/client/src/pages/Update/Otp/Otp.jsx index 75a4d73..ca792fa 100644 --- a/client/src/pages/Update/Otp/Otp.jsx +++ b/client/src/pages/Update/Otp/Otp.jsx @@ -10,6 +10,7 @@ import { getUserByAadhaar, sendOTP } from '../../../services/apiservice' import SubmitButton from '../../../components/SubmitButton/SubmitButton' import { toast, ToastContainer } from 'react-toastify' import PopUpModal from '../../../components/Modal/Modal' +import Spinner from '../../../components/Spinner/Spinner' import styles from './Otp.module.css' @@ -63,7 +64,7 @@ const Otp = () => { } if (isLoading) { - return
{t('loading')}
+ return } if (isError) { @@ -73,6 +74,9 @@ const Otp = () => { if (data) { setOriUserData(data?.data) } + + const description = ['CLICK_ON_SEND_OTP', 'YOU_WILL_RECIEVE_AN_OTP_ON_YOUR_MOBILE_NUMBER', 'YOU_CAN_RESEND_THE_OTP_AFTER_30_SECONDS_IF_YOU_HAVENT_RECEIVED_IT_YET', 'CLICK_ON_VERIFY_OTP_TO_VERIFY_YOUR_MOBILE_NUMBER'] + return ( <> { />
    -
  • Click on "SEND OTP"
  • -
  • - You will recieve an OTP on your entered mobile number -
  • -
  • - You can "RESEND" the OTP after 30 seconds, if you - haven't received it yet. -
  • -
  • - Click on "VERIFY OTP" to verify your mobile number -
  • + {description.map((item) => (
  • {t(item)}
  • ))}
} diff --git a/client/src/pages/Update/PhotoCapture/PhotoCapture.jsx b/client/src/pages/Update/PhotoCapture/PhotoCapture.jsx index 25f8572..4fd4117 100644 --- a/client/src/pages/Update/PhotoCapture/PhotoCapture.jsx +++ b/client/src/pages/Update/PhotoCapture/PhotoCapture.jsx @@ -30,25 +30,18 @@ const PhotoCapture = () => { } } + const description = ['ENSURE_THAT_YOUR_PHOTO_IS_CLEAR_AND_IN_FOCUS', 'ALSO_ENSURE_THAT_YOU_ARE_IN_THE_CENTER_OF_YOUR_PHOTO', 'YOU_WONT_BE_ABLE_TO_PROCEED_UNTIL_YOU_HAVE_CAPTURED_A_CLEAR_AND_CENTERED_PHOTO'] + return ( <>
    -
  • - Ensure that your photo is clear and in focus -
  • -
  • - Also, ensure that you are in the center of your photo -
  • -
  • - You won't be able to proceed until you have captured a - clear and centered photo -
  • + {description.map((item) => (
  • {t(item)}
  • ))}
} -- cgit