react-native-timacare 3.3.6 → 3.3.8
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/components/ModalOptionLoan.js +1 -1
- package/lib/commonjs/components/ModalOptionLoan.js.flow +3 -5
- package/lib/commonjs/components/ModalOptionLoan.js.map +1 -1
- package/lib/commonjs/screens/full-submit/update-document.js +1 -1
- package/lib/commonjs/screens/full-submit/update-document.js.flow +18 -19
- package/lib/commonjs/screens/full-submit/update-document.js.map +1 -1
- package/lib/commonjs/screens/home/index.js.flow +1 -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 +20 -47
- package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js +1 -1
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.flow +17 -41
- package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.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 +17 -41
- package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
- package/lib/module/components/ModalOptionLoan.js +1 -1
- package/lib/module/components/ModalOptionLoan.js.map +1 -1
- package/lib/module/screens/full-submit/update-document.js +1 -1
- package/lib/module/screens/full-submit/update-document.js.map +1 -1
- package/lib/module/screens/home/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/RegisterCamera.js +1 -1
- package/lib/module/screens/toan-trinh-so/RegisterCamera.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/typescript/components/ModalOptionLoan.d.ts.map +1 -1
- package/lib/typescript/screens/full-submit/update-document.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/RegisterCamera.d.ts.map +1 -1
- package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
- package/package.json +1 -2
- package/src/components/ModalOptionLoan.tsx +3 -5
- package/src/screens/full-submit/update-document.tsx +18 -19
- package/src/screens/home/index.tsx +1 -1
- package/src/screens/toan-trinh-so/OCR.tsx +20 -47
- package/src/screens/toan-trinh-so/RegisterCamera.tsx +17 -41
- package/src/screens/toan-trinh-so/VehicleCamera.tsx +17 -41
|
@@ -39,7 +39,6 @@ import { commonStyles } from '../CommonStyles';
|
|
|
39
39
|
import { ScreenNames } from '../../navigation';
|
|
40
40
|
import { load, OCR_V2, save } from '../../utils/storage';
|
|
41
41
|
import { IconUpload } from '../../assets/svgs';
|
|
42
|
-
import ImagePicker from 'react-native-image-crop-picker';
|
|
43
42
|
import { launchImageLibrary } from 'react-native-image-picker';
|
|
44
43
|
|
|
45
44
|
const { width: screenWidth, height: screenHeight } = Dimensions.get('window');
|
|
@@ -205,47 +204,24 @@ export default function VehicleCamera(props: any) {
|
|
|
205
204
|
}, [isFocused]);
|
|
206
205
|
|
|
207
206
|
const pickImageFromGallery = async () => {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
if (
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
});
|
|
226
|
-
}
|
|
207
|
+
const result = await launchImageLibrary({
|
|
208
|
+
mediaType: 'photo',
|
|
209
|
+
});
|
|
210
|
+
if (result.assets) {
|
|
211
|
+
if (props?.route?.params?.front) {
|
|
212
|
+
navigation.push(ScreenNames.VehicleRegistrationFront, {
|
|
213
|
+
uri: result.assets[0]?.uri,
|
|
214
|
+
loan: props?.route?.params?.loan,
|
|
215
|
+
});
|
|
216
|
+
} else if (props.route?.params?.callback) {
|
|
217
|
+
navigation.goBack();
|
|
218
|
+
props.route?.params?.callback(result.assets[0]?.uri);
|
|
219
|
+
} else {
|
|
220
|
+
navigation.push(ScreenNames.VehicleRegistrationBack, {
|
|
221
|
+
uri: result.assets[0]?.uri,
|
|
222
|
+
loan: props?.route?.params?.loan,
|
|
223
|
+
});
|
|
227
224
|
}
|
|
228
|
-
} else {
|
|
229
|
-
ImagePicker.openPicker({}).then((image) => {
|
|
230
|
-
if (props?.route?.params?.front) {
|
|
231
|
-
navigation.push(ScreenNames.VehicleRegistrationFront, {
|
|
232
|
-
uri:
|
|
233
|
-
Platform.OS === 'android' ? image?.path : 'file://' + image?.path,
|
|
234
|
-
loan: props?.route?.params?.loan,
|
|
235
|
-
});
|
|
236
|
-
} else if (props.route?.params?.callback) {
|
|
237
|
-
navigation.goBack();
|
|
238
|
-
props.route?.params?.callback(
|
|
239
|
-
Platform.OS === 'android' ? image?.path : 'file://' + image?.path
|
|
240
|
-
);
|
|
241
|
-
} else {
|
|
242
|
-
navigation.push(ScreenNames.VehicleRegistrationBack, {
|
|
243
|
-
uri:
|
|
244
|
-
Platform.OS === 'android' ? image?.path : 'file://' + image?.path,
|
|
245
|
-
loan: props?.route?.params?.loan,
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
225
|
}
|
|
250
226
|
};
|
|
251
227
|
|