@os1-platform/dispatch-mobile 2.1.1 → 2.1.3
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/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +9 -4
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +78 -36
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +2 -3
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +223 -127
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/camera.svg +3 -0
- package/lib/commonjs/components/executiontasks/imageCapture/circle-xmark.svg +5 -0
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickpSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/constants/constants.js +1 -1
- package/lib/commonjs/constants/constants.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/locale/Str.js +3 -1
- package/lib/commonjs/locale/Str.js.map +1 -1
- package/lib/commonjs/locale/en.json +2 -1
- package/lib/commonjs/locale/i18n.js +5 -1
- package/lib/commonjs/locale/i18n.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +2 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +24 -5
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +22 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +24 -5
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +22 -1
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +24 -5
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +25 -4
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +31 -5
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/utils/helper.js +46 -3
- package/lib/commonjs/utils/helper.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +9 -4
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +78 -36
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashSchema.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +2 -3
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +226 -130
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/camera.svg +3 -0
- package/lib/module/components/executiontasks/imageCapture/circle-xmark.svg +5 -0
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickpSchema.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/constants/constants.js +1 -1
- package/lib/module/constants/constants.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/locale/Str.js +3 -1
- package/lib/module/locale/Str.js.map +1 -1
- package/lib/module/locale/en.json +2 -1
- package/lib/module/locale/i18n.js +5 -1
- package/lib/module/locale/i18n.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +2 -1
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +24 -5
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +22 -1
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +25 -5
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +22 -1
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +24 -5
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +25 -4
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +31 -5
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/utils/helper.js +46 -4
- package/lib/module/utils/helper.js.map +1 -1
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +1 -0
- package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/imageCapture/CaptureUtils.d.ts +6 -1
- package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +1 -2
- package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +1 -0
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +1 -0
- package/lib/typescript/constants/constants.d.ts +1 -1
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/locale/Str.d.ts +2 -0
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +1 -1
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +1 -0
- package/lib/typescript/utils/helper.d.ts +4 -3
- package/package.json +4 -5
- package/src/components/executiontasks/deliver/DeliverETInput.ts +1 -0
- package/src/components/executiontasks/deliver/SLDeliverET.tsx +13 -6
- package/src/components/executiontasks/doodle/SignatureET.tsx +48 -43
- package/src/components/executiontasks/doodle/SignatureSchema.ts +1 -0
- package/src/components/executiontasks/dropCash/DropCashSchema.ts +1 -0
- package/src/components/executiontasks/dropCash/SLDropCash.tsx +4 -4
- package/src/components/executiontasks/forms/FormGenerator.tsx +4 -3
- package/src/components/executiontasks/forms/FormSchema.ts +1 -0
- package/src/components/executiontasks/imageCapture/CaptureSchema.ts +1 -0
- package/src/components/executiontasks/imageCapture/CaptureUtils.ts +4 -9
- package/src/components/executiontasks/imageCapture/ImageCapture.tsx +279 -185
- package/src/components/executiontasks/imageCapture/camera.svg +3 -0
- package/src/components/executiontasks/imageCapture/circle-xmark.svg +5 -0
- package/src/components/executiontasks/payments/completePayment/CompletePaymentET.tsx +2 -1
- package/src/components/executiontasks/payments/completePayment/CompletePaymentSchema.ts +1 -0
- package/src/components/executiontasks/payments/init/InitPaymentET.tsx +2 -3
- package/src/components/executiontasks/payments/init/InitPaymentSchema.ts +1 -0
- package/src/components/executiontasks/payments/processPayment/ProcessPaymentET.tsx +3 -2
- package/src/components/executiontasks/payments/processPayment/ProcessPaymentSchema.ts +1 -0
- package/src/components/executiontasks/pickup/PickpSchema.ts +1 -0
- package/src/components/executiontasks/pickup/SLPickupET.tsx +5 -3
- package/src/constants/constants.ts +1 -1
- package/src/index.tsx +4 -2
- package/src/locale/Str.ts +3 -1
- package/src/locale/en.json +2 -1
- package/src/locale/i18n.ts +5 -1
- package/src/manager/syncmanager/DBConfig.ts +1 -1
- package/src/styles/executionTasks/CommonStyles.ts +1 -0
- package/src/ui/screens/DeliverScreen.tsx +27 -8
- package/src/ui/screens/DoodleScreen.tsx +25 -2
- package/src/ui/screens/DropCashScreen.tsx +27 -8
- package/src/ui/screens/FormsScreen.tsx +23 -1
- package/src/ui/screens/ImageCaptureScreen.tsx +29 -11
- package/src/ui/screens/PaymentScreen.tsx +32 -10
- package/src/ui/screens/PickupScreen.tsx +35 -8
- package/src/utils/helper.ts +47 -4
|
@@ -52,10 +52,14 @@ export const renderItem = ({ item }: { item: LineItem }) => (
|
|
|
52
52
|
|
|
53
53
|
const getMessage = (
|
|
54
54
|
returnPackageCount: number | undefined,
|
|
55
|
-
message: string | undefined
|
|
55
|
+
message: string | undefined,
|
|
56
|
+
title: string | undefined
|
|
56
57
|
) => {
|
|
57
58
|
try {
|
|
58
|
-
const
|
|
59
|
+
const isReturnOrder = title?.toString()?.toLowerCase()?.includes("return");
|
|
60
|
+
//message ||
|
|
61
|
+
//Str.DEFAULT_DELIVER_MESSAGE
|
|
62
|
+
const msg = getStrVal(isReturnOrder ? Str.DEFAULT_RETURN_MESSAGE : Str.DEFAULT_DELIVER_MESSAGE, Str.count, returnPackageCount && returnPackageCount >= 1 ? returnPackageCount : '');
|
|
59
63
|
return msg;
|
|
60
64
|
} catch (error: any) {
|
|
61
65
|
return message || '';
|
|
@@ -361,11 +365,14 @@ const DeliverET = (props: DeliverETInput) => {
|
|
|
361
365
|
{props.title || DEFAULT_DELIVER_TITLE}
|
|
362
366
|
</Text>
|
|
363
367
|
<Text style={DeliverPickupStyles.messageText}>
|
|
364
|
-
{getMessage(props.returnPackageCount, props.message)}
|
|
368
|
+
{getMessage(props.returnPackageCount, props.message, props.title)}
|
|
365
369
|
</Text>
|
|
366
|
-
<Text style={DeliverPickupStyles.messageText}>
|
|
370
|
+
{/* {(props.title?.trim?.toString()?.toLowerCase()?.includes("return")) && <Text style={DeliverPickupStyles.messageText}>
|
|
371
|
+
{getStrVal(Str.DEFAULT_DELIVER_MESSAGE, Str.count, props.returnPackageCount && props.returnPackageCount >= 1 ? props.returnPackageCount : '')}
|
|
372
|
+
</Text>} */}
|
|
373
|
+
{(props.title?.toString()?.toLowerCase()?.includes("return")) == false && <Text style={DeliverPickupStyles.messageText}>
|
|
367
374
|
{props?.shipCount ? getStrVal(Str.shipments, Str.count, props.shipCount) : ''}
|
|
368
|
-
</Text>
|
|
375
|
+
</Text>}
|
|
369
376
|
|
|
370
377
|
{/* Removed showing the item when item.length === 1 */}
|
|
371
378
|
{/* {props.returnPackageCount === 1 && props.items.length ? (
|
|
@@ -405,7 +412,7 @@ const DeliverET = (props: DeliverETInput) => {
|
|
|
405
412
|
Confirm
|
|
406
413
|
</Button>
|
|
407
414
|
{props.restrictCancel === true ? null : (
|
|
408
|
-
<Button
|
|
415
|
+
(props.isSelfLoop == false) && <Button
|
|
409
416
|
labelStyle={CommonStyles.cancelButtonLabel}
|
|
410
417
|
style={[CommonStyles.cancelButton, { marginTop: 10 }]}
|
|
411
418
|
mode={'outlined'}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
View,
|
|
9
9
|
} from 'react-native';
|
|
10
10
|
import type { SignatureInput } from './SignatureSchema';
|
|
11
|
-
import { Button,
|
|
11
|
+
import { Button, Provider } from 'react-native-paper';
|
|
12
12
|
import { getBaseETResponse } from '../../../utils/ExecTaskUtils';
|
|
13
13
|
import { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';
|
|
14
14
|
import {
|
|
@@ -32,12 +32,15 @@ import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
|
32
32
|
import { hasGoBackConnector } from '../../../components/utils';
|
|
33
33
|
import GoBackModal from '../../../components/widgets/GoBackModal';
|
|
34
34
|
import { useFocusEffect } from '@react-navigation/native';
|
|
35
|
+
import { getStr } from '../../../locale/util';
|
|
36
|
+
import Str from '../../../locale/Str';
|
|
35
37
|
|
|
36
38
|
const SignatureET = (props: SignatureInput) => {
|
|
37
39
|
const signatureViewRef = useRef<any>();
|
|
38
40
|
const [dragged, setDragged] = useState(0);
|
|
39
41
|
const dragRef = useRef<number>(0);
|
|
40
42
|
const [showBackModal, setShowBackModal] = useState(false);
|
|
43
|
+
const [buttonProceed, setButtonProceed] = useState(false);
|
|
41
44
|
|
|
42
45
|
// Handle back-button click when scanList was being viewed
|
|
43
46
|
useFocusEffect(
|
|
@@ -62,28 +65,24 @@ const SignatureET = (props: SignatureInput) => {
|
|
|
62
65
|
|
|
63
66
|
useLayoutEffect(() => {
|
|
64
67
|
props.navigation.setOptions({
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
+
headerTitle: () => (
|
|
69
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', marginRight: "50%" }}>
|
|
68
70
|
<Icon
|
|
69
71
|
onPress={() => {
|
|
70
|
-
if (
|
|
71
|
-
props.taskMeta?.enableGoBack &&
|
|
72
|
-
hasGoBackConnector(props.applicableReasons)
|
|
73
|
-
)
|
|
72
|
+
if (props.taskMeta?.enableGoBack && props.applicableReasons) {
|
|
74
73
|
setShowBackModal(true);
|
|
75
|
-
else
|
|
74
|
+
} else {
|
|
75
|
+
props.navigation.goBack();
|
|
76
|
+
}
|
|
76
77
|
}}
|
|
77
78
|
name="arrow-back"
|
|
78
|
-
color=
|
|
79
|
-
size={
|
|
80
|
-
style={{
|
|
81
|
-
paddingRight: 15,
|
|
82
|
-
paddingTop: 5,
|
|
83
|
-
}}
|
|
79
|
+
color="black"
|
|
80
|
+
size={22}
|
|
81
|
+
style={{ paddingRight: 6 }}
|
|
84
82
|
/>
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
<Text style={{ fontSize: 16, fontFamily: Fonts.IBMPlexSans_500Medium, lineHeight: 24 }}>{props.title}</Text>
|
|
84
|
+
</View>
|
|
85
|
+
),
|
|
87
86
|
});
|
|
88
87
|
}, [props.navigation, props.title]);
|
|
89
88
|
|
|
@@ -176,9 +175,11 @@ const SignatureET = (props: SignatureInput) => {
|
|
|
176
175
|
{renderModal()}
|
|
177
176
|
<View style={styles.mainContainer}>
|
|
178
177
|
<View style={styles.doodleView}>
|
|
179
|
-
<
|
|
180
|
-
{
|
|
181
|
-
|
|
178
|
+
<View style={{ paddingVertical: 20, marginTop: 20, backgroundColor: "#FFF" }}>
|
|
179
|
+
<Text style={styles.messageText}>
|
|
180
|
+
{props.message || DEFAULT_SIGN_ET_MESSAGE}
|
|
181
|
+
</Text>
|
|
182
|
+
</View>
|
|
182
183
|
<View style={styles.horizontalLine} />
|
|
183
184
|
<View>
|
|
184
185
|
{/* <Text style={styles.messageText2}>{'Received by'}</Text> */}
|
|
@@ -192,10 +193,10 @@ const SignatureET = (props: SignatureInput) => {
|
|
|
192
193
|
signatureViewRef.current?.resetImage();
|
|
193
194
|
}}
|
|
194
195
|
>
|
|
195
|
-
<Text style={styles.clearBtn}>{'
|
|
196
|
+
<Text style={styles.clearBtn}>{''}</Text>
|
|
196
197
|
</TouchableOpacity>
|
|
197
198
|
</View>
|
|
198
|
-
<View style={{
|
|
199
|
+
<View style={{ height: 470, width: 310, borderWidth: 1, borderColor: "#E0E3EB", alignSelf: "center", borderRadius: 10, overflow: 'hidden' }}>
|
|
199
200
|
<SignatureCapture
|
|
200
201
|
ref={signatureViewRef}
|
|
201
202
|
rotateClockwise={false}
|
|
@@ -231,8 +232,10 @@ const SignatureET = (props: SignatureInput) => {
|
|
|
231
232
|
onDragEvent={(drag) => {
|
|
232
233
|
if (drag.dragged) {
|
|
233
234
|
if (Platform.OS === 'android') {
|
|
235
|
+
setButtonProceed(true)
|
|
234
236
|
setDragged((prevState) => prevState + 1);
|
|
235
237
|
} else {
|
|
238
|
+
setButtonProceed(true)
|
|
236
239
|
dragRef.current = dragRef.current + 1;
|
|
237
240
|
}
|
|
238
241
|
}
|
|
@@ -240,20 +243,27 @@ const SignatureET = (props: SignatureInput) => {
|
|
|
240
243
|
/>
|
|
241
244
|
</View>
|
|
242
245
|
</View>
|
|
246
|
+
<View style={{ backgroundColor: '#DDDDDD', width: '100%', height: 1 }} />
|
|
243
247
|
<View style={styles.bottomButtons}>
|
|
244
|
-
<Button
|
|
245
|
-
style={[CommonStyles.cancelButton, { flex: 1, marginEnd:
|
|
248
|
+
{(props.isSelfLoop == false) && <Button
|
|
249
|
+
style={[CommonStyles.cancelButton, { flex: 1, marginEnd: 7 }]}
|
|
246
250
|
labelStyle={CommonStyles.cancelButtonLabel}
|
|
247
251
|
mode={'outlined'}
|
|
248
252
|
onPress={async () => {
|
|
249
253
|
await saveAndSubmit(true, '');
|
|
250
|
-
}}
|
|
251
|
-
>
|
|
252
|
-
Skip
|
|
254
|
+
}}>{getStr(Str.skip)}
|
|
253
255
|
</Button>
|
|
256
|
+
}
|
|
254
257
|
<Button
|
|
255
|
-
labelStyle={
|
|
256
|
-
|
|
258
|
+
labelStyle={{
|
|
259
|
+
color: buttonProceed ? "#ffff" : "#A3AAC2",
|
|
260
|
+
fontFamily: Fonts.IBMPlexSans_500Medium,
|
|
261
|
+
fontSize: 14,
|
|
262
|
+
lineHeight: 20,
|
|
263
|
+
textAlign: 'center',
|
|
264
|
+
textTransform: 'capitalize'
|
|
265
|
+
}}
|
|
266
|
+
style={[CommonStyles.nextButton, { flex: 1, marginStart: 8, backgroundColor: buttonProceed ? "#5B80F7" : "#E0E3EB" }]}
|
|
257
267
|
mode={'contained'}
|
|
258
268
|
onPress={async () => signatureViewRef.current?.saveImage()}
|
|
259
269
|
>
|
|
@@ -266,26 +276,23 @@ const SignatureET = (props: SignatureInput) => {
|
|
|
266
276
|
};
|
|
267
277
|
const styles = StyleSheet.create({
|
|
268
278
|
horizontalLine: {
|
|
269
|
-
backgroundColor: '#DDDDDD',
|
|
270
|
-
width: '100%',
|
|
271
|
-
height: 1,
|
|
272
279
|
marginTop: 13,
|
|
273
|
-
marginBottom: 15,
|
|
274
280
|
},
|
|
275
281
|
doodleView: {
|
|
276
282
|
flex: 1,
|
|
277
|
-
padding: 20,
|
|
283
|
+
// padding: 20,
|
|
278
284
|
},
|
|
279
285
|
mainContainer: {
|
|
280
286
|
flex: 1,
|
|
281
|
-
backgroundColor: '#
|
|
287
|
+
backgroundColor: '#F9F9F9',
|
|
282
288
|
},
|
|
283
289
|
bottomButtons: {
|
|
284
290
|
justifyContent: 'flex-end',
|
|
285
|
-
marginBottom: 10,
|
|
286
291
|
flexDirection: 'row',
|
|
287
|
-
marginStart:
|
|
288
|
-
marginEnd:
|
|
292
|
+
marginStart: 14,
|
|
293
|
+
marginEnd: 14,
|
|
294
|
+
backgroundColor: "white",
|
|
295
|
+
paddingVertical: 12,
|
|
289
296
|
},
|
|
290
297
|
clearBtn: {
|
|
291
298
|
color: SdkColors[ColorTheme.LIGHT].primaryButton,
|
|
@@ -300,11 +307,9 @@ const styles = StyleSheet.create({
|
|
|
300
307
|
messageText: {
|
|
301
308
|
fontSize: 16,
|
|
302
309
|
lineHeight: 20,
|
|
303
|
-
color: '#
|
|
304
|
-
fontFamily:
|
|
305
|
-
|
|
306
|
-
? Fonts.IBMPlexSans_400Regular
|
|
307
|
-
: 'IBMPlexSans-Regular',
|
|
310
|
+
color: '#111',
|
|
311
|
+
fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_400Regular : 'IBMPlexSans-Regular',
|
|
312
|
+
marginStart: 20
|
|
308
313
|
},
|
|
309
314
|
messageText2: {
|
|
310
315
|
flex: 1,
|
|
@@ -10,6 +10,7 @@ import type { ETAmount } from '../payments/init/InitPaymentSchema';
|
|
|
10
10
|
export type DropCashInput = BaseETRequest & {
|
|
11
11
|
expectedAmount: ETAmount;
|
|
12
12
|
confirmAmount?: boolean;
|
|
13
|
+
isSelfLoop: boolean;
|
|
13
14
|
onSubmitET: (etOutput: DropCashOutput) => void;
|
|
14
15
|
confirmCustodyExchange?: boolean;
|
|
15
16
|
};
|
|
@@ -27,9 +27,9 @@ const SLDropCash = (props: DropCashInput) => {
|
|
|
27
27
|
props.confirmAmount
|
|
28
28
|
? ''
|
|
29
29
|
: `${getPaymentValue(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
props.expectedAmount.value,
|
|
31
|
+
props.expectedAmount.minorUnit
|
|
32
|
+
)}`
|
|
33
33
|
);
|
|
34
34
|
const [inputError, setInputError] = useState('');
|
|
35
35
|
|
|
@@ -250,7 +250,7 @@ const SLDropCash = (props: DropCashInput) => {
|
|
|
250
250
|
>
|
|
251
251
|
Confirm
|
|
252
252
|
</Button>
|
|
253
|
-
{!props.confirmCustodyExchange && (
|
|
253
|
+
{!props.confirmCustodyExchange && (props.isSelfLoop == false) && (
|
|
254
254
|
<Button
|
|
255
255
|
labelStyle={CommonStyles.cancelButtonLabel}
|
|
256
256
|
style={[CommonStyles.cancelButton, { marginTop: 10 }]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef, useState, useLayoutEffect } from 'react';
|
|
1
|
+
import React, { useRef, useState, useLayoutEffect, useEffect } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
BackHandler,
|
|
4
4
|
KeyboardAvoidingView,
|
|
@@ -212,7 +212,7 @@ const FormGenerator = (props: FormInputSchema) => {
|
|
|
212
212
|
}
|
|
213
213
|
}}
|
|
214
214
|
>
|
|
215
|
-
<Text>{}</Text>
|
|
215
|
+
<Text>{ }</Text>
|
|
216
216
|
</ReactNativeForm>
|
|
217
217
|
</FormContext.Provider>
|
|
218
218
|
</View>
|
|
@@ -235,7 +235,7 @@ const FormGenerator = (props: FormInputSchema) => {
|
|
|
235
235
|
</Button>
|
|
236
236
|
</View>
|
|
237
237
|
<View>
|
|
238
|
-
<Button
|
|
238
|
+
{(props.isSelfLoop == false) && <Button
|
|
239
239
|
style={[CommonStyles.cancelButton, { width: 165, marginEnd: 10 }]}
|
|
240
240
|
labelStyle={CommonStyles.cancelButtonLabel}
|
|
241
241
|
mode={'outlined'}
|
|
@@ -249,6 +249,7 @@ const FormGenerator = (props: FormInputSchema) => {
|
|
|
249
249
|
>
|
|
250
250
|
Cancel
|
|
251
251
|
</Button>
|
|
252
|
+
}
|
|
252
253
|
</View>
|
|
253
254
|
</View>
|
|
254
255
|
</KeyboardAvoidingView>
|
|
@@ -22,18 +22,13 @@ import { BaseError } from '../../../errors/BaseError';
|
|
|
22
22
|
import BaseErrorCodes from '../../../errors/ErrorCodes';
|
|
23
23
|
import DispatchSdkCache from '../../../manager/sdk/DispatchSdkCache';
|
|
24
24
|
import { insertDocumentInDB } from '../../../utils/SyncManagerUtils';
|
|
25
|
-
|
|
26
25
|
import {CameraOptions, launchCamera} from 'react-native-image-picker';
|
|
27
|
-
import { useState } from 'react';
|
|
28
26
|
|
|
29
|
-
export async function deleteImage(
|
|
30
|
-
imageData: ImageData,
|
|
31
|
-
images: ImageData[]
|
|
32
|
-
): Promise<ImageData[]> {
|
|
27
|
+
export async function deleteImage(imageData: { path: string; id: { toString: () => string; }; }, images: any[]) {
|
|
33
28
|
await FileSystem.deleteAsync(imageData.path);
|
|
34
|
-
let filtered = images.filter((img
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
let filtered = images.filter(ele=>ele).filter(img => img.id.toString().toLowerCase() !== imageData.id.toString().toLowerCase()
|
|
30
|
+
);
|
|
31
|
+
console.log("filtered",filtered);
|
|
37
32
|
return filtered;
|
|
38
33
|
}
|
|
39
34
|
|