react-native-timacare 3.1.2 → 3.1.4-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/assets/icons/cam2.svg +5 -0
- package/lib/commonjs/assets/icons/chip.svg +20 -0
- package/lib/commonjs/assets/icons/index.js +1 -1
- package/lib/commonjs/assets/icons/index.js.flow +8 -0
- package/lib/commonjs/assets/icons/index.js.map +1 -1
- package/lib/commonjs/assets/icons/ocr.svg +11 -0
- package/lib/commonjs/assets/icons/takePhoto.svg +20 -0
- package/lib/commonjs/assets/icons/tima_small.svg +12 -23
- package/lib/commonjs/assets/svgs/back.svg +4 -0
- package/lib/commonjs/assets/svgs/complete.svg +27 -0
- package/lib/commonjs/assets/svgs/currentStep.svg +28 -0
- package/lib/commonjs/assets/svgs/edit.svg +42 -0
- package/lib/commonjs/assets/svgs/edit_success.svg +15 -0
- package/lib/commonjs/assets/svgs/ekyc.svg +18 -0
- package/lib/commonjs/assets/svgs/ekyc_success.svg +6 -0
- package/lib/commonjs/assets/svgs/index.js +2 -0
- package/lib/commonjs/assets/svgs/index.js.flow +23 -0
- package/lib/commonjs/assets/svgs/index.js.map +1 -0
- package/lib/commonjs/assets/svgs/nextStep.svg +21 -0
- package/lib/commonjs/assets/svgs/notify.svg +18 -0
- package/lib/commonjs/assets/svgs/orc_success.svg +11 -0
- package/lib/commonjs/assets/tts/1000009864.png +0 -0
- package/lib/commonjs/assets/tts/1000009872.png +0 -0
- package/lib/commonjs/assets/tts/1000011964.png +0 -0
- package/lib/commonjs/assets/tts/Banner.png +0 -0
- package/lib/commonjs/assets/tts/Frame 1000011947.png +0 -0
- package/lib/commonjs/assets/tts/Frame1000011946.png +0 -0
- package/lib/commonjs/assets/tts/Frame1000011953.png +0 -0
- package/lib/commonjs/assets/tts/back.png +0 -0
- package/lib/commonjs/assets/tts/front.png +0 -0
- package/lib/commonjs/assets/tts/otp.png +0 -0
- package/lib/commonjs/assets/tts/vehicleRegistration.png +0 -0
- package/lib/commonjs/assets/tts/vehicleStep.png +0 -0
- package/lib/commonjs/components/CIMBLoading.js +1 -1
- package/lib/commonjs/components/CIMBLoading.js.map +1 -1
- package/lib/commonjs/components/CommonSelect.js +1 -1
- package/lib/commonjs/components/CommonSelect.js.map +1 -1
- package/lib/commonjs/components/Loading.js +1 -1
- package/lib/commonjs/components/Loading.js.map +1 -1
- package/lib/commonjs/components/MButton.js +1 -1
- package/lib/commonjs/components/MButton.js.map +1 -1
- package/lib/commonjs/components/MHeader.js +1 -1
- package/lib/commonjs/components/MHeader.js.flow +1 -1
- package/lib/commonjs/components/MHeader.js.map +1 -1
- package/lib/commonjs/components/MSelect.js +2 -0
- package/lib/commonjs/components/MSelect.js.flow +78 -0
- package/lib/commonjs/components/MSelect.js.map +1 -0
- package/lib/commonjs/components/MText.js +1 -1
- package/lib/commonjs/components/MText.js.map +1 -1
- package/lib/commonjs/components/MyTextInput.js +1 -1
- package/lib/commonjs/components/MyTextInput.js.map +1 -1
- package/lib/commonjs/components/StepIndicator.js +2 -0
- package/lib/commonjs/components/StepIndicator.js.flow +85 -0
- package/lib/commonjs/components/StepIndicator.js.map +1 -0
- package/lib/commonjs/components/keyboardspace/index.js +1 -1
- package/lib/commonjs/components/keyboardspace/index.js.map +1 -1
- package/lib/commonjs/components/logoTima/index.js +1 -1
- package/lib/commonjs/components/logoTima/index.js.map +1 -1
- package/lib/commonjs/components/select/index.js +1 -1
- package/lib/commonjs/components/select/index.js.flow +19 -3
- package/lib/commonjs/components/select/index.js.map +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.flow +3 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/navigation/primary-navigator.js +1 -1
- package/lib/commonjs/navigation/primary-navigator.js.flow +81 -1
- package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
- package/lib/commonjs/navigation/root-navigator.js +1 -1
- package/lib/commonjs/navigation/root-navigator.js.map +1 -1
- package/lib/commonjs/screens/Selector.js +1 -1
- package/lib/commonjs/screens/Selector.js.map +1 -1
- package/lib/commonjs/screens/camera/index.js +1 -1
- package/lib/commonjs/screens/camera/index.js.flow +1 -1
- package/lib/commonjs/screens/camera/index.js.map +1 -1
- package/lib/commonjs/screens/cimb-sign/index.js +1 -1
- package/lib/commonjs/screens/cimb-sign/index.js.map +1 -1
- package/lib/commonjs/screens/contract/index.js +1 -1
- package/lib/commonjs/screens/contract/index.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/DetailLoanTima.js +1 -1
- package/lib/commonjs/screens/detail-loan/DetailLoanTima.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/Info.js +1 -1
- package/lib/commonjs/screens/detail-loan/Info.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/Payment.js +1 -1
- package/lib/commonjs/screens/detail-loan/Payment.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentAll.js +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentAll.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentInfo.js +1 -1
- package/lib/commonjs/screens/detail-loan/PaymentInfo.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/QrPayment.js +1 -1
- package/lib/commonjs/screens/detail-loan/QrPayment.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js +1 -1
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/index.js +1 -1
- package/lib/commonjs/screens/detail-loan/index.js.map +1 -1
- package/lib/commonjs/screens/digital-lending/Step1.js +1 -1
- package/lib/commonjs/screens/digital-lending/Step1.js.map +1 -1
- package/lib/commonjs/screens/digital-lending/Step2.js +1 -1
- package/lib/commonjs/screens/digital-lending/Step2.js.map +1 -1
- package/lib/commonjs/screens/digital-lending/Step3.js +1 -1
- package/lib/commonjs/screens/digital-lending/Step3.js.map +1 -1
- package/lib/commonjs/screens/digital-lending/Step4.js +1 -1
- package/lib/commonjs/screens/digital-lending/Step4.js.map +1 -1
- package/lib/commonjs/screens/digital-lending/Step5.js +1 -1
- package/lib/commonjs/screens/digital-lending/Step5.js.map +1 -1
- package/lib/commonjs/screens/digital-lending/Step6.js +1 -1
- package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -1
- package/lib/commonjs/screens/digital-lending/index.js +1 -1
- package/lib/commonjs/screens/digital-lending/index.js.map +1 -1
- package/lib/commonjs/screens/eSign/PreviewContract.js +1 -1
- package/lib/commonjs/screens/eSign/PreviewContract.js.map +1 -1
- package/lib/commonjs/screens/eSign/Store.js +1 -1
- package/lib/commonjs/screens/eSign/Store.js.flow +9 -2
- package/lib/commonjs/screens/eSign/Store.js.map +1 -1
- package/lib/commonjs/screens/eSign/index.js +1 -1
- package/lib/commonjs/screens/eSign/index.js.flow +4 -1
- package/lib/commonjs/screens/eSign/index.js.map +1 -1
- package/lib/commonjs/screens/forgotPassword/index.js +1 -1
- package/lib/commonjs/screens/forgotPassword/index.js.map +1 -1
- package/lib/commonjs/screens/full-submit/accept_policy.js +1 -1
- package/lib/commonjs/screens/full-submit/accept_policy.js.map +1 -1
- package/lib/commonjs/screens/full-submit/index.js +1 -1
- package/lib/commonjs/screens/full-submit/index.js.flow +7 -7
- package/lib/commonjs/screens/full-submit/index.js.map +1 -1
- package/lib/commonjs/screens/full-submit/selfie.js +1 -1
- package/lib/commonjs/screens/full-submit/selfie.js.map +1 -1
- package/lib/commonjs/screens/full-submit/update-document.js +1 -1
- package/lib/commonjs/screens/full-submit/update-document.js.flow +1 -1
- package/lib/commonjs/screens/full-submit/update-document.js.map +1 -1
- package/lib/commonjs/screens/full-submit/update-info.js +1 -1
- package/lib/commonjs/screens/full-submit/update-info.js.flow +1 -1
- package/lib/commonjs/screens/full-submit/update-info.js.map +1 -1
- package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js +1 -1
- package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js.map +1 -1
- package/lib/commonjs/screens/guide-transfer-bank/index.js +1 -1
- package/lib/commonjs/screens/guide-transfer-bank/index.js.map +1 -1
- package/lib/commonjs/screens/home/CIMBxTima.js +1 -1
- package/lib/commonjs/screens/home/CIMBxTima.js.map +1 -1
- package/lib/commonjs/screens/home/index.js +1 -1
- package/lib/commonjs/screens/home/index.js.flow +1809 -1400
- package/lib/commonjs/screens/home/index.js.map +1 -1
- package/lib/commonjs/screens/intro/index.js +1 -1
- package/lib/commonjs/screens/intro/index.js.map +1 -1
- package/lib/commonjs/screens/introduction/index.js +1 -1
- package/lib/commonjs/screens/introduction/index.js.map +1 -1
- package/lib/commonjs/screens/liveness/LivenessStore.js +1 -1
- package/lib/commonjs/screens/liveness/LivenessStore.js.flow +87 -1
- package/lib/commonjs/screens/liveness/LivenessStore.js.map +1 -1
- package/lib/commonjs/screens/liveness/index.js +1 -1
- package/lib/commonjs/screens/liveness/index.js.map +1 -1
- package/lib/commonjs/screens/liveness-v2/index.js +1 -1
- package/lib/commonjs/screens/liveness-v2/index.js.flow +36 -23
- package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
- package/lib/commonjs/screens/loan/PreviewSchedulePaymentTopup.js +1 -1
- package/lib/commonjs/screens/loan/PreviewSchedulePaymentTopup.js.map +1 -1
- package/lib/commonjs/screens/loan/UpdateLoan.js +1 -1
- package/lib/commonjs/screens/loan/UpdateLoan.js.map +1 -1
- package/lib/commonjs/screens/loginWithPassword/index.js +1 -1
- package/lib/commonjs/screens/loginWithPassword/index.js.map +1 -1
- package/lib/commonjs/screens/main/index.js +1 -1
- package/lib/commonjs/screens/main/index.js.map +1 -1
- package/lib/commonjs/screens/mrz-scanner/index.js +1 -1
- package/lib/commonjs/screens/mrz-scanner/index.js.flow +2 -2
- package/lib/commonjs/screens/mrz-scanner/index.js.map +1 -1
- package/lib/commonjs/screens/nationalID/index.js +1 -1
- package/lib/commonjs/screens/nationalID/index.js.map +1 -1
- package/lib/commonjs/screens/nationalIDBack/index.js +1 -1
- package/lib/commonjs/screens/nationalIDBack/index.js.map +1 -1
- package/lib/commonjs/screens/notification/index.js +1 -1
- package/lib/commonjs/screens/notification/index.js.map +1 -1
- package/lib/commonjs/screens/otp/index.js +1 -1
- package/lib/commonjs/screens/otp/index.js.map +1 -1
- package/lib/commonjs/screens/payment-evidence/Guideline.js +1 -1
- package/lib/commonjs/screens/payment-evidence/Guideline.js.map +1 -1
- package/lib/commonjs/screens/payment-evidence/ModalGuideline.js +1 -1
- package/lib/commonjs/screens/payment-evidence/ModalGuideline.js.map +1 -1
- package/lib/commonjs/screens/payment-evidence/index.js +1 -1
- package/lib/commonjs/screens/payment-evidence/index.js.map +1 -1
- package/lib/commonjs/screens/personal/index.js +1 -1
- package/lib/commonjs/screens/personal/index.js.map +1 -1
- package/lib/commonjs/screens/qualify/index.js +1 -1
- package/lib/commonjs/screens/qualify/index.js.map +1 -1
- package/lib/commonjs/screens/quick-submit/index.js +1 -1
- package/lib/commonjs/screens/quick-submit/index.js.map +1 -1
- package/lib/commonjs/screens/register/index.js +1 -1
- package/lib/commonjs/screens/register/index.js.flow +3 -1
- package/lib/commonjs/screens/register/index.js.map +1 -1
- package/lib/commonjs/screens/schedule-payment/DigitalSchedulePayment.js +1 -1
- package/lib/commonjs/screens/schedule-payment/DigitalSchedulePayment.js.map +1 -1
- package/lib/commonjs/screens/schedule-payment/index.js +1 -1
- package/lib/commonjs/screens/schedule-payment/index.js.map +1 -1
- package/lib/commonjs/screens/schedule-payment/payment-list.js +1 -1
- package/lib/commonjs/screens/schedule-payment/payment-list.js.map +1 -1
- package/lib/commonjs/screens/selfie/index.js +1 -1
- package/lib/commonjs/screens/selfie/index.js.map +1 -1
- package/lib/commonjs/screens/setPassword/confirmPassword.js +1 -1
- package/lib/commonjs/screens/setPassword/confirmPassword.js.map +1 -1
- package/lib/commonjs/screens/setPassword/index.js +1 -1
- package/lib/commonjs/screens/setPassword/index.js.map +1 -1
- package/lib/commonjs/screens/sign-tima/ConfirmContract.js +1 -1
- package/lib/commonjs/screens/sign-tima/ConfirmContract.js.map +1 -1
- package/lib/commonjs/screens/sign-tima/ViewContract.js +1 -1
- package/lib/commonjs/screens/sign-tima/ViewContract.js.map +1 -1
- package/lib/commonjs/screens/splash/index.js +1 -1
- package/lib/commonjs/screens/splash/index.js.map +1 -1
- package/lib/commonjs/screens/terms/QuickTerm.js +1 -1
- package/lib/commonjs/screens/terms/QuickTerm.js.map +1 -1
- package/lib/commonjs/screens/terms/TermScreen.js +1 -1
- package/lib/commonjs/screens/terms/TermScreen.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.flow +373 -0
- package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/OCR.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +831 -0
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.flow +467 -0
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.flow +1007 -0
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.flow +791 -0
- package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.flow +1200 -0
- package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js.flow +242 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDBack.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.flow +247 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.flow +356 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.flow +267 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.flow +143 -0
- package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +477 -0
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.flow +197 -0
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js.flow +239 -0
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationBack.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.flow +240 -0
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -0
- package/lib/commonjs/screens/toan-trinh-so/store.js +2 -0
- package/lib/commonjs/screens/toan-trinh-so/store.js.flow +237 -0
- package/lib/commonjs/screens/toan-trinh-so/store.js.map +1 -0
- package/lib/commonjs/screens/uploadVideo/index.js +1 -1
- package/lib/commonjs/screens/uploadVideo/index.js.map +1 -1
- package/lib/commonjs/services/api/api-config.js +1 -1
- package/lib/commonjs/services/api/api-config.js.flow +2 -2
- package/lib/commonjs/services/api/api-config.js.map +1 -1
- package/lib/commonjs/services/api/api.js +1 -1
- package/lib/commonjs/services/api/api.js.flow +235 -0
- package/lib/commonjs/services/api/api.js.map +1 -1
- package/lib/commonjs/utils/index.js +1 -1
- package/lib/commonjs/utils/index.js.flow +67 -45
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/storage/storage.js +1 -1
- package/lib/commonjs/utils/storage/storage.js.flow +4 -0
- package/lib/commonjs/utils/storage/storage.js.map +1 -1
- package/lib/module/assets/icons/cam2.svg +5 -0
- package/lib/module/assets/icons/chip.svg +20 -0
- package/lib/module/assets/icons/index.js +1 -1
- package/lib/module/assets/icons/index.js.map +1 -1
- package/lib/module/assets/icons/ocr.svg +11 -0
- package/lib/module/assets/icons/takePhoto.svg +20 -0
- package/lib/module/assets/icons/tima_small.svg +12 -23
- package/lib/module/assets/svgs/back.svg +4 -0
- package/lib/module/assets/svgs/complete.svg +27 -0
- package/lib/module/assets/svgs/currentStep.svg +28 -0
- package/lib/module/assets/svgs/edit.svg +42 -0
- package/lib/module/assets/svgs/edit_success.svg +15 -0
- package/lib/module/assets/svgs/ekyc.svg +18 -0
- package/lib/module/assets/svgs/ekyc_success.svg +6 -0
- package/lib/module/assets/svgs/index.js +2 -0
- package/lib/module/assets/svgs/index.js.map +1 -0
- package/lib/module/assets/svgs/nextStep.svg +21 -0
- package/lib/module/assets/svgs/notify.svg +18 -0
- package/lib/module/assets/svgs/orc_success.svg +11 -0
- package/lib/module/assets/tts/1000009864.png +0 -0
- package/lib/module/assets/tts/1000009872.png +0 -0
- package/lib/module/assets/tts/1000011964.png +0 -0
- package/lib/module/assets/tts/Banner.png +0 -0
- package/lib/module/assets/tts/Frame 1000011947.png +0 -0
- package/lib/module/assets/tts/Frame1000011946.png +0 -0
- package/lib/module/assets/tts/Frame1000011953.png +0 -0
- package/lib/module/assets/tts/back.png +0 -0
- package/lib/module/assets/tts/front.png +0 -0
- package/lib/module/assets/tts/otp.png +0 -0
- package/lib/module/assets/tts/vehicleRegistration.png +0 -0
- package/lib/module/assets/tts/vehicleStep.png +0 -0
- package/lib/module/components/CIMBLoading.js +1 -1
- package/lib/module/components/CIMBLoading.js.map +1 -1
- package/lib/module/components/CommonSelect.js +1 -1
- package/lib/module/components/CommonSelect.js.map +1 -1
- package/lib/module/components/Loading.js +1 -1
- package/lib/module/components/Loading.js.map +1 -1
- package/lib/module/components/MButton.js +1 -1
- package/lib/module/components/MButton.js.map +1 -1
- package/lib/module/components/MHeader.js +1 -1
- package/lib/module/components/MHeader.js.map +1 -1
- package/lib/module/components/MSelect.js +2 -0
- package/lib/module/components/MSelect.js.map +1 -0
- package/lib/module/components/MText.js +1 -1
- package/lib/module/components/MText.js.map +1 -1
- package/lib/module/components/MyTextInput.js +1 -1
- package/lib/module/components/MyTextInput.js.map +1 -1
- package/lib/module/components/StepIndicator.js +2 -0
- package/lib/module/components/StepIndicator.js.map +1 -0
- package/lib/module/components/keyboardspace/index.js +1 -1
- package/lib/module/components/keyboardspace/index.js.map +1 -1
- package/lib/module/components/logoTima/index.js +1 -1
- package/lib/module/components/logoTima/index.js.map +1 -1
- package/lib/module/components/select/index.js +1 -1
- package/lib/module/components/select/index.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigation/primary-navigator.js +1 -1
- package/lib/module/navigation/primary-navigator.js.map +1 -1
- package/lib/module/navigation/root-navigator.js +1 -1
- package/lib/module/navigation/root-navigator.js.map +1 -1
- package/lib/module/screens/Selector.js +1 -1
- package/lib/module/screens/Selector.js.map +1 -1
- package/lib/module/screens/camera/index.js +1 -1
- package/lib/module/screens/camera/index.js.map +1 -1
- package/lib/module/screens/cimb-sign/index.js +1 -1
- package/lib/module/screens/cimb-sign/index.js.map +1 -1
- package/lib/module/screens/contract/index.js +1 -1
- package/lib/module/screens/contract/index.js.map +1 -1
- package/lib/module/screens/detail-loan/DetailLoanTima.js +1 -1
- package/lib/module/screens/detail-loan/DetailLoanTima.js.map +1 -1
- package/lib/module/screens/detail-loan/Info.js +1 -1
- package/lib/module/screens/detail-loan/Info.js.map +1 -1
- package/lib/module/screens/detail-loan/Payment.js +1 -1
- package/lib/module/screens/detail-loan/Payment.js.map +1 -1
- package/lib/module/screens/detail-loan/PaymentAll.js +1 -1
- package/lib/module/screens/detail-loan/PaymentAll.js.map +1 -1
- package/lib/module/screens/detail-loan/PaymentInfo.js +1 -1
- package/lib/module/screens/detail-loan/PaymentInfo.js.map +1 -1
- package/lib/module/screens/detail-loan/QrPayment.js +1 -1
- package/lib/module/screens/detail-loan/QrPayment.js.map +1 -1
- package/lib/module/screens/detail-loan/ShowQrCode.js +1 -1
- package/lib/module/screens/detail-loan/ShowQrCode.js.map +1 -1
- package/lib/module/screens/detail-loan/index.js +1 -1
- package/lib/module/screens/detail-loan/index.js.map +1 -1
- package/lib/module/screens/digital-lending/Step1.js +1 -1
- package/lib/module/screens/digital-lending/Step1.js.map +1 -1
- package/lib/module/screens/digital-lending/Step2.js +1 -1
- package/lib/module/screens/digital-lending/Step2.js.map +1 -1
- package/lib/module/screens/digital-lending/Step3.js +1 -1
- package/lib/module/screens/digital-lending/Step3.js.map +1 -1
- package/lib/module/screens/digital-lending/Step4.js +1 -1
- package/lib/module/screens/digital-lending/Step4.js.map +1 -1
- package/lib/module/screens/digital-lending/Step5.js +1 -1
- package/lib/module/screens/digital-lending/Step5.js.map +1 -1
- package/lib/module/screens/digital-lending/Step6.js +1 -1
- package/lib/module/screens/digital-lending/Step6.js.map +1 -1
- package/lib/module/screens/digital-lending/index.js +1 -1
- package/lib/module/screens/digital-lending/index.js.map +1 -1
- package/lib/module/screens/eSign/PreviewContract.js +1 -1
- package/lib/module/screens/eSign/PreviewContract.js.map +1 -1
- package/lib/module/screens/eSign/Store.js +1 -1
- package/lib/module/screens/eSign/Store.js.map +1 -1
- package/lib/module/screens/eSign/index.js +1 -1
- package/lib/module/screens/eSign/index.js.map +1 -1
- package/lib/module/screens/forgotPassword/index.js +1 -1
- package/lib/module/screens/forgotPassword/index.js.map +1 -1
- package/lib/module/screens/full-submit/accept_policy.js +1 -1
- package/lib/module/screens/full-submit/accept_policy.js.map +1 -1
- package/lib/module/screens/full-submit/index.js +1 -1
- package/lib/module/screens/full-submit/index.js.map +1 -1
- package/lib/module/screens/full-submit/selfie.js +1 -1
- package/lib/module/screens/full-submit/selfie.js.map +1 -1
- package/lib/module/screens/full-submit/update-document.js +1 -1
- package/lib/module/screens/full-submit/update-document.js.map +1 -1
- package/lib/module/screens/full-submit/update-info.js +1 -1
- package/lib/module/screens/full-submit/update-info.js.map +1 -1
- package/lib/module/screens/guide-transfer-bank/TransferDetail.js +1 -1
- package/lib/module/screens/guide-transfer-bank/TransferDetail.js.map +1 -1
- package/lib/module/screens/guide-transfer-bank/index.js +1 -1
- package/lib/module/screens/guide-transfer-bank/index.js.map +1 -1
- package/lib/module/screens/home/CIMBxTima.js +1 -1
- package/lib/module/screens/home/CIMBxTima.js.map +1 -1
- package/lib/module/screens/home/index.js +1 -1
- package/lib/module/screens/home/index.js.map +1 -1
- package/lib/module/screens/intro/index.js +1 -1
- package/lib/module/screens/intro/index.js.map +1 -1
- package/lib/module/screens/introduction/index.js +1 -1
- package/lib/module/screens/introduction/index.js.map +1 -1
- package/lib/module/screens/liveness/LivenessStore.js +1 -1
- package/lib/module/screens/liveness/LivenessStore.js.map +1 -1
- package/lib/module/screens/liveness/index.js +1 -1
- package/lib/module/screens/liveness/index.js.map +1 -1
- package/lib/module/screens/liveness-v2/index.js +1 -1
- package/lib/module/screens/liveness-v2/index.js.map +1 -1
- package/lib/module/screens/loan/PreviewSchedulePaymentTopup.js +1 -1
- package/lib/module/screens/loan/PreviewSchedulePaymentTopup.js.map +1 -1
- package/lib/module/screens/loan/UpdateLoan.js +1 -1
- package/lib/module/screens/loan/UpdateLoan.js.map +1 -1
- package/lib/module/screens/loginWithPassword/index.js +1 -1
- package/lib/module/screens/loginWithPassword/index.js.map +1 -1
- package/lib/module/screens/main/index.js +1 -1
- package/lib/module/screens/main/index.js.map +1 -1
- package/lib/module/screens/mrz-scanner/index.js +1 -1
- package/lib/module/screens/mrz-scanner/index.js.map +1 -1
- package/lib/module/screens/nationalID/index.js +1 -1
- package/lib/module/screens/nationalID/index.js.map +1 -1
- package/lib/module/screens/nationalIDBack/index.js +1 -1
- package/lib/module/screens/nationalIDBack/index.js.map +1 -1
- package/lib/module/screens/notification/index.js +1 -1
- package/lib/module/screens/notification/index.js.map +1 -1
- package/lib/module/screens/otp/index.js +1 -1
- package/lib/module/screens/otp/index.js.map +1 -1
- package/lib/module/screens/payment-evidence/Guideline.js +1 -1
- package/lib/module/screens/payment-evidence/Guideline.js.map +1 -1
- package/lib/module/screens/payment-evidence/ModalGuideline.js +1 -1
- package/lib/module/screens/payment-evidence/ModalGuideline.js.map +1 -1
- package/lib/module/screens/payment-evidence/index.js +1 -1
- package/lib/module/screens/payment-evidence/index.js.map +1 -1
- package/lib/module/screens/personal/index.js +1 -1
- package/lib/module/screens/personal/index.js.map +1 -1
- package/lib/module/screens/qualify/index.js +1 -1
- package/lib/module/screens/qualify/index.js.map +1 -1
- package/lib/module/screens/quick-submit/index.js +1 -1
- package/lib/module/screens/quick-submit/index.js.map +1 -1
- package/lib/module/screens/register/index.js +1 -1
- package/lib/module/screens/register/index.js.map +1 -1
- package/lib/module/screens/schedule-payment/DigitalSchedulePayment.js +1 -1
- package/lib/module/screens/schedule-payment/DigitalSchedulePayment.js.map +1 -1
- package/lib/module/screens/schedule-payment/index.js +1 -1
- package/lib/module/screens/schedule-payment/index.js.map +1 -1
- package/lib/module/screens/schedule-payment/payment-list.js +1 -1
- package/lib/module/screens/schedule-payment/payment-list.js.map +1 -1
- package/lib/module/screens/selfie/index.js +1 -1
- package/lib/module/screens/selfie/index.js.map +1 -1
- package/lib/module/screens/setPassword/confirmPassword.js +1 -1
- package/lib/module/screens/setPassword/confirmPassword.js.map +1 -1
- package/lib/module/screens/setPassword/index.js +1 -1
- package/lib/module/screens/setPassword/index.js.map +1 -1
- package/lib/module/screens/sign-tima/ConfirmContract.js +1 -1
- package/lib/module/screens/sign-tima/ConfirmContract.js.map +1 -1
- package/lib/module/screens/sign-tima/ViewContract.js +1 -1
- package/lib/module/screens/sign-tima/ViewContract.js.map +1 -1
- package/lib/module/screens/splash/index.js +1 -1
- package/lib/module/screens/splash/index.js.map +1 -1
- package/lib/module/screens/terms/QuickTerm.js +1 -1
- package/lib/module/screens/terms/QuickTerm.js.map +1 -1
- package/lib/module/screens/terms/TermScreen.js +1 -1
- package/lib/module/screens/terms/TermScreen.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/LoanInterestRate.js +2 -0
- package/lib/module/screens/toan-trinh-so/LoanInterestRate.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/OCR.js +2 -0
- package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/RegisterCamera.js +2 -0
- package/lib/module/screens/toan-trinh-so/RegisterCamera.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/ReviewInformation.js +2 -0
- package/lib/module/screens/toan-trinh-so/ReviewInformation.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js +2 -0
- package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/ReviewLoan.js +2 -0
- package/lib/module/screens/toan-trinh-so/ReviewLoan.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/TTSNationalIDBack.js +2 -0
- package/lib/module/screens/toan-trinh-so/TTSNationalIDBack.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js +2 -0
- package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/TTSOTP.js +2 -0
- package/lib/module/screens/toan-trinh-so/TTSOTP.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/TTSSelfie.js +2 -0
- package/lib/module/screens/toan-trinh-so/TTSSelfie.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/TTSSignLoan.js +2 -0
- package/lib/module/screens/toan-trinh-so/TTSSignLoan.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/VehicleCamera.js +2 -0
- package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/VehicleRegistration.js +2 -0
- package/lib/module/screens/toan-trinh-so/VehicleRegistration.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/VehicleRegistrationBack.js +2 -0
- package/lib/module/screens/toan-trinh-so/VehicleRegistrationBack.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js +2 -0
- package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -0
- package/lib/module/screens/toan-trinh-so/store.js +2 -0
- package/lib/module/screens/toan-trinh-so/store.js.map +1 -0
- package/lib/module/screens/uploadVideo/index.js +1 -1
- package/lib/module/screens/uploadVideo/index.js.map +1 -1
- package/lib/module/services/api/api-config.js +1 -1
- package/lib/module/services/api/api-config.js.map +1 -1
- package/lib/module/services/api/api.js +1 -1
- package/lib/module/services/api/api.js.map +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/storage/storage.js +1 -1
- package/lib/module/utils/storage/storage.js.map +1 -1
- package/lib/typescript/assets/icons/index.d.ts +5 -1
- package/lib/typescript/assets/icons/index.d.ts.map +1 -1
- package/lib/typescript/assets/svgs/index.d.ts +12 -0
- package/lib/typescript/assets/svgs/index.d.ts.map +1 -0
- package/lib/typescript/components/MSelect.d.ts +2 -0
- package/lib/typescript/components/MSelect.d.ts.map +1 -0
- package/lib/typescript/components/StepIndicator.d.ts +5 -0
- package/lib/typescript/components/StepIndicator.d.ts.map +1 -0
- package/lib/typescript/components/select/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/navigation/primary-navigator.d.ts +16 -0
- package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
- package/lib/typescript/screens/eSign/Store.d.ts +1 -1
- package/lib/typescript/screens/eSign/Store.d.ts.map +1 -1
- package/lib/typescript/screens/eSign/index.d.ts.map +1 -1
- package/lib/typescript/screens/home/index.d.ts.map +1 -1
- package/lib/typescript/screens/liveness/LivenessStore.d.ts +1 -0
- package/lib/typescript/screens/liveness/LivenessStore.d.ts.map +1 -1
- package/lib/typescript/screens/liveness-v2/index.d.ts.map +1 -1
- package/lib/typescript/screens/register/index.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/LoanInterestRate.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/LoanInterestRate.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/OCR.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/RegisterCamera.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/RegisterCamera.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/ReviewInformation.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/ReviewInformation.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/ReviewInformationOther.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/ReviewInformationOther.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/TTSNationalIDBack.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/TTSNationalIDBack.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/TTSNationalIDFront.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/TTSNationalIDFront.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/TTSOTP.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/TTSOTP.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/TTSSelfie.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/TTSSelfie.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/TTSSignLoan.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/TTSSignLoan.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/VehicleRegistration.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/VehicleRegistration.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationBack.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationBack.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationFront.d.ts +2 -0
- package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationFront.d.ts.map +1 -0
- package/lib/typescript/screens/toan-trinh-so/store.d.ts +26 -0
- package/lib/typescript/screens/toan-trinh-so/store.d.ts.map +1 -0
- package/lib/typescript/services/api/api.d.ts +224 -0
- package/lib/typescript/services/api/api.d.ts.map +1 -1
- package/lib/typescript/utils/index.d.ts +8 -0
- package/lib/typescript/utils/index.d.ts.map +1 -1
- package/lib/typescript/utils/storage/storage.d.ts +3 -0
- package/lib/typescript/utils/storage/storage.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/icons/cam2.svg +5 -0
- package/src/assets/icons/chip.svg +20 -0
- package/src/assets/icons/index.tsx +8 -0
- package/src/assets/icons/ocr.svg +11 -0
- package/src/assets/icons/takePhoto.svg +20 -0
- package/src/assets/icons/tima_small.svg +12 -23
- package/src/assets/svgs/back.svg +4 -0
- package/src/assets/svgs/complete.svg +27 -0
- package/src/assets/svgs/currentStep.svg +28 -0
- package/src/assets/svgs/edit.svg +42 -0
- package/src/assets/svgs/edit_success.svg +15 -0
- package/src/assets/svgs/ekyc.svg +18 -0
- package/src/assets/svgs/ekyc_success.svg +6 -0
- package/src/assets/svgs/index.tsx +23 -0
- package/src/assets/svgs/nextStep.svg +21 -0
- package/src/assets/svgs/notify.svg +18 -0
- package/src/assets/svgs/orc_success.svg +11 -0
- package/src/assets/tts/1000009864.png +0 -0
- package/src/assets/tts/1000009872.png +0 -0
- package/src/assets/tts/1000011964.png +0 -0
- package/src/assets/tts/Banner.png +0 -0
- package/src/assets/tts/Frame 1000011947.png +0 -0
- package/src/assets/tts/Frame1000011946.png +0 -0
- package/src/assets/tts/Frame1000011953.png +0 -0
- package/src/assets/tts/back.png +0 -0
- package/src/assets/tts/front.png +0 -0
- package/src/assets/tts/otp.png +0 -0
- package/src/assets/tts/vehicleRegistration.png +0 -0
- package/src/assets/tts/vehicleStep.png +0 -0
- package/src/components/MHeader.tsx +1 -1
- package/src/components/MSelect.tsx +78 -0
- package/src/components/StepIndicator.tsx +85 -0
- package/src/components/select/index.tsx +19 -3
- package/src/index.tsx +3 -1
- package/src/navigation/primary-navigator.tsx +81 -1
- package/src/screens/camera/index.tsx +1 -1
- package/src/screens/eSign/Store.tsx +9 -2
- package/src/screens/eSign/index.tsx +4 -1
- package/src/screens/full-submit/index.tsx +7 -7
- package/src/screens/full-submit/update-document.tsx +1 -1
- package/src/screens/full-submit/update-info.tsx +1 -1
- package/src/screens/home/index.tsx +1809 -1400
- package/src/screens/liveness/LivenessStore.tsx +87 -1
- package/src/screens/liveness-v2/index.tsx +36 -23
- package/src/screens/mrz-scanner/index.tsx +2 -2
- package/src/screens/register/index.tsx +3 -1
- package/src/screens/toan-trinh-so/LoanInterestRate.tsx +373 -0
- package/src/screens/toan-trinh-so/OCR.tsx +831 -0
- package/src/screens/toan-trinh-so/RegisterCamera.tsx +467 -0
- package/src/screens/toan-trinh-so/ReviewInformation.tsx +1007 -0
- package/src/screens/toan-trinh-so/ReviewInformationOther.tsx +791 -0
- package/src/screens/toan-trinh-so/ReviewLoan.tsx +1200 -0
- package/src/screens/toan-trinh-so/TTSNationalIDBack.tsx +242 -0
- package/src/screens/toan-trinh-so/TTSNationalIDFront.tsx +247 -0
- package/src/screens/toan-trinh-so/TTSOTP.tsx +356 -0
- package/src/screens/toan-trinh-so/TTSSelfie.tsx +267 -0
- package/src/screens/toan-trinh-so/TTSSignLoan.tsx +143 -0
- package/src/screens/toan-trinh-so/VehicleCamera.tsx +477 -0
- package/src/screens/toan-trinh-so/VehicleRegistration.tsx +197 -0
- package/src/screens/toan-trinh-so/VehicleRegistrationBack.tsx +239 -0
- package/src/screens/toan-trinh-so/VehicleRegistrationFront.tsx +240 -0
- package/src/screens/toan-trinh-so/store.ts +237 -0
- package/src/services/api/api-config.ts +2 -2
- package/src/services/api/api.ts +235 -0
- package/src/utils/index.tsx +67 -45
- package/src/utils/storage/storage.ts +4 -0
|
@@ -0,0 +1,831 @@
|
|
|
1
|
+
//@ts-nocheck
|
|
2
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { observer, Observer } from 'mobx-react-lite';
|
|
4
|
+
import {
|
|
5
|
+
View,
|
|
6
|
+
NativeModules,
|
|
7
|
+
TouchableOpacity,
|
|
8
|
+
SafeAreaView,
|
|
9
|
+
TextStyle,
|
|
10
|
+
ViewStyle,
|
|
11
|
+
ImageStyle,
|
|
12
|
+
Image,
|
|
13
|
+
ActivityIndicator,
|
|
14
|
+
Dimensions,
|
|
15
|
+
StyleSheet,
|
|
16
|
+
Alert,
|
|
17
|
+
} from 'react-native';
|
|
18
|
+
import { MText } from '../../components/MText';
|
|
19
|
+
import { load, OCR_V1, save } from '../../utils/storage';
|
|
20
|
+
import {
|
|
21
|
+
request,
|
|
22
|
+
PERMISSIONS,
|
|
23
|
+
RESULTS,
|
|
24
|
+
openSettings,
|
|
25
|
+
} from 'react-native-permissions';
|
|
26
|
+
import { RNCamera } from 'react-native-camera';
|
|
27
|
+
import Modal from 'react-native-modal';
|
|
28
|
+
import LinearGradient from 'react-native-linear-gradient';
|
|
29
|
+
import {
|
|
30
|
+
Cam2Svg,
|
|
31
|
+
ChipSvg,
|
|
32
|
+
IconBackWhite,
|
|
33
|
+
TakePhotoSvg,
|
|
34
|
+
TimaSmall,
|
|
35
|
+
} from '../../assets/icons';
|
|
36
|
+
import MButton from '../../components/MButton';
|
|
37
|
+
import { commonStyles } from '../CommonStyles';
|
|
38
|
+
import { StackActions, useNavigation } from '@react-navigation/native';
|
|
39
|
+
import TextRecognition from '@react-native-ml-kit/text-recognition';
|
|
40
|
+
import { ScreenNames } from '../../navigation';
|
|
41
|
+
import { Api } from '../../services/api';
|
|
42
|
+
import Loading from '../../components/Loading';
|
|
43
|
+
import DeviceInfo from 'react-native-device-info';
|
|
44
|
+
|
|
45
|
+
const { NFCReader } = NativeModules;
|
|
46
|
+
|
|
47
|
+
export const OCR = observer(function OCR(props: any) {
|
|
48
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
49
|
+
const navigation = useNavigation();
|
|
50
|
+
const [showModal, setShowModal] = useState(false);
|
|
51
|
+
const [type, setType] = useState('passport');
|
|
52
|
+
const [taking, setTaking] = useState(false);
|
|
53
|
+
const [passPermission, setPassPermission] = useState(false);
|
|
54
|
+
|
|
55
|
+
const myCamera = useRef(null);
|
|
56
|
+
|
|
57
|
+
const requestPermissions = () => {
|
|
58
|
+
request(
|
|
59
|
+
Platform.OS === 'ios'
|
|
60
|
+
? PERMISSIONS.IOS.CAMERA
|
|
61
|
+
: PERMISSIONS.ANDROID.CAMERA
|
|
62
|
+
).then((result) => {
|
|
63
|
+
switch (result) {
|
|
64
|
+
case RESULTS.UNAVAILABLE:
|
|
65
|
+
console.log(
|
|
66
|
+
'This feature is not available (on this device / in this context)'
|
|
67
|
+
);
|
|
68
|
+
Alert.alert(
|
|
69
|
+
'Thông báo',
|
|
70
|
+
'Máy ảnh trên thiết bị không tương thích.\nVui lòng kiểm tra lại thiết bị!',
|
|
71
|
+
[{ text: 'Đồng ý' }]
|
|
72
|
+
);
|
|
73
|
+
break;
|
|
74
|
+
case RESULTS.DENIED:
|
|
75
|
+
console.log(
|
|
76
|
+
'The permission has not been requested / is denied but requestable'
|
|
77
|
+
);
|
|
78
|
+
Alert.alert(
|
|
79
|
+
'Thông báo',
|
|
80
|
+
'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
|
|
81
|
+
[
|
|
82
|
+
{
|
|
83
|
+
text: 'Đồng ý',
|
|
84
|
+
onPress: () => {
|
|
85
|
+
if (Platform.OS === 'ios') {
|
|
86
|
+
openSettings();
|
|
87
|
+
} else {
|
|
88
|
+
requestPermissions();
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
]
|
|
93
|
+
);
|
|
94
|
+
break;
|
|
95
|
+
case RESULTS.LIMITED:
|
|
96
|
+
console.log('The permission is limited: some actions are possible');
|
|
97
|
+
Alert.alert(
|
|
98
|
+
'Thông báo',
|
|
99
|
+
'Quyền máy ảnh bị hạn chế. Vui lòng kiểm tra lại để tiếp tục!',
|
|
100
|
+
[
|
|
101
|
+
{
|
|
102
|
+
text: 'Đồng ý',
|
|
103
|
+
onPress: () => {
|
|
104
|
+
if (Platform.OS === 'ios') {
|
|
105
|
+
openSettings();
|
|
106
|
+
} else {
|
|
107
|
+
requestPermissions();
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
]
|
|
112
|
+
);
|
|
113
|
+
break;
|
|
114
|
+
case RESULTS.GRANTED:
|
|
115
|
+
console.log('The permission is granted');
|
|
116
|
+
setPassPermission(true);
|
|
117
|
+
break;
|
|
118
|
+
case RESULTS.BLOCKED:
|
|
119
|
+
console.log('The permission is denied and not requestable anymore');
|
|
120
|
+
Alert.alert(
|
|
121
|
+
'Thông báo',
|
|
122
|
+
'Bạn đã từ chối quyền máy ảnh. Vui lòng cấp quyền máy ảnh để tiếp tục!',
|
|
123
|
+
[
|
|
124
|
+
{
|
|
125
|
+
text: 'Đồng ý',
|
|
126
|
+
onPress: () => {
|
|
127
|
+
if (Platform.OS === 'ios') {
|
|
128
|
+
openSettings();
|
|
129
|
+
} else {
|
|
130
|
+
openSettings();
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
]
|
|
135
|
+
);
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const loadIntro = async () => {
|
|
142
|
+
const intro = await load(OCR_V1);
|
|
143
|
+
if (!intro) {
|
|
144
|
+
setShowModal(true);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
useEffect(() => {
|
|
149
|
+
requestPermissions();
|
|
150
|
+
loadIntro();
|
|
151
|
+
}, []);
|
|
152
|
+
|
|
153
|
+
const saveDataNfc = async (body) => {
|
|
154
|
+
try {
|
|
155
|
+
setIsLoading(true);
|
|
156
|
+
const response = await Api.getInstance().saveNfcInfo({
|
|
157
|
+
...body,
|
|
158
|
+
loanBriefId: props?.route?.params?.loan?.id,
|
|
159
|
+
});
|
|
160
|
+
setIsLoading(false);
|
|
161
|
+
if (response.kind === 'ok') {
|
|
162
|
+
if (response.data?.meta?.errorCode === 200) {
|
|
163
|
+
navigation.push(ScreenNames.TTSSelfie, {
|
|
164
|
+
loan: props?.route?.params?.loan,
|
|
165
|
+
});
|
|
166
|
+
} else {
|
|
167
|
+
Alert.alert('Thông báo', response?.data?.meta?.errorMessage);
|
|
168
|
+
}
|
|
169
|
+
} else {
|
|
170
|
+
Alert.alert('Thông báo', 'Có lỗi xảy ra. Vui lòng thử lại sau');
|
|
171
|
+
}
|
|
172
|
+
} catch (error) {
|
|
173
|
+
console.log(error);
|
|
174
|
+
setIsLoading(false);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
const convertToDate = (input, end) => {
|
|
179
|
+
let yearPrefix = input.substring(0, 2);
|
|
180
|
+
let year = end
|
|
181
|
+
? '20' + yearPrefix
|
|
182
|
+
: parseInt(yearPrefix) > 20
|
|
183
|
+
? '19' + yearPrefix
|
|
184
|
+
: '20' + yearPrefix;
|
|
185
|
+
let month = input.substring(2, 4);
|
|
186
|
+
let day = input.substring(4, 6);
|
|
187
|
+
|
|
188
|
+
return year + '-' + month + '-' + day;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
const extractMRZInfo = (text) => {
|
|
192
|
+
let documentNumber = '';
|
|
193
|
+
let birthDate = '';
|
|
194
|
+
let expirationDate = '';
|
|
195
|
+
const regex1 = /VNM(\d{9})/;
|
|
196
|
+
const match1 = text.match(regex1);
|
|
197
|
+
|
|
198
|
+
// If a match is found, return the 9 digits, otherwise return null
|
|
199
|
+
if (match1) {
|
|
200
|
+
documentNumber = match1[1];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
console.log('documentNumber', documentNumber);
|
|
204
|
+
|
|
205
|
+
// Regular expression to match 'VNM' followed by 9 digits, then two 6-digit numbers
|
|
206
|
+
const regex = /(\d{6}).[MF](\d{6})/;
|
|
207
|
+
|
|
208
|
+
// Search for the pattern in the text
|
|
209
|
+
const match = text.replace(/ /g, '').match(regex);
|
|
210
|
+
|
|
211
|
+
// If a match is found, return the captured groups, otherwise return null
|
|
212
|
+
if (match) {
|
|
213
|
+
console.log({
|
|
214
|
+
documentNumber: documentNumber,
|
|
215
|
+
birthDate: match[1],
|
|
216
|
+
expirationDate: match[2],
|
|
217
|
+
});
|
|
218
|
+
(birthDate = match[1]), (expirationDate = match[2]);
|
|
219
|
+
} else {
|
|
220
|
+
return null;
|
|
221
|
+
}
|
|
222
|
+
if (documentNumber && birthDate && expirationDate) {
|
|
223
|
+
try {
|
|
224
|
+
NFCReader.readNFCCard(
|
|
225
|
+
documentNumber,
|
|
226
|
+
convertToDate(birthDate, false),
|
|
227
|
+
convertToDate(expirationDate, true),
|
|
228
|
+
(error, response) => {
|
|
229
|
+
try {
|
|
230
|
+
const convertData = JSON.parse(response);
|
|
231
|
+
saveDataNfc(convertData);
|
|
232
|
+
} catch (e) {
|
|
233
|
+
console.log(e);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
).t;
|
|
237
|
+
} catch (e) {
|
|
238
|
+
console.log(e);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
const handleTextRecognition = async (imagePath) => {
|
|
244
|
+
try {
|
|
245
|
+
const result = await TextRecognition.recognize(imagePath);
|
|
246
|
+
const mrzText = result.text;
|
|
247
|
+
extractMRZInfo(mrzText);
|
|
248
|
+
} catch (error) {
|
|
249
|
+
console.log(error);
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
const scanNfc = async () => {
|
|
254
|
+
if (myCamera.current) {
|
|
255
|
+
const options = { quality: 0.8, base64: true };
|
|
256
|
+
const data = await myCamera.current.takePictureAsync(options);
|
|
257
|
+
await handleTextRecognition(data.uri);
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
const takePhoto = async () => {
|
|
262
|
+
setTaking(true);
|
|
263
|
+
const options = {
|
|
264
|
+
width: 720,
|
|
265
|
+
base64: true,
|
|
266
|
+
pauseAfterCapture: true,
|
|
267
|
+
fixOrientation: false,
|
|
268
|
+
forceUpOrientation: false,
|
|
269
|
+
orientation: RNCamera.Constants.Orientation.portrait,
|
|
270
|
+
};
|
|
271
|
+
const data = await myCamera.current.takePictureAsync(options);
|
|
272
|
+
setTaking(false);
|
|
273
|
+
if (props?.route?.params?.front && !props.route?.params?.callback) {
|
|
274
|
+
navigation.push(ScreenNames.TTSNationalIDFront, {
|
|
275
|
+
uri: data?.uri,
|
|
276
|
+
loan: props?.route?.params?.loan,
|
|
277
|
+
});
|
|
278
|
+
} else if (!props?.route?.params?.front && !props.route?.params?.callback) {
|
|
279
|
+
navigation.push(ScreenNames.TTSNationalIDBack, {
|
|
280
|
+
uri: data?.uri,
|
|
281
|
+
loan: props?.route?.params?.loan,
|
|
282
|
+
});
|
|
283
|
+
} else {
|
|
284
|
+
navigation.goBack();
|
|
285
|
+
props.route?.params?.callback(data?.uri);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
return (
|
|
290
|
+
<View
|
|
291
|
+
style={{ flex: 1, backgroundColor: 'black' }}
|
|
292
|
+
pointerEvents={'box-none'}
|
|
293
|
+
>
|
|
294
|
+
<View
|
|
295
|
+
style={{
|
|
296
|
+
alignItems: 'center',
|
|
297
|
+
position: 'absolute',
|
|
298
|
+
top: DeviceInfo.hasNotch() ? 70 : 24,
|
|
299
|
+
left: 0,
|
|
300
|
+
right: 0,
|
|
301
|
+
zIndex: 100,
|
|
302
|
+
}}
|
|
303
|
+
>
|
|
304
|
+
<TouchableOpacity
|
|
305
|
+
onPress={() => {
|
|
306
|
+
navigation.goBack();
|
|
307
|
+
}}
|
|
308
|
+
style={{
|
|
309
|
+
position: 'absolute',
|
|
310
|
+
left: 10,
|
|
311
|
+
top: 4,
|
|
312
|
+
width: 24,
|
|
313
|
+
height: 24,
|
|
314
|
+
alignItems: 'center',
|
|
315
|
+
justifyContent: 'center',
|
|
316
|
+
}}
|
|
317
|
+
>
|
|
318
|
+
<IconBackWhite />
|
|
319
|
+
</TouchableOpacity>
|
|
320
|
+
<View
|
|
321
|
+
style={{
|
|
322
|
+
flexDirection: 'row',
|
|
323
|
+
padding: 2,
|
|
324
|
+
borderRadius: 4,
|
|
325
|
+
alignItems: 'center',
|
|
326
|
+
backgroundColor: 'transparent',
|
|
327
|
+
}}
|
|
328
|
+
>
|
|
329
|
+
<TouchableOpacity
|
|
330
|
+
style={{}}
|
|
331
|
+
onPress={() => {
|
|
332
|
+
setType('passport');
|
|
333
|
+
}}
|
|
334
|
+
>
|
|
335
|
+
<LinearGradient
|
|
336
|
+
colors={
|
|
337
|
+
type === 'passport'
|
|
338
|
+
? ['#FF8E4F', '#EF592E']
|
|
339
|
+
: ['black', 'black']
|
|
340
|
+
}
|
|
341
|
+
style={{
|
|
342
|
+
height: 28,
|
|
343
|
+
paddingHorizontal: 8,
|
|
344
|
+
borderRadius: 4,
|
|
345
|
+
width: 100,
|
|
346
|
+
flexDirection: 'row',
|
|
347
|
+
alignItems: 'center',
|
|
348
|
+
}}
|
|
349
|
+
>
|
|
350
|
+
<Cam2Svg />
|
|
351
|
+
<MText
|
|
352
|
+
style={{
|
|
353
|
+
color: 'white',
|
|
354
|
+
fontSize: 12,
|
|
355
|
+
fontWeight: 'bold',
|
|
356
|
+
marginLeft: 5,
|
|
357
|
+
}}
|
|
358
|
+
>
|
|
359
|
+
Chụp 2 mặt
|
|
360
|
+
</MText>
|
|
361
|
+
</LinearGradient>
|
|
362
|
+
</TouchableOpacity>
|
|
363
|
+
<View
|
|
364
|
+
style={{
|
|
365
|
+
backgroundColor: 'white',
|
|
366
|
+
width: 1,
|
|
367
|
+
borderRadius: 10,
|
|
368
|
+
height: 20,
|
|
369
|
+
marginHorizontal: 8,
|
|
370
|
+
}}
|
|
371
|
+
></View>
|
|
372
|
+
<TouchableOpacity
|
|
373
|
+
style={{}}
|
|
374
|
+
onPress={() => {
|
|
375
|
+
setType('nfc');
|
|
376
|
+
}}
|
|
377
|
+
>
|
|
378
|
+
<LinearGradient
|
|
379
|
+
colors={
|
|
380
|
+
type === 'nfc' ? ['#FF8E4F', '#EF592E'] : ['black', 'black']
|
|
381
|
+
}
|
|
382
|
+
style={{
|
|
383
|
+
height: 28,
|
|
384
|
+
paddingHorizontal: 8,
|
|
385
|
+
borderRadius: 4,
|
|
386
|
+
width: 100,
|
|
387
|
+
flexDirection: 'row',
|
|
388
|
+
alignItems: 'center',
|
|
389
|
+
}}
|
|
390
|
+
>
|
|
391
|
+
<ChipSvg />
|
|
392
|
+
<MText
|
|
393
|
+
style={{
|
|
394
|
+
color: 'white',
|
|
395
|
+
fontSize: 12,
|
|
396
|
+
fontWeight: 'bold',
|
|
397
|
+
marginLeft: 5,
|
|
398
|
+
}}
|
|
399
|
+
>
|
|
400
|
+
NFC
|
|
401
|
+
</MText>
|
|
402
|
+
</LinearGradient>
|
|
403
|
+
</TouchableOpacity>
|
|
404
|
+
</View>
|
|
405
|
+
<MText
|
|
406
|
+
style={{
|
|
407
|
+
color: 'white',
|
|
408
|
+
fontSize: 16,
|
|
409
|
+
textAlign: 'center',
|
|
410
|
+
padding: 16,
|
|
411
|
+
marginTop: 10,
|
|
412
|
+
}}
|
|
413
|
+
>
|
|
414
|
+
{type === 'passport' && props?.route?.params?.front
|
|
415
|
+
? 'Chụp CMND/ CCCD mặt trước'
|
|
416
|
+
: type === 'passport'
|
|
417
|
+
? 'Chụp CMND/ CCCD mặt sau'
|
|
418
|
+
: 'Dùng camera để quét chuỗi ký tự mặt sau thẻ CCCD gắn chíp ở phía dưới'}
|
|
419
|
+
</MText>
|
|
420
|
+
</View>
|
|
421
|
+
|
|
422
|
+
{passPermission && type === 'passport' ? (
|
|
423
|
+
<View
|
|
424
|
+
style={[
|
|
425
|
+
commonStyles.alignCenter,
|
|
426
|
+
commonStyles.fill,
|
|
427
|
+
commonStyles.justifyCenter,
|
|
428
|
+
{
|
|
429
|
+
position: 'absolute',
|
|
430
|
+
width: Dimensions.get('window').width,
|
|
431
|
+
height: Dimensions.get('window').height,
|
|
432
|
+
},
|
|
433
|
+
]}
|
|
434
|
+
>
|
|
435
|
+
<RNCamera
|
|
436
|
+
ref={myCamera}
|
|
437
|
+
defaultVideoQuality={RNCamera.Constants.VideoQuality['720p']}
|
|
438
|
+
style={{
|
|
439
|
+
width: Dimensions.get('window').width,
|
|
440
|
+
height: 260,
|
|
441
|
+
overflow: 'hidden',
|
|
442
|
+
}}
|
|
443
|
+
maxZoom={1}
|
|
444
|
+
>
|
|
445
|
+
{({ camera, status, recordAudioPermissionStatus }) => {
|
|
446
|
+
if (status !== 'READY') return <ActivityIndicator />;
|
|
447
|
+
}}
|
|
448
|
+
</RNCamera>
|
|
449
|
+
<View style={styles.buttonContainer}>
|
|
450
|
+
<MText
|
|
451
|
+
style={{
|
|
452
|
+
color: 'white',
|
|
453
|
+
fontSize: 14,
|
|
454
|
+
textAlign: 'center',
|
|
455
|
+
padding: 16,
|
|
456
|
+
}}
|
|
457
|
+
>
|
|
458
|
+
Vui lòng đặt giấy tờ nằm vừa khung hình chữ nhật, chụp đủ ánh sáng
|
|
459
|
+
và rõ nét.
|
|
460
|
+
</MText>
|
|
461
|
+
<MButton
|
|
462
|
+
onPress={() => {
|
|
463
|
+
takePhoto();
|
|
464
|
+
}}
|
|
465
|
+
>
|
|
466
|
+
<TakePhotoSvg />
|
|
467
|
+
</MButton>
|
|
468
|
+
</View>
|
|
469
|
+
</View>
|
|
470
|
+
) : (
|
|
471
|
+
<>
|
|
472
|
+
<RNCamera
|
|
473
|
+
ref={myCamera}
|
|
474
|
+
style={styles.camera}
|
|
475
|
+
type={RNCamera.Constants.Type.back}
|
|
476
|
+
captureAudio={false}
|
|
477
|
+
></RNCamera>
|
|
478
|
+
<View style={styles.overlay}>
|
|
479
|
+
<View style={styles.overlayTop} />
|
|
480
|
+
<View style={styles.overlayCenter}>
|
|
481
|
+
<View style={styles.overlayLeft} />
|
|
482
|
+
<View style={styles.overlayRect}></View>
|
|
483
|
+
<View style={styles.overlayRight} />
|
|
484
|
+
</View>
|
|
485
|
+
<View style={styles.overlayBottom} />
|
|
486
|
+
</View>
|
|
487
|
+
<View style={styles.buttonContainer}>
|
|
488
|
+
<MText
|
|
489
|
+
style={{
|
|
490
|
+
color: 'white',
|
|
491
|
+
fontSize: 14,
|
|
492
|
+
textAlign: 'center',
|
|
493
|
+
padding: 16,
|
|
494
|
+
}}
|
|
495
|
+
>
|
|
496
|
+
Vui lòng đặt chuỗi kí tự nằm vừa khung hình chữ nhật, chụp đủ ánh
|
|
497
|
+
sáng và rõ nét.
|
|
498
|
+
</MText>
|
|
499
|
+
<TouchableOpacity
|
|
500
|
+
onPress={() => {
|
|
501
|
+
scanNfc();
|
|
502
|
+
}}
|
|
503
|
+
>
|
|
504
|
+
<TakePhotoSvg />
|
|
505
|
+
</TouchableOpacity>
|
|
506
|
+
</View>
|
|
507
|
+
</>
|
|
508
|
+
)}
|
|
509
|
+
|
|
510
|
+
<Modal
|
|
511
|
+
isVisible={showModal}
|
|
512
|
+
style={$modal}
|
|
513
|
+
backdropTransitionInTiming={0}
|
|
514
|
+
nimationOutTiming={200}
|
|
515
|
+
animationInTiming={200}
|
|
516
|
+
animationIn={'slideInUp'}
|
|
517
|
+
animationOut={'fadeOutDown'}
|
|
518
|
+
useNativeDriverForBackdrop={true}
|
|
519
|
+
useNativeDriver={true}
|
|
520
|
+
>
|
|
521
|
+
<LinearGradient colors={['#FF8E4F', '#EF592E']} style={$container}>
|
|
522
|
+
<View style={$paddingV}>
|
|
523
|
+
<MText style={$title}>NHẬN DIỆN GIẤY TỜ TÙY THÂN</MText>
|
|
524
|
+
<MText style={$description}>
|
|
525
|
+
Chụp ảnh 2 mặt hoặc NFC CCCD/ CMND
|
|
526
|
+
</MText>
|
|
527
|
+
|
|
528
|
+
<Image
|
|
529
|
+
source={require('../../assets/tts/vehicleStep.png')}
|
|
530
|
+
style={$step}
|
|
531
|
+
/>
|
|
532
|
+
|
|
533
|
+
<View style={$bg}>
|
|
534
|
+
<View
|
|
535
|
+
style={{
|
|
536
|
+
flexDirection: 'column',
|
|
537
|
+
alignItems: 'center',
|
|
538
|
+
}}
|
|
539
|
+
>
|
|
540
|
+
<Image
|
|
541
|
+
source={require('../../assets/tts/Frame1000011946.png')}
|
|
542
|
+
style={{
|
|
543
|
+
width: '60%',
|
|
544
|
+
height: 70,
|
|
545
|
+
resizeMode: 'contain',
|
|
546
|
+
marginVertical: 16,
|
|
547
|
+
}}
|
|
548
|
+
/>
|
|
549
|
+
</View>
|
|
550
|
+
<View style={{ marginTop: 10, paddingHorizontal: 24 }}>
|
|
551
|
+
<MText style={[$title2, { textAlign: 'left' }]}>
|
|
552
|
+
Cách 1: NFC (Áp dụng cho CCCD gắn chip)
|
|
553
|
+
</MText>
|
|
554
|
+
<View style={$row}>
|
|
555
|
+
<TimaSmall />
|
|
556
|
+
<MText style={$txt}>
|
|
557
|
+
Đặt phần chip đồng gần lại với phần phía trên của{'\n'}mặt
|
|
558
|
+
lưng điện thoại
|
|
559
|
+
</MText>
|
|
560
|
+
</View>
|
|
561
|
+
<View style={$row}>
|
|
562
|
+
<TimaSmall />
|
|
563
|
+
<MText style={$txt}>
|
|
564
|
+
Giữ nguyên cho đến khi đọc xong thông tin thẻ
|
|
565
|
+
</MText>
|
|
566
|
+
</View>
|
|
567
|
+
<Image
|
|
568
|
+
source={require('../../assets/tts/Frame1000011953.png')}
|
|
569
|
+
style={{
|
|
570
|
+
width: '100%',
|
|
571
|
+
height: 70,
|
|
572
|
+
resizeMode: 'contain',
|
|
573
|
+
marginTop: 16,
|
|
574
|
+
}}
|
|
575
|
+
/>
|
|
576
|
+
</View>
|
|
577
|
+
<View style={{ marginTop: 10, paddingHorizontal: 24 }}>
|
|
578
|
+
<MText style={[$title2, { textAlign: 'left' }]}>
|
|
579
|
+
Cách 2: Chụp 2 mặt
|
|
580
|
+
</MText>
|
|
581
|
+
<View style={$row}>
|
|
582
|
+
<TimaSmall />
|
|
583
|
+
<MText style={$txt}>
|
|
584
|
+
Nên đặt CCCD/ CMND lên mặt phẳng để chụp
|
|
585
|
+
</MText>
|
|
586
|
+
</View>
|
|
587
|
+
<View style={$row}>
|
|
588
|
+
<TimaSmall />
|
|
589
|
+
<MText style={$txt}>
|
|
590
|
+
Đặt CCCD/ CMND nằm gọn trong khung hình (Không {'\n'} quá
|
|
591
|
+
nhỏ hay quá to làm mất chi tiết)
|
|
592
|
+
</MText>
|
|
593
|
+
</View>
|
|
594
|
+
<View style={$row}>
|
|
595
|
+
<TimaSmall />
|
|
596
|
+
<MText style={$txt}>
|
|
597
|
+
Chọn nơi ánh sáng tốt, tránh lóa/ chói hình chụp
|
|
598
|
+
</MText>
|
|
599
|
+
</View>
|
|
600
|
+
<Image
|
|
601
|
+
source={require('../../assets/tts/Frame 1000011947.png')}
|
|
602
|
+
style={{
|
|
603
|
+
width: '100%',
|
|
604
|
+
height: 80,
|
|
605
|
+
resizeMode: 'contain',
|
|
606
|
+
marginTop: 10,
|
|
607
|
+
}}
|
|
608
|
+
/>
|
|
609
|
+
</View>
|
|
610
|
+
|
|
611
|
+
<View
|
|
612
|
+
style={{
|
|
613
|
+
flexDirection: 'row',
|
|
614
|
+
alignItems: 'center',
|
|
615
|
+
margin: 16,
|
|
616
|
+
}}
|
|
617
|
+
>
|
|
618
|
+
<TouchableOpacity
|
|
619
|
+
onPress={() => {
|
|
620
|
+
setType('passport');
|
|
621
|
+
setShowModal(false);
|
|
622
|
+
save(OCR_V1, true);
|
|
623
|
+
}}
|
|
624
|
+
style={{
|
|
625
|
+
flex: 1,
|
|
626
|
+
borderWidth: 1,
|
|
627
|
+
borderColor: '#EF592E',
|
|
628
|
+
height: 40,
|
|
629
|
+
alignItems: 'center',
|
|
630
|
+
justifyContent: 'center',
|
|
631
|
+
borderRadius: 40,
|
|
632
|
+
marginRight: 16,
|
|
633
|
+
}}
|
|
634
|
+
>
|
|
635
|
+
<MText
|
|
636
|
+
style={{
|
|
637
|
+
color: '#EF592E',
|
|
638
|
+
fontSize: 16,
|
|
639
|
+
}}
|
|
640
|
+
>
|
|
641
|
+
Chụp 2 mặt
|
|
642
|
+
</MText>
|
|
643
|
+
</TouchableOpacity>
|
|
644
|
+
<MButton
|
|
645
|
+
style={{
|
|
646
|
+
flex: 1,
|
|
647
|
+
}}
|
|
648
|
+
onPress={() => {
|
|
649
|
+
setType('nfc');
|
|
650
|
+
setShowModal(false);
|
|
651
|
+
save(OCR_V1, true);
|
|
652
|
+
}}
|
|
653
|
+
>
|
|
654
|
+
<LinearGradient
|
|
655
|
+
start={{ x: 1, y: 0 }}
|
|
656
|
+
end={{ x: 0, y: 1 }}
|
|
657
|
+
style={{
|
|
658
|
+
height: 40,
|
|
659
|
+
marginVertical: 16,
|
|
660
|
+
borderRadius: 30,
|
|
661
|
+
alignItems: 'center',
|
|
662
|
+
justifyContent: 'center',
|
|
663
|
+
}}
|
|
664
|
+
colors={['#FF7A00', '#EF4123']}
|
|
665
|
+
>
|
|
666
|
+
<MText
|
|
667
|
+
style={{
|
|
668
|
+
fontSize: 16,
|
|
669
|
+
color: 'white',
|
|
670
|
+
}}
|
|
671
|
+
>
|
|
672
|
+
NFC
|
|
673
|
+
</MText>
|
|
674
|
+
</LinearGradient>
|
|
675
|
+
</MButton>
|
|
676
|
+
</View>
|
|
677
|
+
</View>
|
|
678
|
+
</View>
|
|
679
|
+
</LinearGradient>
|
|
680
|
+
</Modal>
|
|
681
|
+
|
|
682
|
+
<Loading isLoading={isLoading} />
|
|
683
|
+
</View>
|
|
684
|
+
);
|
|
685
|
+
});
|
|
686
|
+
const $row: ViewStyle = {
|
|
687
|
+
flexDirection: 'row',
|
|
688
|
+
alignItems: 'center',
|
|
689
|
+
marginTop: 5,
|
|
690
|
+
};
|
|
691
|
+
const $txt: TextStyle = {
|
|
692
|
+
fontSize: 12,
|
|
693
|
+
marginLeft: 5,
|
|
694
|
+
};
|
|
695
|
+
const $bg: ViewStyle = {
|
|
696
|
+
backgroundColor: 'white',
|
|
697
|
+
borderTopRightRadius: 26,
|
|
698
|
+
borderTopLeftRadius: 26,
|
|
699
|
+
};
|
|
700
|
+
|
|
701
|
+
const $step: ImageStyle = {
|
|
702
|
+
height: 40,
|
|
703
|
+
width: '100%',
|
|
704
|
+
resizeMode: 'contain',
|
|
705
|
+
marginTop: 10,
|
|
706
|
+
marginBottom: 10,
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
const $paddingV: ViewStyle = {
|
|
710
|
+
paddingTop: 16,
|
|
711
|
+
};
|
|
712
|
+
|
|
713
|
+
const $title: TextStyle = {
|
|
714
|
+
fontSize: 16,
|
|
715
|
+
color: 'white',
|
|
716
|
+
fontWeight: 'bold',
|
|
717
|
+
textAlign: 'center',
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
const $title2: TextStyle = {
|
|
721
|
+
fontSize: 16,
|
|
722
|
+
color: '#333333',
|
|
723
|
+
fontWeight: 'bold',
|
|
724
|
+
textAlign: 'center',
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
const $description: TextStyle = {
|
|
728
|
+
fontSize: 12,
|
|
729
|
+
color: 'white',
|
|
730
|
+
textAlign: 'center',
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
const $flex: ViewStyle = {
|
|
734
|
+
flex: 1,
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
const $modal: ViewStyle = {
|
|
738
|
+
justifyContent: 'flex-end',
|
|
739
|
+
margin: 0,
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
const $container: ViewStyle = {
|
|
743
|
+
borderTopRightRadius: 26,
|
|
744
|
+
borderTopLeftRadius: 26,
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
const styles = StyleSheet.create({
|
|
748
|
+
container: {
|
|
749
|
+
flex: 1,
|
|
750
|
+
},
|
|
751
|
+
camera: {
|
|
752
|
+
flex: 1,
|
|
753
|
+
},
|
|
754
|
+
buttonContainer: {
|
|
755
|
+
flex: 0,
|
|
756
|
+
flexDirection: 'column',
|
|
757
|
+
justifyContent: 'center',
|
|
758
|
+
alignItems: 'center',
|
|
759
|
+
position: 'absolute',
|
|
760
|
+
bottom: 40,
|
|
761
|
+
left: 0,
|
|
762
|
+
right: 0,
|
|
763
|
+
zIndex: 1000,
|
|
764
|
+
},
|
|
765
|
+
captureButton: {
|
|
766
|
+
width: 56,
|
|
767
|
+
height: 56,
|
|
768
|
+
borderRadius: 35,
|
|
769
|
+
backgroundColor: 'white',
|
|
770
|
+
justifyContent: 'center',
|
|
771
|
+
alignItems: 'center',
|
|
772
|
+
},
|
|
773
|
+
innerCaptureButton: {
|
|
774
|
+
width: 60,
|
|
775
|
+
height: 60,
|
|
776
|
+
borderRadius: 30,
|
|
777
|
+
backgroundColor: 'red',
|
|
778
|
+
},
|
|
779
|
+
overlay: {
|
|
780
|
+
position: 'absolute',
|
|
781
|
+
top: 0,
|
|
782
|
+
left: 0,
|
|
783
|
+
right: 0,
|
|
784
|
+
bottom: 0,
|
|
785
|
+
justifyContent: 'center',
|
|
786
|
+
alignItems: 'center',
|
|
787
|
+
},
|
|
788
|
+
overlayTop: {
|
|
789
|
+
flex: 1,
|
|
790
|
+
backgroundColor: 'black',
|
|
791
|
+
width: '100%',
|
|
792
|
+
},
|
|
793
|
+
overlayCenter: {
|
|
794
|
+
flexDirection: 'row',
|
|
795
|
+
},
|
|
796
|
+
overlayLeft: {
|
|
797
|
+
flex: 1,
|
|
798
|
+
backgroundColor: 'black',
|
|
799
|
+
},
|
|
800
|
+
overlayRect: {
|
|
801
|
+
width: '90%',
|
|
802
|
+
height: 100,
|
|
803
|
+
borderColor: 'white',
|
|
804
|
+
borderWidth: 2,
|
|
805
|
+
justifyContent: 'center',
|
|
806
|
+
alignItems: 'center',
|
|
807
|
+
},
|
|
808
|
+
instructionText: {
|
|
809
|
+
color: 'white',
|
|
810
|
+
textAlign: 'center',
|
|
811
|
+
paddingHorizontal: 10,
|
|
812
|
+
fontSize: 14,
|
|
813
|
+
position: 'absolute',
|
|
814
|
+
top: -50,
|
|
815
|
+
},
|
|
816
|
+
overlayRight: {
|
|
817
|
+
flex: 1,
|
|
818
|
+
backgroundColor: 'black',
|
|
819
|
+
},
|
|
820
|
+
overlayBottom: {
|
|
821
|
+
flex: 1,
|
|
822
|
+
backgroundColor: 'black',
|
|
823
|
+
width: '100%',
|
|
824
|
+
},
|
|
825
|
+
mrzContainer: {
|
|
826
|
+
padding: 10,
|
|
827
|
+
},
|
|
828
|
+
mrzText: {
|
|
829
|
+
fontSize: 16,
|
|
830
|
+
},
|
|
831
|
+
});
|