react-native-timacare 3.3.11 → 3.3.13
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/RNTimacare.js +1 -1
- package/lib/commonjs/RNTimacare.js.flow +2 -11
- package/lib/commonjs/RNTimacare.js.map +1 -1
- package/lib/commonjs/assets/digital_topup/index.js +2 -0
- package/lib/commonjs/assets/digital_topup/index.js.flow +28 -0
- package/lib/commonjs/assets/digital_topup/index.js.map +1 -0
- package/lib/commonjs/assets/digital_topup/step1.svg +31 -0
- package/lib/commonjs/assets/digital_topup/step1_disable.svg +31 -0
- package/lib/commonjs/assets/digital_topup/step1_success.svg +21 -0
- package/lib/commonjs/assets/digital_topup/step2.svg +39 -0
- package/lib/commonjs/assets/digital_topup/step2_disable.svg +16 -0
- package/lib/commonjs/assets/digital_topup/step2_success.svg +21 -0
- package/lib/commonjs/assets/digital_topup/step3.svg +23 -0
- package/lib/commonjs/assets/digital_topup/step3_disable.svg +10 -0
- package/lib/commonjs/assets/digital_topup/step3_success.svg +21 -0
- package/lib/commonjs/assets/digital_topup/step4_disable.svg +16 -0
- package/lib/commonjs/assets/digital_topup/step4_success.svg +21 -0
- package/lib/commonjs/components/AlertLoan.js +1 -1
- package/lib/commonjs/components/AlertLoan.js.flow +1 -1
- package/lib/commonjs/components/AlertLoan.js.map +1 -1
- package/lib/commonjs/components/ItemTimaOneV3.js +1 -1
- package/lib/commonjs/components/ItemTimaOneV3.js.flow +1 -5
- package/lib/commonjs/components/ItemTimaOneV3.js.map +1 -1
- package/lib/commonjs/components/MHeader.js +1 -1
- package/lib/commonjs/components/MHeader.js.flow +3 -2
- package/lib/commonjs/components/MHeader.js.map +1 -1
- package/lib/commonjs/components/ModalOptionLoan.js +1 -1
- package/lib/commonjs/components/ModalOptionLoan.js.flow +4 -2
- package/lib/commonjs/components/ModalOptionLoan.js.map +1 -1
- package/lib/commonjs/components/ModalOptionLoanDigital.js +2 -0
- package/lib/commonjs/components/ModalOptionLoanDigital.js.flow +297 -0
- package/lib/commonjs/components/ModalOptionLoanDigital.js.map +1 -0
- package/lib/commonjs/navigation/primary-navigator.js +1 -1
- package/lib/commonjs/navigation/primary-navigator.js.flow +0 -3
- package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js +1 -1
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js.flow +299 -126
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js.map +1 -1
- package/lib/commonjs/screens/detail-loan/QrPayment.js +1 -1
- package/lib/commonjs/screens/detail-loan/QrPayment.js.flow +1 -0
- 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.flow +1 -1
- package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
- package/lib/commonjs/screens/home/DigitalTopupItem.js +2 -0
- package/lib/commonjs/screens/home/DigitalTopupItem.js.flow +562 -0
- package/lib/commonjs/screens/home/DigitalTopupItem.js.map +1 -0
- package/lib/commonjs/screens/home/index.js +1 -1
- package/lib/commonjs/screens/home/index.js.flow +49 -4
- package/lib/commonjs/screens/home/index.js.map +1 -1
- package/lib/commonjs/screens/liveness-v2/index.js +1 -1
- package/lib/commonjs/screens/liveness-v2/index.js.flow +12 -9
- package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
- package/lib/commonjs/screens/nationalID/index.js +1 -1
- package/lib/commonjs/screens/nationalID/index.js.flow +4 -2
- 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.flow +3 -1
- package/lib/commonjs/screens/nationalIDBack/index.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +3 -1
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.flow +1 -375
- package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.flow +12 -9
- package/lib/commonjs/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.flow +16 -10
- package/lib/commonjs/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.flow +18 -15
- package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js.flow +1 -1
- package/lib/commonjs/screens/toan-trinh-so/TopupLoanInfo.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +8 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.flow +20 -17
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.flow +14 -9
- package/lib/commonjs/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
- package/lib/commonjs/screens/uploadVideo/index.js +1 -1
- package/lib/commonjs/screens/uploadVideo/index.js.flow +109 -61
- package/lib/commonjs/screens/uploadVideo/index.js.map +1 -1
- package/lib/commonjs/screens/uploadVideo/videoStore.js +1 -1
- package/lib/commonjs/screens/uploadVideo/videoStore.js.flow +4 -4
- package/lib/commonjs/screens/uploadVideo/videoStore.js.map +1 -1
- package/lib/commonjs/sdkConfig.js +1 -1
- package/lib/commonjs/sdkConfig.js.flow +6 -0
- package/lib/commonjs/sdkConfig.js.map +1 -1
- package/lib/commonjs/services/api/api.js +1 -1
- package/lib/commonjs/services/api/api.js.flow +32 -0
- package/lib/commonjs/services/api/api.js.map +1 -1
- package/lib/module/RNTimacare.js +1 -1
- package/lib/module/RNTimacare.js.map +1 -1
- package/lib/module/assets/digital_topup/index.js +2 -0
- package/lib/module/assets/digital_topup/index.js.map +1 -0
- package/lib/module/assets/digital_topup/step1.svg +31 -0
- package/lib/module/assets/digital_topup/step1_disable.svg +31 -0
- package/lib/module/assets/digital_topup/step1_success.svg +21 -0
- package/lib/module/assets/digital_topup/step2.svg +39 -0
- package/lib/module/assets/digital_topup/step2_disable.svg +16 -0
- package/lib/module/assets/digital_topup/step2_success.svg +21 -0
- package/lib/module/assets/digital_topup/step3.svg +23 -0
- package/lib/module/assets/digital_topup/step3_disable.svg +10 -0
- package/lib/module/assets/digital_topup/step3_success.svg +21 -0
- package/lib/module/assets/digital_topup/step4_disable.svg +16 -0
- package/lib/module/assets/digital_topup/step4_success.svg +21 -0
- package/lib/module/components/AlertLoan.js +1 -1
- package/lib/module/components/AlertLoan.js.map +1 -1
- package/lib/module/components/ItemTimaOneV3.js +1 -1
- package/lib/module/components/ItemTimaOneV3.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/ModalOptionLoan.js +1 -1
- package/lib/module/components/ModalOptionLoan.js.map +1 -1
- package/lib/module/components/ModalOptionLoanDigital.js +2 -0
- package/lib/module/components/ModalOptionLoanDigital.js.map +1 -0
- package/lib/module/navigation/primary-navigator.js +1 -1
- package/lib/module/navigation/primary-navigator.js.map +1 -1
- package/lib/module/screens/camera/CCCDCameraScreen.js +1 -1
- package/lib/module/screens/camera/CCCDCameraScreen.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/home/DigitalTopupItem.js +2 -0
- package/lib/module/screens/home/DigitalTopupItem.js.map +1 -0
- package/lib/module/screens/home/index.js +1 -1
- package/lib/module/screens/home/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/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/toan-trinh-so/OCR.js +1 -1
- package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewLoan.js +1 -1
- package/lib/module/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js +1 -1
- package/lib/module/screens/toan-trinh-so/TTSNationalIDFront.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TTSSelfie.js +1 -1
- package/lib/module/screens/toan-trinh-so/TTSSelfie.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TTSSignLoan.js +1 -1
- package/lib/module/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/TopupLoanInfo.js +1 -1
- package/lib/module/screens/toan-trinh-so/TopupLoanInfo.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistration.js +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistration.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js +1 -1
- package/lib/module/screens/toan-trinh-so/VehicleRegistrationFront.js.map +1 -1
- package/lib/module/screens/uploadVideo/index.js +1 -1
- package/lib/module/screens/uploadVideo/index.js.map +1 -1
- package/lib/module/screens/uploadVideo/videoStore.js +1 -1
- package/lib/module/screens/uploadVideo/videoStore.js.map +1 -1
- package/lib/module/sdkConfig.js +1 -1
- package/lib/module/sdkConfig.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/typescript/RNTimacare.d.ts +1 -1
- package/lib/typescript/RNTimacare.d.ts.map +1 -1
- package/lib/typescript/assets/digital_topup/index.d.ts +14 -0
- package/lib/typescript/assets/digital_topup/index.d.ts.map +1 -0
- package/lib/typescript/components/ItemTimaOneV3.d.ts.map +1 -1
- package/lib/typescript/components/MHeader.d.ts.map +1 -1
- package/lib/typescript/components/ModalOptionLoan.d.ts.map +1 -1
- package/lib/typescript/components/ModalOptionLoanDigital.d.ts +9 -0
- package/lib/typescript/components/ModalOptionLoanDigital.d.ts.map +1 -0
- package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
- package/lib/typescript/screens/camera/CCCDCameraScreen.d.ts.map +1 -1
- package/lib/typescript/screens/detail-loan/QrPayment.d.ts.map +1 -1
- package/lib/typescript/screens/home/DigitalTopupItem.d.ts +7 -0
- package/lib/typescript/screens/home/DigitalTopupItem.d.ts.map +1 -0
- package/lib/typescript/screens/home/index.d.ts.map +1 -1
- package/lib/typescript/screens/liveness-v2/index.d.ts.map +1 -1
- package/lib/typescript/screens/nationalID/index.d.ts.map +1 -1
- package/lib/typescript/screens/nationalIDBack/index.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/TTSNationalIDFront.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/TTSSelfie.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/TTSSignLoan.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/VehicleRegistration.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/VehicleRegistrationFront.d.ts.map +1 -1
- package/lib/typescript/screens/uploadVideo/index.d.ts.map +1 -1
- package/lib/typescript/sdkConfig.d.ts.map +1 -1
- package/lib/typescript/services/api/api.d.ts +32 -0
- package/lib/typescript/services/api/api.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/RNTimacare.tsx +2 -11
- package/src/assets/digital_topup/index.tsx +28 -0
- package/src/assets/digital_topup/step1.svg +31 -0
- package/src/assets/digital_topup/step1_disable.svg +31 -0
- package/src/assets/digital_topup/step1_success.svg +21 -0
- package/src/assets/digital_topup/step2.svg +39 -0
- package/src/assets/digital_topup/step2_disable.svg +16 -0
- package/src/assets/digital_topup/step2_success.svg +21 -0
- package/src/assets/digital_topup/step3.svg +23 -0
- package/src/assets/digital_topup/step3_disable.svg +10 -0
- package/src/assets/digital_topup/step3_success.svg +21 -0
- package/src/assets/digital_topup/step4_disable.svg +16 -0
- package/src/assets/digital_topup/step4_success.svg +21 -0
- package/src/components/AlertLoan.tsx +1 -1
- package/src/components/ItemTimaOneV3.tsx +1 -5
- package/src/components/MHeader.tsx +3 -2
- package/src/components/ModalOptionLoan.tsx +4 -2
- package/src/components/ModalOptionLoanDigital.tsx +297 -0
- package/src/navigation/primary-navigator.tsx +0 -3
- package/src/screens/camera/CCCDCameraScreen.tsx +299 -126
- package/src/screens/detail-loan/QrPayment.tsx +1 -0
- package/src/screens/detail-loan/ShowQrCode.tsx +1 -1
- package/src/screens/home/DigitalTopupItem.tsx +562 -0
- package/src/screens/home/index.tsx +49 -4
- package/src/screens/liveness-v2/index.tsx +12 -9
- package/src/screens/nationalID/index.tsx +4 -2
- package/src/screens/nationalIDBack/index.tsx +3 -1
- package/src/screens/toan-trinh-so/OCR.tsx +3 -1
- package/src/screens/toan-trinh-so/ReviewLoan.tsx +1 -375
- package/src/screens/toan-trinh-so/TTSNationalIDFront.tsx +12 -9
- package/src/screens/toan-trinh-so/TTSSelfie.tsx +16 -10
- package/src/screens/toan-trinh-so/TTSSignLoan.tsx +18 -15
- package/src/screens/toan-trinh-so/TopupLoanInfo.tsx +1 -1
- package/src/screens/toan-trinh-so/VehicleCamera.tsx +8 -1
- package/src/screens/toan-trinh-so/VehicleRegistration.tsx +20 -17
- package/src/screens/toan-trinh-so/VehicleRegistrationFront.tsx +14 -9
- package/src/screens/uploadVideo/index.tsx +109 -61
- package/src/screens/uploadVideo/videoStore.tsx +4 -4
- package/src/sdkConfig.ts +6 -0
- package/src/services/api/api.ts +32 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=VehicleRegistration;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _native=require("@react-navigation/native");var _CommonStyles=require("../CommonStyles");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _api=require("../../services/api");var _navigation=require("../../navigation");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _MButton=_interopRequireDefault(require("../../components/MButton"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _AppStore=_interopRequireDefault(require("../../AppStore"));var _utils=require("../../utils");var _jsxFileName="/Users/tima/Documents/Tima/tima-care-v2-sdk/src/screens/toan-trinh-so/VehicleRegistration.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var logoView={position:'absolute',width:'100%',height:'100%',resizeMode:'cover'};function VehicleRegistration(props){var navigation=(0,_native.useNavigation)();var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),photo=_useState2[0],setPhoto=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),isLoading=_useState4[0],setIsLoading=_useState4[1];(0,_react.useEffect)(function _callee(){var _props$route,_props$route$params,_props$route3,_props$route3$params,_props$route3$params$,_props$route4,_props$route4$params,_props$route4$params$,_props$route5,_props$route5$params,_props$route5$params$,_props$route6,_props$route6$params,_props$route6$params$;var _props$route2,_props$route2$params;return _regenerator.default.async(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(props!=null&&(_props$route=props.route)!=null&&(_props$route$params=_props$route.params)!=null&&_props$route$params.uri){setPhoto(props==null?void 0:(_props$route2=props.route)==null?void 0:(_props$route2$params=_props$route2.params)==null?void 0:_props$route2$params.uri);}_context.next=3;return _regenerator.default.awrap((0,_utils.logEvent)('dangky_completed',{event:'dangky_completed',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(props==null?void 0:(_props$route3=props.route)==null?void 0:(_props$route3$params=_props$route3.params)==null?void 0:(_props$route3$params$=_props$route3$params.loan)==null?void 0:_props$route3$params$.id),utmSource:props==null?void 0:(_props$route4=props.route)==null?void 0:(_props$route4$params=_props$route4.params)==null?void 0:(_props$route4$params$=_props$route4$params.loan)==null?void 0:_props$route4$params$.utmSource}));case 3:(0,_utils.logEventFb)('dangky_completed');_context.next=6;return _regenerator.default.awrap((0,_utils.logEvent)('dangkiem_started',{event:'dangkiem_started',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(props==null?void 0:(_props$route5=props.route)==null?void 0:(_props$route5$params=_props$route5.params)==null?void 0:(_props$route5$params$=_props$route5$params.loan)==null?void 0:_props$route5$params$.id),utmSource:props==null?void 0:(_props$route6=props.route)==null?void 0:(_props$route6$params=_props$route6.params)==null?void 0:(_props$route6$params$=_props$route6$params.loan)==null?void 0:_props$route6$params$.utmSource}));case 6:(0,_utils.logEventFb)('dangkiem_started');case 7:case"end":return _context.stop();}},null,null,null,Promise);},[]);var takePhoto=function takePhoto(){var _props$route7,_props$route7$params;navigation.push(_navigation.ScreenNames.RegisterCamera,{front:true,loan:props==null?void 0:(_props$route7=props.route)==null?void 0:(_props$route7$params=_props$route7.params)==null?void 0:_props$route7$params.loan,callback:function callback(photo){setPhoto(photo);}});};var nextStep=function _callee2(){var _props$route8,_props$route8$params,_props$route8$params$,formData,response,_response$data,_response$data$meta,_props$route9,_props$route9$params,_response$data2,_response$data2$meta;return _regenerator.default.async(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;setIsLoading(true);formData=new FormData();formData.append('LoanBriefId',props==null?void 0:(_props$route8=props.route)==null?void 0:(_props$route8$params=_props$route8.params)==null?void 0:(_props$route8$params$=_props$route8$params.loan)==null?void 0:_props$route8$params$.id);formData.append('TypeDocumentId',508);formData.append('SubType',1);formData.append('image',{uri:photo,type:'image/jpg',name:'image.jpg'});_context2.next=9;return _regenerator.default.awrap(_api.Api.getInstance().uploadImageAutoDE(formData));case 9:response=_context2.sent;setIsLoading(false);if(response.kind==='ok'){if(((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){navigation.push(_navigation.ScreenNames.RegisterCamera,{loan:props==null?void 0:(_props$route9=props.route)==null?void 0:(_props$route9$params=_props$route9.params)==null?void 0:_props$route9$params.loan});}else{_reactNative.Alert.alert('Thông báo',(_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');}_context2.next=19;break;case 14:_context2.prev=14;_context2.t0=_context2["catch"](0);console.log(_context2.t0);_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');setIsLoading(false);case 19:case"end":return _context2.stop();}},null,null,[[0,14]],Promise);};return _react.default.createElement(_reactNative.View,{style:$flex,__self:this,__source:{fileName:_jsxFileName,lineNumber:107,columnNumber:5}},_react.default.createElement(_reactNative.Image,{source:require('../../assets/img/EKYC.png'),style:logoView,__self:this,__source:{fileName:_jsxFileName,lineNumber:108,columnNumber:7}}),_react.default.createElement(_MHeader.default,{title:"\u0110\u0102NG KI\u1EC2M XE",onBack:function onBack(){navigation.goBack();},__self:this,__source:{fileName:_jsxFileName,lineNumber:109,columnNumber:7}}),_react.default.createElement(_reactNative.SafeAreaView,{style:$flex,__self:this,__source:{fileName:_jsxFileName,lineNumber:115,columnNumber:7}},_react.default.createElement(_reactNative.ScrollView,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:116,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:{paddingHorizontal:16,paddingBottom:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:117,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:118,columnNumber:13}},_react.default.createElement(_icons.TimaSmallWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:125,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{fontSize:16,color:'#FFFFFF',marginLeft:8}],__self:this,__source:{fileName:_jsxFileName,lineNumber:126,columnNumber:15}},"Ch\u1EE5p \u0111\u0103ng ki\u1EC3m xe m\u1EB7t tr\u01B0\u1EDBc")),_react.default.createElement(_reactNative.Image,{source:photo?{uri:photo}:require('../../assets/tts/back.png'),style:{width:_reactNative.Dimensions.get('window').width-32,height:(_reactNative.Dimensions.get('window').width-32)*250/360,borderWidth:8,borderRadius:6,borderColor:'#FFFFFF',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:135,columnNumber:13}}))),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',paddingHorizontal:16,marginBottom:30},__self:this,__source:{fileName:_jsxFileName,lineNumber:150,columnNumber:9}},_react.default.createElement(_MButton.default,{onPress:function onPress(){takePhoto();},disabled:isLoading,style:[_CommonStyles.commonStyles.row,_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'#FFFFFF',height:40,borderRadius:30,flex:1,marginRight:8,borderWidth:1,borderColor:'#EF4123'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:157,columnNumber:11}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'#F05123'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:177,columnNumber:13}},"Ch\u1EE5p \u1EA3nh")),_react.default.createElement(_MButton.default,{disabled:!photo||isLoading,style:{flex:1},onPress:function onPress(){nextStep();},__self:this,__source:{fileName:_jsxFileName,lineNumber:182,columnNumber:11}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:['#FF7A00','#EF4123'],style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{height:40,borderRadius:30,marginLeft:8}],__self:this,__source:{fileName:_jsxFileName,lineNumber:189,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'white'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:201,columnNumber:15}},"Ti\u1EBFp t\u1EE5c")))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:207,columnNumber:9}})));}var $flex={flex:1};
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=VehicleRegistration;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _native=require("@react-navigation/native");var _CommonStyles=require("../CommonStyles");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _api=require("../../services/api");var _navigation=require("../../navigation");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _MButton=_interopRequireDefault(require("../../components/MButton"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _AppStore=_interopRequireDefault(require("../../AppStore"));var _utils=require("../../utils");var _jsxFileName="/Users/tima/Documents/Tima/tima-care-v2-sdk/src/screens/toan-trinh-so/VehicleRegistration.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var logoView={position:'absolute',width:'100%',height:'100%',resizeMode:'cover'};function VehicleRegistration(props){var navigation=(0,_native.useNavigation)();var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),photo=_useState2[0],setPhoto=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),isLoading=_useState4[0],setIsLoading=_useState4[1];(0,_react.useEffect)(function(){var _props$route,_props$route$params;if(props!=null&&(_props$route=props.route)!=null&&(_props$route$params=_props$route.params)!=null&&_props$route$params.uri){var _props$route2,_props$route2$params;setPhoto(props==null?void 0:(_props$route2=props.route)==null?void 0:(_props$route2$params=_props$route2.params)==null?void 0:_props$route2$params.uri);}var trackStarted=function _callee(){var _props$route3,_props$route3$params,_props$route3$params$,_props$route4,_props$route4$params,_props$route4$params$,_props$route5,_props$route5$params,_props$route5$params$,_props$route6,_props$route6$params,_props$route6$params$;return _regenerator.default.async(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return _regenerator.default.awrap((0,_utils.logEvent)('dangky_completed',{event:'dangky_completed',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(props==null?void 0:(_props$route3=props.route)==null?void 0:(_props$route3$params=_props$route3.params)==null?void 0:(_props$route3$params$=_props$route3$params.loan)==null?void 0:_props$route3$params$.id),utmSource:props==null?void 0:(_props$route4=props.route)==null?void 0:(_props$route4$params=_props$route4.params)==null?void 0:(_props$route4$params$=_props$route4$params.loan)==null?void 0:_props$route4$params$.utmSource}));case 2:(0,_utils.logEventFb)('dangky_completed');_context.next=5;return _regenerator.default.awrap((0,_utils.logEvent)('dangkiem_started',{event:'dangkiem_started',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(props==null?void 0:(_props$route5=props.route)==null?void 0:(_props$route5$params=_props$route5.params)==null?void 0:(_props$route5$params$=_props$route5$params.loan)==null?void 0:_props$route5$params$.id),utmSource:props==null?void 0:(_props$route6=props.route)==null?void 0:(_props$route6$params=_props$route6.params)==null?void 0:(_props$route6$params$=_props$route6$params.loan)==null?void 0:_props$route6$params$.utmSource}));case 5:(0,_utils.logEventFb)('dangkiem_started');case 6:case"end":return _context.stop();}},null,null,null,Promise);};trackStarted();},[]);var takePhoto=function takePhoto(){var _props$route7,_props$route7$params;navigation.push(_navigation.ScreenNames.RegisterCamera,{front:true,loan:props==null?void 0:(_props$route7=props.route)==null?void 0:(_props$route7$params=_props$route7.params)==null?void 0:_props$route7$params.loan,callback:function callback(photo){setPhoto(photo);}});};var nextStep=function _callee2(){var _props$route8,_props$route8$params,_props$route8$params$,formData,response,_response$data,_response$data$meta,_props$route9,_props$route9$params,_response$data2,_response$data2$meta;return _regenerator.default.async(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;setIsLoading(true);formData=new FormData();formData.append('LoanBriefId',props==null?void 0:(_props$route8=props.route)==null?void 0:(_props$route8$params=_props$route8.params)==null?void 0:(_props$route8$params$=_props$route8$params.loan)==null?void 0:_props$route8$params$.id);formData.append('TypeDocumentId',508);formData.append('SubType',1);formData.append('image',{uri:photo,type:'image/jpg',name:'image.jpg'});_context2.next=9;return _regenerator.default.awrap(_api.Api.getInstance().uploadImageAutoDE(formData));case 9:response=_context2.sent;setIsLoading(false);if(response.kind==='ok'){if(((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){navigation.push(_navigation.ScreenNames.RegisterCamera,{loan:props==null?void 0:(_props$route9=props.route)==null?void 0:(_props$route9$params=_props$route9.params)==null?void 0:_props$route9$params.loan});}else{_reactNative.Alert.alert('Thông báo',(_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');}_context2.next=19;break;case 14:_context2.prev=14;_context2.t0=_context2["catch"](0);console.log(_context2.t0);_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');setIsLoading(false);case 19:case"end":return _context2.stop();}},null,null,[[0,14]],Promise);};return _react.default.createElement(_reactNative.View,{style:$flex,__self:this,__source:{fileName:_jsxFileName,lineNumber:110,columnNumber:5}},_react.default.createElement(_reactNative.Image,{source:require('../../assets/img/EKYC.png'),style:logoView,__self:this,__source:{fileName:_jsxFileName,lineNumber:111,columnNumber:7}}),_react.default.createElement(_MHeader.default,{title:"\u0110\u0102NG KI\u1EC2M XE",onBack:function onBack(){navigation.goBack();},__self:this,__source:{fileName:_jsxFileName,lineNumber:112,columnNumber:7}}),_react.default.createElement(_reactNative.SafeAreaView,{style:$flex,__self:this,__source:{fileName:_jsxFileName,lineNumber:118,columnNumber:7}},_react.default.createElement(_reactNative.ScrollView,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:119,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:{paddingHorizontal:16,paddingBottom:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:120,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:121,columnNumber:13}},_react.default.createElement(_icons.TimaSmallWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:128,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{fontSize:16,color:'#FFFFFF',marginLeft:8}],__self:this,__source:{fileName:_jsxFileName,lineNumber:129,columnNumber:15}},"Ch\u1EE5p \u0111\u0103ng ki\u1EC3m xe m\u1EB7t tr\u01B0\u1EDBc")),_react.default.createElement(_reactNative.Image,{source:photo?{uri:photo}:require('../../assets/tts/back.png'),style:{width:_reactNative.Dimensions.get('window').width-32,height:(_reactNative.Dimensions.get('window').width-32)*250/360,borderWidth:8,borderRadius:6,borderColor:'#FFFFFF',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:138,columnNumber:13}}))),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',paddingHorizontal:16,marginBottom:30},__self:this,__source:{fileName:_jsxFileName,lineNumber:153,columnNumber:9}},_react.default.createElement(_MButton.default,{onPress:function onPress(){takePhoto();},disabled:isLoading,style:[_CommonStyles.commonStyles.row,_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'#FFFFFF',height:40,borderRadius:30,flex:1,marginRight:8,borderWidth:1,borderColor:'#EF4123'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:160,columnNumber:11}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'#F05123'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:180,columnNumber:13}},"Ch\u1EE5p \u1EA3nh")),_react.default.createElement(_MButton.default,{disabled:!photo||isLoading,style:{flex:1},onPress:function onPress(){nextStep();},__self:this,__source:{fileName:_jsxFileName,lineNumber:185,columnNumber:11}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:['#FF7A00','#EF4123'],style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{height:40,borderRadius:30,marginLeft:8}],__self:this,__source:{fileName:_jsxFileName,lineNumber:192,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'white'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:204,columnNumber:15}},"Ti\u1EBFp t\u1EE5c")))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:210,columnNumber:9}})));}var $flex={flex:1};
|
|
2
2
|
//# sourceMappingURL=VehicleRegistration.js.map
|
|
@@ -39,26 +39,29 @@ export default function VehicleRegistration(props) {
|
|
|
39
39
|
const [photo, setPhoto] = useState(null);
|
|
40
40
|
const [isLoading, setIsLoading] = useState(false);
|
|
41
41
|
|
|
42
|
-
useEffect(
|
|
42
|
+
useEffect(() => {
|
|
43
43
|
if (props?.route?.params?.uri) {
|
|
44
44
|
setPhoto(props?.route?.params?.uri);
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
const trackStarted = async () => {
|
|
47
|
+
await logEvent('dangky_completed', {
|
|
48
|
+
event: 'dangky_completed',
|
|
49
|
+
createdAt: new Date(),
|
|
50
|
+
deviceId: appStore.deviceId,
|
|
51
|
+
loanId: String(props?.route?.params?.loan?.id),
|
|
52
|
+
utmSource: props?.route?.params?.loan?.utmSource,
|
|
53
|
+
});
|
|
54
|
+
logEventFb('dangky_completed');
|
|
55
|
+
await logEvent('dangkiem_started', {
|
|
56
|
+
event: 'dangkiem_started',
|
|
57
|
+
createdAt: new Date(),
|
|
58
|
+
deviceId: appStore.deviceId,
|
|
59
|
+
loanId: String(props?.route?.params?.loan?.id),
|
|
60
|
+
utmSource: props?.route?.params?.loan?.utmSource,
|
|
61
|
+
});
|
|
62
|
+
logEventFb('dangkiem_started');
|
|
63
|
+
};
|
|
64
|
+
trackStarted();
|
|
62
65
|
}, []);
|
|
63
66
|
|
|
64
67
|
const takePhoto = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_MHeader","_interopRequireDefault","_native","_CommonStyles","_icons","_MText","_api","_navigation","_Loading","_MButton","_reactNativeLinearGradient","_AppStore","_utils","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","logoView","position","width","height","resizeMode","VehicleRegistration","props","navigation","useNavigation","_useState","useState","_useState2","_slicedToArray2","photo","setPhoto","_useState3","_useState4","isLoading","setIsLoading","useEffect","_callee","_props$route","_props$route$params","_props$route3","_props$route3$params","_props$route3$params$","_props$route4","_props$route4$params","_props$route4$params$","_props$route5","_props$route5$params","_props$route5$params$","_props$route6","_props$route6$params","_props$route6$params$","_props$route2","_props$route2$params","_regenerator","async","_callee$","_context","prev","next","route","params","uri","awrap","logEvent","event","createdAt","Date","deviceId","appStore","loanId","String","loan","id","utmSource","logEventFb","stop","Promise","takePhoto","_props$route7","_props$route7$params","push","ScreenNames","RegisterCamera","front","callback","nextStep","_callee2","_props$route8","_props$route8$params","_props$route8$params$","formData","response","_response$data","_response$data$meta","_props$route9","_props$route9$params","_response$data2","_response$data2$meta","_callee2$","_context2","FormData","append","type","name","Api","getInstance","uploadImageAutoDE","sent","kind","data","meta","errorCode","Alert","alert","errorMessage","t0","console","log","createElement","View","style","$flex","__self","__source","fileName","lineNumber","columnNumber","Image","source","title","onBack","goBack","SafeAreaView","ScrollView","commonStyles","fill","paddingHorizontal","paddingBottom","flexDirection","alignItems","marginTop","TimaSmallWhite","MText","textNormalBold","fontSize","color","marginLeft","Dimensions","borderWidth","borderRadius","borderColor","marginBottom","onPress","disabled","row","alignCenter","justifyCenter","backgroundColor","flex","marginRight","textNormal","colors"],"sourceRoot":"../../../../src","sources":["screens/toan-trinh-so/VehicleRegistration.tsx"],"mappings":"2VACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAUA,IAAAE,QAAA,CAAAC,sBAAA,CAAAH,OAAA,8BACA,IAAAI,OAAA,CAAAJ,OAAA,6BAKA,IAAAK,aAAA,CAAAL,OAAA,oBACA,IAAAM,MAAA,CAAAN,OAAA,uBACA,IAAAO,MAAA,CAAAP,OAAA,2BACA,IAAAQ,IAAA,CAAAR,OAAA,uBACA,IAAAS,WAAA,CAAAT,OAAA,qBACA,IAAAU,QAAA,CAAAP,sBAAA,CAAAH,OAAA,8BACA,IAAAW,QAAA,CAAAR,sBAAA,CAAAH,OAAA,8BACA,IAAAY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Ef,KAAK,CAAE,OAAQ,CAAC,CAAE,CAAAvB,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAlI,YAAA,CAAAmI,UAAA,KAAAC,YAAA,MAAC,oBAEtD,CACO,CACT,CACL,CAAC,CACPrJ,MAAA,CAAAwB,OAAA,CAAAqH,aAAA,CAACjI,QAAA,CAAAY,OAAO,EAACgC,SAAS,CAAEA,SAAU,CAAAyF,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAAlI,YAAA,CAAAmI,UAAA,KAAAC,YAAA,IAAE,CACpB,CACV,CAAC,CAEX,CAEA,GAAM,CAAAL,KAAgB,CAAG,CACvBqC,IAAI,CAAE,CACR,CAAC"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_MHeader","_interopRequireDefault","_native","_CommonStyles","_icons","_MText","_api","_navigation","_Loading","_MButton","_reactNativeLinearGradient","_AppStore","_utils","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","logoView","position","width","height","resizeMode","VehicleRegistration","props","navigation","useNavigation","_useState","useState","_useState2","_slicedToArray2","photo","setPhoto","_useState3","_useState4","isLoading","setIsLoading","useEffect","_props$route","_props$route$params","route","params","uri","_props$route2","_props$route2$params","trackStarted","_callee","_props$route3","_props$route3$params","_props$route3$params$","_props$route4","_props$route4$params","_props$route4$params$","_props$route5","_props$route5$params","_props$route5$params$","_props$route6","_props$route6$params","_props$route6$params$","_regenerator","async","_callee$","_context","prev","next","awrap","logEvent","event","createdAt","Date","deviceId","appStore","loanId","String","loan","id","utmSource","logEventFb","stop","Promise","takePhoto","_props$route7","_props$route7$params","push","ScreenNames","RegisterCamera","front","callback","nextStep","_callee2","_props$route8","_props$route8$params","_props$route8$params$","formData","response","_response$data","_response$data$meta","_props$route9","_props$route9$params","_response$data2","_response$data2$meta","_callee2$","_context2","FormData","append","type","name","Api","getInstance","uploadImageAutoDE","sent","kind","data","meta","errorCode","Alert","alert","errorMessage","t0","console","log","createElement","View","style","$flex","__self","__source","fileName","lineNumber","columnNumber","Image","source","title","onBack","goBack","SafeAreaView","ScrollView","commonStyles","fill","paddingHorizontal","paddingBottom","flexDirection","alignItems","marginTop","TimaSmallWhite","MText","textNormalBold","fontSize","color","marginLeft","Dimensions","borderWidth","borderRadius","borderColor","marginBottom","onPress","disabled","row","alignCenter","justifyCenter","backgroundColor","flex","marginRight","textNormal","colors"],"sourceRoot":"../../../../src","sources":["screens/toan-trinh-so/VehicleRegistration.tsx"],"mappings":"2VACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAUA,IAAAE,QAAA,CAAAC,sBAAA,CAAAH,OAAA,8BACA,IAAAI,OAAA,CAAAJ,OAAA,6BAKA,IAAAK,aAAA,CAAAL,OAAA,oBACA,IAAAM,MAAA,CAAAN,OAAA,uBACA,IAAAO,MAAA,CAAAP,OAAA,2BACA,IAAAQ,IAAA,CAAAR,OAAA,uBACA,IAAAS,WAAA,CAAAT,OAAA,qBACA,IAAAU,QAAA,CAAAP,sBAAA,CAAAH,OAAA,8BACA,IAAAW,QAAA,CAAAR,sBAAA,CAAAH,OAAA,8BACA,IAAAY,0BAAA,CAAAT,sBAAA,CAAAH,OAAA,kCACA,IAAAa,SAAA,CAAAV,sBAAA,CAAAH,OAAA,oBACA,IAAAc,MAAA,CAAAd,OAAA,gBAAmD,IAAAe,YAAA,0GAAAC,yBAAAC,CAAA,wBAAAC,OAAA,iBAAAC,CAAA,KAAAD,OAAA,GAAAE,CAAA,KAAAF,OAAA,UAAAF,wBAAA,UAAAA,yBAAAC,CAAA,SAAAA,CAAA,CAAAG,CAAA,CAAAD,CAAA,IAAAF,CAAA,YAAAlB,wBAAAkB,CAAA,CAAAE,CAAA,MAAAA,CAAA,EAAAF,CAAA,EAAAA,CAAA,CAAAI,UAAA,QAAAJ,CAAA,WA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CAAC,CAEX,CAEA,GAAM,CAAAL,KAAgB,CAAG,CACvBqC,IAAI,CAAE,CACR,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=VehicleRegistrationFront;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _MText=require("../../components/MText");var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _native=require("@react-navigation/native");var _CommonStyles=require("../CommonStyles");var _icons=require("../../assets/icons");var _MButton=_interopRequireDefault(require("../../components/MButton"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _navigation=require("../../navigation");var _api=require("../../services/api");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _AppStore=_interopRequireDefault(require("../../AppStore"));var _utils=require("../../utils");var _jsxFileName="/Users/tima/Documents/Tima/tima-care-v2-sdk/src/screens/toan-trinh-so/VehicleRegistrationFront.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var logoView={position:'absolute',width:'100%',height:'100%',resizeMode:'cover'};function VehicleRegistrationFront(props){var navigation=(0,_native.useNavigation)();var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),photo=_useState2[0],setPhoto=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),isLoading=_useState4[0],setIsLoading=_useState4[1];(0,_react.useEffect)(function _callee(){var _props$route,_props$route$params,_props$route3,_props$route3$params,_props$route3$params$,_props$route4,_props$route4$params,_props$route4$params$;var _props$route2,_props$route2$params;return _regenerator.default.async(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(props!=null&&(_props$route=props.route)!=null&&(_props$route$params=_props$route.params)!=null&&_props$route$params.uri){setPhoto(props==null?void 0:(_props$route2=props.route)==null?void 0:(_props$route2$params=_props$route2.params)==null?void 0:_props$route2$params.uri);}_context.next=3;return _regenerator.default.awrap((0,_utils.logEvent)('dangky_started',{event:'dangky_started',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(props==null?void 0:(_props$route3=props.route)==null?void 0:(_props$route3$params=_props$route3.params)==null?void 0:(_props$route3$params$=_props$route3$params.loan)==null?void 0:_props$route3$params$.id),utmSource:props==null?void 0:(_props$route4=props.route)==null?void 0:(_props$route4$params=_props$route4.params)==null?void 0:(_props$route4$params$=_props$route4$params.loan)==null?void 0:_props$route4$params$.utmSource}));case 3:(0,_utils.logEventFb)('dangky_started');case 4:case"end":return _context.stop();}},null,null,null,Promise);},[]);var takePhoto=function takePhoto(){var _props$route5,_props$route5$params;navigation.push(_navigation.ScreenNames.VehicleCamera,{front:true,loan:props==null?void 0:(_props$route5=props.route)==null?void 0:(_props$route5$params=_props$route5.params)==null?void 0:_props$route5$params.loan,callback:function callback(photo){setPhoto(photo);}});};var nextStep=function _callee2(){var _props$route6,_props$route6$params,_props$route6$params$,formData,response,_response$data,_response$data$meta,_props$route7,_props$route7$params,_response$data2,_response$data2$meta;return _regenerator.default.async(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;setIsLoading(true);formData=new FormData();formData.append('LoanBriefId',props==null?void 0:(_props$route6=props.route)==null?void 0:(_props$route6$params=_props$route6.params)==null?void 0:(_props$route6$params$=_props$route6$params.loan)==null?void 0:_props$route6$params$.id);formData.append('TypeDocumentId',314);formData.append('SubTypeId',1);formData.append('image',{uri:photo,type:'image/jpg',name:'image.jpg'});_context2.next=9;return _regenerator.default.awrap(_api.Api.getInstance().uploadImageAutoDE(formData));case 9:response=_context2.sent;setIsLoading(false);if(response.kind==='ok'){if(((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){navigation.push(_navigation.ScreenNames.VehicleCamera,{front:false,loan:props==null?void 0:(_props$route7=props.route)==null?void 0:(_props$route7$params=_props$route7.params)==null?void 0:_props$route7$params.loan});}else{_reactNative.Alert.alert('Thông báo',(_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');}_context2.next=19;break;case 14:_context2.prev=14;_context2.t0=_context2["catch"](0);console.log(_context2.t0);_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');setIsLoading(false);case 19:case"end":return _context2.stop();}},null,null,[[0,14]],Promise);};return _react.default.createElement(_reactNative.View,{style:$flex,__self:this,__source:{fileName:_jsxFileName,lineNumber:102,columnNumber:5}},_react.default.createElement(_reactNative.Image,{source:require('../../assets/img/EKYC.png'),style:logoView,__self:this,__source:{fileName:_jsxFileName,lineNumber:103,columnNumber:7}}),_react.default.createElement(_MHeader.default,{title:"\u0110\u0102NG K\xDD XE",onBack:function onBack(){navigation.goBack();},__self:this,__source:{fileName:_jsxFileName,lineNumber:104,columnNumber:7}}),_react.default.createElement(_reactNative.SafeAreaView,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:110,columnNumber:7}},_react.default.createElement(_reactNative.ScrollView,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:111,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:{paddingHorizontal:16,paddingBottom:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:112,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:113,columnNumber:13}},_react.default.createElement(_icons.TimaSmallWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:120,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{fontSize:16,color:'#FFFFFF',marginLeft:8}],__self:this,__source:{fileName:_jsxFileName,lineNumber:121,columnNumber:15}},"Ch\u1EE5p \u0111\u0103ng k\xFD xe m\u1EB7t tr\u01B0\u1EDBc")),_react.default.createElement(_reactNative.Image,{source:photo?{uri:photo}:require('../../assets/tts/front.png'),style:{width:_reactNative.Dimensions.get('window').width-32,height:(_reactNative.Dimensions.get('window').width-32)*250/360,borderWidth:8,borderRadius:6,borderColor:'#FFFFFF',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:130,columnNumber:13}}),_react.default.createElement(_reactNative.View,{style:{marginTop:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:143,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{fontSize:16}],__self:this,__source:{fileName:_jsxFileName,lineNumber:144,columnNumber:15}},"L\u01B0u \xFD ch\u1EE5p \u0111\u0103ng k\xFD xe"),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',marginTop:16,alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:147,columnNumber:15}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:154,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{color:'#333333',marginLeft:8,fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:155,columnNumber:17}},"N\xEAn \u0111\u1EB7t \u0111\u0103ng k\xFD xe l\xEAn m\u1EB7t ph\u1EB3ng \u0111\u1EC3 ch\u1EE5p")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',marginTop:8},__self:this,__source:{fileName:_jsxFileName,lineNumber:161,columnNumber:15}},_react.default.createElement(_icons.TimaSmall,{style:{marginTop:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:162,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{color:'#333333',marginLeft:8,fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:163,columnNumber:17}},"\u0110\u1EB7t \u0111\u0103ng k\xFD xe n\u1EB1m g\u1ECDn trong khung h\xECnh",'\n',"(Kh\xF4ng qu\xE1 nh\u1ECF hay qu\xE1 to l\xE0m m\u1EA5t chi ti\u1EBFt)")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',marginTop:8,alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:170,columnNumber:15}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:177,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{color:'#333333',marginLeft:8,fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:178,columnNumber:17}},"Ch\u1ECDn n\u01A1i \xE1nh s\xE1ng t\u1ED1t, tr\xE1nh l\xF3a/ ch\xF3i h\xECnh ch\u1EE5p"))))),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',paddingHorizontal:16,marginBottom:30},__self:this,__source:{fileName:_jsxFileName,lineNumber:187,columnNumber:9}},_react.default.createElement(_MButton.default,{onPress:function onPress(){takePhoto();},disabled:isLoading,style:[_CommonStyles.commonStyles.row,_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'#FFFFFF',height:40,borderRadius:30,flex:1,marginRight:8,borderWidth:1,borderColor:'#EF4123'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:194,columnNumber:11}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'#F05123'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:214,columnNumber:13}},"Ch\u1EE5p \u1EA3nh")),_react.default.createElement(_MButton.default,{disabled:!photo||isLoading,style:{flex:1},onPress:function onPress(){nextStep();},__self:this,__source:{fileName:_jsxFileName,lineNumber:219,columnNumber:11}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:['#FF7A00','#EF4123'],style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{height:40,borderRadius:30,marginLeft:8}],__self:this,__source:{fileName:_jsxFileName,lineNumber:226,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'white'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:238,columnNumber:15}},"Ti\u1EBFp t\u1EE5c")))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:244,columnNumber:9}})));}var $flex={flex:1};
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=VehicleRegistrationFront;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _MText=require("../../components/MText");var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _native=require("@react-navigation/native");var _CommonStyles=require("../CommonStyles");var _icons=require("../../assets/icons");var _MButton=_interopRequireDefault(require("../../components/MButton"));var _reactNativeLinearGradient=_interopRequireDefault(require("react-native-linear-gradient"));var _navigation=require("../../navigation");var _api=require("../../services/api");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _AppStore=_interopRequireDefault(require("../../AppStore"));var _utils=require("../../utils");var _jsxFileName="/Users/tima/Documents/Tima/tima-care-v2-sdk/src/screens/toan-trinh-so/VehicleRegistrationFront.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var logoView={position:'absolute',width:'100%',height:'100%',resizeMode:'cover'};function VehicleRegistrationFront(props){var navigation=(0,_native.useNavigation)();var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2.default)(_useState,2),photo=_useState2[0],setPhoto=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),isLoading=_useState4[0],setIsLoading=_useState4[1];(0,_react.useEffect)(function(){var _props$route,_props$route$params;if(props!=null&&(_props$route=props.route)!=null&&(_props$route$params=_props$route.params)!=null&&_props$route$params.uri){var _props$route2,_props$route2$params;setPhoto(props==null?void 0:(_props$route2=props.route)==null?void 0:(_props$route2$params=_props$route2.params)==null?void 0:_props$route2$params.uri);}var trackStarted=function _callee(){var _props$route3,_props$route3$params,_props$route3$params$,_props$route4,_props$route4$params,_props$route4$params$;return _regenerator.default.async(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return _regenerator.default.awrap((0,_utils.logEvent)('dangky_started',{event:'dangky_started',createdAt:new Date(),deviceId:_AppStore.default.deviceId,loanId:String(props==null?void 0:(_props$route3=props.route)==null?void 0:(_props$route3$params=_props$route3.params)==null?void 0:(_props$route3$params$=_props$route3$params.loan)==null?void 0:_props$route3$params$.id),utmSource:props==null?void 0:(_props$route4=props.route)==null?void 0:(_props$route4$params=_props$route4.params)==null?void 0:(_props$route4$params$=_props$route4$params.loan)==null?void 0:_props$route4$params$.utmSource}));case 2:(0,_utils.logEventFb)('dangky_started');case 3:case"end":return _context.stop();}},null,null,null,Promise);};trackStarted();},[]);var takePhoto=function takePhoto(){var _props$route5,_props$route5$params;navigation.push(_navigation.ScreenNames.VehicleCamera,{front:true,loan:props==null?void 0:(_props$route5=props.route)==null?void 0:(_props$route5$params=_props$route5.params)==null?void 0:_props$route5$params.loan,callback:function callback(photo){setPhoto(photo);}});};var nextStep=function _callee2(){var _props$route6,_props$route6$params,_props$route6$params$,formData,response,_response$data,_response$data$meta,_props$route7,_props$route7$params,_response$data2,_response$data2$meta;return _regenerator.default.async(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;setIsLoading(true);formData=new FormData();formData.append('LoanBriefId',props==null?void 0:(_props$route6=props.route)==null?void 0:(_props$route6$params=_props$route6.params)==null?void 0:(_props$route6$params$=_props$route6$params.loan)==null?void 0:_props$route6$params$.id);formData.append('TypeDocumentId',314);formData.append('SubTypeId',1);formData.append('image',{uri:photo,type:'image/jpg',name:'image.jpg'});_context2.next=9;return _regenerator.default.awrap(_api.Api.getInstance().uploadImageAutoDE(formData));case 9:response=_context2.sent;setIsLoading(false);if(response.kind==='ok'){if(((_response$data=response.data)==null?void 0:(_response$data$meta=_response$data.meta)==null?void 0:_response$data$meta.errorCode)===200){navigation.push(_navigation.ScreenNames.VehicleCamera,{front:false,loan:props==null?void 0:(_props$route7=props.route)==null?void 0:(_props$route7$params=_props$route7.params)==null?void 0:_props$route7$params.loan});}else{_reactNative.Alert.alert('Thông báo',(_response$data2=response.data)==null?void 0:(_response$data2$meta=_response$data2.meta)==null?void 0:_response$data2$meta.errorMessage);}}else{_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');}_context2.next=19;break;case 14:_context2.prev=14;_context2.t0=_context2["catch"](0);console.log(_context2.t0);_reactNative.Alert.alert('Thông báo','Có lỗi xảy ra. Vui lòng thử lại sau');setIsLoading(false);case 19:case"end":return _context2.stop();}},null,null,[[0,14]],Promise);};return _react.default.createElement(_reactNative.View,{style:$flex,__self:this,__source:{fileName:_jsxFileName,lineNumber:107,columnNumber:5}},_react.default.createElement(_reactNative.Image,{source:require('../../assets/img/EKYC.png'),style:logoView,__self:this,__source:{fileName:_jsxFileName,lineNumber:108,columnNumber:7}}),_react.default.createElement(_MHeader.default,{title:"\u0110\u0102NG K\xDD XE",onBack:function onBack(){navigation.goBack();},__self:this,__source:{fileName:_jsxFileName,lineNumber:109,columnNumber:7}}),_react.default.createElement(_reactNative.SafeAreaView,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:115,columnNumber:7}},_react.default.createElement(_reactNative.ScrollView,{style:_CommonStyles.commonStyles.fill,__self:this,__source:{fileName:_jsxFileName,lineNumber:116,columnNumber:9}},_react.default.createElement(_reactNative.View,{style:{paddingHorizontal:16,paddingBottom:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:117,columnNumber:11}},_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',alignItems:'center',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:118,columnNumber:13}},_react.default.createElement(_icons.TimaSmallWhite,{__self:this,__source:{fileName:_jsxFileName,lineNumber:125,columnNumber:15}}),_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{fontSize:16,color:'#FFFFFF',marginLeft:8}],__self:this,__source:{fileName:_jsxFileName,lineNumber:126,columnNumber:15}},"Ch\u1EE5p \u0111\u0103ng k\xFD xe m\u1EB7t tr\u01B0\u1EDBc")),_react.default.createElement(_reactNative.Image,{source:photo?{uri:photo}:require('../../assets/tts/front.png'),style:{width:_reactNative.Dimensions.get('window').width-32,height:(_reactNative.Dimensions.get('window').width-32)*250/360,borderWidth:8,borderRadius:6,borderColor:'#FFFFFF',marginTop:16},__self:this,__source:{fileName:_jsxFileName,lineNumber:135,columnNumber:13}}),_react.default.createElement(_reactNative.View,{style:{marginTop:24},__self:this,__source:{fileName:_jsxFileName,lineNumber:148,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormalBold,{fontSize:16}],__self:this,__source:{fileName:_jsxFileName,lineNumber:149,columnNumber:15}},"L\u01B0u \xFD ch\u1EE5p \u0111\u0103ng k\xFD xe"),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',marginTop:16,alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:152,columnNumber:15}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:159,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{color:'#333333',marginLeft:8,fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:160,columnNumber:17}},"N\xEAn \u0111\u1EB7t \u0111\u0103ng k\xFD xe l\xEAn m\u1EB7t ph\u1EB3ng \u0111\u1EC3 ch\u1EE5p")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',marginTop:8},__self:this,__source:{fileName:_jsxFileName,lineNumber:166,columnNumber:15}},_react.default.createElement(_icons.TimaSmall,{style:{marginTop:5},__self:this,__source:{fileName:_jsxFileName,lineNumber:167,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{color:'#333333',marginLeft:8,fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:168,columnNumber:17}},"\u0110\u1EB7t \u0111\u0103ng k\xFD xe n\u1EB1m g\u1ECDn trong khung h\xECnh",'\n',"(Kh\xF4ng qu\xE1 nh\u1ECF hay qu\xE1 to l\xE0m m\u1EA5t chi ti\u1EBFt)")),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',marginTop:8,alignItems:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:175,columnNumber:15}},_react.default.createElement(_icons.TimaSmall,{__self:this,__source:{fileName:_jsxFileName,lineNumber:182,columnNumber:17}}),_react.default.createElement(_MText.MText,{style:{color:'#333333',marginLeft:8,fontSize:12},__self:this,__source:{fileName:_jsxFileName,lineNumber:183,columnNumber:17}},"Ch\u1ECDn n\u01A1i \xE1nh s\xE1ng t\u1ED1t, tr\xE1nh l\xF3a/ ch\xF3i h\xECnh ch\u1EE5p"))))),_react.default.createElement(_reactNative.View,{style:{flexDirection:'row',paddingHorizontal:16,marginBottom:30},__self:this,__source:{fileName:_jsxFileName,lineNumber:192,columnNumber:9}},_react.default.createElement(_MButton.default,{onPress:function onPress(){takePhoto();},disabled:isLoading,style:[_CommonStyles.commonStyles.row,_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{backgroundColor:'#FFFFFF',height:40,borderRadius:30,flex:1,marginRight:8,borderWidth:1,borderColor:'#EF4123'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:199,columnNumber:11}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'#F05123'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:219,columnNumber:13}},"Ch\u1EE5p \u1EA3nh")),_react.default.createElement(_MButton.default,{disabled:!photo||isLoading,style:{flex:1},onPress:function onPress(){nextStep();},__self:this,__source:{fileName:_jsxFileName,lineNumber:224,columnNumber:11}},_react.default.createElement(_reactNativeLinearGradient.default,{colors:['#FF7A00','#EF4123'],style:[_CommonStyles.commonStyles.alignCenter,_CommonStyles.commonStyles.justifyCenter,{height:40,borderRadius:30,marginLeft:8}],__self:this,__source:{fileName:_jsxFileName,lineNumber:231,columnNumber:13}},_react.default.createElement(_MText.MText,{style:[_CommonStyles.commonStyles.textNormal,{color:'white'}],__self:this,__source:{fileName:_jsxFileName,lineNumber:243,columnNumber:15}},"Ti\u1EBFp t\u1EE5c")))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:249,columnNumber:9}})));}var $flex={flex:1};
|
|
2
2
|
//# sourceMappingURL=VehicleRegistrationFront.js.map
|
|
@@ -40,18 +40,23 @@ export default function VehicleRegistrationFront(props: any) {
|
|
|
40
40
|
const [photo, setPhoto] = useState(null);
|
|
41
41
|
const [isLoading, setIsLoading] = useState(false);
|
|
42
42
|
|
|
43
|
-
useEffect(
|
|
43
|
+
useEffect(() => {
|
|
44
44
|
if (props?.route?.params?.uri) {
|
|
45
45
|
setPhoto(props?.route?.params?.uri);
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
|
|
48
|
+
const trackStarted = async () => {
|
|
49
|
+
await logEvent('dangky_started', {
|
|
50
|
+
event: 'dangky_started',
|
|
51
|
+
createdAt: new Date(),
|
|
52
|
+
deviceId: appStore.deviceId,
|
|
53
|
+
loanId: String(props?.route?.params?.loan?.id),
|
|
54
|
+
utmSource: props?.route?.params?.loan?.utmSource,
|
|
55
|
+
});
|
|
56
|
+
logEventFb('dangky_started');
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
trackStarted();
|
|
55
60
|
}, []);
|
|
56
61
|
|
|
57
62
|
const takePhoto = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_MText","_MHeader","_interopRequireDefault","_native","_CommonStyles","_icons","_MButton","_reactNativeLinearGradient","_navigation","_api","_Loading","_AppStore","_utils","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","logoView","position","width","height","resizeMode","VehicleRegistrationFront","props","navigation","useNavigation","_useState","useState","_useState2","_slicedToArray2","photo","setPhoto","_useState3","_useState4","isLoading","setIsLoading","useEffect","_callee","_props$route","_props$route$params","_props$route3","_props$route3$params","_props$route3$params$","_props$route4","_props$route4$params","_props$route4$params$","_props$route2","_props$route2$params","_regenerator","async","_callee$","_context","prev","next","route","params","uri","awrap","logEvent","event","createdAt","Date","deviceId","appStore","loanId","String","loan","id","utmSource","logEventFb","stop","Promise","takePhoto","_props$route5","_props$route5$params","push","ScreenNames","VehicleCamera","front","callback","nextStep","_callee2","_props$route6","_props$route6$params","_props$route6$params$","formData","response","_response$data","_response$data$meta","_props$route7","_props$route7$params","_response$data2","_response$data2$meta","_callee2$","_context2","FormData","append","type","name","Api","getInstance","uploadImageAutoDE","sent","kind","data","meta","errorCode","Alert","alert","errorMessage","t0","console","log","createElement","View","style","$flex","__self","__source","fileName","lineNumber","columnNumber","Image","source","title","onBack","goBack","SafeAreaView","commonStyles","fill","ScrollView","paddingHorizontal","paddingBottom","flexDirection","alignItems","marginTop","TimaSmallWhite","MText","textNormalBold","fontSize","color","marginLeft","Dimensions","borderWidth","borderRadius","borderColor","TimaSmall","marginBottom","onPress","disabled","row","alignCenter","justifyCenter","backgroundColor","flex","marginRight","textNormal","colors"],"sourceRoot":"../../../../src","sources":["screens/toan-trinh-so/VehicleRegistrationFront.tsx"],"mappings":"gWACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAWA,IAAAE,MAAA,CAAAF,OAAA,2BACA,IAAAG,QAAA,CAAAC,sBAAA,CAAAJ,OAAA,8BACA,IAAAK,OAAA,CAAAL,OAAA,6BAKA,IAAAM,aAAA,CAAAN,OAAA,oBACA,IAAAO,MAAA,CAAAP,OAAA,uBACA,IAAAQ,QAAA,CAAAJ,sBAAA,CAAAJ,OAAA,8BACA,IAAAS,0BAAA,CAAAL,sBAAA,CAAAJ,OAAA,kCACA,IAAAU,WAAA,CAAAV,OAAA,qBACA,IAAAW,IAAA,CAAAX,OAAA,uBACA,IAAAY,QAAA,CAAAR,sBAAA,CAAAJ,OAAA,8BACA,IAAAa,SAAA,CAAAT,sBAAA,CAAAJ,OAAA,oBACA,IAAAc,MAAA,CAAAd,OAAA,gBAAmD,IAAAe,YAAA,+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AAA,MAEF/I,MAAA,CAAAwB,OAAA,CAAA+G,aAAA,CAAC5H,0BAAA,CAAAa,OAAc,EACb2J,MAAM,CAAE,CAAC,SAAS,CAAE,SAAS,CAAE,CAC/B1C,KAAK,CAAE,CACLa,0BAAY,CAACuB,WAAW,CACxBvB,0BAAY,CAACwB,aAAa,CAC1B,CACEpI,MAAM,CAAE,EAAE,CACV4H,YAAY,CAAE,EAAE,CAChBH,UAAU,CAAE,CACd,CAAC,CACD,CAAAxB,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAA5H,YAAA,CAAA6H,UAAA,KAAAC,YAAA,MAEF/I,MAAA,CAAAwB,OAAA,CAAA+G,aAAA,CAACnI,MAAA,CAAA2J,KAAK,EAACtB,KAAK,CAAE,CAACa,0BAAY,CAAC4B,UAAU,CAAE,CAAEhB,KAAK,CAAE,OAAQ,CAAC,CAAE,CAAAvB,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAA5H,YAAA,CAAA6H,UAAA,KAAAC,YAAA,MAAC,oBAEtD,CACO,CACT,CACL,CAAC,CACP/I,MAAA,CAAAwB,OAAA,CAAA+G,aAAA,CAACzH,QAAA,CAAAU,OAAO,EAACgC,SAAS,CAAEA,SAAU,CAAAmF,MAAA,MAAAC,QAAA,EAAAC,QAAA,CAAA5H,YAAA,CAAA6H,UAAA,KAAAC,YAAA,IAAE,CACpB,CACV,CAAC,CAEX,CACA,GAAM,CAAAL,KAAgB,CAAG,CACvBsC,IAAI,CAAE,CACR,CAAC"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_MText","_MHeader","_interopRequireDefault","_native","_CommonStyles","_icons","_MButton","_reactNativeLinearGradient","_navigation","_api","_Loading","_AppStore","_utils","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","logoView","position","width","height","resizeMode","VehicleRegistrationFront","props","navigation","useNavigation","_useState","useState","_useState2","_slicedToArray2","photo","setPhoto","_useState3","_useState4","isLoading","setIsLoading","useEffect","_props$route","_props$route$params","route","params","uri","_props$route2","_props$route2$params","trackStarted","_callee","_props$route3","_props$route3$params","_props$route3$params$","_props$route4","_props$route4$params","_props$route4$params$","_regenerator","async","_callee$","_context","prev","next","awrap","logEvent","event","createdAt","Date","deviceId","appStore","loanId","String","loan","id","utmSource","logEventFb","stop","Promise","takePhoto","_props$route5","_props$route5$params","push","ScreenNames","VehicleCamera","front","callback","nextStep","_callee2","_props$route6","_props$route6$params","_props$route6$params$","formData","response","_response$data","_response$data$meta","_props$route7","_props$route7$params","_response$data2","_response$data2$meta","_callee2$","_context2","FormData","append","type","name","Api","getInstance","uploadImageAutoDE","sent","kind","data","meta","errorCode","Alert","alert","errorMessage","t0","console","log","createElement","View","style","$flex","__self","__source","fileName","lineNumber","columnNumber","Image","source","title","onBack","goBack","SafeAreaView","commonStyles","fill","ScrollView","paddingHorizontal","paddingBottom","flexDirection","alignItems","marginTop","TimaSmallWhite","MText","textNormalBold","fontSize","color","marginLeft","Dimensions","borderWidth","borderRadius","borderColor","TimaSmall","marginBottom","onPress","disabled","row","alignCenter","justifyCenter","backgroundColor","flex","marginRight","textNormal","colors"],"sourceRoot":"../../../../src","sources":["screens/toan-trinh-so/VehicleRegistrationFront.tsx"],"mappings":"gWACA,IAAAA,MAAA,CAAAC,uBAAA,CAAAC,OAAA,WACA,IAAAC,YAAA,CAAAD,OAAA,iBAWA,IAAAE,MAAA,CAAAF,OAAA,2BACA,IAAAG,QAAA,CAAAC,sBAAA,CAAAJ,OAAA,8BACA,IAAAK,OAAA,CAAAL,OAAA,6BAKA,IAAAM,aAAA,CAAAN,OAAA,oBACA,IAAAO,MAAA,CAAAP,OAAA,uBACA,IAAAQ,QAAA,CAAAJ,sBAAA,CAAAJ,OAAA,8BACA,IAAAS,0BAAA,CAAAL,sBAAA,CAAAJ,OAAA,kCACA,IAAAU,WAAA,CAAAV,OAAA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 -1,2 +1,2 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Video=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _mobxReactLite=require("mobx-react-lite");var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _utils=require("../../utils");var _reactNativeCamera=require("react-native-camera");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _native=require("@react-navigation/native");var _videoStore=_interopRequireDefault(require("./videoStore"));var _reactNativePermissions=require("react-native-permissions");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _jsxFileName="/Users/tima/Documents/Tima/tima-care-v2-sdk/src/screens/uploadVideo/index.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var Video=exports.Video=(0,_mobxReactLite.observer)(function Video(props){var navigation=(0,_native.useNavigation)();var camera=(0,_react.useRef)(null);var _useState=(0,_react.useState)(
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Video=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _mobxReactLite=require("mobx-react-lite");var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _utils=require("../../utils");var _reactNativeCamera=require("react-native-camera");var _icons=require("../../assets/icons");var _MText=require("../../components/MText");var _native=require("@react-navigation/native");var _videoStore=_interopRequireDefault(require("./videoStore"));var _reactNativePermissions=require("react-native-permissions");var _Loading=_interopRequireDefault(require("../../components/Loading"));var _MHeader=_interopRequireDefault(require("../../components/MHeader"));var _jsxFileName="/Users/tima/Documents/Tima/tima-care-v2-sdk/src/screens/uploadVideo/index.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var COUNTDOWN_SECONDS=3;var getCameraPermissions=function getCameraPermissions(){return _reactNative.Platform.OS==='ios'?[_reactNativePermissions.PERMISSIONS.IOS.CAMERA,_reactNativePermissions.PERMISSIONS.IOS.MICROPHONE]:[_reactNativePermissions.PERMISSIONS.ANDROID.CAMERA,_reactNativePermissions.PERMISSIONS.ANDROID.RECORD_AUDIO];};var Video=exports.Video=(0,_mobxReactLite.observer)(function Video(props){var _props$route,_props$route$params;var navigation=(0,_native.useNavigation)();var camera=(0,_react.useRef)(null);var _useState=(0,_react.useState)(COUNTDOWN_SECONDS),_useState2=(0,_slicedToArray2.default)(_useState,2),count=_useState2[0],setCount=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2.default)(_useState3,2),isRecording=_useState4[0],setIsRecording=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=(0,_slicedToArray2.default)(_useState5,2),isLoading=_useState6[0],setIsLoading=_useState6[1];var loan=props==null?void 0:(_props$route=props.route)==null?void 0:(_props$route$params=_props$route.params)==null?void 0:_props$route$params.loan;var content=(0,_react.useMemo)(function(){return"H\xF4m nay ng\xE0y "+(0,_utils.formatDDMMYYY)(new Date())+" t\xF4i t\xEAn l\xE0 "+((loan==null?void 0:loan.fullname)||'')+" c\xF3 th\u1EF1c hi\u1EC7n kho\u1EA3n vay t\u1EA1i Tima v\u1EDBi s\u1ED1 ti\u1EC1n l\xE0 "+(0,_utils.formatMoney)((loan==null?void 0:loan.loanAmount)||0);},[loan==null?void 0:loan.fullname,loan==null?void 0:loan.loanAmount]);var requestPermissions=function _callee(){var permissions,statuses,toRequest,requested,values,allGranted,anyBlocked;return _regenerator.default.async(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:permissions=getCameraPermissions();_context.next=3;return _regenerator.default.awrap((0,_reactNativePermissions.checkMultiple)(permissions));case 3:statuses=_context.sent;toRequest=permissions.filter(function(permission){return statuses[permission]!==_reactNativePermissions.RESULTS.GRANTED;});if(!(toRequest.length===0)){_context.next=7;break;}return _context.abrupt("return",true);case 7:_context.next=9;return _regenerator.default.awrap((0,_reactNativePermissions.requestMultiple)(toRequest));case 9:requested=_context.sent;values=Object.values(requested);allGranted=values.every(function(status){return status===_reactNativePermissions.RESULTS.GRANTED;});anyBlocked=values.some(function(status){return status===_reactNativePermissions.RESULTS.BLOCKED;});if(!allGranted){_reactNative.Alert.alert('Thông báo',anyBlocked?'Vui lòng bật quyền Camera và Micro trong Cài đặt để tiếp tục.':'Vui lòng cấp quyền Camera và Micro để tiếp tục.',anyBlocked?[{text:'Huỷ'},{text:'Mở cài đặt',onPress:function onPress(){return(0,_reactNativePermissions.openSettings)();}}]:[{text:'OK'}]);}return _context.abrupt("return",allGranted);case 15:case"end":return _context.stop();}},null,null,null,Promise);};(0,_react.useEffect)(function(){requestPermissions();setCount(COUNTDOWN_SECONDS);var id=setInterval(function(){setCount(function(prev){if(prev<=1){clearInterval(id);return 0;}return prev-1;});},1000);return function(){return clearInterval(id);};},[]);var stopRecording=function stopRecording(){if(!camera.current)return;camera.current.stopRecording();setIsRecording(false);};var startVideo=function _callee2(){var hasPermission,data,formData;return _regenerator.default.async(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!(!camera.current||isLoading||isRecording||count>0)){_context2.next=2;break;}return _context2.abrupt("return");case 2:_context2.next=4;return _regenerator.default.awrap(requestPermissions());case 4:hasPermission=_context2.sent;if(hasPermission){_context2.next=7;break;}return _context2.abrupt("return");case 7:setIsRecording(true);_context2.prev=8;_context2.next=11;return _regenerator.default.awrap(camera.current.recordAsync((0,_extends2.default)({quality:_reactNativeCamera.RNCamera.Constants.VideoQuality['480p'],videoBitrate:1500000},_reactNative.Platform.OS==='ios'?{codec:_reactNativeCamera.RNCamera.Constants.VideoCodec.H264}:{})));case 11:data=_context2.sent;setIsLoading(true);formData=new FormData();formData.append('video',{name:data.uri.split(/[\\/]/).pop(),uri:data.uri,type:'video/*'});_videoStore.default.uploadVideo(loan==null?void 0:loan.id,formData,function(){setIsLoading(false);_reactNative.Alert.alert('Thông báo','Tải video lên thành công',[{text:'Ok',onPress:function onPress(){return navigation.goBack();}}]);},function(){setIsLoading(false);});_context2.next=24;break;case 18:_context2.prev=18;_context2.t0=_context2["catch"](8);setIsRecording(false);setIsLoading(false);console.error(_context2.t0);_reactNative.Alert.alert('Thông báo','Không thể quay video. Vui lòng thử lại.');case 24:case"end":return _context2.stop();}},null,null,[[8,18]],Promise);};return _react.default.createElement(_reactNative.View,{style:{flex:1},__self:this,__source:{fileName:_jsxFileName,lineNumber:158,columnNumber:5}},_react.default.createElement(_MHeader.default,{title:"Quay video",onBack:function onBack(){return navigation.goBack();},__self:this,__source:{fileName:_jsxFileName,lineNumber:163,columnNumber:7}}),_react.default.createElement(_reactNative.SafeAreaView,{style:{flex:1,backgroundColor:'white'},__self:this,__source:{fileName:_jsxFileName,lineNumber:164,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:{flex:1,justifyContent:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:165,columnNumber:9}},count===0&&_react.default.createElement(_reactNative.View,{style:{position:'absolute',bottom:100,right:0,left:0,zIndex:1,paddingHorizontal:10,justifyContent:'center',backgroundColor:'black',paddingVertical:10},__self:this,__source:{fileName:_jsxFileName,lineNumber:167,columnNumber:13}},_react.default.createElement(_MText.MText,{style:{color:'white',fontSize:16,textAlign:'center'},__self:this,__source:{fileName:_jsxFileName,lineNumber:180,columnNumber:15}},content)),_react.default.createElement(_reactNativeCamera.RNCamera,{ref:camera,style:styles.preview,type:_reactNativeCamera.RNCamera.Constants.Type.front,permissionDialogTitle:'Permission to use camera',permissionDialogMessage:'We need your permission to use your camera phone',androidCameraPermissionOptions:{title:'Permission to use camera',message:'We need your permission to use your camera',buttonPositive:'Ok',buttonNegative:'Cancel'},androidRecordAudioPermissionOptions:{title:'Permission to use audio recording',message:'We need your permission to use your audio',buttonPositive:'Ok',buttonNegative:'Cancel'},__self:this,__source:{fileName:_jsxFileName,lineNumber:191,columnNumber:11}}),_react.default.createElement(_reactNative.View,{style:{backgroundColor:'#00000080',justifyContent:'center',position:'absolute',bottom:0,left:0,right:0},__self:this,__source:{fileName:_jsxFileName,lineNumber:212,columnNumber:11}},isRecording?_react.default.createElement(_reactNative.TouchableOpacity,{style:{justifyContent:'center',alignItems:'center',marginBottom:20},onPress:function onPress(){stopRecording();},__self:this,__source:{fileName:_jsxFileName,lineNumber:223,columnNumber:15}},_react.default.createElement(_icons.IconPause,{fill:'white',width:60,height:60,__self:this,__source:{fileName:_jsxFileName,lineNumber:233,columnNumber:17}})):_react.default.createElement(_reactNative.TouchableOpacity,{style:{justifyContent:'center',alignItems:'center',marginBottom:20},disabled:_videoStore.default.isLoading,onPress:function onPress(){startVideo();},__self:this,__source:{fileName:_jsxFileName,lineNumber:236,columnNumber:15}},_react.default.createElement(_icons.IconPlay,{fill:'white',width:60,height:60,__self:this,__source:{fileName:_jsxFileName,lineNumber:247,columnNumber:17}})))),_react.default.createElement(_Loading.default,{isLoading:isLoading,__self:this,__source:{fileName:_jsxFileName,lineNumber:252,columnNumber:9}})));});var styles=_reactNative.StyleSheet.create({preview:{position:'absolute',width:'100%',height:'100%',justifyContent:'flex-end',alignItems:'center'}});
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//@ts-nocheck
|
|
2
|
-
import { observer
|
|
3
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { observer } from 'mobx-react-lite';
|
|
3
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import {
|
|
5
5
|
Alert,
|
|
6
6
|
Platform,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { formatDDMMYYY, formatMoney } from '../../utils';
|
|
13
13
|
import { RNCamera } from 'react-native-camera';
|
|
14
14
|
import MButton from '../../components/MButton';
|
|
15
|
-
import {
|
|
15
|
+
import { IconPause, IconPlay } from '../../assets/icons';
|
|
16
16
|
import { MText } from '../../components/MText';
|
|
17
17
|
import { useNavigation } from '@react-navigation/native';
|
|
18
18
|
import videoStore from './videoStore';
|
|
@@ -21,89 +21,137 @@ import {
|
|
|
21
21
|
requestMultiple,
|
|
22
22
|
openSettings,
|
|
23
23
|
PERMISSIONS,
|
|
24
|
-
request,
|
|
25
24
|
RESULTS,
|
|
26
25
|
} from 'react-native-permissions';
|
|
27
26
|
import Loading from '../../components/Loading';
|
|
28
27
|
import MHeader from '../../components/MHeader';
|
|
29
28
|
|
|
29
|
+
const COUNTDOWN_SECONDS = 3;
|
|
30
|
+
|
|
31
|
+
const getCameraPermissions = () =>
|
|
32
|
+
Platform.OS === 'ios'
|
|
33
|
+
? [PERMISSIONS.IOS.CAMERA, PERMISSIONS.IOS.MICROPHONE]
|
|
34
|
+
: [PERMISSIONS.ANDROID.CAMERA, PERMISSIONS.ANDROID.RECORD_AUDIO];
|
|
35
|
+
|
|
30
36
|
export const Video = observer(function Video(props: any) {
|
|
31
37
|
const navigation = useNavigation();
|
|
32
38
|
const camera = useRef(null);
|
|
33
|
-
const [count, setCount] = useState(
|
|
34
|
-
const
|
|
35
|
-
const [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const content =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const requestPermissions = () => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
)
|
|
39
|
+
const [count, setCount] = useState(COUNTDOWN_SECONDS);
|
|
40
|
+
const [isRecording, setIsRecording] = useState(false);
|
|
41
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
42
|
+
|
|
43
|
+
const loan = props?.route?.params?.loan;
|
|
44
|
+
const content = useMemo(() => {
|
|
45
|
+
return `Hôm nay ngày ${formatDDMMYYY(new Date())} tôi tên là ${
|
|
46
|
+
loan?.fullname || ''
|
|
47
|
+
} có thực hiện khoản vay tại Tima với số tiền là ${formatMoney(
|
|
48
|
+
loan?.loanAmount || 0
|
|
49
|
+
)}`;
|
|
50
|
+
}, [loan?.fullname, loan?.loanAmount]);
|
|
51
|
+
|
|
52
|
+
const requestPermissions = async () => {
|
|
53
|
+
const permissions = getCameraPermissions();
|
|
54
|
+
const statuses = await checkMultiple(permissions);
|
|
55
|
+
const toRequest = permissions.filter(
|
|
56
|
+
(permission) => statuses[permission] !== RESULTS.GRANTED
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
if (toRequest.length === 0) return true;
|
|
60
|
+
|
|
61
|
+
const requested = await requestMultiple(toRequest);
|
|
62
|
+
const values = Object.values(requested);
|
|
63
|
+
const allGranted = values.every((status) => status === RESULTS.GRANTED);
|
|
64
|
+
const anyBlocked = values.some((status) => status === RESULTS.BLOCKED);
|
|
65
|
+
|
|
66
|
+
if (!allGranted) {
|
|
67
|
+
Alert.alert(
|
|
68
|
+
'Thông báo',
|
|
69
|
+
anyBlocked
|
|
70
|
+
? 'Vui lòng bật quyền Camera và Micro trong Cài đặt để tiếp tục.'
|
|
71
|
+
: 'Vui lòng cấp quyền Camera và Micro để tiếp tục.',
|
|
72
|
+
anyBlocked
|
|
73
|
+
? [
|
|
74
|
+
{ text: 'Huỷ' },
|
|
75
|
+
{
|
|
76
|
+
text: 'Mở cài đặt',
|
|
77
|
+
onPress: () => openSettings(),
|
|
78
|
+
},
|
|
79
|
+
]
|
|
80
|
+
: [{ text: 'OK' }]
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return allGranted;
|
|
52
85
|
};
|
|
53
86
|
|
|
54
87
|
useEffect(() => {
|
|
55
88
|
requestPermissions();
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
setCount(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
89
|
+
setCount(COUNTDOWN_SECONDS);
|
|
90
|
+
const id = setInterval(() => {
|
|
91
|
+
setCount((prev) => {
|
|
92
|
+
if (prev <= 1) {
|
|
93
|
+
clearInterval(id);
|
|
94
|
+
return 0;
|
|
95
|
+
}
|
|
96
|
+
return prev - 1;
|
|
97
|
+
});
|
|
62
98
|
}, 1000);
|
|
99
|
+
return () => clearInterval(id);
|
|
63
100
|
}, []);
|
|
64
101
|
|
|
65
102
|
const stopRecording = () => {
|
|
103
|
+
if (!camera.current) return;
|
|
66
104
|
camera.current.stopRecording();
|
|
67
105
|
setIsRecording(false);
|
|
68
|
-
setIsLoading(true);
|
|
69
106
|
};
|
|
70
107
|
|
|
71
108
|
const startVideo = async () => {
|
|
72
|
-
if (!camera) {
|
|
109
|
+
if (!camera.current || isLoading || isRecording || count > 0) {
|
|
73
110
|
return;
|
|
74
111
|
}
|
|
112
|
+
const hasPermission = await requestPermissions();
|
|
113
|
+
if (!hasPermission) return;
|
|
114
|
+
|
|
75
115
|
setIsRecording(true);
|
|
76
|
-
|
|
77
|
-
|
|
116
|
+
try {
|
|
117
|
+
const data = await camera.current.recordAsync({
|
|
78
118
|
quality: RNCamera.Constants.VideoQuality['480p'],
|
|
79
119
|
videoBitrate: 1500000,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
120
|
+
...(Platform.OS === 'ios'
|
|
121
|
+
? { codec: RNCamera.Constants.VideoCodec.H264 }
|
|
122
|
+
: {}),
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
setIsLoading(true);
|
|
126
|
+
const formData = new FormData();
|
|
127
|
+
formData.append('video', {
|
|
128
|
+
name: data.uri.split(/[\\/]/).pop(),
|
|
129
|
+
uri: data.uri,
|
|
130
|
+
type: 'video/*',
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
videoStore.uploadVideo(
|
|
134
|
+
loan?.id,
|
|
135
|
+
formData,
|
|
136
|
+
() => {
|
|
137
|
+
setIsLoading(false);
|
|
138
|
+
Alert.alert('Thông báo', 'Tải video lên thành công', [
|
|
139
|
+
{
|
|
140
|
+
text: 'Ok',
|
|
141
|
+
onPress: () => navigation.goBack(),
|
|
142
|
+
},
|
|
143
|
+
]);
|
|
144
|
+
},
|
|
145
|
+
() => {
|
|
146
|
+
setIsLoading(false);
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
} catch (err) {
|
|
150
|
+
setIsRecording(false);
|
|
151
|
+
setIsLoading(false);
|
|
152
|
+
console.error(err);
|
|
153
|
+
Alert.alert('Thông báo', 'Không thể quay video. Vui lòng thử lại.');
|
|
154
|
+
}
|
|
107
155
|
};
|
|
108
156
|
|
|
109
157
|
return (
|
|
@@ -143,7 +191,7 @@ export const Video = observer(function Video(props: any) {
|
|
|
143
191
|
<RNCamera
|
|
144
192
|
ref={camera}
|
|
145
193
|
style={styles.preview}
|
|
146
|
-
type=
|
|
194
|
+
type={RNCamera.Constants.Type.front}
|
|
147
195
|
permissionDialogTitle={'Permission to use camera'}
|
|
148
196
|
permissionDialogMessage={
|
|
149
197
|
'We need your permission to use your camera phone'
|