UNPKG

lml-main

Version:

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

20 lines 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var redux_observable_1 = require("redux-observable"); var actions_1 = require("../actions"); exports.postAllocationGroupSuccess = function (action$, store) { return action$.ofType(actions_1.POST_ALLOCATION_GROUP.SUCCESS, actions_1.POST_REALLOCATION_GROUP.SUCCESS, actions_1.POST_DEALLOCATION_GROUP.SUCCESS, actions_1.POST_TAG_GROUP.SUCCESS, actions_1.POST_UNTAG_GROUP.SUCCESS) .map(function (action) { var errors = action.result.errors || []; var jobs = action.result.jobs || []; var allocationBatch = tslib_1.__assign({}, action.result, { jobs: jobs.filter(function (job) { return errors.filter(function (error) { return job.refId === error.refId; }).length === 0; }) }); return actions_1.setAllocationGroupById(allocationBatch); }); }; exports.postAllocationGroupEpics = redux_observable_1.combineEpics(exports.postAllocationGroupSuccess); //# sourceMappingURL=post-allocation-group.js.map