UNPKG

lml-main

Version:

This is now a mono repository published into many standalone packages.

23 lines 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var redux_observable_1 = require("redux-observable"); var cosmoui_1 = require("cosmoui"); var actions_1 = require("../actions"); exports.getLocationByIdSuccess = function (action$, store) { return action$.ofType(actions_1.FETCH_LOCATION_BY_OBJECT_ID.SUCCESS) .map(function (action) { return actions_1.setLocationByObjectId(action.result); }); }; exports.getLocationByIdBatchSuccess = function (action$, store) { return action$.ofType(actions_1.FETCH_LOCATION_BY_OBJECT_ID_BATCH.SUCCESS) .map(function (action) { return actions_1.setLocationByObjectIdBatch(action.result.locations); }); }; exports.getLocationByIdError = function (action$, store) { return action$.ofType(actions_1.FETCH_LOCATION_BY_OBJECT_ID.ERROR, actions_1.FETCH_LOCATION_BY_OBJECT_ID_BATCH.ERROR) .mapTo(cosmoui_1.notificationError('There was a problem fetching location data. Please refresh')); }; exports.getLocationByIdEpics = redux_observable_1.combineEpics(exports.getLocationByIdSuccess, exports.getLocationByIdBatchSuccess, exports.getLocationByIdError); //# sourceMappingURL=get-location-by-id.js.map