react-native-timacare 3.3.15 → 3.3.17

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.
Files changed (35) hide show
  1. package/lib/commonjs/screens/camera/CCCDCameraScreen.js +1 -1
  2. package/lib/commonjs/screens/camera/CCCDCameraScreen.js.flow +162 -235
  3. package/lib/commonjs/screens/camera/CCCDCameraScreen.js.map +1 -1
  4. package/lib/commonjs/screens/home/DigitalTopupItem.js +1 -1
  5. package/lib/commonjs/screens/home/DigitalTopupItem.js.flow +595 -425
  6. package/lib/commonjs/screens/home/DigitalTopupItem.js.map +1 -1
  7. package/lib/commonjs/screens/home/index.js +1 -1
  8. package/lib/commonjs/screens/home/index.js.flow +5 -1
  9. package/lib/commonjs/screens/home/index.js.map +1 -1
  10. package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
  11. package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +1 -1
  12. package/lib/commonjs/services/api/api.js +1 -1
  13. package/lib/commonjs/services/api/api.js.flow +16 -0
  14. package/lib/commonjs/services/api/api.js.map +1 -1
  15. package/lib/module/screens/camera/CCCDCameraScreen.js +1 -1
  16. package/lib/module/screens/camera/CCCDCameraScreen.js.map +1 -1
  17. package/lib/module/screens/home/DigitalTopupItem.js +1 -1
  18. package/lib/module/screens/home/DigitalTopupItem.js.map +1 -1
  19. package/lib/module/screens/home/index.js +1 -1
  20. package/lib/module/screens/home/index.js.map +1 -1
  21. package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
  22. package/lib/module/services/api/api.js +1 -1
  23. package/lib/module/services/api/api.js.map +1 -1
  24. package/lib/typescript/screens/camera/CCCDCameraScreen.d.ts.map +1 -1
  25. package/lib/typescript/screens/home/DigitalTopupItem.d.ts +2 -1
  26. package/lib/typescript/screens/home/DigitalTopupItem.d.ts.map +1 -1
  27. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  28. package/lib/typescript/services/api/api.d.ts +16 -0
  29. package/lib/typescript/services/api/api.d.ts.map +1 -1
  30. package/package.json +1 -1
  31. package/src/screens/camera/CCCDCameraScreen.tsx +162 -235
  32. package/src/screens/home/DigitalTopupItem.tsx +595 -425
  33. package/src/screens/home/index.tsx +5 -1
  34. package/src/screens/toan-trinh-so/OCR.tsx +1 -1
  35. package/src/services/api/api.ts +16 -0
@@ -529,7 +529,11 @@ export const Home = observer(function Home() {
529
529
  <ItemTimaOneV3 item={item} navigation={navigation} />
530
530
  </View>
531
531
  ) : item?.typeLoan === 4 && !item?.isPipelineCIMB ? (
532
- <DigitalTopupItem item={item} navigation={navigation} />
532
+ <DigitalTopupItem
533
+ item={item}
534
+ navigation={navigation}
535
+ callback={() => onRefresh()}
536
+ />
533
537
  ) : (
534
538
  <View>
535
539
  {/* // luồng CIMB */}
@@ -300,7 +300,7 @@ export const OCR = observer(function OCR(props: any) {
300
300
  fixOrientation: false,
301
301
  forceUpOrientation: false,
302
302
  orientation: RNCamera.Constants.Orientation.portrait,
303
- quality: 0.8,
303
+ quality: 0.9,
304
304
  pictureSize: '1280x720',
305
305
  };
306
306
  const data = await myCamera.current.takePictureAsync(options);
@@ -3311,4 +3311,20 @@ export class Api {
3311
3311
  return { kind: "bad-data" }
3312
3312
  }
3313
3313
  }
3314
+
3315
+ async confirmLoanDigitalTopup(body) {
3316
+ // make the api call
3317
+ const response: ApiResponse<any> = await this.apisauce.post(`api/v2.0/autodev2/confirm_loan`, body)
3318
+ // the typical ways to die when calling an api
3319
+ if (!response.ok) {
3320
+ const problem = getGeneralApiProblem(response)
3321
+ if (problem) return problem
3322
+ }
3323
+ // transform the data into the format we are expecting
3324
+ try {
3325
+ return { kind: "ok", data: response.data }
3326
+ } catch {
3327
+ return { kind: "bad-data" }
3328
+ }
3329
+ }
3314
3330
  }