@os1-platform/dispatch-mobile 2.1.0 → 2.1.1
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 +3 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickpSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +3 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/locale/Str.js +2 -1
- package/lib/commonjs/locale/Str.js.map +1 -1
- package/lib/commonjs/locale/i18n.js +4 -0
- package/lib/commonjs/locale/i18n.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +1 -0
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +11 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +3 -0
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +3 -0
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverETInput.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +3 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickpSchema.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +3 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/locale/Str.js +2 -1
- package/lib/module/locale/Str.js.map +1 -1
- package/lib/module/locale/i18n.js +4 -0
- package/lib/module/locale/i18n.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +1 -0
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js +11 -1
- package/lib/module/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +3 -0
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +3 -0
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/typescript/components/executiontasks/deliver/DeliverETInput.d.ts +1 -0
- package/lib/typescript/components/executiontasks/pickup/PickpSchema.d.ts +1 -0
- package/lib/typescript/locale/Str.d.ts +1 -0
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +2 -1
- package/package.json +5 -6
- package/src/components/executiontasks/deliver/DeliverETInput.ts +1 -0
- package/src/components/executiontasks/deliver/SLDeliverET.tsx +93 -90
- package/src/components/executiontasks/pickup/PickpSchema.ts +1 -0
- package/src/components/executiontasks/pickup/SLPickupET.tsx +82 -79
- package/src/locale/Str.ts +2 -1
- package/src/locale/i18n.ts +8 -3
- package/src/manager/syncmanager/DBConfig.ts +1 -0
- package/src/manager/syncmanager/events/ETEventsManager.ts +15 -1
- package/src/ui/screens/DeliverScreen.tsx +7 -4
- package/src/ui/screens/PickupScreen.tsx +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@os1-platform/dispatch-mobile",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Dispatch SDK React Native Package",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
"@commitlint/config-conventional": "^11.0.0",
|
|
60
60
|
"@expo-google-fonts/ibm-plex-sans": "*",
|
|
61
61
|
"@foxtrotplatform/platform-coreos-mts-sdk": "file:foxtrotplatform-platform-coreos-mts-sdk-1.0.2.tgz",
|
|
62
|
-
"@os1-platform/platform-coreos-execution-engine-sdk": "1.0.4",
|
|
63
62
|
"@react-native-async-storage/async-storage": "^1.15.14",
|
|
64
63
|
"@react-native-community/datetimepicker": "^3.5.2",
|
|
65
64
|
"@react-native-community/eslint-config": "^2.0.0",
|
|
@@ -104,7 +103,6 @@
|
|
|
104
103
|
"expo-font": "~10.0.3",
|
|
105
104
|
"expo-image-manipulator": "~10.1.2",
|
|
106
105
|
"expo-image-picker": "~11.0.3",
|
|
107
|
-
"react-native-image-picker": "^7.0.2",
|
|
108
106
|
"expo-location": "~13.0.4",
|
|
109
107
|
"expo-sqlite": "~11.0.0",
|
|
110
108
|
"graphql": "^16.2.0",
|
|
@@ -121,6 +119,7 @@
|
|
|
121
119
|
"react-native-builder-bob": "^0.18.0",
|
|
122
120
|
"react-native-dropdown-picker": "^5.4.0",
|
|
123
121
|
"react-native-get-random-values": "^1.8.0",
|
|
122
|
+
"react-native-image-picker": "^7.0.2",
|
|
124
123
|
"react-native-paper": "^4.9.2",
|
|
125
124
|
"react-native-safe-area-context": "^3.3.2",
|
|
126
125
|
"react-native-screens": "^3.9.0",
|
|
@@ -154,7 +153,6 @@
|
|
|
154
153
|
"expo-font": "~11.0.1",
|
|
155
154
|
"expo-image-manipulator": "~11.0.0",
|
|
156
155
|
"expo-image-picker": "~14.1.0",
|
|
157
|
-
"react-native-image-picker": "^7.0.2",
|
|
158
156
|
"expo-location": "~15.0.1",
|
|
159
157
|
"expo-sqlite": "~11.0.0",
|
|
160
158
|
"graphql": "^16.2.0",
|
|
@@ -162,6 +160,7 @@
|
|
|
162
160
|
"react-native": "^0.69.5",
|
|
163
161
|
"react-native-dropdown-picker": "^5.4.0",
|
|
164
162
|
"react-native-get-random-values": "^1.8.0",
|
|
163
|
+
"react-native-image-picker": "^7.0.2",
|
|
165
164
|
"react-native-paper": "^4.9.2",
|
|
166
165
|
"react-native-safe-area-context": "^3.3.2",
|
|
167
166
|
"react-native-screens": "^3.9.0",
|
|
@@ -260,6 +259,7 @@
|
|
|
260
259
|
]
|
|
261
260
|
},
|
|
262
261
|
"dependencies": {
|
|
262
|
+
"@os1-platform/platform-coreos-execution-engine-sdk": "1.0.4",
|
|
263
263
|
"@rjsf/core": "^2.0.0",
|
|
264
264
|
"apollo-link-timeout": "^4.0.0",
|
|
265
265
|
"decompress": "^4.2.1",
|
|
@@ -272,7 +272,6 @@
|
|
|
272
272
|
"react-native-svg": "^13.6.0",
|
|
273
273
|
"recyclerlistview": "^4.2.0",
|
|
274
274
|
"rjsf-native": "^1.0.14",
|
|
275
|
-
"toggle-switch-react-native": "^3.3.0"
|
|
276
|
-
"@os1-platform/platform-coreos-execution-engine-sdk": "1.0.4"
|
|
275
|
+
"toggle-switch-react-native": "^3.3.0"
|
|
277
276
|
}
|
|
278
277
|
}
|
|
@@ -38,6 +38,7 @@ export type DeliverETInput = BaseETRequest & {
|
|
|
38
38
|
confirmShipments?: boolean;
|
|
39
39
|
onSubmitET(response: DeliverOutput): void;
|
|
40
40
|
returnPackageCount?: number;
|
|
41
|
+
shipCount?: number;
|
|
41
42
|
restrictCancel?: boolean;
|
|
42
43
|
showDeliverModal: boolean;
|
|
43
44
|
setShowDeliverModal: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -34,15 +34,15 @@ import { hasGoBackConnector } from '../../../components/utils';
|
|
|
34
34
|
import { useFocusEffect } from '@react-navigation/native';
|
|
35
35
|
import { getStr, getStrVal } from '../../../locale/util';
|
|
36
36
|
import Str from '../../../locale/Str';
|
|
37
|
-
import CircleMark from '../../../icons/circleMark.svg';
|
|
38
|
-
import { TouchableOpacity } from 'react-native';
|
|
37
|
+
import CircleMark from '../../../icons/circleMark.svg';
|
|
38
|
+
import { TouchableOpacity } from 'react-native';
|
|
39
39
|
import ModalWidget from '../../../components/widgets/ModalWidget';
|
|
40
40
|
|
|
41
41
|
const ListItem = ({ lineItem }: { lineItem: LineItem }) => (
|
|
42
42
|
<View style={{ justifyContent: 'center' }}>
|
|
43
|
-
<Text
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
<Text style={DeliverPickupStyles.itemTextStyle}>
|
|
44
|
+
{`Order ID: ${lineItem.skuId}`}
|
|
45
|
+
</Text>
|
|
46
46
|
</View>
|
|
47
47
|
);
|
|
48
48
|
|
|
@@ -56,7 +56,7 @@ const getMessage = (
|
|
|
56
56
|
) => {
|
|
57
57
|
try {
|
|
58
58
|
const msg = message || getStrVal(Str.DEFAULT_DELIVER_MESSAGE, Str.count, returnPackageCount && returnPackageCount >= 1 ? returnPackageCount : '');
|
|
59
|
-
|
|
59
|
+
return msg;
|
|
60
60
|
} catch (error: any) {
|
|
61
61
|
return message || '';
|
|
62
62
|
}
|
|
@@ -112,10 +112,10 @@ const DeliverET = (props: DeliverETInput) => {
|
|
|
112
112
|
hasGoBackConnector(props.applicableReasons)
|
|
113
113
|
)
|
|
114
114
|
setShowBackModal(true);
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
else {
|
|
116
|
+
setShowDeliverModal(false);
|
|
117
|
+
props.navigation.goBack();
|
|
118
|
+
}
|
|
119
119
|
}}
|
|
120
120
|
name="arrow-back"
|
|
121
121
|
color={'black'}
|
|
@@ -153,56 +153,56 @@ const DeliverET = (props: DeliverETInput) => {
|
|
|
153
153
|
);
|
|
154
154
|
};
|
|
155
155
|
|
|
156
|
-
const renderGoBackModal = () => {
|
|
157
|
-
return (
|
|
158
|
-
<ModalWidget
|
|
159
|
-
dismissable={true}
|
|
160
|
-
showModal={goBack}
|
|
161
|
-
title={{
|
|
162
|
-
label: `Are you sure you want to exit ${DEFAULT_DELIVER_TITLE}?`,
|
|
163
|
-
}}
|
|
164
|
-
subTitle={{
|
|
165
|
-
label: 'All progress will be lost',
|
|
166
|
-
styles: {
|
|
167
|
-
alignSelf: 'center',
|
|
168
|
-
},
|
|
169
|
-
}}
|
|
170
|
-
primaryButton={{
|
|
171
|
-
label: 'Exit',
|
|
172
|
-
onPress: async () => {
|
|
173
|
-
if (
|
|
174
|
-
props.taskMeta?.enableGoBack &&
|
|
175
|
-
hasGoBackConnector(props.applicableReasons)
|
|
176
|
-
) {
|
|
177
|
-
props.onSubmitET({
|
|
178
|
-
...(await getBaseETResponse(
|
|
179
|
-
EntityCode.DELIVER,
|
|
180
|
-
false,
|
|
181
|
-
GO_BACK_EVENT_CODE,
|
|
182
|
-
'',
|
|
183
|
-
props.mergedObjectiveId,
|
|
184
|
-
ExecutionTaskID.DELIVER
|
|
185
|
-
)),
|
|
186
|
-
});
|
|
187
|
-
setShowBackModal(false);
|
|
188
|
-
} else {
|
|
189
|
-
props.navigation.goBack();
|
|
190
|
-
}
|
|
191
|
-
setShowBackModal(false);
|
|
192
|
-
},
|
|
193
|
-
styles: styles.primaryButtonStyles,
|
|
194
|
-
}}
|
|
195
|
-
secondaryButton={{
|
|
196
|
-
label: 'Cancel',
|
|
197
|
-
onPress: () => {
|
|
198
|
-
setGoBack(false);
|
|
199
|
-
setShowDeliverModal(true);
|
|
200
|
-
},
|
|
201
|
-
styles: styles.secondaryButtonStyles,
|
|
202
|
-
}}
|
|
203
|
-
/>
|
|
204
|
-
);
|
|
205
|
-
};
|
|
156
|
+
const renderGoBackModal = () => {
|
|
157
|
+
return (
|
|
158
|
+
<ModalWidget
|
|
159
|
+
dismissable={true}
|
|
160
|
+
showModal={goBack}
|
|
161
|
+
title={{
|
|
162
|
+
label: `Are you sure you want to exit ${DEFAULT_DELIVER_TITLE}?`,
|
|
163
|
+
}}
|
|
164
|
+
subTitle={{
|
|
165
|
+
label: 'All progress will be lost',
|
|
166
|
+
styles: {
|
|
167
|
+
alignSelf: 'center',
|
|
168
|
+
},
|
|
169
|
+
}}
|
|
170
|
+
primaryButton={{
|
|
171
|
+
label: 'Exit',
|
|
172
|
+
onPress: async () => {
|
|
173
|
+
if (
|
|
174
|
+
props.taskMeta?.enableGoBack &&
|
|
175
|
+
hasGoBackConnector(props.applicableReasons)
|
|
176
|
+
) {
|
|
177
|
+
props.onSubmitET({
|
|
178
|
+
...(await getBaseETResponse(
|
|
179
|
+
EntityCode.DELIVER,
|
|
180
|
+
false,
|
|
181
|
+
GO_BACK_EVENT_CODE,
|
|
182
|
+
'',
|
|
183
|
+
props.mergedObjectiveId,
|
|
184
|
+
ExecutionTaskID.DELIVER
|
|
185
|
+
)),
|
|
186
|
+
});
|
|
187
|
+
setShowBackModal(false);
|
|
188
|
+
} else {
|
|
189
|
+
props.navigation.goBack();
|
|
190
|
+
}
|
|
191
|
+
setShowBackModal(false);
|
|
192
|
+
},
|
|
193
|
+
styles: styles.primaryButtonStyles,
|
|
194
|
+
}}
|
|
195
|
+
secondaryButton={{
|
|
196
|
+
label: 'Cancel',
|
|
197
|
+
onPress: () => {
|
|
198
|
+
setGoBack(false);
|
|
199
|
+
setShowDeliverModal(true);
|
|
200
|
+
},
|
|
201
|
+
styles: styles.secondaryButtonStyles,
|
|
202
|
+
}}
|
|
203
|
+
/>
|
|
204
|
+
);
|
|
205
|
+
};
|
|
206
206
|
|
|
207
207
|
if (props.confirmCustodyExchange) {
|
|
208
208
|
return (
|
|
@@ -216,7 +216,7 @@ const DeliverET = (props: DeliverETInput) => {
|
|
|
216
216
|
props.taskMeta?.enableGoBack &&
|
|
217
217
|
hasGoBackConnector(props.applicableReasons)
|
|
218
218
|
) {
|
|
219
|
-
setShowDeliverModal(false);
|
|
219
|
+
setShowDeliverModal(false);
|
|
220
220
|
setShowBackModal(true);
|
|
221
221
|
return true;
|
|
222
222
|
} else {
|
|
@@ -235,8 +235,8 @@ const DeliverET = (props: DeliverETInput) => {
|
|
|
235
235
|
</Text>
|
|
236
236
|
</View>
|
|
237
237
|
<View style={styles.returnView}>
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
<Text style={styles.subTitle}>{getStr(props.returnPackageCount ? props.returnPackageCount > 1 ? Str.Expected_Shipments : Str.Expected_Shipment : Str.Expected_Shipments)}</Text>
|
|
239
|
+
<Text style={styles.title}>{props.returnPackageCount}</Text>
|
|
240
240
|
</View>
|
|
241
241
|
{props.confirmShipments ? (
|
|
242
242
|
<View
|
|
@@ -250,14 +250,14 @@ const DeliverET = (props: DeliverETInput) => {
|
|
|
250
250
|
fontSize: 14,
|
|
251
251
|
lineHeight: 24,
|
|
252
252
|
fontFamily:
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
Platform.OS === 'android'
|
|
254
|
+
? Fonts.IBMPlexSans_400Regular
|
|
255
255
|
: 'IBMPlexSans-Regular',
|
|
256
256
|
}}
|
|
257
257
|
multiline={false}
|
|
258
258
|
autoComplete={'off'}
|
|
259
259
|
label={getStr(Number(pkgCount) > 1 ? Str.Shipments_handed_over : Str.Shipment_handed_over)}
|
|
260
|
-
|
|
260
|
+
value={pkgCount}
|
|
261
261
|
mode={'outlined'}
|
|
262
262
|
error={!isEmptyOrBlank(inputError)}
|
|
263
263
|
selectionColor={'#6200EE'}
|
|
@@ -346,15 +346,15 @@ const DeliverET = (props: DeliverETInput) => {
|
|
|
346
346
|
>
|
|
347
347
|
<View style={styles.modalView}>
|
|
348
348
|
<View style={styles.modalStyle}>
|
|
349
|
-
|
|
350
|
-
onPress={() => {
|
|
351
|
-
setShowDeliverModal(false);
|
|
352
|
-
setGoBack(true);
|
|
353
|
-
}}
|
|
354
|
-
style={styles.crossIcon}
|
|
355
|
-
hitSlop={{ bottom: 10, top: 10, right: 10, left: 10 }}
|
|
356
|
-
>
|
|
357
|
-
<CircleMark />
|
|
349
|
+
<TouchableOpacity
|
|
350
|
+
onPress={() => {
|
|
351
|
+
setShowDeliverModal(false);
|
|
352
|
+
setGoBack(true);
|
|
353
|
+
}}
|
|
354
|
+
style={styles.crossIcon}
|
|
355
|
+
hitSlop={{ bottom: 10, top: 10, right: 10, left: 10 }}
|
|
356
|
+
>
|
|
357
|
+
<CircleMark />
|
|
358
358
|
</TouchableOpacity>
|
|
359
359
|
<View style={styles.modalBody}>
|
|
360
360
|
<Text style={DeliverPickupStyles.titleText}>
|
|
@@ -363,6 +363,9 @@ const DeliverET = (props: DeliverETInput) => {
|
|
|
363
363
|
<Text style={DeliverPickupStyles.messageText}>
|
|
364
364
|
{getMessage(props.returnPackageCount, props.message)}
|
|
365
365
|
</Text>
|
|
366
|
+
<Text style={DeliverPickupStyles.messageText}>
|
|
367
|
+
{props?.shipCount ? getStrVal(Str.shipments, Str.count, props.shipCount) : ''}
|
|
368
|
+
</Text>
|
|
366
369
|
|
|
367
370
|
{/* Removed showing the item when item.length === 1 */}
|
|
368
371
|
{/* {props.returnPackageCount === 1 && props.items.length ? (
|
|
@@ -460,8 +463,8 @@ const styles = StyleSheet.create({
|
|
|
460
463
|
paddingHorizontal: 40,
|
|
461
464
|
alignItems: 'center',
|
|
462
465
|
},
|
|
463
|
-
crossIcon: {
|
|
464
|
-
alignSelf: 'flex-end',
|
|
466
|
+
crossIcon: {
|
|
467
|
+
alignSelf: 'flex-end',
|
|
465
468
|
},
|
|
466
469
|
bottomButtons: {
|
|
467
470
|
marginTop: 12,
|
|
@@ -495,18 +498,18 @@ const styles = StyleSheet.create({
|
|
|
495
498
|
? Fonts.IBMPlexSans_600SemiBold
|
|
496
499
|
: 'IBMPlexSans-SemiBold',
|
|
497
500
|
},
|
|
498
|
-
primaryButtonStyles: {
|
|
499
|
-
marginTop: 16,
|
|
500
|
-
height: 40,
|
|
501
|
-
borderRadius: 6,
|
|
502
|
-
justifyContent: 'center',
|
|
503
|
-
alignItems: 'center',
|
|
504
|
-
},
|
|
505
|
-
secondaryButtonStyles: {
|
|
506
|
-
marginVertical: 16,
|
|
507
|
-
height: 40,
|
|
508
|
-
borderRadius: 6,
|
|
509
|
-
justifyContent: 'center',
|
|
510
|
-
alignItems: 'center',
|
|
501
|
+
primaryButtonStyles: {
|
|
502
|
+
marginTop: 16,
|
|
503
|
+
height: 40,
|
|
504
|
+
borderRadius: 6,
|
|
505
|
+
justifyContent: 'center',
|
|
506
|
+
alignItems: 'center',
|
|
507
|
+
},
|
|
508
|
+
secondaryButtonStyles: {
|
|
509
|
+
marginVertical: 16,
|
|
510
|
+
height: 40,
|
|
511
|
+
borderRadius: 6,
|
|
512
|
+
justifyContent: 'center',
|
|
513
|
+
alignItems: 'center',
|
|
511
514
|
},
|
|
512
515
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BackHandler, StyleSheet, Text, View, Modal, Platform, TouchableOpacity } from 'react-native';
|
|
2
|
-
import React, { useState, useLayoutEffect,useCallback } from 'react';
|
|
2
|
+
import React, { useState, useLayoutEffect, useCallback } from 'react';
|
|
3
3
|
import { Button, Portal, Provider } from 'react-native-paper';
|
|
4
4
|
|
|
5
5
|
import {
|
|
@@ -26,14 +26,14 @@ import GoBackModal from '../../../components/widgets/GoBackModal';
|
|
|
26
26
|
import { useFocusEffect } from '@react-navigation/native';
|
|
27
27
|
import { getStrVal } from '../../../locale/util';
|
|
28
28
|
import Str from '../../../locale/Str';
|
|
29
|
-
import CircleMark from '../../../icons/circleMark.svg';
|
|
29
|
+
import CircleMark from '../../../icons/circleMark.svg';
|
|
30
30
|
import ModalWidget from '../../../components/widgets/ModalWidget';
|
|
31
31
|
|
|
32
32
|
const ListItem = ({ lineItem }: { lineItem: LineItem }) => (
|
|
33
33
|
<View style={{ justifyContent: 'center' }}>
|
|
34
|
-
<Text
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
<Text style={DeliverPickupStyles.itemTextStyle}>
|
|
35
|
+
{`Order ID: ${lineItem.skuId}`}
|
|
36
|
+
</Text>
|
|
37
37
|
</View>
|
|
38
38
|
);
|
|
39
39
|
|
|
@@ -128,56 +128,56 @@ const SLPickupET = (props: PickupETInput) => {
|
|
|
128
128
|
);
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
-
const renderGoBackModal = () => {
|
|
132
|
-
return (
|
|
133
|
-
<ModalWidget
|
|
134
|
-
dismissable={true}
|
|
135
|
-
showModal={goBack}
|
|
136
|
-
title={{
|
|
137
|
-
label: `Are you sure you want to exit ${DEFAULT_PICKUP_TITLE}?`,
|
|
138
|
-
}}
|
|
139
|
-
subTitle={{
|
|
140
|
-
label: 'All progress will be lost',
|
|
141
|
-
styles: {
|
|
142
|
-
alignSelf: 'center',
|
|
143
|
-
},
|
|
144
|
-
}}
|
|
145
|
-
primaryButton={{
|
|
146
|
-
label: 'Exit',
|
|
147
|
-
onPress: async () => {
|
|
148
|
-
if (
|
|
149
|
-
props.taskMeta?.enableGoBack &&
|
|
150
|
-
hasGoBackConnector(props.applicableReasons)
|
|
151
|
-
) {
|
|
152
|
-
props.onSubmitET({
|
|
153
|
-
...(await getBaseETResponse(
|
|
154
|
-
EntityCode.PICKUP,
|
|
155
|
-
false,
|
|
156
|
-
GO_BACK_EVENT_CODE,
|
|
157
|
-
'',
|
|
158
|
-
props.mergedObjectiveId,
|
|
159
|
-
ExecutionTaskID.PICKUP
|
|
160
|
-
)),
|
|
161
|
-
});
|
|
162
|
-
setShowBackModal(false);
|
|
163
|
-
} else {
|
|
164
|
-
props.navigation.goBack();
|
|
165
|
-
}
|
|
166
|
-
setShowBackModal(false);
|
|
167
|
-
},
|
|
168
|
-
styles: styles.primaryButtonStyles,
|
|
169
|
-
}}
|
|
170
|
-
secondaryButton={{
|
|
171
|
-
label: 'Cancel',
|
|
172
|
-
onPress: () => {
|
|
173
|
-
setGoBack(false);
|
|
174
|
-
setShowPickupModal(true);
|
|
175
|
-
},
|
|
176
|
-
styles: styles.secondaryButtonStyles,
|
|
177
|
-
}}
|
|
178
|
-
/>
|
|
179
|
-
);
|
|
180
|
-
};
|
|
131
|
+
const renderGoBackModal = () => {
|
|
132
|
+
return (
|
|
133
|
+
<ModalWidget
|
|
134
|
+
dismissable={true}
|
|
135
|
+
showModal={goBack}
|
|
136
|
+
title={{
|
|
137
|
+
label: `Are you sure you want to exit ${DEFAULT_PICKUP_TITLE}?`,
|
|
138
|
+
}}
|
|
139
|
+
subTitle={{
|
|
140
|
+
label: 'All progress will be lost',
|
|
141
|
+
styles: {
|
|
142
|
+
alignSelf: 'center',
|
|
143
|
+
},
|
|
144
|
+
}}
|
|
145
|
+
primaryButton={{
|
|
146
|
+
label: 'Exit',
|
|
147
|
+
onPress: async () => {
|
|
148
|
+
if (
|
|
149
|
+
props.taskMeta?.enableGoBack &&
|
|
150
|
+
hasGoBackConnector(props.applicableReasons)
|
|
151
|
+
) {
|
|
152
|
+
props.onSubmitET({
|
|
153
|
+
...(await getBaseETResponse(
|
|
154
|
+
EntityCode.PICKUP,
|
|
155
|
+
false,
|
|
156
|
+
GO_BACK_EVENT_CODE,
|
|
157
|
+
'',
|
|
158
|
+
props.mergedObjectiveId,
|
|
159
|
+
ExecutionTaskID.PICKUP
|
|
160
|
+
)),
|
|
161
|
+
});
|
|
162
|
+
setShowBackModal(false);
|
|
163
|
+
} else {
|
|
164
|
+
props.navigation.goBack();
|
|
165
|
+
}
|
|
166
|
+
setShowBackModal(false);
|
|
167
|
+
},
|
|
168
|
+
styles: styles.primaryButtonStyles,
|
|
169
|
+
}}
|
|
170
|
+
secondaryButton={{
|
|
171
|
+
label: 'Cancel',
|
|
172
|
+
onPress: () => {
|
|
173
|
+
setGoBack(false);
|
|
174
|
+
setShowPickupModal(true);
|
|
175
|
+
},
|
|
176
|
+
styles: styles.secondaryButtonStyles,
|
|
177
|
+
}}
|
|
178
|
+
/>
|
|
179
|
+
);
|
|
180
|
+
};
|
|
181
181
|
|
|
182
182
|
return (
|
|
183
183
|
<Provider>
|
|
@@ -203,15 +203,15 @@ const SLPickupET = (props: PickupETInput) => {
|
|
|
203
203
|
>
|
|
204
204
|
<View style={styles.modalView}>
|
|
205
205
|
<View style={styles.modalStyle}>
|
|
206
|
-
|
|
207
|
-
onPress={() => {
|
|
208
|
-
setShowPickupModal(false);
|
|
209
|
-
setGoBack(true);
|
|
210
|
-
}}
|
|
211
|
-
style={styles.crossIcon}
|
|
212
|
-
hitSlop={{ bottom: 10, top: 10, right: 10, left: 10 }}
|
|
213
|
-
>
|
|
214
|
-
<CircleMark />
|
|
206
|
+
<TouchableOpacity
|
|
207
|
+
onPress={() => {
|
|
208
|
+
setShowPickupModal(false);
|
|
209
|
+
setGoBack(true);
|
|
210
|
+
}}
|
|
211
|
+
style={styles.crossIcon}
|
|
212
|
+
hitSlop={{ bottom: 10, top: 10, right: 10, left: 10 }}
|
|
213
|
+
>
|
|
214
|
+
<CircleMark />
|
|
215
215
|
</TouchableOpacity>
|
|
216
216
|
<View style={styles.modalBody}>
|
|
217
217
|
<Text style={DeliverPickupStyles.titleText}>
|
|
@@ -220,6 +220,9 @@ const SLPickupET = (props: PickupETInput) => {
|
|
|
220
220
|
<Text style={DeliverPickupStyles.messageText}>
|
|
221
221
|
{getMessage(props.pickupCount, props.message)}
|
|
222
222
|
</Text>
|
|
223
|
+
<Text style={DeliverPickupStyles.messageText}>
|
|
224
|
+
{props?.shipCount ? getStrVal(Str.shipments, Str.count, props.shipCount) : ''}
|
|
225
|
+
</Text>
|
|
223
226
|
{/* Removed showing the item when item.length === 1 */}
|
|
224
227
|
{/* {props.pickupCount === 1 && props.items.length ? (
|
|
225
228
|
<View style={{ justifyContent: 'center' }}>
|
|
@@ -315,8 +318,8 @@ const styles = StyleSheet.create({
|
|
|
315
318
|
paddingHorizontal: 40,
|
|
316
319
|
alignItems: 'center',
|
|
317
320
|
},
|
|
318
|
-
crossIcon: {
|
|
319
|
-
alignSelf: 'flex-end',
|
|
321
|
+
crossIcon: {
|
|
322
|
+
alignSelf: 'flex-end',
|
|
320
323
|
},
|
|
321
324
|
bottomButtons: {
|
|
322
325
|
marginTop: 12,
|
|
@@ -350,18 +353,18 @@ const styles = StyleSheet.create({
|
|
|
350
353
|
? Fonts.IBMPlexSans_600SemiBold
|
|
351
354
|
: 'IBMPlexSans-SemiBold',
|
|
352
355
|
},
|
|
353
|
-
primaryButtonStyles: {
|
|
354
|
-
marginTop: 16,
|
|
355
|
-
height: 40,
|
|
356
|
-
borderRadius: 6,
|
|
357
|
-
justifyContent: 'center',
|
|
358
|
-
alignItems: 'center',
|
|
359
|
-
},
|
|
360
|
-
secondaryButtonStyles: {
|
|
361
|
-
marginVertical: 16,
|
|
362
|
-
height: 40,
|
|
363
|
-
borderRadius: 6,
|
|
364
|
-
justifyContent: 'center',
|
|
365
|
-
alignItems: 'center',
|
|
356
|
+
primaryButtonStyles: {
|
|
357
|
+
marginTop: 16,
|
|
358
|
+
height: 40,
|
|
359
|
+
borderRadius: 6,
|
|
360
|
+
justifyContent: 'center',
|
|
361
|
+
alignItems: 'center',
|
|
362
|
+
},
|
|
363
|
+
secondaryButtonStyles: {
|
|
364
|
+
marginVertical: 16,
|
|
365
|
+
height: 40,
|
|
366
|
+
borderRadius: 6,
|
|
367
|
+
justifyContent: 'center',
|
|
368
|
+
alignItems: 'center',
|
|
366
369
|
},
|
|
367
370
|
});
|
package/src/locale/Str.ts
CHANGED
|
@@ -8,5 +8,6 @@ export default {
|
|
|
8
8
|
Expected_Shipments: 'Expected_Shipments',
|
|
9
9
|
Expected_Shipment: 'Expected_Shipment',
|
|
10
10
|
Shipment_handed_over: 'Shipment_handed_over',
|
|
11
|
-
Shipments_handed_over: 'Shipments_handed_over'
|
|
11
|
+
Shipments_handed_over: 'Shipments_handed_over',
|
|
12
|
+
shipments: 'shipments'
|
|
12
13
|
}
|
package/src/locale/i18n.ts
CHANGED
|
@@ -2,16 +2,21 @@ import { I18n } from "i18n-js";
|
|
|
2
2
|
import en from './en.json';
|
|
3
3
|
|
|
4
4
|
const i18n = new I18n({
|
|
5
|
-
...en,
|
|
5
|
+
...en,
|
|
6
6
|
en: {
|
|
7
7
|
DEFAULT_PICKUP_MESSAGE: {
|
|
8
8
|
one: "Confirm Pickup of 1 order",
|
|
9
9
|
other: "Confirm Pickup of %{count} orders",
|
|
10
|
-
|
|
10
|
+
},
|
|
11
11
|
DEFAULT_DELIVER_MESSAGE: {
|
|
12
12
|
one: "Confirm Drop of 1 order",
|
|
13
13
|
other: "Confirm Drop of %{count} orders"
|
|
14
|
-
|
|
14
|
+
},
|
|
15
|
+
shipments: {
|
|
16
|
+
one: "(%{count} shipment)?",
|
|
17
|
+
other: "(%{count} shipments)?"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
15
20
|
});
|
|
16
21
|
|
|
17
22
|
export default i18n;
|
|
@@ -216,6 +216,17 @@ export default class ETEventsManager {
|
|
|
216
216
|
},
|
|
217
217
|
];
|
|
218
218
|
}
|
|
219
|
+
case DispatchSyncType.DISPATCH_SUB_STATUS_UPDATE: {
|
|
220
|
+
return [
|
|
221
|
+
{
|
|
222
|
+
data: {
|
|
223
|
+
action: DispatchSyncType.DISPATCH_SUB_STATUS_UPDATE,
|
|
224
|
+
payload: this.getDispatchUpdatePayload(_bulkEventData),
|
|
225
|
+
},
|
|
226
|
+
length: 1,
|
|
227
|
+
},
|
|
228
|
+
];
|
|
229
|
+
}
|
|
219
230
|
default: {
|
|
220
231
|
return [
|
|
221
232
|
{
|
|
@@ -297,6 +308,8 @@ export default class ETEventsManager {
|
|
|
297
308
|
}
|
|
298
309
|
}
|
|
299
310
|
|
|
311
|
+
|
|
312
|
+
|
|
300
313
|
// NEW CODE
|
|
301
314
|
async insertBulkEvent(_eventData: BulkEvent): Promise<void> {
|
|
302
315
|
try {
|
|
@@ -312,7 +325,8 @@ export default class ETEventsManager {
|
|
|
312
325
|
_eventData.syncType === SyncType.WORKFLOW ||
|
|
313
326
|
_eventData.syncType === SyncType.CUSTODY_IN_SCAN ||
|
|
314
327
|
_eventData.syncType === SyncType.CUSTODY_OUT_SCAN ||
|
|
315
|
-
_eventData.syncType === DispatchSyncType.DISPATCH_UPDATE
|
|
328
|
+
_eventData.syncType === DispatchSyncType.DISPATCH_UPDATE ||
|
|
329
|
+
_eventData.syncType === DispatchSyncType.DISPATCH_SUB_STATUS_UPDATE
|
|
316
330
|
) {
|
|
317
331
|
output.forEach(
|
|
318
332
|
(syncManagerPayload: SyncManagerPayload, index: number) => {
|
|
@@ -30,6 +30,7 @@ const DeliverScreen = ({
|
|
|
30
30
|
getDataFromNextState(nextState);
|
|
31
31
|
|
|
32
32
|
const [returnPackageCount, setReturnPackageCount] = useState(0);
|
|
33
|
+
const [shipCount, setShipCount] = useState(0);
|
|
33
34
|
const [items, setItems] = useState([]);
|
|
34
35
|
|
|
35
36
|
const getMergedReturnPackageCount = async () => {
|
|
@@ -37,6 +38,7 @@ const DeliverScreen = ({
|
|
|
37
38
|
mergedObjectiveId
|
|
38
39
|
);
|
|
39
40
|
setReturnPackageCount(count.totalCount);
|
|
41
|
+
setShipCount(count.shipCount);
|
|
40
42
|
};
|
|
41
43
|
useEffect(() => {
|
|
42
44
|
onTaskStart(
|
|
@@ -80,12 +82,13 @@ const DeliverScreen = ({
|
|
|
80
82
|
taskMeta={taskMeta}
|
|
81
83
|
mergedObjectiveId={mergedObjectiveId}
|
|
82
84
|
returnPackageCount={returnPackageCount}
|
|
83
|
-
|
|
85
|
+
shipCount={shipCount}
|
|
86
|
+
showDeliverModal={showDeliverModal}
|
|
84
87
|
setShowDeliverModal={setShowDeliverModal}
|
|
85
88
|
onSubmitET={async (deliverOutput) => {
|
|
86
|
-
if (
|
|
87
|
-
deliverOutput.success ||
|
|
88
|
-
deliverOutput.eventCode == GO_BACK_EVENT_CODE
|
|
89
|
+
if (
|
|
90
|
+
deliverOutput.success ||
|
|
91
|
+
deliverOutput.eventCode == GO_BACK_EVENT_CODE
|
|
89
92
|
) {
|
|
90
93
|
await submitOutput(deliverOutput);
|
|
91
94
|
} else {
|