@zum/flash-client
Advanced tools
Comparing version 0.0.40 to 0.0.41
@@ -9,5 +9,5 @@ "use strict"; | ||
/* | ||
* Subscribe to the flagged checkpoints for the given yardIds and date | ||
* For Vendor user, client should pass the yard id. If the yard id is not passed, user will be subscribed to selected yard. | ||
* For Enterprise user, client should pass empty array. User will be subscribed to all yards associated with district operators. | ||
* Subscribe to the flagged checkpoints for the given yardIds and date | ||
* For Vendor user, client should pass the yard id. If the yard id is not passed, user will be subscribed to selected yard. | ||
* For Enterprise user, client should pass empty array. User will be subscribed to all yards associated with district operators. | ||
*/ | ||
@@ -18,3 +18,3 @@ const subscribeToFlaggedCheckpoints = (yardIds, date, getFlaggedCheckpoints) => { | ||
const flaggedCheckpointsObservableSubscription = flaggedCheckpointsObservable.subscribe(flaggedCheckpointsObservableSubject); | ||
const flaggedCheckpointsResponseObservable = flaggedCheckpointsObservableSubject.pipe((0, operators_1.switchMap)((event) => { | ||
const flaggedCheckpointsResponseObservable = flaggedCheckpointsObservableSubject.pipe((0, operators_1.filter)((event) => !!event.data), (0, operators_1.switchMap)((event) => { | ||
return getFlaggedCheckpoints({ assigneeId: event.data?.assigneeId, date }).pipe((0, operators_1.map)((flaggedCheckpoints) => { | ||
@@ -21,0 +21,0 @@ return { assigneeId: event.data?.assigneeId, result: flaggedCheckpoints }; |
import { merge, Observable, Subject } from 'rxjs'; | ||
import { map, switchMap } from 'rxjs/operators'; | ||
import { filter, map, switchMap } from 'rxjs/operators'; | ||
import { FlashEvent } from '../../connect/types'; | ||
@@ -9,5 +9,5 @@ import { getSubscriptionManager } from '../init/initializer'; | ||
/* | ||
* Subscribe to the flagged checkpoints for the given yardIds and date | ||
* For Vendor user, client should pass the yard id. If the yard id is not passed, user will be subscribed to selected yard. | ||
* For Enterprise user, client should pass empty array. User will be subscribed to all yards associated with district operators. | ||
* Subscribe to the flagged checkpoints for the given yardIds and date | ||
* For Vendor user, client should pass the yard id. If the yard id is not passed, user will be subscribed to selected yard. | ||
* For Enterprise user, client should pass empty array. User will be subscribed to all yards associated with district operators. | ||
*/ | ||
@@ -28,2 +28,3 @@ export const subscribeToFlaggedCheckpoints = <T>( | ||
flaggedCheckpointsObservableSubject.pipe( | ||
filter((event) => !!event.data), | ||
switchMap((event: FlashEvent) => { | ||
@@ -30,0 +31,0 @@ return getFlaggedCheckpoints({ assigneeId: event.data?.assigneeId, date }).pipe( |
{ | ||
"name": "@zum/flash-client", | ||
"version": "0.0.40", | ||
"version": "0.0.41", | ||
"description": "Client for connecting to Zum Flash server", | ||
@@ -5,0 +5,0 @@ "license": "UNLICENSED", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
174756
115
1568