@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DispatchSyncType","DATABASE_NAME","EVENTS_TABLE","REASONS_TABLE","EVENT_CODES_TABLE","EVENTS_COLUMNS","ID","SEQUENCE","PAYLOAD","SYNCED","CONFIG","SYNC_TYPE","META","SYNC_ERROR","DISPATCH_ID","DATA_LENGTH","DOCUMENT_TABLE","DOCUMENT_COLUMNS","DATA","BASE64","FILE_PATH","FILE_NAME","FILE_TYPE","FMS_FOLDER_ID","FMS_ID","PRIORITY","DESCRIPTION","JOB_ID","OBJECTIVE_REF","SyncMethod","ReasonColums","CODE","IS_ENABLED","SYSTEM_DEFINED","EventColumns","SUCCESS_EVENT","WORKFLOW_INSTANCE_TABLE","WORKFLOW_INSTANCE_COLUMNS","WORKFLOW_INSTANCE_ID","MERGED_WORKFLOW_INSTANCE_ID","SCANNABLE_ID","INITIAL_MERGED_WORKFLOW_INSTANCE_ID","STATUS","JOB_WF_ID","DISPLAY_DATA","WORKFLOW_ID"],"sources":["DBConfig.ts"],"sourcesContent":["import { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';\nexport type ExecEngineSyncType = IDispatch.SyncType;\n\nexport enum DispatchSyncType {\n DEFAULT = 'DEFAULT',\n DISPATCH_UPDATE = 'DISPATCH_UPDATE',\n DISPATCH_SUB_STATUS_UPDATE = 'DISPATCH_SUB_STATUS_UPDATE',\n}\n\nexport const DATABASE_NAME = '
|
|
1
|
+
{"version":3,"names":["DispatchSyncType","DATABASE_NAME","EVENTS_TABLE","REASONS_TABLE","EVENT_CODES_TABLE","EVENTS_COLUMNS","ID","SEQUENCE","PAYLOAD","SYNCED","CONFIG","SYNC_TYPE","META","SYNC_ERROR","DISPATCH_ID","DATA_LENGTH","DOCUMENT_TABLE","DOCUMENT_COLUMNS","DATA","BASE64","FILE_PATH","FILE_NAME","FILE_TYPE","FMS_FOLDER_ID","FMS_ID","PRIORITY","DESCRIPTION","JOB_ID","OBJECTIVE_REF","SyncMethod","ReasonColums","CODE","IS_ENABLED","SYSTEM_DEFINED","EventColumns","SUCCESS_EVENT","WORKFLOW_INSTANCE_TABLE","WORKFLOW_INSTANCE_COLUMNS","WORKFLOW_INSTANCE_ID","MERGED_WORKFLOW_INSTANCE_ID","SCANNABLE_ID","INITIAL_MERGED_WORKFLOW_INSTANCE_ID","STATUS","JOB_WF_ID","DISPLAY_DATA","WORKFLOW_ID"],"sources":["DBConfig.ts"],"sourcesContent":["import { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';\nexport type ExecEngineSyncType = IDispatch.SyncType;\n\nexport enum DispatchSyncType {\n DEFAULT = 'DEFAULT',\n DISPATCH_UPDATE = 'DISPATCH_UPDATE',\n DISPATCH_SUB_STATUS_UPDATE = 'DISPATCH_SUB_STATUS_UPDATE',\n}\n\nexport const DATABASE_NAME = 'OS1_Driver_App_DB';\nexport const EVENTS_TABLE = 'EVENTS_TABLE';\nexport const REASONS_TABLE = 'REASONS_TABLE';\nexport const EVENT_CODES_TABLE = 'EVENT_CODES_TABLE';\n\nexport const EVENTS_COLUMNS = {\n ID: 'id',\n SEQUENCE: 'seq_number',\n PAYLOAD: 'payload',\n SYNCED: 'synced',\n CONFIG: 'config',\n SYNC_TYPE: 'sync_type',\n META: 'meta',\n SYNC_ERROR: 'sync_error',\n DISPATCH_ID: 'dispatch_id',\n DATA_LENGTH: 'data_length',\n};\n\nexport const DOCUMENT_TABLE = 'DOCUMENTS_TABLE';\nexport const DOCUMENT_COLUMNS = {\n ID: 'id',\n DATA: 'data',\n BASE64: 'base64',\n FILE_PATH: 'file_path',\n FILE_NAME: 'file_name',\n FILE_TYPE: 'file_type',\n SYNCED: 'synced',\n FMS_FOLDER_ID: 'fms_folder_id',\n FMS_ID: 'fms_id',\n PRIORITY: 'priority',\n DESCRIPTION: 'desc',\n SYNC_ERROR: 'sync_error',\n DISPATCH_ID: 'dispatch_id',\n JOB_ID: 'job_id',\n OBJECTIVE_REF: 'objective_ref',\n};\nexport type DocumentRow = {\n id: number;\n data: string;\n base64: boolean;\n file_path: string;\n file_name: string;\n file_type: string;\n synced: boolean;\n fms_folder_id: string;\n fms_id: string;\n priority: number;\n desc: string;\n sync_error: string;\n dispatch_id: string;\n job_id: string;\n objective_ref: string;\n};\nexport type EventRow = {\n id: number;\n payload: string;\n synced: boolean;\n config: string;\n sync_type: ExecEngineSyncType | DispatchSyncType;\n objective_ref: string;\n sync_error: string;\n dispatch_id: string;\n};\n\nexport enum SyncMethod {\n POST = 'POST',\n PUT = 'PUT',\n GET = 'GET',\n DELETE = 'DELETE',\n}\nexport const ReasonColums = {\n CODE: 'reasonCode',\n DESCRIPTION: 'description',\n IS_ENABLED: 'isEnabled',\n SYSTEM_DEFINED: 'isSystemDefined',\n};\nexport interface ReasonsRow {\n description: string;\n isEnabled: boolean;\n reasonCode: string;\n isSystemDefined: boolean;\n}\n\nexport interface EventsRow {\n description: string;\n successEvent: boolean;\n eventCode: string;\n}\n\nexport const EventColumns = {\n CODE: 'eventCode',\n DESCRIPTION: 'description',\n SUCCESS_EVENT: 'successEvent',\n};\n\n// NEW CODE\nexport interface BulkEvent {\n syncType: ExecEngineSyncType | DispatchSyncType;\n dispatchId: string;\n data: any;\n meta?: any; // updatedBy, code, status, timestamp, [{jobId,wfId}]\n}\n\n// OLD CODE\n// export interface BulkEvent {\n// syncType: SyncType;\n// dispatchId: string;\n// data: string;\n// config: string;\n// sequence: number;\n// meta?: any;\n// }\n\nexport interface WFUpdateBulkEventData {\n [customETName: string]: EventETData;\n}\n\nexport interface EventETData {\n output: any;\n}\n\nexport interface WIUpdateOutputPayload {\n dispatchId: string;\n updatedBy: any;\n workflows: Array<WorkflowUpdatePayload>;\n}\n\nexport interface WorkflowUpdatePayload {\n status: string;\n timestamp: number;\n attemptId: 1;\n code: string;\n data: any;\n meta?: any;\n __unmerged?: Array<UnmergedData>;\n}\n\nexport interface UnmergedData {\n workflowInstanceId: string;\n jobId: string;\n data?: any;\n}\n\nexport interface CustodyData {\n dispatchId: string;\n jobId: string;\n custodyEntity: string;\n custodyLocationId: string;\n custodyEntityAmount: number;\n custodyEntityId: string;\n}\n\nexport const WORKFLOW_INSTANCE_TABLE = 'WF_INSTANCE_TABLE';\nexport const WORKFLOW_INSTANCE_COLUMNS = {\n WORKFLOW_INSTANCE_ID: 'WFIId',\n MERGED_WORKFLOW_INSTANCE_ID: 'MWFIId',\n JOB_ID: 'jobId',\n SCANNABLE_ID: 'scannableId',\n INITIAL_MERGED_WORKFLOW_INSTANCE_ID: 'InitialMWFIId',\n STATUS: 'status',\n JOB_WF_ID: 'jobWfId',\n DISPLAY_DATA: 'displayData',\n WORKFLOW_ID: 'WFId',\n};\n\nexport interface SyncManagerPayload {\n data: {\n action: ExecEngineSyncType | DispatchSyncType;\n payload: any;\n };\n length: number;\n}\n"],"mappings":"AAGA,WAAYA,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAM5B,OAAO,MAAMC,aAAa,GAAG,mBAAmB;AAChD,OAAO,MAAMC,YAAY,GAAG,cAAc;AAC1C,OAAO,MAAMC,aAAa,GAAG,eAAe;AAC5C,OAAO,MAAMC,iBAAiB,GAAG,mBAAmB;AAEpD,OAAO,MAAMC,cAAc,GAAG;EAC5BC,EAAE,EAAE,IAAI;EACRC,QAAQ,EAAE,YAAY;EACtBC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE,QAAQ;EAChBC,SAAS,EAAE,WAAW;EACtBC,IAAI,EAAE,MAAM;EACZC,UAAU,EAAE,YAAY;EACxBC,WAAW,EAAE,aAAa;EAC1BC,WAAW,EAAE;AACf,CAAC;AAED,OAAO,MAAMC,cAAc,GAAG,iBAAiB;AAC/C,OAAO,MAAMC,gBAAgB,GAAG;EAC9BX,EAAE,EAAE,IAAI;EACRY,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,QAAQ;EAChBC,SAAS,EAAE,WAAW;EACtBC,SAAS,EAAE,WAAW;EACtBC,SAAS,EAAE,WAAW;EACtBb,MAAM,EAAE,QAAQ;EAChBc,aAAa,EAAE,eAAe;EAC9BC,MAAM,EAAE,QAAQ;EAChBC,QAAQ,EAAE,UAAU;EACpBC,WAAW,EAAE,MAAM;EACnBb,UAAU,EAAE,YAAY;EACxBC,WAAW,EAAE,aAAa;EAC1Ba,MAAM,EAAE,QAAQ;EAChBC,aAAa,EAAE;AACjB,CAAC;AA6BD,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAMtB,OAAO,MAAMC,YAAY,GAAG;EAC1BC,IAAI,EAAE,YAAY;EAClBL,WAAW,EAAE,aAAa;EAC1BM,UAAU,EAAE,WAAW;EACvBC,cAAc,EAAE;AAClB,CAAC;AAcD,OAAO,MAAMC,YAAY,GAAG;EAC1BH,IAAI,EAAE,WAAW;EACjBL,WAAW,EAAE,aAAa;EAC1BS,aAAa,EAAE;AACjB,CAAC;;AAED;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAyCA,OAAO,MAAMC,uBAAuB,GAAG,mBAAmB;AAC1D,OAAO,MAAMC,yBAAyB,GAAG;EACvCC,oBAAoB,EAAE,OAAO;EAC7BC,2BAA2B,EAAE,QAAQ;EACrCZ,MAAM,EAAE,OAAO;EACfa,YAAY,EAAE,aAAa;EAC3BC,mCAAmC,EAAE,eAAe;EACpDC,MAAM,EAAE,QAAQ;EAChBC,SAAS,EAAE,SAAS;EACpBC,YAAY,EAAE,aAAa;EAC3BC,WAAW,EAAE;AACf,CAAC"}
|
|
@@ -84,7 +84,8 @@ export const CommonStyles = StyleSheet.create({
|
|
|
84
84
|
fontWeight: '500',
|
|
85
85
|
lineHeight: 20,
|
|
86
86
|
textAlign: 'center',
|
|
87
|
-
fontStyle: 'normal'
|
|
87
|
+
fontStyle: 'normal',
|
|
88
|
+
textTransform: 'capitalize'
|
|
88
89
|
},
|
|
89
90
|
mainExitButton: {
|
|
90
91
|
backgroundColor: SdkColors[ColorTheme.LIGHT].exitButton
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","SdkColors","ColorTheme","Fonts","deliverETStyles","create","item","padding","marginTop","title","fontSize","footerButtonStyles","flexDirection","width","input","marginBottom","footerComponent","flex","marginStart","marginEnd","marginRight","position","bottom","errorText","color","fontStyle","CommonStyles","alignCenter","alignItems","flexRow","mainContainer","backgroundColor","nextButton","LIGHT","primaryButton","nextButtonLabel","fontFamily","IBMPlexSans_500Medium","lineHeight","textAlign","fontWeight","cancelButton","borderWidth","borderColor","cancelButtonLabel","defaultColor","mainExitButton","exitButton","mainExitButtonLabel","exitButtonLabel","justifyContent","modalContent","modalView","borderRadius","subText","letterSpacing","DeliverPickupStyles","itemTextStyle","IBMPlexSans_400Regular","flatList","titleText","IBMPlexSans_600SemiBold","messageText"],"sources":["CommonStyles.ts"],"sourcesContent":["import { StyleSheet } from 'react-native';\nimport SdkColors, { ColorTheme } from '../SdkColors';\n\nexport enum Fonts {\n IBMPlexSans_400Regular = 'IBMPlexSans_400Regular',\n IBMPlexSans_600SemiBold = 'IBMPlexSans_600SemiBold',\n IBMPlexSans_300Light = 'IBMPlexSans_300Light',\n IBMPlexSans_700Bold = 'IBMPlexSans_700Bold',\n IBMPlexSans_100Thin = 'IBMPlexSans_100Thin',\n IBMPlexSans_100Thin_Italic = 'IBMPlexSans_100Thin_Italic',\n IBMPlexSans_200ExtraLight = 'IBMPlexSans_200ExtraLight',\n IBMPlexSans_200ExtraLight_Italic = 'IBMPlexSans_200ExtraLight_Italic',\n IBMPlexSans_300Light_Italic = 'IBMPlexSans_300Light_Italic',\n IBMPlexSans_400Regular_Italic = 'IBMPlexSans_400Regular_Italic',\n IBMPlexSans_500Medium = 'IBMPlexSans_500Medium',\n IBMPlexSans_500Medium_Italic = 'IBMPlexSans_500Medium_Italic',\n IBMPlexSans_600SemiBold_Italic = 'IBMPlexSans_600SemiBold_Italic',\n IBMPlexSans_700Bold_Italic = 'IBMPlexSans_700Bold_Italic',\n}\nexport const deliverETStyles = StyleSheet.create({\n item: {\n padding: 2,\n marginTop: 8,\n },\n title: {\n fontSize: 16,\n },\n footerButtonStyles: {\n flexDirection: 'row',\n width: '100%',\n },\n input: {\n marginTop: 12,\n marginBottom: 10,\n },\n footerComponent: {\n flex: 1,\n marginStart: 8,\n marginEnd: 8,\n marginRight: 8,\n width: '100%',\n position: 'absolute',\n bottom: 10,\n },\n errorText: {\n color: 'red',\n fontSize: 16,\n fontStyle: 'normal',\n },\n});\nexport const CommonStyles = StyleSheet.create({\n alignCenter: {\n flex: 1,\n alignItems: 'center',\n },\n flexRow: {\n flex: 1,\n flexDirection: 'row',\n },\n mainContainer: {\n flex: 1,\n backgroundColor: '#f9f9f9',\n },\n nextButton: {\n backgroundColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n },\n nextButtonLabel: {\n color: '#ffffff',\n fontFamily: Fonts.IBMPlexSans_500Medium,\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n fontWeight: '500',\n },\n cancelButton: {\n borderWidth: 1,\n borderColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n },\n cancelButtonLabel: {\n color: SdkColors[ColorTheme.LIGHT].defaultColor,\n fontFamily: Fonts.IBMPlexSans_500Medium,\n fontSize: 14,\n fontWeight: '500',\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n },\n mainExitButton: {\n backgroundColor: SdkColors[ColorTheme.LIGHT].exitButton,\n },\n mainExitButtonLabel: {\n color: '#ffffff',\n fontFamily: Fonts.IBMPlexSans_500Medium,\n fontSize: 14,\n fontWeight: '500',\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n },\n exitButton: {\n borderWidth: 1,\n borderColor: SdkColors[ColorTheme.LIGHT].exitButton,\n },\n exitButtonLabel: {\n color: SdkColors[ColorTheme.LIGHT].exitButton,\n fontFamily: Fonts.IBMPlexSans_500Medium,\n fontSize: 14,\n fontWeight: '500',\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n },\n bottom: {\n flex: 1,\n justifyContent: 'flex-end',\n marginBottom: 10,\n },\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n flex: 1,\n marginBottom: 60,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n borderRadius: 9,\n },\n subText: {\n justifyContent: 'center',\n fontFamily: 'IBMPlexSans_400Regular',\n fontStyle: 'normal',\n fontSize: 14,\n letterSpacing: 0.25,\n lineHeight: 20,\n textAlign: 'center',\n color: '#000000',\n marginBottom: 10,\n },\n});\nexport const DeliverPickupStyles = StyleSheet.create({\n itemTextStyle: {\n fontFamily: Fonts.IBMPlexSans_400Regular,\n color: '#111111',\n textAlign: 'center',\n alignItems: 'center',\n justifyContent: 'center',\n },\n mainContainer: {\n flex: 1,\n backgroundColor: 'rgba(61, 68, 92, 0.7)',\n },\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n flex: 1,\n marginBottom: 60,\n },\n flatList: {\n marginTop: 7,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n borderRadius: 9,\n },\n titleText: {\n justifyContent: 'center',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n fontStyle: 'normal',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n color: '#111111',\n },\n messageText: {\n marginTop: 10,\n justifyContent: 'center',\n fontFamily: Fonts.IBMPlexSans_400Regular,\n fontStyle: 'normal',\n fontWeight: '400',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n color: '#000000',\n },\n});\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,OAAOC,SAAS,IAAIC,UAAU,QAAQ,cAAc;AAEpD,WAAYC,KAAK,0BAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAALA,KAAK;EAAA,OAALA,KAAK;AAAA;AAgBjB,OAAO,MAAMC,eAAe,GAAGJ,UAAU,CAACK,MAAM,CAAC;EAC/CC,IAAI,EAAE;IACJC,OAAO,EAAE,CAAC;IACVC,SAAS,EAAE;EACb,CAAC;EACDC,KAAK,EAAE;IACLC,QAAQ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S,CAACC,UAAU,CAAC+B,KAAK,CAAC,CAACY,YAAY;IAC/CT,UAAU,EAAEjC,KAAK,CAACkC,qBAAqB;IACvC3B,QAAQ,EAAE,EAAE;IACZ8B,UAAU,EAAE,KAAK;IACjBF,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE,QAAQ;IACnBd,SAAS,EAAE;
|
|
1
|
+
{"version":3,"names":["StyleSheet","SdkColors","ColorTheme","Fonts","deliverETStyles","create","item","padding","marginTop","title","fontSize","footerButtonStyles","flexDirection","width","input","marginBottom","footerComponent","flex","marginStart","marginEnd","marginRight","position","bottom","errorText","color","fontStyle","CommonStyles","alignCenter","alignItems","flexRow","mainContainer","backgroundColor","nextButton","LIGHT","primaryButton","nextButtonLabel","fontFamily","IBMPlexSans_500Medium","lineHeight","textAlign","fontWeight","cancelButton","borderWidth","borderColor","cancelButtonLabel","defaultColor","textTransform","mainExitButton","exitButton","mainExitButtonLabel","exitButtonLabel","justifyContent","modalContent","modalView","borderRadius","subText","letterSpacing","DeliverPickupStyles","itemTextStyle","IBMPlexSans_400Regular","flatList","titleText","IBMPlexSans_600SemiBold","messageText"],"sources":["CommonStyles.ts"],"sourcesContent":["import { StyleSheet } from 'react-native';\nimport SdkColors, { ColorTheme } from '../SdkColors';\n\nexport enum Fonts {\n IBMPlexSans_400Regular = 'IBMPlexSans_400Regular',\n IBMPlexSans_600SemiBold = 'IBMPlexSans_600SemiBold',\n IBMPlexSans_300Light = 'IBMPlexSans_300Light',\n IBMPlexSans_700Bold = 'IBMPlexSans_700Bold',\n IBMPlexSans_100Thin = 'IBMPlexSans_100Thin',\n IBMPlexSans_100Thin_Italic = 'IBMPlexSans_100Thin_Italic',\n IBMPlexSans_200ExtraLight = 'IBMPlexSans_200ExtraLight',\n IBMPlexSans_200ExtraLight_Italic = 'IBMPlexSans_200ExtraLight_Italic',\n IBMPlexSans_300Light_Italic = 'IBMPlexSans_300Light_Italic',\n IBMPlexSans_400Regular_Italic = 'IBMPlexSans_400Regular_Italic',\n IBMPlexSans_500Medium = 'IBMPlexSans_500Medium',\n IBMPlexSans_500Medium_Italic = 'IBMPlexSans_500Medium_Italic',\n IBMPlexSans_600SemiBold_Italic = 'IBMPlexSans_600SemiBold_Italic',\n IBMPlexSans_700Bold_Italic = 'IBMPlexSans_700Bold_Italic',\n}\nexport const deliverETStyles = StyleSheet.create({\n item: {\n padding: 2,\n marginTop: 8,\n },\n title: {\n fontSize: 16,\n },\n footerButtonStyles: {\n flexDirection: 'row',\n width: '100%',\n },\n input: {\n marginTop: 12,\n marginBottom: 10,\n },\n footerComponent: {\n flex: 1,\n marginStart: 8,\n marginEnd: 8,\n marginRight: 8,\n width: '100%',\n position: 'absolute',\n bottom: 10,\n },\n errorText: {\n color: 'red',\n fontSize: 16,\n fontStyle: 'normal',\n },\n});\nexport const CommonStyles = StyleSheet.create({\n alignCenter: {\n flex: 1,\n alignItems: 'center',\n },\n flexRow: {\n flex: 1,\n flexDirection: 'row',\n },\n mainContainer: {\n flex: 1,\n backgroundColor: '#f9f9f9',\n },\n nextButton: {\n backgroundColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n },\n nextButtonLabel: {\n color: '#ffffff',\n fontFamily: Fonts.IBMPlexSans_500Medium,\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n fontWeight: '500',\n },\n cancelButton: {\n borderWidth: 1,\n borderColor: SdkColors[ColorTheme.LIGHT].primaryButton,\n },\n cancelButtonLabel: {\n color: SdkColors[ColorTheme.LIGHT].defaultColor,\n fontFamily: Fonts.IBMPlexSans_500Medium,\n fontSize: 14,\n fontWeight: '500',\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n textTransform:'capitalize'\n },\n mainExitButton: {\n backgroundColor: SdkColors[ColorTheme.LIGHT].exitButton,\n },\n mainExitButtonLabel: {\n color: '#ffffff',\n fontFamily: Fonts.IBMPlexSans_500Medium,\n fontSize: 14,\n fontWeight: '500',\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n },\n exitButton: {\n borderWidth: 1,\n borderColor: SdkColors[ColorTheme.LIGHT].exitButton,\n },\n exitButtonLabel: {\n color: SdkColors[ColorTheme.LIGHT].exitButton,\n fontFamily: Fonts.IBMPlexSans_500Medium,\n fontSize: 14,\n fontWeight: '500',\n lineHeight: 20,\n textAlign: 'center',\n fontStyle: 'normal',\n },\n bottom: {\n flex: 1,\n justifyContent: 'flex-end',\n marginBottom: 10,\n },\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n flex: 1,\n marginBottom: 60,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n borderRadius: 9,\n },\n subText: {\n justifyContent: 'center',\n fontFamily: 'IBMPlexSans_400Regular',\n fontStyle: 'normal',\n fontSize: 14,\n letterSpacing: 0.25,\n lineHeight: 20,\n textAlign: 'center',\n color: '#000000',\n marginBottom: 10,\n },\n});\nexport const DeliverPickupStyles = StyleSheet.create({\n itemTextStyle: {\n fontFamily: Fonts.IBMPlexSans_400Regular,\n color: '#111111',\n textAlign: 'center',\n alignItems: 'center',\n justifyContent: 'center',\n },\n mainContainer: {\n flex: 1,\n backgroundColor: 'rgba(61, 68, 92, 0.7)',\n },\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n flex: 1,\n marginBottom: 60,\n },\n flatList: {\n marginTop: 7,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n borderRadius: 9,\n },\n titleText: {\n justifyContent: 'center',\n fontFamily: Fonts.IBMPlexSans_600SemiBold,\n fontStyle: 'normal',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n color: '#111111',\n },\n messageText: {\n marginTop: 10,\n justifyContent: 'center',\n fontFamily: Fonts.IBMPlexSans_400Regular,\n fontStyle: 'normal',\n fontWeight: '400',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n color: '#000000',\n },\n});\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,OAAOC,SAAS,IAAIC,UA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AAS,EAAE;IACTtB,eAAe,EAAE,OAAO;IACxBxB,OAAO,EAAE,EAAE;IACX+C,YAAY,EAAE;EAChB,CAAC;EACDO,SAAS,EAAE;IACTV,cAAc,EAAE,QAAQ;IACxBf,UAAU,EAAEjC,KAAK,CAAC2D,uBAAuB;IACzCrC,SAAS,EAAE,QAAQ;IACnBf,QAAQ,EAAE,EAAE;IACZ4B,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE,QAAQ;IACnBf,KAAK,EAAE;EACT,CAAC;EACDuC,WAAW,EAAE;IACXvD,SAAS,EAAE,EAAE;IACb2C,cAAc,EAAE,QAAQ;IACxBf,UAAU,EAAEjC,KAAK,CAACwD,sBAAsB;IACxClC,SAAS,EAAE,QAAQ;IACnBe,UAAU,EAAE,KAAK;IACjB9B,QAAQ,EAAE,EAAE;IACZ4B,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE,QAAQ;IACnBf,KAAK,EAAE;EACT;AACF,CAAC,CAAC"}
|
|
@@ -10,31 +10,49 @@ import CancelOrderDialog from '../../components/widgets/CancelOrderDialog';
|
|
|
10
10
|
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
11
11
|
import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
12
12
|
import { GO_BACK_EVENT_CODE } from '../../constants/constants';
|
|
13
|
+
import Helper from '../../utils/helper';
|
|
13
14
|
const DeliverScreen = _ref => {
|
|
14
15
|
let {
|
|
15
16
|
navigation,
|
|
16
17
|
route,
|
|
17
18
|
baseETProps
|
|
18
19
|
} = _ref;
|
|
20
|
+
const helperInstance = Helper.getInstance();
|
|
19
21
|
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
20
22
|
const {
|
|
21
23
|
taskMeta,
|
|
22
24
|
mergedObjectiveId,
|
|
23
25
|
input,
|
|
24
|
-
wfMeta
|
|
26
|
+
wfMeta,
|
|
27
|
+
taskName
|
|
25
28
|
} = getDataFromNextState(nextState);
|
|
26
29
|
const [returnPackageCount, setReturnPackageCount] = useState(0);
|
|
27
30
|
const [shipCount, setShipCount] = useState(0);
|
|
28
31
|
const [items, setItems] = useState([]);
|
|
32
|
+
const [isSelfLoopTrue, setSelfLoop] = useState(false);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
(async () => {
|
|
35
|
+
onTaskStart(nextState, route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
36
|
+
getMergedReturnPackageCount();
|
|
37
|
+
await getSelfLoopBool();
|
|
38
|
+
})();
|
|
39
|
+
}, []);
|
|
40
|
+
const getSelfLoopBool = async () => {
|
|
41
|
+
try {
|
|
42
|
+
var _mergedObjectiveId$;
|
|
43
|
+
const splitArr = (_mergedObjectiveId$ = mergedObjectiveId[0]) === null || _mergedObjectiveId$ === void 0 ? void 0 : _mergedObjectiveId$.split('#');
|
|
44
|
+
const isSelfLoopTrue = await helperInstance.isSelfLoopExistOnET(splitArr[1], taskName);
|
|
45
|
+
setSelfLoop(isSelfLoopTrue);
|
|
46
|
+
console.log('isSelfLoopTrue code execution successful!');
|
|
47
|
+
} catch (error) {
|
|
48
|
+
console.log('isSelfLoopTrue code execution error', error);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
29
51
|
const getMergedReturnPackageCount = async () => {
|
|
30
52
|
const count = await DispatchExecutor.getScannedShipmentsCount(mergedObjectiveId);
|
|
31
53
|
setReturnPackageCount(count.totalCount);
|
|
32
54
|
setShipCount(count.shipCount);
|
|
33
55
|
};
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
onTaskStart(nextState, route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
36
|
-
getMergedReturnPackageCount();
|
|
37
|
-
}, []);
|
|
38
56
|
useEffect(() => {
|
|
39
57
|
if (returnPackageCount === 1) {
|
|
40
58
|
setItems(input.items);
|
|
@@ -53,6 +71,7 @@ const DeliverScreen = _ref => {
|
|
|
53
71
|
}, /*#__PURE__*/React.createElement(SLDeliverET, _extends({}, input, {
|
|
54
72
|
items: items,
|
|
55
73
|
navigation: navigation,
|
|
74
|
+
isSelfLoop: isSelfLoopTrue,
|
|
56
75
|
taskMeta: taskMeta,
|
|
57
76
|
mergedObjectiveId: mergedObjectiveId,
|
|
58
77
|
returnPackageCount: returnPackageCount,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useEffect","useState","withBaseDispatchScreen","EntityCode","ExecutionTaskID","DispatchStateContainer","SLDeliverET","RouteParams","getDataFromNextState","View","CancelOrderDialog","onTaskStart","DispatchExecutor","GO_BACK_EVENT_CODE","DeliverScreen","_ref","navigation","route","baseETProps","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","returnPackageCount","setReturnPackageCount","shipCount","setShipCount","items","setItems","getMergedReturnPackageCount","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useState","withBaseDispatchScreen","EntityCode","ExecutionTaskID","DispatchStateContainer","SLDeliverET","RouteParams","getDataFromNextState","View","CancelOrderDialog","onTaskStart","DispatchExecutor","GO_BACK_EVENT_CODE","Helper","DeliverScreen","_ref","navigation","route","baseETProps","helperInstance","getInstance","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","taskName","returnPackageCount","setReturnPackageCount","shipCount","setShipCount","items","setItems","isSelfLoopTrue","setSelfLoop","ROOT_META_DATA","customEventsData","getMergedReturnPackageCount","getSelfLoopBool","_mergedObjectiveId$","splitArr","split","isSelfLoopExistOnET","console","log","error","count","getScannedShipmentsCount","totalCount","showDeliverModal","setShowDeliverModal","showAlert","setShowAlert","sResponse","setResponse","submitOutput","deliverOutput","navigateToNextTask","success","DELIVER","createElement","style","flex","_extends","isSelfLoop","onSubmitET","eventCode","_prevState","visible","onSubmit","value"],"sources":["DeliverScreen.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport SLDeliverET from '../../components/executiontasks/deliver/SLDeliverET';\nimport { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';\nimport { View } from 'react-native';\nimport CancelOrderDialog from '../../components/widgets/CancelOrderDialog';\nimport { onTaskStart } from '../../utils/ExecTaskUtils';\nimport { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';\nimport Storage from '../../utils/storage';\nimport {\n SCAN_MERGED_OBJ_ID_OUTPUT,\n SHARED_PREFERENCE_SCAN_OUTPUT,\n} from '../../manager/syncmanager/constants';\nimport { GO_BACK_EVENT_CODE } from '../../constants/constants';\nimport Helper from '../../utils/helper';\n\nconst DeliverScreen = ({\n navigation,\n route,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const helperInstance = Helper.getInstance();\n const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta, taskName } =\n getDataFromNextState(nextState);\n\n const [returnPackageCount, setReturnPackageCount] = useState(0);\n const [shipCount, setShipCount] = useState(0);\n const [items, setItems] = useState([]);\n const [isSelfLoopTrue, setSelfLoop] = useState(false);\n\n useEffect(() => {\n (async () => {\n onTaskStart(\n nextState,\n route.params[RouteParams.ROOT_META_DATA].customEventsData\n );\n getMergedReturnPackageCount();\n await getSelfLoopBool();\n })();\n }, [])\n\n const getSelfLoopBool = async () => {\n try {\n const splitArr = mergedObjectiveId[0]?.split('#');\n const isSelfLoopTrue: boolean = await helperInstance.isSelfLoopExistOnET(splitArr[1], taskName)\n setSelfLoop(isSelfLoopTrue);\n console.log('isSelfLoopTrue code execution successful!');\n } catch (error) {\n console.log('isSelfLoopTrue code execution error', error);\n }\n }\n\n const getMergedReturnPackageCount = async () => {\n const count = await DispatchExecutor.getScannedShipmentsCount(\n mergedObjectiveId\n );\n setReturnPackageCount(count.totalCount);\n setShipCount(count.shipCount);\n };\n\n useEffect(() => {\n if (returnPackageCount === 1) {\n setItems(input.items);\n }\n }, [returnPackageCount]);\n\n const [showDeliverModal, setShowDeliverModal] = useState(true);\n const [showAlert, setShowAlert] = useState(false);\n const [sResponse, setResponse] = useState<any>();\n const submitOutput = useCallback(\n async (deliverOutput: any) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n deliverOutput,\n deliverOutput.success,\n EntityCode.DELIVER,\n ExecutionTaskID.DELIVER,\n baseETProps,\n false\n );\n },\n [baseETProps, navigation, route]\n );\n\n return (\n <View style={{ flex: 1 }}>\n <SLDeliverET\n {...input}\n items={items}\n navigation={navigation}\n isSelfLoop={isSelfLoopTrue}\n taskMeta={taskMeta}\n mergedObjectiveId={mergedObjectiveId}\n returnPackageCount={returnPackageCount}\n shipCount={shipCount}\n showDeliverModal={showDeliverModal}\n setShowDeliverModal={setShowDeliverModal}\n onSubmitET={async (deliverOutput) => {\n if (\n deliverOutput.success ||\n deliverOutput.eventCode == GO_BACK_EVENT_CODE\n ) {\n await submitOutput(deliverOutput);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return deliverOutput;\n });\n }\n }}\n />\n <CancelOrderDialog\n visible={showAlert}\n onSubmit={async (value) => {\n if (value) {\n setShowAlert(false);\n await submitOutput(sResponse);\n } else {\n setShowAlert(false);\n setShowDeliverModal(true);\n }\n }}\n />\n </View>\n );\n};\nexport default withBaseDispatchScreen(DeliverScreen);\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC/D,OAAOC,sBAAsB,MAAM,0BAA0B;AAE7D,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAC7E,OAAOC,sBAAsB,MAAM,+CAA+C;AAClF,OAAOC,WAAW,MAAM,qDAAqD;AAC7E,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,yBAAyB;AAC3E,SAASC,IAAI,QAAQ,cAAc;AACnC,OAAOC,iBAAiB,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,CAAC"}
|
|
@@ -9,24 +9,44 @@ import { View } from 'react-native';
|
|
|
9
9
|
import CancelOrderDialog from '../../components/widgets/CancelOrderDialog';
|
|
10
10
|
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
11
11
|
import { GO_BACK_EVENT_CODE } from '../../constants/constants';
|
|
12
|
+
import Helper from '../../utils/helper';
|
|
12
13
|
const DoodleScreen = _ref => {
|
|
13
14
|
let {
|
|
14
15
|
route,
|
|
15
16
|
navigation,
|
|
16
17
|
baseETProps
|
|
17
18
|
} = _ref;
|
|
19
|
+
const helperInstance = Helper.getInstance();
|
|
18
20
|
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
19
21
|
const {
|
|
20
22
|
taskMeta,
|
|
21
23
|
mergedObjectiveId,
|
|
22
24
|
input,
|
|
23
|
-
wfMeta
|
|
25
|
+
wfMeta,
|
|
26
|
+
taskName
|
|
24
27
|
} = getDataFromNextState(nextState);
|
|
25
28
|
useEffect(() => {
|
|
26
29
|
onTaskStart(nextState, route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
27
30
|
}, []);
|
|
28
31
|
const [showAlert, setShowAlert] = useState(false);
|
|
29
32
|
const [sResponse, setResponse] = useState();
|
|
33
|
+
const [isSelfLoopTrue, setSelfLoop] = useState(false);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
(async () => {
|
|
36
|
+
await getSelfLoopBool();
|
|
37
|
+
})();
|
|
38
|
+
}, []);
|
|
39
|
+
const getSelfLoopBool = async () => {
|
|
40
|
+
try {
|
|
41
|
+
var _mergedObjectiveId$;
|
|
42
|
+
const splitArr = (_mergedObjectiveId$ = mergedObjectiveId[0]) === null || _mergedObjectiveId$ === void 0 ? void 0 : _mergedObjectiveId$.split('#');
|
|
43
|
+
const isSelfLoopTrue = await helperInstance.isSelfLoopExistOnET(splitArr[1], taskName);
|
|
44
|
+
setSelfLoop(isSelfLoopTrue);
|
|
45
|
+
console.log('isSelfLoopTrue code execution successful!');
|
|
46
|
+
} catch (error) {
|
|
47
|
+
console.log('isSelfLoopTrue code execution error', error);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
30
50
|
const submitOutput = useCallback(async base64Data => {
|
|
31
51
|
await DispatchStateContainer.getInstance().navigateToNextTask(navigation, route, base64Data, base64Data.success, EntityCode.DOODLE, ExecutionTaskID.DOODLE, baseETProps, false);
|
|
32
52
|
}, [baseETProps, navigation, route]);
|
|
@@ -38,6 +58,7 @@ const DoodleScreen = _ref => {
|
|
|
38
58
|
// jobIDs={getJobIDs(route.params[RouteParams.NEXT_STATES])}
|
|
39
59
|
// objRefs={getObjectiveRefs(route.params[RouteParams.NEXT_STATES])}
|
|
40
60
|
navigation: navigation,
|
|
61
|
+
isSelfLoop: isSelfLoopTrue,
|
|
41
62
|
taskMeta: taskMeta,
|
|
42
63
|
mergedObjectiveId: mergedObjectiveId,
|
|
43
64
|
onSubmitET: async base64Data => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SignatureET","React","useCallback","useEffect","useState","withBaseDispatchScreen","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","getDataFromNextState","View","CancelOrderDialog","onTaskStart","GO_BACK_EVENT_CODE","DoodleScreen","_ref","route","navigation","baseETProps","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","ROOT_META_DATA","customEventsData","showAlert","setShowAlert","sResponse","setResponse","
|
|
1
|
+
{"version":3,"names":["SignatureET","React","useCallback","useEffect","useState","withBaseDispatchScreen","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","getDataFromNextState","View","CancelOrderDialog","onTaskStart","GO_BACK_EVENT_CODE","Helper","DoodleScreen","_ref","route","navigation","baseETProps","helperInstance","getInstance","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","taskName","ROOT_META_DATA","customEventsData","showAlert","setShowAlert","sResponse","setResponse","isSelfLoopTrue","setSelfLoop","getSelfLoopBool","_mergedObjectiveId$","splitArr","split","isSelfLoopExistOnET","console","log","error","submitOutput","base64Data","navigateToNextTask","success","DOODLE","createElement","style","flex","_extends","isSelfLoop","onSubmitET","eventCode","_prevState","label","visible","onSubmit","value"],"sources":["DoodleScreen.tsx"],"sourcesContent":["import SignatureET from '../../components/executiontasks/doodle/SignatureET';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';\nimport { View } from 'react-native';\nimport CancelOrderDialog from '../../components/widgets/CancelOrderDialog';\nimport { onTaskStart } from '../../utils/ExecTaskUtils';\nimport { GO_BACK_EVENT_CODE } from '../../constants/constants';\nimport Helper from '../../utils/helper';\n\nconst DoodleScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const helperInstance = Helper.getInstance();\n const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta, taskName } =\n getDataFromNextState(nextState);\n useEffect(() => {\n onTaskStart(\n nextState,\n route.params[RouteParams.ROOT_META_DATA].customEventsData\n );\n }, []);\n const [showAlert, setShowAlert] = useState(false);\n const [sResponse, setResponse] = useState<any>();\n const [isSelfLoopTrue, setSelfLoop] = useState(false);\n\n useEffect(() => {\n (async () => {\n await getSelfLoopBool();\n })();\n }, [])\n\n const getSelfLoopBool = async () => {\n try {\n const splitArr = mergedObjectiveId[0]?.split('#');\n const isSelfLoopTrue: boolean = await helperInstance.isSelfLoopExistOnET(splitArr[1], taskName)\n setSelfLoop(isSelfLoopTrue);\n console.log('isSelfLoopTrue code execution successful!');\n } catch (error) {\n console.log('isSelfLoopTrue code execution error', error);\n }\n }\n\n const submitOutput = useCallback(\n async (base64Data: any) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n base64Data,\n base64Data.success,\n EntityCode.DOODLE,\n ExecutionTaskID.DOODLE,\n baseETProps,\n false\n );\n },\n [baseETProps, navigation, route]\n );\n\n return (\n <View style={{ flex: 1 }}>\n <SignatureET\n {...input}\n // jobIDs={getJobIDs(route.params[RouteParams.NEXT_STATES])}\n // objRefs={getObjectiveRefs(route.params[RouteParams.NEXT_STATES])}\n navigation={navigation}\n isSelfLoop={isSelfLoopTrue}\n taskMeta={taskMeta}\n mergedObjectiveId={mergedObjectiveId}\n onSubmitET={async (base64Data) => {\n if (base64Data.success || base64Data.eventCode == GO_BACK_EVENT_CODE) {\n await submitOutput(base64Data);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return base64Data;\n });\n }\n }}\n />\n <CancelOrderDialog\n label={'Cancel Signature'}\n visible={showAlert}\n onSubmit={async (value) => {\n if (value) {\n setShowAlert(false);\n await submitOutput(sResponse);\n } else {\n setShowAlert(false);\n }\n }}\n />\n </View>\n );\n};\n\nexport default withBaseDispatchScreen(DoodleScreen);\n"],"mappings":";AAAA,OAAOA,WAAW,MAAM,oDAAoD;AAC5E,OAAOC,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC/D,OAAOC,sBAAsB,MAAM,0BAA0B;AAE7D,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAC7E,OAAOC,sBAAsB,MAAM,+CAA+C;AAClF,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,yBAAyB;AAC3E,SAASC,IAAI,QAAQ,cAAc;AACnC,OAAOC,iBAAiB,MAAM,4CAA4C;AAC1E,SAASC,WAAW,QAAQ,2BAA2B;AACvD,SAASC,kBAAkB,QAAQ,2BAA2B;AAC9D,OAAOC,MAAM,MAAM,oBAAoB;AAEvC,MAAMC,YAAY,GAAGC,IAAA,IAQf;EAAA,IARgB;IACpBC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAH,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B,CAAC,MAAM;QACLD,YAAY,CAAC,KAAK,CAAC;MACrB;IACF;EAAE,CACH,CACG,CAAC;AAEX,CAAC;AAED,eAAe7B,sBAAsB,CAACW,YAAY,CAAC"}
|
|
@@ -10,6 +10,8 @@ import CancelOrderDialog from '../../components/widgets/CancelOrderDialog';
|
|
|
10
10
|
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
11
11
|
import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
12
12
|
import { GO_BACK_EVENT_CODE } from '../../constants/constants';
|
|
13
|
+
import Helper from '../../utils/helper';
|
|
14
|
+
|
|
13
15
|
// OLD CODE
|
|
14
16
|
// function getTotalExpected(nextStates: any[]): ETAmount {
|
|
15
17
|
// let totalAmount = 0;
|
|
@@ -30,18 +32,28 @@ const DropCashScreen = _ref => {
|
|
|
30
32
|
navigation,
|
|
31
33
|
baseETProps
|
|
32
34
|
} = _ref;
|
|
35
|
+
const helperInstance = Helper.getInstance();
|
|
33
36
|
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
34
37
|
const {
|
|
35
38
|
taskMeta,
|
|
36
39
|
mergedObjectiveId,
|
|
37
40
|
input,
|
|
38
|
-
wfMeta
|
|
41
|
+
wfMeta,
|
|
42
|
+
taskName
|
|
39
43
|
} = getDataFromNextState(nextState);
|
|
40
44
|
const [expectedAmount, setExpectedAmount] = useState({
|
|
41
45
|
value: 0,
|
|
42
46
|
minorUnit: input.expectedAmount.minorUnit,
|
|
43
47
|
currencyCode: input.expectedAmount.currencyCode
|
|
44
48
|
});
|
|
49
|
+
const [isSelfLoopTrue, setSelfLoop] = useState(false);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
(async () => {
|
|
52
|
+
onTaskStart(nextState, route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
53
|
+
getTotalExpected();
|
|
54
|
+
await getSelfLoopBool();
|
|
55
|
+
})();
|
|
56
|
+
}, []);
|
|
45
57
|
const getTotalExpected = async () => {
|
|
46
58
|
const totalAmount = await DispatchExecutor.getTotalAmountMWI(mergedObjectiveId);
|
|
47
59
|
setExpectedAmount({
|
|
@@ -49,10 +61,17 @@ const DropCashScreen = _ref => {
|
|
|
49
61
|
value: totalAmount
|
|
50
62
|
});
|
|
51
63
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
64
|
+
const getSelfLoopBool = async () => {
|
|
65
|
+
try {
|
|
66
|
+
var _mergedObjectiveId$;
|
|
67
|
+
const splitArr = (_mergedObjectiveId$ = mergedObjectiveId[0]) === null || _mergedObjectiveId$ === void 0 ? void 0 : _mergedObjectiveId$.split('#');
|
|
68
|
+
const isSelfLoopTrue = await helperInstance.isSelfLoopExistOnET(splitArr[1], taskName);
|
|
69
|
+
setSelfLoop(isSelfLoopTrue);
|
|
70
|
+
console.log('isSelfLoopTrue code execution successful!');
|
|
71
|
+
} catch (error) {
|
|
72
|
+
console.log('isSelfLoopTrue code execution error', error);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
56
75
|
const [showAlert, setShowAlert] = useState(false);
|
|
57
76
|
const [sResponse, setResponse] = useState();
|
|
58
77
|
const submitOutput = useCallback(async etOutput => {
|
|
@@ -64,6 +83,7 @@ const DropCashScreen = _ref => {
|
|
|
64
83
|
}
|
|
65
84
|
}, /*#__PURE__*/React.createElement(SLDropCash, _extends({}, input, {
|
|
66
85
|
expectedAmount: expectedAmount,
|
|
86
|
+
isSelfLoop: isSelfLoopTrue,
|
|
67
87
|
navigation: navigation,
|
|
68
88
|
mergedObjectiveId: mergedObjectiveId,
|
|
69
89
|
taskMeta: taskMeta,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useEffect","useState","withBaseDispatchScreen","SLDropCash","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","getDataFromNextState","View","CancelOrderDialog","onTaskStart","DispatchExecutor","GO_BACK_EVENT_CODE","DropCashScreen","_ref","route","navigation","baseETProps","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","expectedAmount","setExpectedAmount","value","minorUnit","currencyCode","getTotalExpected","totalAmount","getTotalAmountMWI","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useState","withBaseDispatchScreen","SLDropCash","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","getDataFromNextState","View","CancelOrderDialog","onTaskStart","DispatchExecutor","GO_BACK_EVENT_CODE","Helper","DropCashScreen","_ref","route","navigation","baseETProps","helperInstance","getInstance","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","taskName","expectedAmount","setExpectedAmount","value","minorUnit","currencyCode","isSelfLoopTrue","setSelfLoop","ROOT_META_DATA","customEventsData","getTotalExpected","getSelfLoopBool","totalAmount","getTotalAmountMWI","_mergedObjectiveId$","splitArr","split","isSelfLoopExistOnET","console","log","error","showAlert","setShowAlert","sResponse","setResponse","submitOutput","etOutput","navigateToNextTask","success","DELIVER_CASH","createElement","style","flex","_extends","isSelfLoop","onSubmitET","eventCode","_prevState","visible","onSubmit"],"sources":["DropCashScreen.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport { SLDropCash } from '../../components/executiontasks/ExecutionTasksIndex';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';\nimport type { ETAmount } from '../../components/executiontasks/payments/init/InitPaymentSchema';\nimport { View } from 'react-native';\nimport CancelOrderDialog from '../../components/widgets/CancelOrderDialog';\nimport { onTaskStart } from '../../utils/ExecTaskUtils';\n\nimport { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';\nimport { GO_BACK_EVENT_CODE } from '../../constants/constants';\nimport Helper from '../../utils/helper';\n\n// OLD CODE\n// function getTotalExpected(nextStates: any[]): ETAmount {\n// let totalAmount = 0;\n// for (const s of nextStates) {\n// totalAmount += s.nextState.data.input.expectedAmount.value;\n// }\n// return {\n// value: totalAmount,\n// minorUnit: nextStates[0].nextState.data.input.expectedAmount.minorUnit,\n// currencyCode:\n// nextStates[0].nextState.data.input.expectedAmount.currencyCode,\n// };\n// }\n\nconst DropCashScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const helperInstance = Helper.getInstance();\n const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta, taskName } =\n getDataFromNextState(nextState);\n\n const [expectedAmount, setExpectedAmount] = useState<ETAmount>({\n value: 0,\n minorUnit: input.expectedAmount.minorUnit,\n currencyCode: input.expectedAmount.currencyCode,\n });\n const [isSelfLoopTrue, setSelfLoop] = useState(false);\n\n useEffect(() => {\n (async () => {\n onTaskStart(\n nextState,\n route.params[RouteParams.ROOT_META_DATA].customEventsData\n );\n getTotalExpected();\n await getSelfLoopBool();\n })();\n }, [])\n\n const getTotalExpected = async () => {\n const totalAmount: number = await DispatchExecutor.getTotalAmountMWI(\n mergedObjectiveId\n );\n setExpectedAmount({ ...expectedAmount, value: totalAmount });\n };\n\n const getSelfLoopBool = async () => {\n try {\n const splitArr = mergedObjectiveId[0]?.split('#');\n const isSelfLoopTrue: boolean = await helperInstance.isSelfLoopExistOnET(splitArr[1], taskName)\n setSelfLoop(isSelfLoopTrue);\n console.log('isSelfLoopTrue code execution successful!');\n } catch (error) {\n console.log('isSelfLoopTrue code execution error', error);\n }\n }\n\n const [showAlert, setShowAlert] = useState(false);\n const [sResponse, setResponse] = useState<any>();\n const submitOutput = useCallback(\n async (etOutput: any) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n etOutput,\n etOutput.success,\n EntityCode.DELIVER_CASH,\n ExecutionTaskID.DELIVER_CASH,\n baseETProps,\n false\n );\n },\n [baseETProps, navigation, route]\n );\n return (\n <View style={{ flex: 1 }}>\n <SLDropCash\n {...input}\n expectedAmount={expectedAmount}\n isSelfLoop={isSelfLoopTrue}\n navigation={navigation}\n mergedObjectiveId={mergedObjectiveId}\n taskMeta={taskMeta}\n onSubmitET={async (etOutput) => {\n if (etOutput.success || etOutput.eventCode == GO_BACK_EVENT_CODE) {\n await submitOutput(etOutput);\n } else {\n setResponse((_prevState: any) => {\n setShowAlert(true);\n return etOutput;\n });\n }\n }}\n />\n <CancelOrderDialog\n visible={showAlert}\n onSubmit={async (value) => {\n if (value) {\n setShowAlert(false);\n await submitOutput(sResponse);\n } else {\n setShowAlert(false);\n }\n }}\n />\n </View>\n );\n};\nexport default withBaseDispatchScreen(DropCashScreen);\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC/D,OAAOC,sBAAsB,MAAM,0BAA0B;AAE7D,SAASC,UAAU,QAAQ,qDAAqD;AAChF,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAC7E,OAAOC,sBAAsB,MAAM,+CAA+C;AAClF,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,yBAAyB;AAE3E,SAASC,IAAI,QAAQ,cAAc;AACnC,OAAOC,iBAAiB,MAAM,4CAA4C;AAC1E,SAASC,WAAW,QAAQ,2BAA2B;AAEvD,SAASC,gBAAgB,QAAQ,oDAAoD;AACrF,SAASC,kBAAkB,QAAQ,2BAA2B;AAC9D,OAAOC,MAAM,MAAM,oBAAoB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,cAAc,GAAGC,IAAA,IAQjB;EAAA,IARkB;IACtBC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAH,IAAA;EACC,MAAMI,cAAc,GAAGN,MAAM,CAACO,WAAW,CAAC,CAAC;EAC3C,MAAMC,SAAS,GAAGL,KAAK,CAACM,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AAC,IAAI,CAAC;UAClB,OAAOI,QAAQ;QACjB,CAAC,CAAC;MACJ;IACF;EAAE,EACH,CAAC,eACFzD,KAAA,CAAA6D,aAAA,CAACjD,iBAAiB;IAChByD,OAAO,EAAEjB,SAAU;IACnBkB,QAAQ,EAAE,MAAOpC,KAAK,IAAK;MACzB,IAAIA,KAAK,EAAE;QACTmB,YAAY,CAAC,KAAK,CAAC;QACnB,MAAMG,YAAY,CAACF,SAAS,CAAC;MAC/B,CAAC,MAAM;QACLD,YAAY,CAAC,KAAK,CAAC;MACrB;IACF;EAAE,CACH,CACG,CAAC;AAEX,CAAC;AACD,eAAejD,sBAAsB,CAACa,cAAc,CAAC"}
|
|
@@ -10,12 +10,14 @@ import { View } from 'react-native';
|
|
|
10
10
|
import SnackBarCustom, { SnackBarType } from '../../components/widgets/SnackBarCustom';
|
|
11
11
|
import callbackHandler from '../../manager/sdk/callbacksHandler';
|
|
12
12
|
import { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
13
|
+
import Helper from '../../utils/helper';
|
|
13
14
|
const FormsScreen = _ref => {
|
|
14
15
|
let {
|
|
15
16
|
route,
|
|
16
17
|
navigation,
|
|
17
18
|
baseETProps
|
|
18
19
|
} = _ref;
|
|
20
|
+
const helperInstance = Helper.getInstance();
|
|
19
21
|
const [snackBar, setSnackBar] = useState({
|
|
20
22
|
show: false,
|
|
21
23
|
type: SnackBarType.SUCCESS,
|
|
@@ -26,9 +28,11 @@ const FormsScreen = _ref => {
|
|
|
26
28
|
taskMeta,
|
|
27
29
|
mergedObjectiveId,
|
|
28
30
|
input,
|
|
29
|
-
wfMeta
|
|
31
|
+
wfMeta,
|
|
32
|
+
taskName
|
|
30
33
|
} = getDataFromNextState(nextState);
|
|
31
34
|
const [_input, setInputs] = useState(input);
|
|
35
|
+
const [isSelfLoopTrue, setSelfLoop] = useState(false);
|
|
32
36
|
useEffect(() => {
|
|
33
37
|
(async () => {
|
|
34
38
|
onTaskStart(route.params[RouteParams.NEXT_STATES], route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
@@ -59,8 +63,25 @@ const FormsScreen = _ref => {
|
|
|
59
63
|
}
|
|
60
64
|
})();
|
|
61
65
|
}, []);
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
(async () => {
|
|
68
|
+
await getSelfLoopBool();
|
|
69
|
+
})();
|
|
70
|
+
}, []);
|
|
71
|
+
const getSelfLoopBool = async () => {
|
|
72
|
+
try {
|
|
73
|
+
var _mergedObjectiveId$;
|
|
74
|
+
const splitArr = (_mergedObjectiveId$ = mergedObjectiveId[0]) === null || _mergedObjectiveId$ === void 0 ? void 0 : _mergedObjectiveId$.split('#');
|
|
75
|
+
const isSelfLoopTrue = await helperInstance.isSelfLoopExistOnET(splitArr[1], taskName);
|
|
76
|
+
setSelfLoop(isSelfLoopTrue);
|
|
77
|
+
console.log('isSelfLoopTrue code execution successful!');
|
|
78
|
+
} catch (error) {
|
|
79
|
+
console.log('isSelfLoopTrue code execution error', error);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
62
82
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormGenerator, _extends({}, _input, {
|
|
63
83
|
navigation: navigation,
|
|
84
|
+
isSelfLoop: isSelfLoopTrue,
|
|
64
85
|
mergedObjectiveId: mergedObjectiveId,
|
|
65
86
|
taskMeta: taskMeta,
|
|
66
87
|
onError: error => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useState","withBaseDispatchScreen","FormGenerator","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","getDataFromNextState","handleDynamicValues","onTaskStart","View","SnackBarCustom","SnackBarType","callbackHandler","DispatchExecutor","dispatchExecutor","FormsScreen","_ref","route","navigation","baseETProps","snackBar","setSnackBar","show","type","SUCCESS","message","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","_input","setInputs","ROOT_META_DATA","customEventsData","_phoneNumbers$value","contact","getObjectiveTaskDetails","statusFilter","phoneNumbers","getPhoneNumbers","value","length","meta","key","jsonSchemaProperties","JSON","parse","stringify","jsonSchema","properties","prev","dynamicInput","createElement","Fragment","_extends","onError","error","errorMessage","transformErrorMessage","FAILURE","onSubmitET","result","getInstance","navigateToNextTask","success","FORMS","style","justifyContent","visible","onDismiss","customBottom","Array","isArray","e","name","convertToPascalCaseWithSpace","property","inputString","split","filter","word","map","index","capitalizeWord","join","isFirstWord","charAt","toUpperCase","slice"],"sources":["FormsScreen.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport { FormGenerator } from '../../components/executiontasks/ExecutionTasksIndex';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';\nimport { handleDynamicValues, onTaskStart } from '../../utils/ExecTaskUtils';\nimport { View } from 'react-native';\nimport SnackBarCustom, {\n SnackBarType,\n} from '../../components/widgets/SnackBarCustom';\nimport callbackHandler from '../../manager/sdk/callbacksHandler';\nimport { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';\nimport { AjvError } from '@rjsf/core';\n\nconst FormsScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const [snackBar, setSnackBar] = useState({\n show: false,\n type: SnackBarType.SUCCESS,\n message: '',\n });\n const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta } =\n getDataFromNextState(nextState);\n const [_input, setInputs] = useState(input);\n useEffect(() => {\n (async () => {\n onTaskStart(\n route.params[RouteParams.NEXT_STATES],\n route.params[RouteParams.ROOT_META_DATA].customEventsData\n );\n\n if (route.params[RouteParams.ROOT_META_DATA]) {\n //Call objectiveDetails fn and fetch sds ids\n const { contact } = await dispatchExecutor.getObjectiveTaskDetails(\n mergedObjectiveId[0],\n route.params[RouteParams.ROOT_META_DATA].statusFilter\n );\n\n // run callback to get corresponding phone numbers\n const phoneNumbers = await callbackHandler.getPhoneNumbers(contact);\n\n if (phoneNumbers && phoneNumbers.value?.length) {\n route.params[RouteParams.ROOT_META_DATA].meta[phoneNumbers.key] =\n phoneNumbers.value;\n }\n\n let jsonSchemaProperties = JSON.parse(\n JSON.stringify(_input.jsonSchema.properties)\n );\n\n jsonSchemaProperties = handleDynamicValues(\n jsonSchemaProperties,\n route.params[RouteParams.ROOT_META_DATA]\n );\n\n setInputs((prev: any) => {\n const dynamicInput = {\n ...prev,\n jsonSchema: {\n ...prev.jsonSchema,\n properties: jsonSchemaProperties,\n },\n };\n return dynamicInput;\n });\n }\n })();\n }, []);\n\n return (\n <>\n <FormGenerator\n {..._input}\n navigation={navigation}\n mergedObjectiveId={mergedObjectiveId}\n taskMeta={taskMeta}\n onError={(error: AjvError[] | AjvError) => {\n const errorMessage = transformErrorMessage(error);\n\n setSnackBar({\n show: true,\n type: SnackBarType.FAILURE,\n message: errorMessage,\n });\n }}\n onSubmitET={async (result) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n result,\n result.success,\n EntityCode.FORMS,\n ExecutionTaskID.FORMS,\n baseETProps,\n false\n );\n }}\n />\n <View style={{ justifyContent: 'flex-end' }}>\n <SnackBarCustom\n type={snackBar.type}\n message={`${snackBar.message}`}\n visible={snackBar.show}\n onDismiss={() => {\n setSnackBar({\n show: false,\n message: '',\n type: SnackBarType.SUCCESS,\n });\n }}\n customBottom={20}\n />\n </View>\n </>\n );\n};\nexport default withBaseDispatchScreen(FormsScreen);\n\nconst transformErrorMessage = (error: AjvError[] | AjvError): string => {\n let errorMessage = '';\n if (Array.isArray(error)) {\n if (error.length === 1) {\n const e = error[0];\n if (e.name === 'required') {\n errorMessage = `${convertToPascalCaseWithSpace(\n e.property\n )} is required`;\n } else errorMessage = `${e.property} ${e.message}`;\n } else {\n errorMessage = 'Form Validation Failed';\n }\n } else {\n errorMessage = `${error.property} ${error.message}`;\n }\n\n return errorMessage;\n};\n\nfunction convertToPascalCaseWithSpace(inputString: string): string {\n // Capitalize the first letter of each word while preserving spaces\n return inputString\n .split(/[^a-zA-Z0-9]+/)\n .filter((word) => word.length > 0)\n .map((word, index) => capitalizeWord(word, index === 0))\n .join(' ');\n}\n\nfunction capitalizeWord(word: string, isFirstWord: boolean): string {\n if (isFirstWord) {\n return word.charAt(0).toUpperCase() + word.slice(1);\n } else {\n return word;\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,qDAAqD;AACnF,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAE7E,OAAOC,sBAAsB,MAAM,+CAA+C;AAClF,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,yBAAyB;AAC3E,SAASC,mBAAmB,EAAEC,WAAW,QAAQ,2BAA2B;AAC5E,SAASC,IAAI,QAAQ,cAAc;AACnC,OAAOC,cAAc,IACnBC,YAAY,QACP,yCAAyC;AAChD,OAAOC,eAAe,MAAM,oCAAoC;AAChE,SAASC,gBAAgB,IAAIC,gBAAgB,QAAQ,oDAAoD;AAGzG,MAAMC,WAAW,GAAGC,IAAA,IAQd;EAAA,IARe;IACnBC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAH,IAAA;EACC,MAAM,CAACI,QAAQ,EAAEC,WAAW,CAAC,GAAGtB,QAAQ,CAAC;IACvCuB,IAAI,EAAE,KAAK;IACXC,IAAI,EAAEZ,YAAY,CAACa,OAAO;IAC1BC,OAAO,EAAE;EACX,CAAC,CAAC;EACF,MAAMC,SAAS,GAAGT,KAAK,CAACU,MAAM,CAACtB,WAAW,CAACuB,WAAW,CAAC;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A,CAACH,IAAY,EAAEK,WAAoB,EAAU;EAClE,IAAIA,WAAW,EAAE;IACf,OAAOL,IAAI,CAACM,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,GAAGP,IAAI,CAACQ,KAAK,CAAC,CAAC,CAAC;EACrD,CAAC,MAAM;IACL,OAAOR,IAAI;EACb;AACF"}
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","withBaseDispatchScreen","FormGenerator","EntityCode","ExecutionTaskID","DispatchStateContainer","RouteParams","getDataFromNextState","handleDynamicValues","onTaskStart","View","SnackBarCustom","SnackBarType","callbackHandler","DispatchExecutor","dispatchExecutor","Helper","FormsScreen","_ref","route","navigation","baseETProps","helperInstance","getInstance","snackBar","setSnackBar","show","type","SUCCESS","message","nextState","params","NEXT_STATES","taskMeta","mergedObjectiveId","input","wfMeta","taskName","_input","setInputs","isSelfLoopTrue","setSelfLoop","ROOT_META_DATA","customEventsData","_phoneNumbers$value","contact","getObjectiveTaskDetails","statusFilter","phoneNumbers","getPhoneNumbers","value","length","meta","key","jsonSchemaProperties","JSON","parse","stringify","jsonSchema","properties","prev","dynamicInput","getSelfLoopBool","_mergedObjectiveId$","splitArr","split","isSelfLoopExistOnET","console","log","error","createElement","Fragment","_extends","isSelfLoop","onError","errorMessage","transformErrorMessage","FAILURE","onSubmitET","result","navigateToNextTask","success","FORMS","style","justifyContent","visible","onDismiss","customBottom","Array","isArray","e","name","convertToPascalCaseWithSpace","property","inputString","filter","word","map","index","capitalizeWord","join","isFirstWord","charAt","toUpperCase","slice"],"sources":["FormsScreen.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport withBaseDispatchScreen from './WithBaseDispatchScreen';\nimport { FormGenerator } from '../../components/executiontasks/ExecutionTasksIndex';\nimport { EntityCode, ExecutionTaskID } from '../../models/execTasks/ETConfig';\nimport type { BaseETProps } from '../../models/DispatchModels';\nimport DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';\nimport { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';\nimport { handleDynamicValues, onTaskStart } from '../../utils/ExecTaskUtils';\nimport { View } from 'react-native';\nimport SnackBarCustom, {\n SnackBarType,\n} from '../../components/widgets/SnackBarCustom';\nimport callbackHandler from '../../manager/sdk/callbacksHandler';\nimport { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';\nimport { AjvError } from '@rjsf/core';\nimport Helper from '../../utils/helper';\n\nconst FormsScreen = ({\n route,\n navigation,\n baseETProps,\n}: {\n route: any;\n navigation: any;\n baseETProps: BaseETProps;\n}) => {\n const helperInstance = Helper.getInstance();\n const [snackBar, setSnackBar] = useState({\n show: false,\n type: SnackBarType.SUCCESS,\n message: '',\n });\n const nextState = route.params[RouteParams.NEXT_STATES];\n const { taskMeta, mergedObjectiveId, input, wfMeta, taskName } =\n getDataFromNextState(nextState);\n const [_input, setInputs] = useState(input);\n const [isSelfLoopTrue, setSelfLoop] = useState(false);\n\n useEffect(() => {\n (async () => {\n onTaskStart(\n route.params[RouteParams.NEXT_STATES],\n route.params[RouteParams.ROOT_META_DATA].customEventsData\n );\n\n if (route.params[RouteParams.ROOT_META_DATA]) {\n //Call objectiveDetails fn and fetch sds ids\n const { contact } = await dispatchExecutor.getObjectiveTaskDetails(\n mergedObjectiveId[0],\n route.params[RouteParams.ROOT_META_DATA].statusFilter\n );\n\n // run callback to get corresponding phone numbers\n const phoneNumbers = await callbackHandler.getPhoneNumbers(contact);\n\n if (phoneNumbers && phoneNumbers.value?.length) {\n route.params[RouteParams.ROOT_META_DATA].meta[phoneNumbers.key] =\n phoneNumbers.value;\n }\n\n let jsonSchemaProperties = JSON.parse(\n JSON.stringify(_input.jsonSchema.properties)\n );\n\n jsonSchemaProperties = handleDynamicValues(\n jsonSchemaProperties,\n route.params[RouteParams.ROOT_META_DATA]\n );\n\n setInputs((prev: any) => {\n const dynamicInput = {\n ...prev,\n jsonSchema: {\n ...prev.jsonSchema,\n properties: jsonSchemaProperties,\n },\n };\n return dynamicInput;\n });\n }\n })();\n }, []);\n\n useEffect(() => {\n (async () => {\n await getSelfLoopBool();\n })();\n }, [])\n\n const getSelfLoopBool = async () => {\n try {\n const splitArr = mergedObjectiveId[0]?.split('#');\n const isSelfLoopTrue: boolean = await helperInstance.isSelfLoopExistOnET(splitArr[1], taskName)\n setSelfLoop(isSelfLoopTrue);\n console.log('isSelfLoopTrue code execution successful!');\n } catch (error) {\n console.log('isSelfLoopTrue code execution error', error);\n }\n }\n\n return (\n <>\n <FormGenerator\n {..._input}\n navigation={navigation}\n isSelfLoop={isSelfLoopTrue}\n mergedObjectiveId={mergedObjectiveId}\n taskMeta={taskMeta}\n onError={(error: AjvError[] | AjvError) => {\n const errorMessage = transformErrorMessage(error);\n\n setSnackBar({\n show: true,\n type: SnackBarType.FAILURE,\n message: errorMessage,\n });\n }}\n onSubmitET={async (result) => {\n await DispatchStateContainer.getInstance().navigateToNextTask(\n navigation,\n route,\n result,\n result.success,\n EntityCode.FORMS,\n ExecutionTaskID.FORMS,\n baseETProps,\n false\n );\n }}\n />\n <View style={{ justifyContent: 'flex-end' }}>\n <SnackBarCustom\n type={snackBar.type}\n message={`${snackBar.message}`}\n visible={snackBar.show}\n onDismiss={() => {\n setSnackBar({\n show: false,\n message: '',\n type: SnackBarType.SUCCESS,\n });\n }}\n customBottom={20}\n />\n </View>\n </>\n );\n};\nexport default withBaseDispatchScreen(FormsScreen);\n\nconst transformErrorMessage = (error: AjvError[] | AjvError): string => {\n let errorMessage = '';\n if (Array.isArray(error)) {\n if (error.length === 1) {\n const e = error[0];\n if (e.name === 'required') {\n errorMessage = `${convertToPascalCaseWithSpace(\n e.property\n )} is required`;\n } else errorMessage = `${e.property} ${e.message}`;\n } else {\n errorMessage = 'Form Validation Failed';\n }\n } else {\n errorMessage = `${error.property} ${error.message}`;\n }\n\n return errorMessage;\n};\n\nfunction convertToPascalCaseWithSpace(inputString: string): string {\n // Capitalize the first letter of each word while preserving spaces\n return inputString\n .split(/[^a-zA-Z0-9]+/)\n .filter((word) => word.length > 0)\n .map((word, index) => capitalizeWord(word, index === 0))\n .join(' ');\n}\n\nfunction capitalizeWord(word: string, isFirstWord: boolean): string {\n if (isFirstWord) {\n return word.charAt(0).toUpperCase() + word.slice(1);\n } else {\n return word;\n }\n}\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,qDAAqD;AACnF,SAASC,UAAU,EAAEC,eAAe,QAAQ,iCAAiC;AAE7E,OAAOC,sBAAsB,MAAM,+CAA+C;AAClF,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,yBAAyB;AAC3E,SAASC,mBAAmB,EAAEC,WAAW,QAAQ,2BAA2B;AAC5E,SAASC,IAAI,QAAQ,cAAc;AACnC,OAAOC,cAAc,IACnBC,YAAY,QACP,yCAAyC;AAChD,OAAOC,eAAe,MAAM,oCAAoC;AAChE,SAASC,gBAAgB,IAAIC,gBAAgB,QAAQ,oDAAoD;AAEzG,OAAOC,MAAM,MAAM,oBAAoB;AAEvC,MAAMC,WAAW,GAAGC,IAAA,IAQd;EAAA,IARe;IACnBC,KAAK;IACLC,UAAU;IACVC;EAKF,CAAC,GAAAH,IAAA;EACC,MAAMI,cAAc,GAAGN,MAAM,CAACO,WAAW,CAAC,CAAC;EAC3C,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGzB,QAAQ,CAAC;IACvC0B,IAAI,EAAE,KAAK;IACXC,IAAI,EAAEf,YAAY,CAACgB,OAAO;IAC1BC,OAAO,EAAE;EACX,CAAC,CAAC;EACF,MAAMC,SAAS,GAAGX,KAAK,CAACY,MAAM,CAACzB,WAAW,CAAC0B,WAAW,CAAC;EACvD,MAAM;IAAEC,QAAQ;IAAEC,iBAAiB;IAAEC,KAAK;IAAEC,MAAM;IAAEC;EAAS,CAAC,GAC5D9B,oBAAoB,CAACuB,SA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4BAA4B,CAC5CF,CAAC,CAACG,QACJ,CAAE,cAAa;MACjB,CAAC,MAAMlB,YAAY,GAAI,GAAEe,CAAC,CAACG,QAAS,IAAGH,CAAC,CAAC7D,OAAQ,EAAC;IACpD,CAAC,MAAM;MACL8C,YAAY,GAAG,wBAAwB;IACzC;EACF,CAAC,MAAM;IACLA,YAAY,GAAI,GAAEN,KAAK,CAACwB,QAAS,IAAGxB,KAAK,CAACxC,OAAQ,EAAC;EACrD;EAEA,OAAO8C,YAAY;AACrB,CAAC;AAED,SAASiB,4BAA4BA,CAACE,WAAmB,EAAU;EACjE;EACA,OAAOA,WAAW,CACf7B,KAAK,CAAC,eAAe,CAAC,CACtB8B,MAAM,CAAEC,IAAI,IAAKA,IAAI,CAAC7C,MAAM,GAAG,CAAC,CAAC,CACjC8C,GAAG,CAAC,CAACD,IAAI,EAAEE,KAAK,KAAKC,cAAc,CAACH,IAAI,EAAEE,KAAK,KAAK,CAAC,CAAC,CAAC,CACvDE,IAAI,CAAC,GAAG,CAAC;AACd;AAEA,SAASD,cAAcA,CAACH,IAAY,EAAEK,WAAoB,EAAU;EAClE,IAAIA,WAAW,EAAE;IACf,OAAOL,IAAI,CAACM,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,GAAGP,IAAI,CAACQ,KAAK,CAAC,CAAC,CAAC;EACrD,CAAC,MAAM;IACL,OAAOR,IAAI;EACb;AACF"}
|
|
@@ -7,30 +7,48 @@ import DispatchStateContainer from '../../manager/dispatch/DispatchStateContaine
|
|
|
7
7
|
import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
|
|
8
8
|
import { onTaskStart } from '../../utils/ExecTaskUtils';
|
|
9
9
|
import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
|
|
10
|
+
import Helper from '../../utils/helper';
|
|
10
11
|
const ImageCaptureScreen = _ref => {
|
|
11
12
|
let {
|
|
12
13
|
route,
|
|
13
14
|
navigation,
|
|
14
15
|
baseETProps
|
|
15
16
|
} = _ref;
|
|
17
|
+
const helperInstance = Helper.getInstance();
|
|
16
18
|
const nextState = route.params[RouteParams.NEXT_STATES];
|
|
17
19
|
const {
|
|
18
20
|
taskMeta,
|
|
19
21
|
mergedObjectiveId,
|
|
20
22
|
input,
|
|
21
|
-
wfMeta
|
|
23
|
+
wfMeta,
|
|
24
|
+
taskName
|
|
22
25
|
} = getDataFromNextState(nextState);
|
|
23
26
|
const firstInput = input;
|
|
24
27
|
const [inputs, setInputs] = useState(firstInput);
|
|
25
28
|
const [captureCount, setCaptureCount] = useState(0);
|
|
29
|
+
const [isSelfLoopTrue, setSelfLoop] = useState(false);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
(async () => {
|
|
32
|
+
onTaskStart(route.params[RouteParams.NEXT_STATES], route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
33
|
+
getMergedCaptureCount();
|
|
34
|
+
await getSelfLoopBool();
|
|
35
|
+
})();
|
|
36
|
+
}, []);
|
|
37
|
+
const getSelfLoopBool = async () => {
|
|
38
|
+
try {
|
|
39
|
+
var _mergedObjectiveId$;
|
|
40
|
+
const splitArr = (_mergedObjectiveId$ = mergedObjectiveId[0]) === null || _mergedObjectiveId$ === void 0 ? void 0 : _mergedObjectiveId$.split('#');
|
|
41
|
+
const isSelfLoopTrue = await helperInstance.isSelfLoopExistOnET(splitArr[1], taskName);
|
|
42
|
+
setSelfLoop(isSelfLoopTrue);
|
|
43
|
+
console.log('isSelfLoopTrue code execution successful!');
|
|
44
|
+
} catch (error) {
|
|
45
|
+
console.log('isSelfLoopTrue code execution error', error);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
26
48
|
const getMergedCaptureCount = async () => {
|
|
27
49
|
const count = await DispatchExecutor.getScannedShipmentsCount(mergedObjectiveId);
|
|
28
50
|
setCaptureCount(count.totalCount);
|
|
29
51
|
};
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
onTaskStart(route.params[RouteParams.NEXT_STATES], route.params[RouteParams.ROOT_META_DATA].customEventsData);
|
|
32
|
-
getMergedCaptureCount();
|
|
33
|
-
}, []);
|
|
34
52
|
useEffect(() => {
|
|
35
53
|
let _captureCountLimit = captureCount * input.captureCountLimit;
|
|
36
54
|
setInputs(prev => ({
|
|
@@ -40,6 +58,7 @@ const ImageCaptureScreen = _ref => {
|
|
|
40
58
|
}, [captureCount]);
|
|
41
59
|
return /*#__PURE__*/React.createElement(ImageCapture, _extends({}, inputs, {
|
|
42
60
|
captureCount: captureCount,
|
|
61
|
+
isSelfLoop: isSelfLoopTrue,
|
|
43
62
|
navigation: navigation,
|
|
44
63
|
taskMeta: taskMeta,
|
|
45
64
|
mergedObjectiveId: mergedObjectiveId
|