@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
package/src/utils/helper.ts
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
import Network from '
|
|
1
|
+
import Network from '../resources/network';
|
|
2
|
+
import { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
3
|
+
import ETTransition from '@os1-platform/platform-coreos-execution-engine-sdk/';
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
6
|
*
|
|
4
7
|
* @class Helper
|
|
5
8
|
*/
|
|
6
|
-
class Helper {
|
|
9
|
+
export default class Helper {
|
|
10
|
+
|
|
11
|
+
private static instance: Helper;
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
public static getInstance(): Helper {
|
|
15
|
+
if (!Helper.instance) {
|
|
16
|
+
Helper.instance = new Helper();
|
|
17
|
+
}
|
|
18
|
+
return Helper.instance;
|
|
19
|
+
}
|
|
20
|
+
|
|
7
21
|
/**
|
|
8
22
|
* Check the availability of a network for an app.
|
|
9
23
|
*
|
|
@@ -18,7 +32,36 @@ class Helper {
|
|
|
18
32
|
return false;
|
|
19
33
|
}
|
|
20
34
|
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
async isSelfLoopExistOnET(workflowId: string,
|
|
38
|
+
sourceTaskName: string): Promise<boolean> {
|
|
39
|
+
try {
|
|
40
|
+
console.log("isSelfLoopExistOnET::sourceTaskName => ", sourceTaskName)
|
|
41
|
+
//
|
|
42
|
+
let isSelfLoopExist: boolean = false;
|
|
43
|
+
const dummyETTransitionObj = [{ sourceTaskName: "", targetTaskName: "", condition: "" }]
|
|
44
|
+
const transitionsFromCurrentET = await dispatchExecutor.queryWorkflowTransitionData(workflowId, sourceTaskName);
|
|
45
|
+
|
|
46
|
+
outerLoop: for (const obj of transitionsFromCurrentET ?? dummyETTransitionObj) {
|
|
47
|
+
if ((obj.targetTaskName as string).toLocaleLowerCase() === sourceTaskName.toLowerCase()) {
|
|
48
|
+
isSelfLoopExist = true;
|
|
49
|
+
break outerLoop;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// transitionsFromCurrentET?.forEach( (obj) => {
|
|
54
|
+
// if((obj.targetTaskName as string).toLocaleLowerCase() === sourceTaskName.toLowerCase()){
|
|
55
|
+
// isSelfLoopExist = true;
|
|
56
|
+
// break;
|
|
57
|
+
// }
|
|
58
|
+
// });
|
|
59
|
+
return isSelfLoopExist;
|
|
60
|
+
} catch (e: any) {
|
|
61
|
+
console.log("isSelfLoopExistOnET-Error", JSON.stringify(e));
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
21
66
|
}
|
|
22
67
|
|
|
23
|
-
const helper = new Helper();
|
|
24
|
-
export default helper;
|