@os1-platform/dispatch-mobile 2.1.13 → 2.1.14

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 (58) hide show
  1. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +3 -0
  2. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  3. package/lib/commonjs/components/executiontasks/scan/ScanET.js +9 -6
  4. package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
  5. package/lib/commonjs/components/executiontasks/scan/interfaces.js.map +1 -1
  6. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +66 -27
  7. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
  8. package/lib/commonjs/components/executiontasks/scan/utils.js +4 -2
  9. package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
  10. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +0 -1
  11. package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  12. package/lib/commonjs/ui/screens/DeliverScreen.js +9 -1
  13. package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
  14. package/lib/commonjs/ui/screens/FormsScreen.js +9 -1
  15. package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
  16. package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
  17. package/lib/commonjs/utils/Constants.js +9 -0
  18. package/lib/commonjs/utils/Constants.js.map +1 -0
  19. package/lib/commonjs/utils/Enums.js +12 -0
  20. package/lib/commonjs/utils/Enums.js.map +1 -0
  21. package/lib/commonjs/utils/storage.js.map +1 -1
  22. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +3 -0
  23. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  24. package/lib/module/components/executiontasks/scan/ScanET.js +9 -6
  25. package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
  26. package/lib/module/components/executiontasks/scan/interfaces.js.map +1 -1
  27. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +67 -28
  28. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
  29. package/lib/module/components/executiontasks/scan/utils.js +4 -2
  30. package/lib/module/components/executiontasks/scan/utils.js.map +1 -1
  31. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +0 -1
  32. package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
  33. package/lib/module/ui/screens/DeliverScreen.js +9 -1
  34. package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
  35. package/lib/module/ui/screens/FormsScreen.js +9 -1
  36. package/lib/module/ui/screens/FormsScreen.js.map +1 -1
  37. package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
  38. package/lib/module/utils/Constants.js +3 -0
  39. package/lib/module/utils/Constants.js.map +1 -0
  40. package/lib/module/utils/Enums.js +6 -0
  41. package/lib/module/utils/Enums.js.map +1 -0
  42. package/lib/module/utils/storage.js.map +1 -1
  43. package/lib/typescript/components/executiontasks/scan/interfaces.d.ts +2 -0
  44. package/lib/typescript/utils/Constants.d.ts +1 -0
  45. package/lib/typescript/utils/Enums.d.ts +4 -0
  46. package/package.json +2 -2
  47. package/src/components/executiontasks/imageCapture/ImageCapture.tsx +36 -31
  48. package/src/components/executiontasks/scan/ScanET.tsx +23 -23
  49. package/src/components/executiontasks/scan/interfaces.ts +2 -0
  50. package/src/components/executiontasks/scan/sub_components/SummaryPage.tsx +107 -80
  51. package/src/components/executiontasks/scan/utils.ts +4 -1
  52. package/src/manager/syncmanager/document/DocumentSyncManager.ts +45 -46
  53. package/src/ui/screens/DeliverScreen.tsx +9 -7
  54. package/src/ui/screens/FormsScreen.tsx +14 -7
  55. package/src/ui/screens/ImageCaptureScreen.tsx +1 -1
  56. package/src/utils/Constants.ts +2 -0
  57. package/src/utils/Enums.ts +4 -0
  58. package/src/utils/storage.ts +9 -9
@@ -168,14 +168,14 @@ const ScanET = (props: ScannerInput) => {
168
168
  // shipmentCountLoaded: true,
169
169
  // }));
170
170
  }
171
- } catch (error) {}
171
+ } catch (error) { }
172
172
  };
173
173
 
174
174
  const fetchPreviousScannedData = async () => {
175
175
  try {
176
176
  const scanOutput = (await getScanMappedOutput()) || {};
177
177
  setMergedScanETOutput(scanOutput[prefixedMergedObjectiveId] || {});
178
- } catch (error) {}
178
+ } catch (error) { }
179
179
  };
180
180
 
181
181
  const fetchERC = async () => {
@@ -187,7 +187,7 @@ const ScanET = (props: ScannerInput) => {
187
187
  );
188
188
  setEventCodeItems(response);
189
189
  setSelectedEventCode(response[0]);
190
- } catch (error) {}
190
+ } catch (error) { }
191
191
  }
192
192
  };
193
193
 
@@ -240,7 +240,7 @@ const ScanET = (props: ScannerInput) => {
240
240
  else setShowUnscannedShipmentModal(true);
241
241
  }
242
242
  const cta = 'Back Arrow';
243
- fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SCAN_ET_SCREEN, cta: cta });
243
+ fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SCAN_ET_SCREEN, cta: cta });
244
244
 
245
245
  }}
246
246
  name="arrow-back"
@@ -589,7 +589,7 @@ const ScanET = (props: ScannerInput) => {
589
589
  });
590
590
  setShowScanList(!showScanList);
591
591
  const cta = 'View Summary';
592
- fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SCAN_ET_SCREEN, cta: cta });
592
+ fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SCAN_ET_SCREEN, cta: cta });
593
593
  }}
594
594
  >
595
595
  {`View Summary`}
@@ -702,11 +702,12 @@ const ScanET = (props: ScannerInput) => {
702
702
  labelStyle={CommonStyles.nextButtonLabel}
703
703
  style={{ ...CommonStyles.nextButton, marginTop: 20 }}
704
704
  uppercase={false}
705
- onPress={() => {setShowUnscannedShipmentModal(false)
705
+ onPress={() => {
706
+ setShowUnscannedShipmentModal(false)
706
707
  const cta = 'Continue Scanning';
707
- fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SCAN_ET_SCREEN, cta: cta });
708
-
709
-
708
+ fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SCAN_ET_SCREEN, cta: cta });
709
+
710
+
710
711
  }}
711
712
  >
712
713
  Continue Scanning
@@ -726,28 +727,27 @@ const ScanET = (props: ScannerInput) => {
726
727
  message: '',
727
728
  type: SnackBarType.SUCCESS,
728
729
  });
729
-
730
730
  // Trigger Scan Removal Event
731
731
  await resetObjective(props);
732
732
 
733
733
  // Clear Scan
734
734
  await Promise.all([
735
735
  clearScanOutput(prefixedMergedObjectiveId),
736
- DispatchExecutor.removeShipment(prefixedMergedObjectiveId),
736
+ DispatchExecutor.removeShipment(prefixedMergedObjectiveId, undefined, true),
737
737
  ]);
738
738
 
739
739
  props.navigation.goBack();
740
740
  const cta = 'Exit Scan Flow';
741
- fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SCAN_ET_SCREEN, cta: cta });
742
-
743
-
741
+ fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SCAN_ET_SCREEN, cta: cta });
742
+
743
+
744
744
  }}
745
745
  >
746
746
  <Text style={CommonStyles.cancelButtonLabel}>Exit Scan Flow</Text>
747
747
  </TouchableOpacity>
748
748
  </View>
749
749
  </Modal>
750
- </Portal>
750
+ </Portal >
751
751
  );
752
752
  };
753
753
 
@@ -762,9 +762,9 @@ const ScanET = (props: ScannerInput) => {
762
762
  }}
763
763
  >
764
764
  {isMultiObjectiveEnable ||
765
- props.scanMode === 'SINGLE' ||
766
- props.validation.selectedIndex === 0 ||
767
- props.scanCountLimit ? (
765
+ props.scanMode === 'SINGLE' ||
766
+ props.validation.selectedIndex === 0 ||
767
+ props.scanCountLimit ? (
768
768
  <Text>{`${shipmentCount.scannedCount}/${shipmentCount.totalCount} shipments scanned.`}</Text>
769
769
  ) : props.validation.selectedIndex === 1 ||
770
770
  props.validation.selectedIndex === 2 ? (
@@ -801,10 +801,10 @@ const ScanET = (props: ScannerInput) => {
801
801
  <View style={{ flex: 1 }}>
802
802
  {props.ercSelector && (
803
803
  <View style={{ marginHorizontal: 16, marginBottom: 30 }}>
804
- <View style={{ marginBottom: 16 }}>
804
+ <View style={{ marginBottom: 16, zIndex: 10000 }}>
805
805
  <ERDropDown
806
806
  title={'Event'}
807
- style={{ height: 50 }}
807
+ style={{ height: 50, zIndex: 10000 }}
808
808
  selectedReason={selectedEventCode}
809
809
  items={eventCodeItems ?? []}
810
810
  onItemChange={(eventItem: ercItem | null) => {
@@ -812,10 +812,10 @@ const ScanET = (props: ScannerInput) => {
812
812
  }}
813
813
  />
814
814
  </View>
815
- <View style={{ marginVertical: 16 }}>
815
+ <View style={{ marginVertical: 16, zIndex: -1 }}>
816
816
  <ERDropDown
817
817
  title={'Reason'}
818
- style={{ height: 50 }}
818
+ style={{ height: 50, zIndex: -1 }}
819
819
  selectedReason={selectedReason}
820
820
  disabled={
821
821
  !reasonItems || !reasonItems?.length ? true : false
@@ -912,7 +912,7 @@ const ScanET = (props: ScannerInput) => {
912
912
  });
913
913
  setScannedInput(scanText);
914
914
  const cta = 'Apply';
915
- fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SCAN_ET_SCREEN, cta: cta });
915
+ fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SCAN_ET_SCREEN, cta: cta });
916
916
  }}
917
917
  >
918
918
  <Text
@@ -68,6 +68,8 @@ export interface DisplaySummary {
68
68
  orderId?: string;
69
69
  prefixedMergedObjectiveId: string;
70
70
  lastStatus: IDispatchExecutor.ExecutionStatus;
71
+ eCode?: string;
72
+ rCode?: string;
71
73
  }
72
74
 
73
75
  export type ListItem = DisplaySummary & {
@@ -17,7 +17,6 @@ import { TouchableOpacity } from 'react-native';
17
17
  import ERDropDown, { ercItem } from './ERDropDown';
18
18
  import { getErcDropDownItems } from './DropDownUtils';
19
19
  import { ERCode, ScannerInput, ScannerOutput } from '../ScanSchema';
20
- import SdkColors, { ColorTheme } from '../../../../styles/SdkColors';
21
20
  import {
22
21
  BaseDataProvider,
23
22
  DataProvider,
@@ -30,6 +29,7 @@ import Card from '../../../widgets/Card';
30
29
  import {
31
30
  addScans,
32
31
  filterERCItems,
32
+ getEventType,
33
33
  getScanData,
34
34
  getTabCount,
35
35
  removeScan,
@@ -94,23 +94,33 @@ const SummaryPage = (props: SummaryPageProps) => {
94
94
 
95
95
  // START: Modal Handling for Summary Page
96
96
 
97
- const [showUnscannedShipmentModal, setShowUnscannedShipmentModal] =
98
- useState(false);
99
- const [showERCModal, setShowERCModal] = useState(false);
97
+ const [showUnscannedShipmentModal, setShowUnscannedShipmentModal] = useState(false);
100
98
  const [showRemoveShipmentModal, setShowRemoveShipmentModal] = useState(false);
101
99
 
100
+ //states for ERC Selectors
101
+ const [showEditModal, setShowEditModal] = useState(false);
102
+ const [showERCModal, setShowERCModal] = useState(false);
102
103
  const [selectedEventCode, setSelectedEventCode] = useState<ercItem>();
103
104
  const [selectedReason, setSelectedReason] = useState<ercItem>(); // reason code from ercSelector
104
105
  const [reasonItems, setReasonItems] = useState<ercItem[]>(); // list of reason codes
106
+ const [editedEventItems, setEditedEventItems] = useState<ercItem[]>(); // list of reason codes
105
107
  const [editedReasonItems, setEditedReasonItems] = useState<ercItem[]>(); // list of reason codes
108
+ const [editedEventCode, setEditedEventCode] = useState<ercItem>();
109
+ const [editedReason, setEditedReason] = useState<ercItem>(); // reason code from ercSelector
110
+
106
111
  let { scannedCount, totalCount } = props.shipmentCount;
112
+
113
+ // effect for even code selector
107
114
  useEffect(() => {
108
115
  props.ercSelector &&
109
116
  (async () => {
110
117
  setSelectedEventCode(props.eventCodeItems[0]);
111
118
  setEditedEventCode(props.eventCodeItems[0]);
119
+ setEditedEventItems(props.eventCodeItems)
112
120
  })();
113
121
  }, [props.eventCodeItems]);
122
+
123
+ //effect for reason code selector
114
124
  useEffect(() => {
115
125
  selectedEventCode?.code &&
116
126
  (async () => {
@@ -129,6 +139,27 @@ const SummaryPage = (props: SummaryPageProps) => {
129
139
  })();
130
140
  }, [selectedEventCode?.code]);
131
141
 
142
+ useEffect(() => {
143
+ editedEventCode?.code &&
144
+ (async () => {
145
+ let response = await getErcDropDownItems(
146
+ 'REASON',
147
+ props.ercSelector || [],
148
+ editedEventCode?.code
149
+ );
150
+ if (response.length) {
151
+ // setReasonItems(response);
152
+ setEditedReasonItems(response);
153
+ setEditedReason(response[0]);
154
+ } else {
155
+ // setReasonItems([]);
156
+ setEditedReasonItems([]);
157
+ setEditedReason(undefined);
158
+ }
159
+ })();
160
+ }, [editedEventCode?.code]);
161
+
162
+ //Proceed button for ET next flow
132
163
  const renderActionButtons = () => {
133
164
  return (
134
165
  <View
@@ -145,7 +176,7 @@ const SummaryPage = (props: SummaryPageProps) => {
145
176
  props.handleSubmitET(PROCEED_STATUS.DELIVER_NOW, tabs[1].count);
146
177
  }
147
178
  const cta = 'Proceed';
148
- fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SUMMARY_PAGE_SCREEN, cta: cta });
179
+ fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SUMMARY_PAGE_SCREEN, cta: cta });
149
180
 
150
181
  }}
151
182
  >
@@ -172,10 +203,7 @@ const SummaryPage = (props: SummaryPageProps) => {
172
203
  const [scanList, setScanList] = useState<DisplaySummary[]>([]);
173
204
  const [isLoading, setIsLoading] = useState(false);
174
205
  const [isLoadingMore, setIsLoadingMore] = useState(false);
175
- const [showEditModal, setShowEditModal] = useState(false);
176
206
  const [selectedEditItem, setSelectedEditItem] = useState<ListItem>();
177
- const [editedEventCode, setEditedEventCode] = useState<ercItem>();
178
- const [editedReason, setEditedReason] = useState<ercItem>(); // reason code from ercSelector
179
207
  const [selectedItems, setSelectedItems] = useState<{
180
208
  [id: string]: ListItem;
181
209
  }>({});
@@ -250,6 +278,7 @@ const SummaryPage = (props: SummaryPageProps) => {
250
278
  }
251
279
  };
252
280
 
281
+ //effect for all the tabs and their counts
253
282
  useEffect(() => {
254
283
  (async () => {
255
284
  const count = await getTabCount(props.scanProps);
@@ -285,25 +314,7 @@ const SummaryPage = (props: SummaryPageProps) => {
285
314
  })();
286
315
  }, [isRemoved, activeTab, searchQuery]);
287
316
 
288
- useEffect(() => {
289
- editedEventCode?.code &&
290
- (async () => {
291
- let response = await getErcDropDownItems(
292
- 'REASON',
293
- props.ercSelector || [],
294
- editedEventCode?.code
295
- );
296
- if (response.length) {
297
- // setReasonItems(response);
298
- setEditedReasonItems(response);
299
- setEditedReason(response[0]);
300
- } else {
301
- // setReasonItems([]);
302
- setEditedReasonItems([]);
303
- setEditedReason(undefined);
304
- }
305
- })();
306
- }, [editedEventCode?.code]);
317
+
307
318
 
308
319
  // Triggered when the user reaches the end of the list
309
320
  const onEndReached = async () => {
@@ -324,10 +335,10 @@ const SummaryPage = (props: SummaryPageProps) => {
324
335
  renderChildren={() => {
325
336
  return (
326
337
  <View style={{ marginHorizontal: 16, marginBottom: 20 }}>
327
- <View style={{ marginBottom: 16 }}>
338
+ <View style={{ marginBottom: 16, zIndex: 10000 }}>
328
339
  <ERDropDown
329
340
  title={'Event'}
330
- style={{ height: 50 }}
341
+ style={{ height: 50, zIndex: 10000 }}
331
342
  selectedReason={editedEventCode}
332
343
  items={props.eventCodeItems}
333
344
  onItemChange={(eventItem: ercItem | null) => {
@@ -335,10 +346,10 @@ const SummaryPage = (props: SummaryPageProps) => {
335
346
  }}
336
347
  />
337
348
  </View>
338
- <View style={{ marginVertical: 20 }}>
349
+ <View style={{ marginVertical: 20, zIndex: -1 }}>
339
350
  <ERDropDown
340
351
  title={'Reason'}
341
- style={{ height: 50 }}
352
+ style={{ height: 50, zIndex: -1 }}
342
353
  selectedReason={editedReason}
343
354
  disabled={
344
355
  !editedReasonItems || !editedReasonItems?.length
@@ -419,6 +430,8 @@ const SummaryPage = (props: SummaryPageProps) => {
419
430
  prefixedMergedObjectiveId:
420
431
  scan.prefixedMergedObjectiveId,
421
432
  lastStatus: scan.lastStatus,
433
+ eCode: editedEventCode.code,
434
+ rCode: editedReason?.code || '--'
422
435
  };
423
436
  setDataProvider((dataProvider) => {
424
437
  if (dataProvider)
@@ -551,7 +564,7 @@ const SummaryPage = (props: SummaryPageProps) => {
551
564
  setSelectedEditItem(undefined);
552
565
  setShowEditModal(false);
553
566
  const cta = 'Update';
554
- fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SUMMARY_PAGE_SCREEN, cta: cta });
567
+ fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SUMMARY_PAGE_SCREEN, cta: cta });
555
568
 
556
569
  return;
557
570
  },
@@ -563,7 +576,7 @@ const SummaryPage = (props: SummaryPageProps) => {
563
576
  setShowEditModal(false);
564
577
  setSelectedEditItem(undefined);
565
578
  const cta = 'Cancel';
566
- fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SUMMARY_PAGE_SCREEN, cta: cta });
579
+ fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SUMMARY_PAGE_SCREEN, cta: cta });
567
580
 
568
581
  },
569
582
  }}
@@ -592,38 +605,38 @@ const SummaryPage = (props: SummaryPageProps) => {
592
605
  styles: modalStyles.secondaryButtonStyles,
593
606
  onPress: () => setShowUnscannedShipmentModal(false),
594
607
  }}
595
- // OLD CODE: When you wanted to update Undelivered shipments with a particular ERC got removed after: https://dev.azure.com/DelhiveryPlatform/Solutions/_workitems/edit/15669
596
- // secondaryButton={{
597
- // label: `Mark as Undelivered`,
598
- // styles: modalStyles.secondaryButtonStyles,
599
- // onPress: () => {
600
- // setShowUnscannedShipmentModal(false);
601
- // setShowERCModal(true);
602
- // },
603
- // }}
604
- // renderAdditionalButtons={() => {
605
- // return (
606
- // <TouchableOpacity
607
- // style={{
608
- // marginBottom: 16,
609
- // height: 40,
610
- // borderRadius: 6,
611
- // justifyContent: 'center',
612
- // alignItems: 'center',
613
- // }}
614
- // onPress={() => setShowUnscannedShipmentModal(false)}
615
- // >
616
- // <Text
617
- // style={[
618
- // CommonStyles.cancelButtonLabel,
619
- // { color: SdkColors[ColorTheme.LIGHT].primaryButton },
620
- // ]}
621
- // >
622
- // Continue Scanning
623
- // </Text>
624
- // </TouchableOpacity>
625
- // );
626
- // }}
608
+ // OLD CODE: When you wanted to update Undelivered shipments with a particular ERC got removed after: https://dev.azure.com/DelhiveryPlatform/Solutions/_workitems/edit/15669
609
+ // secondaryButton={{
610
+ // label: `Mark as Undelivered`,
611
+ // styles: modalStyles.secondaryButtonStyles,
612
+ // onPress: () => {
613
+ // setShowUnscannedShipmentModal(false);
614
+ // setShowERCModal(true);
615
+ // },
616
+ // }}
617
+ // renderAdditionalButtons={() => {
618
+ // return (
619
+ // <TouchableOpacity
620
+ // style={{
621
+ // marginBottom: 16,
622
+ // height: 40,
623
+ // borderRadius: 6,
624
+ // justifyContent: 'center',
625
+ // alignItems: 'center',
626
+ // }}
627
+ // onPress={() => setShowUnscannedShipmentModal(false)}
628
+ // >
629
+ // <Text
630
+ // style={[
631
+ // CommonStyles.cancelButtonLabel,
632
+ // { color: SdkColors[ColorTheme.LIGHT].primaryButton },
633
+ // ]}
634
+ // >
635
+ // Continue Scanning
636
+ // </Text>
637
+ // </TouchableOpacity>
638
+ // );
639
+ // }}
627
640
  />
628
641
  );
629
642
  };
@@ -640,10 +653,10 @@ const SummaryPage = (props: SummaryPageProps) => {
640
653
  renderChildren={() => {
641
654
  return (
642
655
  <View style={{ marginHorizontal: 16, marginBottom: 20 }}>
643
- <View style={{ marginBottom: 16 }}>
656
+ <View style={{ marginBottom: 16, zIndex: 10000 }}>
644
657
  <ERDropDown
645
658
  title={'Event'}
646
- style={{ height: 50 }}
659
+ style={{ height: 50, zIndex: 10000 }}
647
660
  selectedReason={selectedEventCode}
648
661
  items={filterERCItems(props.eventCodeItems, 'FAILURE')}
649
662
  onItemChange={(eventItem: ercItem | null) => {
@@ -651,10 +664,10 @@ const SummaryPage = (props: SummaryPageProps) => {
651
664
  }}
652
665
  />
653
666
  </View>
654
- <View style={{ marginVertical: 20 }}>
667
+ <View style={{ marginVertical: 20, zIndex: -1 }}>
655
668
  <ERDropDown
656
669
  title={'Reason'}
657
- style={{ height: 50 }}
670
+ style={{ height: 50, zIndex: -1 }}
658
671
  selectedReason={selectedReason}
659
672
  disabled={!reasonItems || !reasonItems?.length ? true : false}
660
673
  items={reasonItems ?? []}
@@ -696,13 +709,11 @@ const SummaryPage = (props: SummaryPageProps) => {
696
709
  contentContainerStyle={{ marginStart: 40, marginEnd: 40 }}
697
710
  title={{ label: 'Remove Shipment' }}
698
711
  subTitle={{
699
- label: `${
700
- Object.keys(selectedItems).length > 1
701
- ? `Are you sure you want to remove the ${
702
- Object.keys(selectedItems).length
703
- } shipments?`
704
- : 'Are you sure you want to remove this shipment?'
705
- }`,
712
+ label: `${Object.keys(selectedItems).length > 1
713
+ ? `Are you sure you want to remove the ${Object.keys(selectedItems).length
714
+ } shipments?`
715
+ : 'Are you sure you want to remove this shipment?'
716
+ }`,
706
717
  styles: modalStyles.subTitleStyles,
707
718
  }}
708
719
  primaryButton={{
@@ -752,9 +763,9 @@ const SummaryPage = (props: SummaryPageProps) => {
752
763
 
753
764
  if (
754
765
  item.prefixedMergedObjectiveId !==
755
- prefixedMergedObjectiveId ||
766
+ prefixedMergedObjectiveId ||
756
767
  item.lastStatus ===
757
- IDispatchExecutor.ExecutionStatus.COMPLETED_FAILURE
768
+ IDispatchExecutor.ExecutionStatus.COMPLETED_FAILURE
758
769
  ) {
759
770
  itemsRemoved.push(item.scanId);
760
771
  } else {
@@ -912,6 +923,22 @@ const SummaryPage = (props: SummaryPageProps) => {
912
923
  });
913
924
  } else {
914
925
  setSelectedItems({});
926
+ if (editedEventItems && scan.eCode && scan.eventCode) {
927
+ let eventErc: ercItem = {
928
+ code: scan.eCode,
929
+ text: scan.eventCode,
930
+ success: getEventType(editedEventItems, scan.eCode)
931
+ }
932
+ setEditedEventCode(eventErc);
933
+ if (editedReasonItems && scan.rCode && scan.reasonCode) {
934
+ let resonErc: ercItem = {
935
+ code: scan.rCode,
936
+ text: scan.reasonCode,
937
+ success: getEventType(editedReasonItems, scan.rCode)
938
+ }
939
+ setEditedReason(resonErc);
940
+ }
941
+ }
915
942
  setShowEditModal(true);
916
943
  setSelectedEditItem({ ...props, index });
917
944
  }
@@ -1112,8 +1139,8 @@ const SummaryPage = (props: SummaryPageProps) => {
1112
1139
  <View style={styles.bottomView}>{renderActionButtons()}</View>
1113
1140
  ) : null}
1114
1141
  {selectedItems &&
1115
- Object.keys(selectedItems).length &&
1116
- activeTab !== SummaryPageTabs.PENDING ? (
1142
+ Object.keys(selectedItems).length &&
1143
+ activeTab !== SummaryPageTabs.PENDING ? (
1117
1144
  <View style={styles.removeBtnContainer}>
1118
1145
  <View
1119
1146
  style={{
@@ -562,6 +562,8 @@ const modifyDisplayScanData = async (
562
562
  reasonCode: reasonCode || '--',
563
563
  prefixedMergedObjectiveId: scan.originalMergedObjId,
564
564
  lastStatus: scan.lastStatus,
565
+ eCode: scan.eventCode,
566
+ rCode: scan.reasonCode
565
567
  };
566
568
  })
567
569
  );
@@ -755,7 +757,8 @@ export async function removeScan(
755
757
 
756
758
  const result = await DispatchExecutor.removeShipment(
757
759
  prefixedMergedObjectiveId,
758
- scans
760
+ scans,
761
+ false
759
762
  );
760
763
 
761
764
  // Decrease count on remove