From 623123588fe66fb3d03f62d5e7811be9de2a4c51 Mon Sep 17 00:00:00 2001 From: pavel-kuznetsov-hypertrack <78730314+pavel-kuznetsov-hypertrack@users.noreply.github.com> Date: Tue, 27 Aug 2024 17:21:43 +0300 Subject: [PATCH] Fix CHANGELOG (#38) --- CHANGELOG.md | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 241440c..3ccdb04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,41 +10,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Support for on-device geofencing via new `HyperTrack.orders["my_order"].isInsideGeofence` property - - To learn more about how to best use this new feature see our guide here: https://developer.hypertrack.com/docs/clock-in-out-tagging#verify-shift-presence-before-starting-work + - To learn more about how to best use this new feature see our guide here: [Verify shift presence before starting work](https://developer.hypertrack.com/docs/clock-in-out-tagging#verify-shift-presence-before-starting-work) Example use for worker clock in: ```typescript -function handlePresence( - isInsideResult: Result -) { +function handlePresence(isInsideResult: Result) { switch (isInsideResult.type) { - case "success": + case 'success': if (isInsideResult.value) { // allow worker to clock in for the shift } else { // "to clock in you must be at order destination" } break; - case "failure": - // resolve any tracking errors to obtain geofence presence + case 'failure': + // resolve any tracking errors to obtain geofence presence } } // check if a worker is inside an order's geofence -handlePresence(HyperTrack.orders.get("my_order").isInsideGeofence) +handlePresence(HyperTrack.orders.get('my_order').isInsideGeofence); // or, listen to order.isInsideGeofence changes -HyperTrack.subscribeToOrders((orders) => { - handlePresence(orders.get("my_order").isInsideGeofence) -}) +HyperTrack.subscribeToOrders((orders) => { + handlePresence(orders.get('my_order').isInsideGeofence); +}); ``` -### Added - -- Support for on-device geofencing via new `HyperTrack.orders["my_order"].isInsideGeofence` property - - To learn more about how to best use this new feature see our guide here: https://developer.hypertrack.com/docs/clock-in-out-tagging#verify-shift-presence-before-starting-work - ### Changed - Updated HyperTrack SDK iOS to [5.7.0](https://github.com/hypertrack/sdk-ios/releases/tag/5.7.0)