@os1-platform/dispatch-mobile 2.1.5 → 2.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/lib/commonjs/analytics/firebase/FirebaseLogging.js +15 -0
  2. package/lib/commonjs/analytics/firebase/FirebaseLogging.js.map +1 -0
  3. package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js +44 -0
  4. package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -0
  5. package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js +79 -0
  6. package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js.map +1 -0
  7. package/lib/commonjs/analytics/sentry/SentryModels.js +6 -0
  8. package/lib/commonjs/analytics/sentry/SentryModels.js.map +1 -0
  9. package/lib/commonjs/analytics/sentry/SentrySdkConstants.js +75 -0
  10. package/lib/commonjs/analytics/sentry/SentrySdkConstants.js.map +1 -0
  11. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +51 -0
  12. package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
  13. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +23 -0
  14. package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  15. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +16 -0
  16. package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
  17. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +52 -2
  18. package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  19. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -0
  20. package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
  21. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +33 -3
  22. package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
  23. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +16 -0
  24. package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  25. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +23 -0
  26. package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  27. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +41 -18
  28. package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
  29. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +14 -3
  30. package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  31. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +12 -1
  32. package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  33. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +18 -6
  34. package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  35. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +62 -5
  36. package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  37. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +23 -0
  38. package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  39. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +37 -0
  40. package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  41. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +23 -0
  42. package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  43. package/lib/commonjs/components/executiontasks/pickup/PickupET.js +16 -0
  44. package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
  45. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +44 -0
  46. package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  47. package/lib/commonjs/components/executiontasks/scan/ScanET.js +40 -1
  48. package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
  49. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +23 -0
  50. package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
  51. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +30 -0
  52. package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  53. package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
  54. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +9 -0
  55. package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  56. package/lib/commonjs/components/widgets/CancelOrderDialog.js +16 -0
  57. package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
  58. package/lib/commonjs/components/widgets/Card.js +17 -1
  59. package/lib/commonjs/components/widgets/Card.js.map +1 -1
  60. package/lib/commonjs/components/widgets/ModalWidget.js +22 -2
  61. package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -1
  62. package/lib/commonjs/components/widgets/SearchBar.js +9 -0
  63. package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
  64. package/lib/commonjs/components/widgets/SnackBarCustom.js +9 -0
  65. package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
  66. package/lib/commonjs/components/widgets/SplitTextInput.js +9 -0
  67. package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
  68. package/lib/commonjs/components/widgets/TabsComponent.js +12 -1
  69. package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
  70. package/lib/commonjs/index.js +46 -0
  71. package/lib/commonjs/index.js.map +1 -1
  72. package/lib/commonjs/manager/sdk/DispatchSdkCache.js +3 -2
  73. package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
  74. package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
  75. package/lib/commonjs/styles/executionTasks/CommonStyles.js +4 -4
  76. package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
  77. package/lib/commonjs/ui/screens/DeliverScreen.js +18 -1
  78. package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
  79. package/lib/commonjs/ui/screens/DoodleScreen.js +9 -0
  80. package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
  81. package/lib/commonjs/ui/screens/DropCashScreen.js +10 -1
  82. package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
  83. package/lib/commonjs/ui/screens/FormsScreen.js +7 -0
  84. package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
  85. package/lib/commonjs/ui/screens/GeofenceScreen.js +12 -0
  86. package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
  87. package/lib/commonjs/ui/screens/ImageCaptureScreen.js +9 -0
  88. package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
  89. package/lib/commonjs/ui/screens/PaymentScreen.js +9 -0
  90. package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
  91. package/lib/commonjs/ui/screens/PickupScreen.js +9 -0
  92. package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
  93. package/lib/commonjs/ui/screens/ValidateOTPScreen.js +12 -0
  94. package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
  95. package/lib/commonjs/utils/ExecTaskUtils.js +30 -13
  96. package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
  97. package/lib/commonjs/utils/Logger.js +54 -41
  98. package/lib/commonjs/utils/Logger.js.map +1 -1
  99. package/lib/module/analytics/firebase/FirebaseLogging.js +8 -0
  100. package/lib/module/analytics/firebase/FirebaseLogging.js.map +1 -0
  101. package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js +37 -0
  102. package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -0
  103. package/lib/module/analytics/sentry/SentryAnalyticsUtils.js +70 -0
  104. package/lib/module/analytics/sentry/SentryAnalyticsUtils.js.map +1 -0
  105. package/lib/module/analytics/sentry/SentryModels.js +2 -0
  106. package/lib/module/analytics/sentry/SentryModels.js.map +1 -0
  107. package/lib/module/analytics/sentry/SentrySdkConstants.js +69 -0
  108. package/lib/module/analytics/sentry/SentrySdkConstants.js.map +1 -0
  109. package/lib/module/components/executiontasks/cancellation/CancelET.js +51 -0
  110. package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
  111. package/lib/module/components/executiontasks/captureInput/CaptureText.js +23 -0
  112. package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
  113. package/lib/module/components/executiontasks/deliver/DeliverET.js +16 -0
  114. package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
  115. package/lib/module/components/executiontasks/deliver/SLDeliverET.js +52 -2
  116. package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
  117. package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -0
  118. package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
  119. package/lib/module/components/executiontasks/doodle/SignatureET.js +33 -3
  120. package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
  121. package/lib/module/components/executiontasks/dropCash/DropCashET.js +16 -0
  122. package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
  123. package/lib/module/components/executiontasks/dropCash/SLDropCash.js +23 -0
  124. package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
  125. package/lib/module/components/executiontasks/forms/FormGenerator.js +41 -18
  126. package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
  127. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +14 -3
  128. package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
  129. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +12 -1
  130. package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
  131. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +18 -6
  132. package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
  133. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +63 -6
  134. package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
  135. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +23 -0
  136. package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
  137. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +37 -0
  138. package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
  139. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +23 -0
  140. package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
  141. package/lib/module/components/executiontasks/pickup/PickupET.js +16 -0
  142. package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
  143. package/lib/module/components/executiontasks/pickup/SLPickupET.js +44 -0
  144. package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
  145. package/lib/module/components/executiontasks/scan/ScanET.js +40 -1
  146. package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
  147. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +23 -0
  148. package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
  149. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +30 -0
  150. package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
  151. package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
  152. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +9 -0
  153. package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
  154. package/lib/module/components/widgets/CancelOrderDialog.js +16 -0
  155. package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
  156. package/lib/module/components/widgets/Card.js +17 -1
  157. package/lib/module/components/widgets/Card.js.map +1 -1
  158. package/lib/module/components/widgets/ModalWidget.js +22 -2
  159. package/lib/module/components/widgets/ModalWidget.js.map +1 -1
  160. package/lib/module/components/widgets/SearchBar.js +9 -0
  161. package/lib/module/components/widgets/SearchBar.js.map +1 -1
  162. package/lib/module/components/widgets/SnackBarCustom.js +9 -0
  163. package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
  164. package/lib/module/components/widgets/SplitTextInput.js +9 -0
  165. package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
  166. package/lib/module/components/widgets/TabsComponent.js +12 -1
  167. package/lib/module/components/widgets/TabsComponent.js.map +1 -1
  168. package/lib/module/index.js +9 -0
  169. package/lib/module/index.js.map +1 -1
  170. package/lib/module/manager/sdk/DispatchSdkCache.js +3 -2
  171. package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
  172. package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
  173. package/lib/module/styles/executionTasks/CommonStyles.js +5 -5
  174. package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
  175. package/lib/module/ui/screens/DeliverScreen.js +18 -1
  176. package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
  177. package/lib/module/ui/screens/DoodleScreen.js +9 -0
  178. package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
  179. package/lib/module/ui/screens/DropCashScreen.js +10 -0
  180. package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
  181. package/lib/module/ui/screens/FormsScreen.js +7 -0
  182. package/lib/module/ui/screens/FormsScreen.js.map +1 -1
  183. package/lib/module/ui/screens/GeofenceScreen.js +12 -0
  184. package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
  185. package/lib/module/ui/screens/ImageCaptureScreen.js +9 -0
  186. package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
  187. package/lib/module/ui/screens/PaymentScreen.js +9 -0
  188. package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
  189. package/lib/module/ui/screens/PickupScreen.js +9 -0
  190. package/lib/module/ui/screens/PickupScreen.js.map +1 -1
  191. package/lib/module/ui/screens/ValidateOTPScreen.js +12 -0
  192. package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
  193. package/lib/module/utils/ExecTaskUtils.js +30 -13
  194. package/lib/module/utils/ExecTaskUtils.js.map +1 -1
  195. package/lib/module/utils/Logger.js +54 -39
  196. package/lib/module/utils/Logger.js.map +1 -1
  197. package/lib/typescript/analytics/firebase/FirebaseLogging.d.ts +2 -0
  198. package/lib/typescript/analytics/sentry/SentryAnalyticsSingleton.d.ts +11 -0
  199. package/lib/typescript/analytics/sentry/SentryAnalyticsUtils.d.ts +2 -0
  200. package/lib/typescript/analytics/sentry/SentryModels.d.ts +15 -0
  201. package/lib/typescript/analytics/sentry/SentrySdkConstants.d.ts +63 -0
  202. package/lib/typescript/index.d.ts +5 -0
  203. package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +2 -0
  204. package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +2 -0
  205. package/lib/typescript/models/execTasks/ETBaseModels.d.ts +25 -6
  206. package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +4 -4
  207. package/lib/typescript/utils/Logger.d.ts +0 -3
  208. package/package.json +5 -3
  209. package/src/analytics/firebase/FirebaseLogging.ts +13 -0
  210. package/src/analytics/sentry/SentryAnalyticsSingleton.ts +35 -0
  211. package/src/analytics/sentry/SentryAnalyticsUtils.ts +71 -0
  212. package/src/analytics/sentry/SentryModels.ts +18 -0
  213. package/src/analytics/sentry/SentrySdkConstants.ts +74 -0
  214. package/src/components/executiontasks/cancellation/CancelET.tsx +25 -2
  215. package/src/components/executiontasks/captureInput/CaptureText.tsx +15 -2
  216. package/src/components/executiontasks/deliver/DeliverET.tsx +8 -0
  217. package/src/components/executiontasks/deliver/SLDeliverET.tsx +22 -5
  218. package/src/components/executiontasks/display/DisplayModalET.tsx +8 -0
  219. package/src/components/executiontasks/doodle/SignatureET.tsx +23 -3
  220. package/src/components/executiontasks/dropCash/DropCashET.tsx +9 -0
  221. package/src/components/executiontasks/dropCash/SLDropCash.tsx +11 -0
  222. package/src/components/executiontasks/forms/FormGenerator.tsx +46 -29
  223. package/src/components/executiontasks/forms/widgets/DateTimeWidget.tsx +10 -3
  224. package/src/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.tsx +8 -1
  225. package/src/components/executiontasks/imageCapture/CaptureUtils.ts +17 -5
  226. package/src/components/executiontasks/imageCapture/ImageCapture.tsx +32 -5
  227. package/src/components/executiontasks/payments/completePayment/CompletePaymentET.tsx +11 -0
  228. package/src/components/executiontasks/payments/init/InitPaymentET.tsx +17 -0
  229. package/src/components/executiontasks/payments/processPayment/ProcessPaymentET.tsx +11 -0
  230. package/src/components/executiontasks/pickup/PickupET.tsx +8 -0
  231. package/src/components/executiontasks/pickup/SLPickupET.tsx +19 -0
  232. package/src/components/executiontasks/scan/ScanET.tsx +19 -1
  233. package/src/components/executiontasks/scan/sub_components/SummaryPage.tsx +11 -0
  234. package/src/components/executiontasks/validateOTP/ValidateOTPET.tsx +14 -0
  235. package/src/components/executiontasks/validateOTP/sub-components/OTPInput.tsx +2 -0
  236. package/src/components/executiontasks/verifyOtp/VerifyOtpET.tsx +5 -0
  237. package/src/components/widgets/CancelOrderDialog.tsx +7 -0
  238. package/src/components/widgets/Card.tsx +9 -1
  239. package/src/components/widgets/ModalWidget.tsx +16 -2
  240. package/src/components/widgets/SearchBar.tsx +6 -1
  241. package/src/components/widgets/SnackBarCustom.tsx +4 -0
  242. package/src/components/widgets/SplitTextInput.tsx +6 -0
  243. package/src/components/widgets/TabsComponent.tsx +8 -1
  244. package/src/index.tsx +8 -3
  245. package/src/manager/sdk/DispatchSdkCache.ts +2 -1
  246. package/src/models/execTasks/ETBaseModels.ts +20 -7
  247. package/src/styles/executionTasks/CommonStyles.ts +5 -5
  248. package/src/ui/screens/DeliverScreen.tsx +9 -0
  249. package/src/ui/screens/DoodleScreen.tsx +5 -0
  250. package/src/ui/screens/DropCashScreen.tsx +6 -0
  251. package/src/ui/screens/FormsScreen.tsx +3 -0
  252. package/src/ui/screens/GeofenceScreen.tsx +11 -1
  253. package/src/ui/screens/ImageCaptureScreen.tsx +5 -0
  254. package/src/ui/screens/PaymentScreen.tsx +5 -0
  255. package/src/ui/screens/PickupScreen.tsx +7 -1
  256. package/src/ui/screens/ValidateOTPScreen.tsx +10 -0
  257. package/src/utils/ExecTaskUtils.ts +36 -10
  258. package/src/utils/Logger.ts +50 -51
@@ -1,7 +1,9 @@
1
1
  import React, { useState } from 'react';
2
2
  import { View, TextInput, TouchableOpacity, StyleSheet } from 'react-native';
3
3
  import { EvilIcons, MaterialIcons } from '@expo/vector-icons';
4
-
4
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
5
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
6
+
5
7
  interface SearchBarProps {
6
8
  searchText: string;
7
9
  setSearchText: (searchText: string) => void;
@@ -18,6 +20,9 @@ const SearchBar = (props: SearchBarProps) => {
18
20
  const handleClear = () => {
19
21
  props.onClear();
20
22
  setSearchText('');
23
+ const cta = "Clear";
24
+ fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SEARCH_BAR_SCREEN, cta: cta });
25
+
21
26
  };
22
27
 
23
28
  return (
@@ -12,6 +12,8 @@ import {
12
12
  import { Surface, withTheme } from 'react-native-paper';
13
13
  import { AntDesign } from '@expo/vector-icons';
14
14
  import { Fonts } from '../../styles/executionTasks/CommonStyles';
15
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
16
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
15
17
 
16
18
  export interface SnackbarProps {
17
19
  visible: boolean;
@@ -152,6 +154,8 @@ const SnackbarCustom = ({
152
154
  color="white"
153
155
  onPress={() => {
154
156
  setHidden(true);
157
+ const cta = "Close";
158
+ fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SCAN_BAR_CUSTOM_SCREEN, cta: cta });
155
159
  }}
156
160
  />
157
161
  </View>
@@ -7,6 +7,8 @@ import {
7
7
  KeyboardTypeOptions,
8
8
  } from 'react-native';
9
9
  import React, { useRef, useState } from 'react';
10
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
11
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
10
12
 
11
13
  export interface SplitTextInputProps {
12
14
  styles: any;
@@ -30,11 +32,15 @@ const SplitTextInput = ({
30
32
  const [isInputBoxFocused, setIsInputBoxFocused] = useState(false);
31
33
 
32
34
  const handleOnPress = () => {
35
+ const cta = "Split Text Input";
36
+ fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SPLIT_TEXT_INPUT_SCREEN, cta: cta });
37
+
33
38
  setIsInputBoxFocused(true);
34
39
  inputRef.current.focus();
35
40
  };
36
41
 
37
42
  const handleOnBlur = () => {
43
+
38
44
  setIsInputBoxFocused(false);
39
45
  };
40
46
 
@@ -1,5 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
  import { View, TouchableOpacity, StyleSheet, ScrollView } from 'react-native';
3
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
4
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
3
5
 
4
6
  export interface Tab {
5
7
  title: string;
@@ -40,7 +42,12 @@ const TabsComponent = (props: TabsComponentProps) => {
40
42
  activeTab === tab.title && styles.activeTab,
41
43
  tab.titleStyle ? tab.titleStyle : {},
42
44
  ]}
43
- onPress={() => handleTabPress(tab.title)}
45
+ onPress={() => {
46
+ handleTabPress(tab.title)
47
+ const cta = tab.title;
48
+ fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.TAB_COMPONENT_SCREEN, cta: cta });
49
+ }
50
+ }
44
51
  >
45
52
  {props.renderTabItem(tab)}
46
53
  </TouchableOpacity>
package/src/index.tsx CHANGED
@@ -46,7 +46,10 @@ import {
46
46
  IDispatchExecutor,
47
47
  } from '@os1-platform/platform-coreos-execution-engine-sdk';
48
48
  import Helper from './utils/helper';
49
-
49
+ import SentryAnalyticsSingleton from './analytics/sentry/SentryAnalyticsSingleton';
50
+ import { fireEventWithScreenName } from './analytics/sentry/SentryAnalyticsUtils';
51
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from './analytics/sentry/SentrySdkConstants';
52
+ import { DispatchAndUserData, SentryEvent } from './analytics/sentry/SentryModels';
50
53
  export { DispatchExecutor, IDispatch, IDispatchExecutor };
51
54
  export { Storage, DispatchExecNavigator };
52
55
  export { ETSummary, CompleteSummary, ObjectiveSummary, DispatchSyncType };
@@ -71,12 +74,14 @@ export {
71
74
  LOG_TYPE,
72
75
  EventListener,
73
76
  };
74
-
77
+ //
75
78
  export { SyncMethod, JobObjectiveType };
76
79
  export type { ETaskSchema };
77
80
  export { ExecutionTask, CancelOrderDialog };
78
81
  export { DispatchSDKManager };
79
-
82
+ //
80
83
  export type { MTSStartRequest, MTSInitRequest };
81
84
  export { MtsSdk };
82
85
  export { Helper };
86
+ //sentry function export
87
+ export { SentryAnalyticsSingleton, fireEventWithScreenName, SeverityLevelValue, ScreenNameSdkConstants, SentryEventNameSdkConstants, DispatchAndUserData, SentryEvent};
@@ -17,7 +17,8 @@ export default class DispatchSdkCache {
17
17
  FIREBASE_REGISTRATION_TOKEN: 'dsc_firebase_token',
18
18
  REASON_FETCH_TIME: 'dsc_reasons_fetch_time',
19
19
  CURRENT_WORKING_TASK_ID: 'current_working_task_id',
20
- // TASK_START_TIME: 'task_start_time',
20
+ TASK_START_TIME: 'task_start_time',
21
+ TASK_START_LOCATION: 'task_start_location',
21
22
  };
22
23
  public async setObjectInCache(keyName: string, obj: any) {
23
24
  await this.storage.setObject(keyName, obj);
@@ -23,25 +23,38 @@ export type BaseETResponse = {
23
23
  /**
24
24
  * Epoch timestamp for the start of task
25
25
  */
26
- // startTime?: number;
26
+ startTime?: number;
27
27
  /**
28
28
  * Epoch timestamp for the end of task
29
29
  */
30
- // endTime?: number;
30
+ endTime?: number;
31
31
  /**
32
32
  * Location at start of task
33
33
  */
34
- // location?: {
34
+ startLocation?: {
35
35
  /**
36
36
  * Latitude
37
37
  */
38
- // latitude?: string;
38
+ latitude?: string;
39
39
  /**
40
40
  * Longitude
41
41
  */
42
- // longitude?: string;
43
- // };
44
- /**
42
+ longitude?: string;
43
+ };
44
+ /**
45
+ * Location at end of task
46
+ */
47
+ endLocation?: {
48
+ /**
49
+ * Latitude
50
+ */
51
+ latitude?: string;
52
+ /**
53
+ * Longitude
54
+ */
55
+ longitude?: string;
56
+ };
57
+ /**\\\
45
58
  * Unique identifier of user performing the action
46
59
  */
47
60
  userDetails: UserData;
@@ -1,4 +1,4 @@
1
- import { StyleSheet } from 'react-native';
1
+ import { StyleSheet,Platform } from 'react-native';
2
2
  import SdkColors, { ColorTheme } from '../SdkColors';
3
3
 
4
4
  export enum Fonts {
@@ -66,7 +66,7 @@ export const CommonStyles = StyleSheet.create({
66
66
  },
67
67
  nextButtonLabel: {
68
68
  color: '#ffffff',
69
- fontFamily: Fonts.IBMPlexSans_500Medium,
69
+ fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
70
70
  fontSize: 14,
71
71
  lineHeight: 20,
72
72
  textAlign: 'center',
@@ -79,7 +79,7 @@ export const CommonStyles = StyleSheet.create({
79
79
  },
80
80
  cancelButtonLabel: {
81
81
  color: SdkColors[ColorTheme.LIGHT].defaultColor,
82
- fontFamily: Fonts.IBMPlexSans_500Medium,
82
+ fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
83
83
  fontSize: 14,
84
84
  fontWeight: '500',
85
85
  lineHeight: 20,
@@ -92,7 +92,7 @@ export const CommonStyles = StyleSheet.create({
92
92
  },
93
93
  mainExitButtonLabel: {
94
94
  color: '#ffffff',
95
- fontFamily: Fonts.IBMPlexSans_500Medium,
95
+ fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
96
96
  fontSize: 14,
97
97
  fontWeight: '500',
98
98
  lineHeight: 20,
@@ -105,7 +105,7 @@ export const CommonStyles = StyleSheet.create({
105
105
  },
106
106
  exitButtonLabel: {
107
107
  color: SdkColors[ColorTheme.LIGHT].exitButton,
108
- fontFamily: Fonts.IBMPlexSans_500Medium,
108
+ fontFamily: Platform.OS === 'android' ? Fonts.IBMPlexSans_500Medium : 'IBMPlexSans-Medium',
109
109
  fontSize: 14,
110
110
  fontWeight: '500',
111
111
  lineHeight: 20,
@@ -16,6 +16,8 @@ import {
16
16
  } from '../../manager/syncmanager/constants';
17
17
  import { GO_BACK_EVENT_CODE } from '../../constants/constants';
18
18
  import Helper from '../../utils/helper';
19
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
20
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
19
21
 
20
22
  const DeliverScreen = ({
21
23
  navigation,
@@ -38,6 +40,13 @@ const DeliverScreen = ({
38
40
 
39
41
  useEffect(() => {
40
42
  (async () => {
43
+ //fire sentry event
44
+ if(input?.title != null && input?.title?.toString()?.length > 0 && input?.title?.toString()?.toLowerCase()?.includes("return")){
45
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.RETURN_ORDER_ET_OPENED, screenName:ScreenNameSdkConstants.RETURN_ORDER_ET_SCREEN});
46
+ }else{
47
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.DELIVER_ET_OPENED, screenName:ScreenNameSdkConstants.DELIVER_ET_SCREEN});
48
+ }
49
+ //
41
50
  onTaskStart(
42
51
  nextState,
43
52
  route.params[RouteParams.ROOT_META_DATA].customEventsData
@@ -10,6 +10,8 @@ import CancelOrderDialog from '../../components/widgets/CancelOrderDialog';
10
10
  import { onTaskStart } from '../../utils/ExecTaskUtils';
11
11
  import { GO_BACK_EVENT_CODE } from '../../constants/constants';
12
12
  import Helper from '../../utils/helper';
13
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
14
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
13
15
 
14
16
  const DoodleScreen = ({
15
17
  route,
@@ -36,6 +38,9 @@ const DoodleScreen = ({
36
38
 
37
39
  useEffect(() => {
38
40
  (async () => {
41
+ //fire sentry event
42
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.SIGNATURE_ET_OPENED, screenName:ScreenNameSdkConstants.SIGNATURE_ET_SCREEN});
43
+ //
39
44
  await getSelfLoopBool();
40
45
  })();
41
46
  }, [])
@@ -13,6 +13,9 @@ import { onTaskStart } from '../../utils/ExecTaskUtils';
13
13
  import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
14
14
  import { GO_BACK_EVENT_CODE } from '../../constants/constants';
15
15
  import Helper from '../../utils/helper';
16
+ //{ fireEventWithScreenName } from 'src/analytics/sentry/SentryAnalyticsUtils';
17
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
18
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
16
19
 
17
20
  // OLD CODE
18
21
  // function getTotalExpected(nextStates: any[]): ETAmount {
@@ -51,6 +54,9 @@ const DropCashScreen = ({
51
54
 
52
55
  useEffect(() => {
53
56
  (async () => {
57
+ //fire sentry event
58
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.RETURN_CASH_ET_OPENED, screenName:ScreenNameSdkConstants.RETURN_CASH_ET_SCREEN});
59
+ //
54
60
  onTaskStart(
55
61
  nextState,
56
62
  route.params[RouteParams.ROOT_META_DATA].customEventsData
@@ -14,6 +14,8 @@ import callbackHandler from '../../manager/sdk/callbacksHandler';
14
14
  import { DispatchExecutor as dispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
15
15
  import { AjvError } from '@rjsf/core';
16
16
  import Helper from '../../utils/helper';
17
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
18
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
17
19
 
18
20
  const FormsScreen = ({
19
21
  route,
@@ -38,6 +40,7 @@ const FormsScreen = ({
38
40
 
39
41
  useEffect(() => {
40
42
  (async () => {
43
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.FORM_ET_OPENED, screenName:ScreenNameSdkConstants.FORM_ET_SCREEN});
41
44
  onTaskStart(
42
45
  route.params[RouteParams.NEXT_STATES],
43
46
  route.params[RouteParams.ROOT_META_DATA].customEventsData
@@ -7,6 +7,8 @@ import type { BaseETProps } from '../../models/DispatchModels';
7
7
  import DispatchStateContainer from '../../manager/dispatch/DispatchStateContainer';
8
8
  import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
9
9
  import { onTaskStart } from '../../utils/ExecTaskUtils';
10
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
11
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
10
12
 
11
13
  const GeofenceScreen = ({
12
14
  route,
@@ -20,7 +22,15 @@ const GeofenceScreen = ({
20
22
  const nextState = route.params[RouteParams.NEXT_STATES];
21
23
  const { taskMeta, mergedObjectiveId, input, wfMeta } =
22
24
  getDataFromNextState(nextState);
23
- useEffect(() => {
25
+
26
+ useEffect(() => {
27
+ (async () => {
28
+ //fire sentry event
29
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.VERIFY_LOCATION_ET_OPENED, screenName:ScreenNameSdkConstants.VERIFY_LOCATION_ET_SCREEN});
30
+ })();
31
+ }, []);
32
+
33
+ useEffect(() => {
24
34
  onTaskStart(
25
35
  nextState,
26
36
  route.params[RouteParams.ROOT_META_DATA].customEventsData
@@ -8,6 +8,8 @@ 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
10
  import Helper from '../../utils/helper';
11
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
12
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
11
13
 
12
14
 
13
15
  const ImageCaptureScreen = ({
@@ -30,6 +32,9 @@ const ImageCaptureScreen = ({
30
32
 
31
33
  useEffect(() => {
32
34
  (async () => {
35
+ //fire sentry event
36
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.CAPTURE_IMAGE_ET_OPENED, screenName:ScreenNameSdkConstants.CAPTURE_IMAGE_ET_SCREEN});
37
+ //
33
38
  onTaskStart(
34
39
  route.params[RouteParams.NEXT_STATES],
35
40
  route.params[RouteParams.ROOT_META_DATA].customEventsData
@@ -21,6 +21,8 @@ import { useEffect } from 'react';
21
21
  import { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';
22
22
  import { GO_BACK_EVENT_CODE } from '../../constants/constants';
23
23
  import Helper from '../../utils/helper';
24
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
25
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
24
26
 
25
27
  const PaymentScreen = ({
26
28
  navigation,
@@ -45,6 +47,9 @@ const PaymentScreen = ({
45
47
 
46
48
  useEffect(() => {
47
49
  (async () => {
50
+ //fire sentry event
51
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.COLLECT_CASH_ET_OPENED, screenName:ScreenNameSdkConstants.COLLECT_CASH_ET_SCREEN});
52
+ //
48
53
  onTaskStart(
49
54
  route.params[RouteParams.NEXT_STATES],
50
55
  route.params[RouteParams.ROOT_META_DATA].customEventsData
@@ -10,6 +10,8 @@ import { onTaskStart } from '../../utils/ExecTaskUtils';
10
10
  import { DispatchExecutor } from '@os1-platform/platform-coreos-execution-engine-sdk';
11
11
  import SLPickupET from '../../components/executiontasks/pickup/SLPickupET';
12
12
  import Helper from '../../utils/helper';
13
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
14
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
13
15
 
14
16
  const PickupScreen = ({
15
17
  route,
@@ -21,7 +23,6 @@ const PickupScreen = ({
21
23
  baseETProps: BaseETProps;
22
24
  }) => {
23
25
  const helperInstance = Helper.getInstance();
24
-
25
26
  const nextState = route.params[RouteParams.NEXT_STATES];
26
27
  const { taskMeta, mergedObjectiveId, input, wfMeta, taskName } =
27
28
  getDataFromNextState(nextState);
@@ -31,8 +32,13 @@ const PickupScreen = ({
31
32
  const [items, setItems] = useState([]);
32
33
  const [isSelfLoopTrue, setSelfLoop] = useState(false);
33
34
 
35
+
36
+
34
37
  useEffect(() => {
35
38
  (async () => {
39
+ //fire sentry event
40
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.PICKUP_ET_OPENED, screenName:ScreenNameSdkConstants.PICKUP_ET_SCREEN});
41
+ //
36
42
  onTaskStart(
37
43
  nextState,
38
44
  route.params[RouteParams.ROOT_META_DATA].customEventsData
@@ -6,6 +6,8 @@ import DispatchStateContainer from '../../manager/dispatch/DispatchStateContaine
6
6
  import { RouteParams, getDataFromNextState } from '../uiConfig/RouteParams';
7
7
  import ValidateOTPET from '../../components/executiontasks/validateOTP/ValidateOTPET';
8
8
  import { handleDynamicValues, onTaskStart } from '../../utils/ExecTaskUtils';
9
+ import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
10
+ import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
9
11
 
10
12
  const ValidateOTPScreen = ({
11
13
  route,
@@ -37,6 +39,14 @@ const ValidateOTPScreen = ({
37
39
  }
38
40
  }, []);
39
41
 
42
+ useEffect(() => {
43
+ (async () => {
44
+ //fire sentry event
45
+ fireEventWithScreenName({severityLevel:SeverityLevelValue.LOG, eventName:SentryEventNameSdkConstants.VERIFY_OTP_ET_OPENED, screenName:ScreenNameSdkConstants.VERIFY_OTP_ET_SCREEN});
46
+ })();
47
+ }, []);
48
+
49
+
40
50
  return (
41
51
  <ValidateOTPET
42
52
  {..._input}
@@ -9,6 +9,7 @@ import dispatchEvent from '../events/EventDispatcher';
9
9
  import type { startEvent } from '../models/DispatchModels';
10
10
  import { JSONPath } from 'jsonpath-plus';
11
11
  import { IDispatch } from '@os1-platform/platform-coreos-execution-engine-sdk';
12
+ import { last } from 'lodash';
12
13
 
13
14
  export async function getBaseETResponse(
14
15
  entityCode: string,
@@ -18,14 +19,20 @@ export async function getBaseETResponse(
18
19
  mergedObjectiveIds: Array<string>,
19
20
  taskId: ExecutionTaskID
20
21
  ): Promise<BaseETResponse> {
21
- // let location = LocationManager.getInstance().getLastLocation();
22
+ let lastLocation = LocationManager.getInstance().getLastLocation();
23
+ console.log("getBaseETResponse:lastLocation:",JSON.stringify(lastLocation))
24
+
22
25
  let cache = DispatchSdkCache.getInstance();
23
26
  const sdkConfig = (await cache.getObjectFromCache(
24
27
  DispatchSdkCache.KEYS.SDK_CONFIG
25
28
  )) as DispatchSDKConfig;
26
- /* const startTime = await cache.getObjectFromCache(
29
+ const startTime = await cache.getObjectFromCache(
27
30
  DispatchSdkCache.KEYS.TASK_START_TIME
28
- ); */
31
+ );
32
+ const startLocation = await cache.getObjectFromCache(
33
+ DispatchSdkCache.KEYS.TASK_START_LOCATION
34
+ );
35
+ console.log("getBaseETResponse:startLocation:",startLocation);
29
36
  let baseResponse: BaseETResponse = {
30
37
  entityCode: entityCode,
31
38
  success: success,
@@ -33,19 +40,29 @@ export async function getBaseETResponse(
33
40
  reasonCode: reasonCode,
34
41
  id: taskId,
35
42
  meta: {
36
- /* location: {
37
- latitude: location.latitude,
38
- longitude: location.longitude,
39
- },*/
43
+ startLocation:{
44
+ latitude:startLocation.latitude,
45
+ longitude:startLocation.longitude
46
+ },
47
+ endLocation:{
48
+ latitude:lastLocation.latitude,
49
+ longitude:lastLocation.longitude
50
+ },
51
+ // location: {
52
+ // latitude: location.latitude,
53
+ // longitude: location.longitude,
54
+ // },
40
55
  userDetails: {
41
56
  id: sdkConfig?.userID ?? '',
42
57
  name: sdkConfig?.userName ?? '',
43
58
  },
44
- /*startTime: startTime ? parseInt(startTime) : Date.now(),
45
- endTime: Date.now(), */
59
+ startTime: startTime ? parseInt(startTime) : Date.now(),
60
+ endTime: Date.now(),
46
61
  },
47
62
  mergedObjectiveIds,
48
63
  };
64
+ console.log("getBaseETResponse:baseResponse:",JSON.stringify(baseResponse));
65
+
49
66
  return baseResponse;
50
67
  }
51
68
 
@@ -129,8 +146,17 @@ export function onTaskStart(
129
146
  const keys = DispatchSdkCache.KEYS;
130
147
  const cache = DispatchSdkCache.getInstance();
131
148
  (async () => {
132
- // await cache.setKeyInCache(keys.TASK_START_TIME, Date.now().toString());
149
+ let lastLocation = LocationManager.getInstance().getLastLocation();
150
+ let location = {
151
+ latitude: lastLocation.latitude,
152
+ longitude: lastLocation.longitude
153
+ }
154
+ console.log("onTaskStart:lastLocation:",location)
155
+ await cache.setKeyInCache(keys.TASK_START_TIME, Date.now().toString());
133
156
  await cache.setKeyInCache(keys.CURRENT_WORKING_TASK_ID, eventData.taskId);
157
+ await cache.setObjectInCache(keys.TASK_START_LOCATION, location);
158
+
159
+
134
160
  })();
135
161
  if (triggerEvent) {
136
162
  const customEtName = eventData.taskName;
@@ -1,7 +1,6 @@
1
1
  import DispatchSdkCache from '../manager/sdk/DispatchSdkCache';
2
2
  import type { DispatchSDKConfig } from '../models/sdk';
3
3
  import * as Sentry from '@sentry/react-native';
4
- import { Severity } from '@sentry/react-native';
5
4
  import crashlytics from '@react-native-firebase/crashlytics';
6
5
 
7
6
  export const enum LOG_TYPE {
@@ -43,7 +42,7 @@ class Logger {
43
42
  logType === LOG_TYPE.APP_WARNING
44
43
  ) {
45
44
  crashlytics().recordError(new Error(message), TAG);
46
- this.sendSentryException(new Error(message), TAG, logType);
45
+ //this.sendSentryException(new Error(message), TAG, logType);
47
46
  }
48
47
  }
49
48
 
@@ -54,57 +53,57 @@ class Logger {
54
53
  return Logger.instance;
55
54
  }
56
55
 
57
- public sendSentryException(exception: any, logTag: string, logType: string) {
58
- (async () => {
59
- try {
60
- Sentry.captureException(
61
- exception,
62
- await this.getUserConfig(Severity.Error, logType, logTag)
63
- );
64
- } catch (error: any) {}
65
- })();
66
- }
56
+ // public sendSentryException(exception: any, logTag: string, logType: string) {
57
+ // // (async () => {
58
+ // // try {
59
+ // // Sentry.captureException(
60
+ // // exception,
61
+ // // await this.getUserConfig(Severity.Error, logType, logTag)
62
+ // // );
63
+ // // } catch (error: any) {}
64
+ // // })();
65
+ // }
67
66
 
68
- public sendSentryMessage(message: string, logTag: string, logType: string) {
69
- (async () => {
70
- try {
71
- Sentry.captureMessage(
72
- message,
73
- await this.getUserConfig(Severity.Warning, logType, logTag)
74
- );
75
- } catch (error: any) {}
76
- })();
77
- }
67
+ // public sendSentryMessage(message: string, logTag: string, logType: string) {
68
+ // // (async () => {
69
+ // // try {
70
+ // // Sentry.captureMessage(
71
+ // // message,
72
+ // // await this.getUserConfig(Severity.Warning, logType, logTag)
73
+ // // );
74
+ // // } catch (error: any) {}
75
+ // // })();
76
+ // }
78
77
 
79
- private async getUserConfig(
80
- logLevel: Severity,
81
- logType: string,
82
- logTag: string
83
- ) {
84
- try {
85
- const config = (await DispatchSdkCache.getInstance().getObjectFromCache(
86
- DispatchSdkCache.KEYS.SDK_CONFIG
87
- )) as DispatchSDKConfig;
88
- const dspId = await DispatchSdkCache.getInstance().getKeyFromCache(
89
- DispatchSdkCache.KEYS.DISPATCH_ID
90
- );
91
- return {
92
- user: {
93
- id: config?.userID,
94
- username: config?.userName,
95
- },
96
- tags: {
97
- dispatchId: dspId,
98
- errorTime: Date.now(),
99
- logType: logType,
100
- logTag: logTag,
101
- },
102
- level: logLevel,
103
- };
104
- } catch (error: any) {
105
- return undefined;
106
- }
107
- }
78
+ // private async getUserConfig(
79
+ // logLevel: Severity,
80
+ // logType: string,
81
+ // logTag: string
82
+ // ) {
83
+ // try {
84
+ // const config = (await DispatchSdkCache.getInstance().getObjectFromCache(
85
+ // DispatchSdkCache.KEYS.SDK_CONFIG
86
+ // )) as DispatchSDKConfig;
87
+ // const dspId = await DispatchSdkCache.getInstance().getKeyFromCache(
88
+ // DispatchSdkCache.KEYS.DISPATCH_ID
89
+ // );
90
+ // return {
91
+ // user: {
92
+ // id: config?.userID,
93
+ // username: config?.userName,
94
+ // },
95
+ // tags: {
96
+ // dispatchId: dspId,
97
+ // errorTime: Date.now(),
98
+ // logType: logType,
99
+ // logTag: logTag,
100
+ // },
101
+ // level: logLevel,
102
+ // };
103
+ // } catch (error: any) {
104
+ // return undefined;
105
+ // }
106
+ // }
108
107
  }
109
108
 
110
109
  export default Logger;