NTP-14132| function changes

This commit is contained in:
aishwarya.srivastava
2024-11-27 22:56:47 +05:30
parent c005a39bae
commit e27b78206e
8 changed files with 51 additions and 65 deletions

View File

@@ -57,6 +57,8 @@ import { getSyncUrl } from '@services/syncJsonDataToBe';
import { handleCheckAndUpdatePullToRefreshStateForNearbyCases } from '@screens/allCases/utils';
import { getWifiDetailsSyncUrl } from '@components/utlis/WifiDetails';
import useFirestoreUpdates from '@hooks/useFirestoreUpdates';
import { handlePostOperativeHourActivity } from '@screens/caseDetails/utils/postOperationalHourActions';
import { setPostOperationalHourRestrictions } from '@reducers/postOperationalHourRestrictionsSlice';
export enum FOREGROUND_TASKS {
GEOLOCATION = 'GEOLOCATION',
@@ -105,6 +107,7 @@ const TrackingComponent: React.FC<ITrackingComponent> = ({ children }) => {
const isTimeDifferenceLess = isTimeDifferenceWithinRange(timestamp, 5);
dispatch(setIsTimeSynced(isTimeDifferenceLess));
}
dispatch(setPostOperationalHourRestrictions(handlePostOperativeHourActivity(timestamp)));
} catch (e: any) {
logError(e, 'Error during fetching timestamp from server.');
}