lml-main
Version:
This is now a mono repository published into many standalone packages.
20 lines • 1.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var redux_observable_1 = require("redux-observable");
var cosmoui_1 = require("cosmoui");
var actions_1 = require("../actions");
var actions_2 = require("../../jobs/actions");
exports.postCourierActionSuccess = function (action$, store) {
return action$.ofType(actions_1.POST_COURIER_ACTION.SUCCESS)
.mergeMap(function (action) { return [
cosmoui_1.notificationSuccess('Job was successfully updated'),
// fetch the audit again
actions_2.fetchJobById(action.result.job.refId, 'jobAudit'),
]; });
};
exports.postCourierActionError = function (action$, store) {
return action$.ofType(actions_1.POST_COURIER_ACTION.ERROR)
.mapTo(cosmoui_1.notificationError('There was a problem updating the job. Please try again'));
};
exports.postCourierActionEpics = redux_observable_1.combineEpics(exports.postCourierActionSuccess, exports.postCourierActionError);
//# sourceMappingURL=post-courier-action.js.map