@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.
Files changed (174) hide show
  1. package/lib/commonjs/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  2. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +9 -4
  3. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  4. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +78 -36
  5. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
  6. package/lib/commonjs/components/executiontasks/doodle/SignatureSchema.js.map +1 -1
  7. package/lib/commonjs/components/executiontasks/dropCash/DropCashSchema.js.map +1 -1
  8. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +1 -1
  9. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  10. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +1 -1
  11. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
  12. package/lib/commonjs/components/executiontasks/forms/FormSchema.js.map +1 -1
  13. package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  14. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +2 -3
  15. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  16. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +223 -127
  17. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  18. package/lib/commonjs/components/executiontasks/imageCapture/camera.svg +3 -0
  19. package/lib/commonjs/components/executiontasks/imageCapture/circle-xmark.svg +5 -0
  20. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +1 -1
  21. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  22. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -1
  23. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +1 -1
  24. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  25. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -1
  26. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +1 -1
  27. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  28. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -1
  29. package/lib/commonjs/components/executiontasks/pickup/PickpSchema.js.map +1 -1
  30. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +1 -1
  31. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  32. package/lib/commonjs/constants/constants.js +1 -1
  33. package/lib/commonjs/constants/constants.js.map +1 -1
  34. package/lib/commonjs/index.js +7 -0
  35. package/lib/commonjs/index.js.map +1 -1
  36. package/lib/commonjs/locale/Str.js +3 -1
  37. package/lib/commonjs/locale/Str.js.map +1 -1
  38. package/lib/commonjs/locale/en.json +2 -1
  39. package/lib/commonjs/locale/i18n.js +5 -1
  40. package/lib/commonjs/locale/i18n.js.map +1 -1
  41. package/lib/commonjs/manager/syncmanager/DBConfig.js +1 -1
  42. package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
  43. package/lib/commonjs/styles/executionTasks/CommonStyles.js +2 -1
  44. package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
  45. package/lib/commonjs/ui/screens/DeliverScreen.js +24 -5
  46. package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/DoodleScreen.js +22 -1
  48. package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/DropCashScreen.js +24 -5
  50. package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/FormsScreen.js +22 -1
  52. package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/ImageCaptureScreen.js +24 -5
  54. package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/PaymentScreen.js +25 -4
  56. package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/PickupScreen.js +31 -5
  58. package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
  59. package/lib/commonjs/utils/helper.js +46 -3
  60. package/lib/commonjs/utils/helper.js.map +1 -1
  61. package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
  62. package/lib/module/components/executiontasks/deliver/SLDeliverET.js +9 -4
  63. package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  64. package/lib/module/components/executiontasks/doodle/SignatureET.js +78 -36
  65. package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
  66. package/lib/module/components/executiontasks/doodle/SignatureSchema.js.map +1 -1
  67. package/lib/module/components/executiontasks/dropCash/DropCashSchema.js.map +1 -1
  68. package/lib/module/components/executiontasks/dropCash/SLDropCash.js +1 -1
  69. package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  70. package/lib/module/components/executiontasks/forms/FormGenerator.js +1 -1
  71. package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
  72. package/lib/module/components/executiontasks/forms/FormSchema.js.map +1 -1
  73. package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
  74. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +2 -3
  75. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  76. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +226 -130
  77. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  78. package/lib/module/components/executiontasks/imageCapture/camera.svg +3 -0
  79. package/lib/module/components/executiontasks/imageCapture/circle-xmark.svg +5 -0
  80. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +1 -1
  81. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  82. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentSchema.js.map +1 -1
  83. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +1 -1
  84. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  85. package/lib/module/components/executiontasks/payments/init/InitPaymentSchema.js.map +1 -1
  86. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +1 -1
  87. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  88. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentSchema.js.map +1 -1
  89. package/lib/module/components/executiontasks/pickup/PickpSchema.js.map +1 -1
  90. package/lib/module/components/executiontasks/pickup/SLPickupET.js +1 -1
  91. package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  92. package/lib/module/constants/constants.js +1 -1
  93. package/lib/module/constants/constants.js.map +1 -1
  94. package/lib/module/index.js +2 -0
  95. package/lib/module/index.js.map +1 -1
  96. package/lib/module/locale/Str.js +3 -1
  97. package/lib/module/locale/Str.js.map +1 -1
  98. package/lib/module/locale/en.json +2 -1
  99. package/lib/module/locale/i18n.js +5 -1
  100. package/lib/module/locale/i18n.js.map +1 -1
  101. package/lib/module/manager/syncmanager/DBConfig.js +1 -1
  102. package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
  103. package/lib/module/styles/executionTasks/CommonStyles.js +2 -1
  104. package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
  105. package/lib/module/ui/screens/DeliverScreen.js +24 -5
  106. package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
  107. package/lib/module/ui/screens/DoodleScreen.js +22 -1
  108. package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
  109. package/lib/module/ui/screens/DropCashScreen.js +25 -5
  110. package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
  111. package/lib/module/ui/screens/FormsScreen.js +22 -1
  112. package/lib/module/ui/screens/FormsScreen.js.map +1 -1
  113. package/lib/module/ui/screens/ImageCaptureScreen.js +24 -5
  114. package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
  115. package/lib/module/ui/screens/PaymentScreen.js +25 -4
  116. package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
  117. package/lib/module/ui/screens/PickupScreen.js +31 -5
  118. package/lib/module/ui/screens/PickupScreen.js.map +1 -1
  119. package/lib/module/utils/helper.js +46 -4
  120. package/lib/module/utils/helper.js.map +1 -1
  121. package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +1 -0
  122. package/lib/typescript/components/executiontasks/doodle/SignatureSchema.d.ts +1 -0
  123. package/lib/typescript/components/executiontasks/dropCash/DropCashSchema.d.ts +1 -0
  124. package/lib/typescript/components/executiontasks/forms/FormSchema.d.ts +1 -0
  125. package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +1 -0
  126. package/lib/typescript/components/executiontasks/imageCapture/CaptureUtils.d.ts +6 -1
  127. package/lib/typescript/components/executiontasks/imageCapture/ImageCapture.d.ts +1 -2
  128. package/lib/typescript/components/executiontasks/payments/completePayment/CompletePaymentSchema.d.ts +1 -0
  129. package/lib/typescript/components/executiontasks/payments/init/InitPaymentSchema.d.ts +1 -0
  130. package/lib/typescript/components/executiontasks/payments/processPayment/ProcessPaymentSchema.d.ts +1 -0
  131. package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +1 -0
  132. package/lib/typescript/constants/constants.d.ts +1 -1
  133. package/lib/typescript/index.d.ts +2 -0
  134. package/lib/typescript/locale/Str.d.ts +2 -0
  135. package/lib/typescript/manager/syncmanager/DBConfig.d.ts +1 -1
  136. package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +1 -0
  137. package/lib/typescript/utils/helper.d.ts +4 -3
  138. package/package.json +4 -5
  139. package/src/components/executiontasks/deliver/DeliverETInput.ts +1 -0
  140. package/src/components/executiontasks/deliver/SLDeliverET.tsx +13 -6
  141. package/src/components/executiontasks/doodle/SignatureET.tsx +48 -43
  142. package/src/components/executiontasks/doodle/SignatureSchema.ts +1 -0
  143. package/src/components/executiontasks/dropCash/DropCashSchema.ts +1 -0
  144. package/src/components/executiontasks/dropCash/SLDropCash.tsx +4 -4
  145. package/src/components/executiontasks/forms/FormGenerator.tsx +4 -3
  146. package/src/components/executiontasks/forms/FormSchema.ts +1 -0
  147. package/src/components/executiontasks/imageCapture/CaptureSchema.ts +1 -0
  148. package/src/components/executiontasks/imageCapture/CaptureUtils.ts +4 -9
  149. package/src/components/executiontasks/imageCapture/ImageCapture.tsx +279 -185
  150. package/src/components/executiontasks/imageCapture/camera.svg +3 -0
  151. package/src/components/executiontasks/imageCapture/circle-xmark.svg +5 -0
  152. package/src/components/executiontasks/payments/completePayment/CompletePaymentET.tsx +2 -1
  153. package/src/components/executiontasks/payments/completePayment/CompletePaymentSchema.ts +1 -0
  154. package/src/components/executiontasks/payments/init/InitPaymentET.tsx +2 -3
  155. package/src/components/executiontasks/payments/init/InitPaymentSchema.ts +1 -0
  156. package/src/components/executiontasks/payments/processPayment/ProcessPaymentET.tsx +3 -2
  157. package/src/components/executiontasks/payments/processPayment/ProcessPaymentSchema.ts +1 -0
  158. package/src/components/executiontasks/pickup/PickpSchema.ts +1 -0
  159. package/src/components/executiontasks/pickup/SLPickupET.tsx +5 -3
  160. package/src/constants/constants.ts +1 -1
  161. package/src/index.tsx +4 -2
  162. package/src/locale/Str.ts +3 -1
  163. package/src/locale/en.json +2 -1
  164. package/src/locale/i18n.ts +5 -1
  165. package/src/manager/syncmanager/DBConfig.ts +1 -1
  166. package/src/styles/executionTasks/CommonStyles.ts +1 -0
  167. package/src/ui/screens/DeliverScreen.tsx +27 -8
  168. package/src/ui/screens/DoodleScreen.tsx +25 -2
  169. package/src/ui/screens/DropCashScreen.tsx +27 -8
  170. package/src/ui/screens/FormsScreen.tsx +23 -1
  171. package/src/ui/screens/ImageCaptureScreen.tsx +29 -11
  172. package/src/ui/screens/PaymentScreen.tsx +32 -10
  173. package/src/ui/screens/PickupScreen.tsx +35 -8
  174. 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 msg = message || getStrVal(Str.DEFAULT_DELIVER_MESSAGE, Str.count, returnPackageCount && returnPackageCount >= 1 ? returnPackageCount : '');
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, Modal, Portal, Provider } from 'react-native-paper';
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
- title: props.title,
66
- headerLeft: () => {
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 props.navigation.goBack();
74
+ } else {
75
+ props.navigation.goBack();
76
+ }
76
77
  }}
77
78
  name="arrow-back"
78
- color={'black'}
79
- size={25}
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
- <Text style={styles.messageText}>
180
- {props.message || DEFAULT_SIGN_ET_MESSAGE}
181
- </Text>
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}>{'Clear'}</Text>
196
+ <Text style={styles.clearBtn}>{''}</Text>
196
197
  </TouchableOpacity>
197
198
  </View>
198
- <View style={{ flex: 1 }}>
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: 5 }]}
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={CommonStyles.nextButtonLabel}
256
- style={[CommonStyles.nextButton, { flex: 1, marginStart: 5 }]}
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: '#ffffff',
287
+ backgroundColor: '#F9F9F9',
282
288
  },
283
289
  bottomButtons: {
284
290
  justifyContent: 'flex-end',
285
- marginBottom: 10,
286
291
  flexDirection: 'row',
287
- marginStart: 10,
288
- marginEnd: 10,
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: '#474A57',
304
- fontFamily:
305
- Platform.OS === 'android'
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,
@@ -28,6 +28,7 @@ export type SignatureInput = BaseETRequest & {
28
28
  resolution: Dimension;
29
29
  fileSizeLimit: MaxFileSize;
30
30
  penColor?: PenColor;
31
+ isSelfLoop: boolean;
31
32
  onSubmitET: (value: SignatureOutput) => void;
32
33
  } & {
33
34
  jobIDs: string[];
@@ -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
- props.expectedAmount.value,
31
- props.expectedAmount.minorUnit
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>
@@ -6,6 +6,7 @@ import type {
6
6
  export type FormInputSchema = BaseETRequest & {
7
7
  jsonSchema: JSONSchema;
8
8
  uiSchema: UISchame;
9
+ isSelfLoop: boolean;
9
10
  onError: (e: any) => void;
10
11
  onSubmitET: (result: FormOutputSchema) => void;
11
12
  };
@@ -73,6 +73,7 @@ export interface AdditionalMultiConfig {
73
73
  }
74
74
 
75
75
  export type CaptureInput = BaseETRequest & {
76
+ isSelfLoop: boolean;
76
77
  resolution: Resolution;
77
78
  fileSizeLimit: MaxFileSize;
78
79
  captureMode: CaptureMode;
@@ -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
- return img.id !== imageData.id;
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