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.
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js +1 -1
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js.flow +162 -235
- package/lib/commonjs/screens/camera/CCCDCameraScreen.js.map +1 -1
- package/lib/commonjs/screens/home/DigitalTopupItem.js +1 -1
- package/lib/commonjs/screens/home/DigitalTopupItem.js.flow +595 -425
- package/lib/commonjs/screens/home/DigitalTopupItem.js.map +1 -1
- package/lib/commonjs/screens/home/index.js +1 -1
- package/lib/commonjs/screens/home/index.js.flow +5 -1
- package/lib/commonjs/screens/home/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 +1 -1
- package/lib/commonjs/services/api/api.js +1 -1
- package/lib/commonjs/services/api/api.js.flow +16 -0
- package/lib/commonjs/services/api/api.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/home/DigitalTopupItem.js +1 -1
- package/lib/module/screens/home/DigitalTopupItem.js.map +1 -1
- package/lib/module/screens/home/index.js +1 -1
- package/lib/module/screens/home/index.js.map +1 -1
- package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
- package/lib/module/services/api/api.js +1 -1
- package/lib/module/services/api/api.js.map +1 -1
- package/lib/typescript/screens/camera/CCCDCameraScreen.d.ts.map +1 -1
- package/lib/typescript/screens/home/DigitalTopupItem.d.ts +2 -1
- package/lib/typescript/screens/home/DigitalTopupItem.d.ts.map +1 -1
- package/lib/typescript/screens/home/index.d.ts.map +1 -1
- package/lib/typescript/services/api/api.d.ts +16 -0
- package/lib/typescript/services/api/api.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/screens/camera/CCCDCameraScreen.tsx +162 -235
- package/src/screens/home/DigitalTopupItem.tsx +595 -425
- package/src/screens/home/index.tsx +5 -1
- package/src/screens/toan-trinh-so/OCR.tsx +1 -1
- 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
|
|
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.
|
|
303
|
+
quality: 0.9,
|
|
304
304
|
pictureSize: '1280x720',
|
|
305
305
|
};
|
|
306
306
|
const data = await myCamera.current.takePictureAsync(options);
|
package/src/services/api/api.ts
CHANGED
|
@@ -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
|
}
|