@zeniai/client-epic-state 5.2.62-beta0KB → 5.2.62-beta0MM

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/lib/entity/actualMatching/actualMatchingReducer.d.ts +3 -1
  2. package/lib/entity/actualMatching/actualMatchingReducer.js +11 -2
  3. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
  4. package/lib/entity/jeSchedules/jeSchedulesPayload.js +1 -0
  5. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -0
  6. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  7. package/lib/entity/snackbar/snackbarTypes.js +1 -1
  8. package/lib/entity/transaction/stateTypes/paymentType.d.ts +2 -2
  9. package/lib/entity/transaction/stateTypes/paymentType.js +1 -9
  10. package/lib/epic.d.ts +2 -4
  11. package/lib/epic.js +2 -6
  12. package/lib/esm/entity/actualMatching/actualMatchingReducer.js +9 -1
  13. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +1 -0
  14. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -1
  15. package/lib/esm/entity/transaction/stateTypes/paymentType.js +1 -9
  16. package/lib/esm/epic.js +2 -6
  17. package/lib/esm/index.js +7 -10
  18. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/actualMatching/ignoreActualMatchingSuggestionEpic.js +50 -0
  19. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/actualMatching/matchAndReverseAccrualsEpic.js +7 -3
  20. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/actualMatching/searchMatchTransactionsEpic.js +2 -23
  21. package/lib/esm/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +66 -35
  22. package/lib/esm/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +60 -64
  23. package/lib/esm/view/expenseAutomationView/types/actualMatchingViewState.js +15 -0
  24. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +30 -4
  25. package/lib/esm/view/transactionDetail/transactionDetailReducer.js +1 -174
  26. package/lib/index.d.ts +8 -12
  27. package/lib/index.js +57 -70
  28. package/lib/view/expenseAutomationView/epics/jeSchedule/actualMatching/ignoreActualMatchingSuggestionEpic.d.ts +10 -0
  29. package/lib/view/expenseAutomationView/epics/jeSchedule/actualMatching/ignoreActualMatchingSuggestionEpic.js +54 -0
  30. package/lib/view/expenseAutomationView/epics/jeSchedule/actualMatching/matchAndReverseAccrualsEpic.js +7 -3
  31. package/lib/view/expenseAutomationView/epics/jeSchedule/actualMatching/searchMatchTransactionsEpic.js +1 -22
  32. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  33. package/lib/view/expenseAutomationView/payload/actualMatchingPayload.d.ts +12 -1
  34. package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.d.ts +16 -8
  35. package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +67 -36
  36. package/lib/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.d.ts +20 -8
  37. package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.d.ts +7 -4
  38. package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +63 -64
  39. package/lib/view/expenseAutomationView/types/actualMatchingViewState.d.ts +20 -4
  40. package/lib/view/expenseAutomationView/types/actualMatchingViewState.js +18 -1
  41. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +1 -1
  42. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +30 -4
  43. package/lib/view/transactionDetail/transactionDetailReducer.d.ts +1 -37
  44. package/lib/view/transactionDetail/transactionDetailReducer.js +2 -176
  45. package/lib/view/transactionDetail/transactionDetailState.d.ts +0 -12
  46. package/package.json +1 -1
  47. package/lib/entity/transaction/stateTypes/printStatus.d.ts +0 -4
  48. package/lib/entity/transaction/stateTypes/printStatus.js +0 -15
  49. package/lib/esm/entity/transaction/stateTypes/printStatus.js +0 -11
  50. package/lib/esm/view/transactionDetail/createTransaction/createTransactionLocalDataHelper.js +0 -133
  51. package/lib/esm/view/transactionDetail/createTransaction/createTransactionPayload.js +0 -114
  52. package/lib/esm/view/transactionDetail/createTransaction/createTransactionSelector.js +0 -41
  53. package/lib/esm/view/transactionDetail/createTransaction/createTransactionState.js +0 -11
  54. package/lib/esm/view/transactionDetail/createTransaction/epics/createTransactionEpic.js +0 -58
  55. package/lib/esm/view/transactionDetail/createTransaction/epics/fetchVendorRecommendationsForCreateTransactionEpic.js +0 -55
  56. package/lib/esm/view/transactionDetail/createTransaction/epics/initializeCreateTransactionLocalDataEpic.js +0 -14
  57. package/lib/view/transactionDetail/createTransaction/createTransactionLocalDataHelper.d.ts +0 -51
  58. package/lib/view/transactionDetail/createTransaction/createTransactionLocalDataHelper.js +0 -148
  59. package/lib/view/transactionDetail/createTransaction/createTransactionPayload.d.ts +0 -82
  60. package/lib/view/transactionDetail/createTransaction/createTransactionPayload.js +0 -118
  61. package/lib/view/transactionDetail/createTransaction/createTransactionSelector.d.ts +0 -40
  62. package/lib/view/transactionDetail/createTransaction/createTransactionSelector.js +0 -48
  63. package/lib/view/transactionDetail/createTransaction/createTransactionState.d.ts +0 -81
  64. package/lib/view/transactionDetail/createTransaction/createTransactionState.js +0 -14
  65. package/lib/view/transactionDetail/createTransaction/epics/createTransactionEpic.d.ts +0 -9
  66. package/lib/view/transactionDetail/createTransaction/epics/createTransactionEpic.js +0 -62
  67. package/lib/view/transactionDetail/createTransaction/epics/fetchVendorRecommendationsForCreateTransactionEpic.d.ts +0 -20
  68. package/lib/view/transactionDetail/createTransaction/epics/fetchVendorRecommendationsForCreateTransactionEpic.js +0 -59
  69. package/lib/view/transactionDetail/createTransaction/epics/initializeCreateTransactionLocalDataEpic.d.ts +0 -12
  70. package/lib/view/transactionDetail/createTransaction/epics/initializeCreateTransactionLocalDataEpic.js +0 -18
@@ -1,81 +0,0 @@
1
- import { Amount } from '../../../commonStateTypes/amount';
2
- import { ID } from '../../../commonStateTypes/common';
3
- import { RecommendationWithCOT } from '../../../commonStateTypes/recommendationBase';
4
- import { PaymentType } from '../../../entity/transaction/stateTypes/paymentType';
5
- import { PrintStatus } from '../../../entity/transaction/stateTypes/printStatus';
6
- import { TransactionCategory, TransactionType } from '../../../entity/transaction/stateTypes/transactionType';
7
- import { ZeniDate } from '../../../zeniDayJS';
8
- /**
9
- * The transaction types the Create Transaction flow can originate. A narrow subset of
10
- * TransactionType -- everything else is read-only and arrives via sync.
11
- */
12
- export declare const ALL_CREATABLE_TRANSACTION_TYPES: readonly ["expense", "check", "credit_card_credit", "transfer", "journal_entry"];
13
- export type CreatableTransactionType = (typeof ALL_CREATABLE_TRANSACTION_TYPES)[number];
14
- /**
15
- * The wire shape the create endpoint expects for a check's remit-to address. Deliberately not
16
- * the CES AddressPayload, which carries `street: string[]` plus address_id/create_time/
17
- * update_time that the create endpoint does not accept.
18
- */
19
- export interface RemitToAddress {
20
- city?: string;
21
- country?: string;
22
- line1?: string;
23
- postalCode?: string;
24
- state?: string;
25
- }
26
- export interface CreateTransactionLineLocalData {
27
- /** Client-side row key only -- never sent. */
28
- id: string;
29
- accountName?: string;
30
- accountQboId?: ID;
31
- amount?: Amount;
32
- classId?: ID;
33
- /**
34
- * Tracked per field, not per line. A line can have a hand-picked account and a prefilled
35
- * class at the same time, and clearing the vendor must undo only the latter.
36
- */
37
- isAccountPreFilled?: boolean;
38
- isClassPreFilled?: boolean;
39
- lineDescription?: string;
40
- /** journal_entry only. */
41
- postingType?: TransactionCategory;
42
- projectId?: ID;
43
- /**
44
- * Backs the "Recommended" group in the category/class dropdowns. Carries the COT shape the
45
- * line-table row already expects, with empty cot/reasoning -- chain-of-thought needs an
46
- * existing transaction, which a create does not have.
47
- */
48
- recommendationsWithCOT?: RecommendationWithCOT[];
49
- /** journal_entry only -- the per-line name. */
50
- vendorQboId?: ID;
51
- }
52
- export interface CreateTransactionLocalData {
53
- /** Empty for transfer, which has no lines at all. */
54
- lines: CreateTransactionLineLocalData[];
55
- transactionType: CreatableTransactionType;
56
- /** journal_entry reference number. */
57
- documentId?: string;
58
- /** check / credit_card_credit reference number. */
59
- documentNumber?: string;
60
- /** transfer */
61
- fromAccountId?: ID;
62
- paymentType?: PaymentType;
63
- /** check only. */
64
- printStatus?: PrintStatus;
65
- qboAccountId?: ID;
66
- /** check only. */
67
- remitToAddress?: RemitToAddress;
68
- toAccountId?: ID;
69
- /** transfer only -- every other type derives its total from the lines. */
70
- totalAmount?: Amount;
71
- transactionDate?: ZeniDate;
72
- transactionMemo?: string;
73
- vendorId?: ID;
74
- }
75
- export type CreateTransactionLocalDataByType = Record<CreatableTransactionType, CreateTransactionLocalData>;
76
- /**
77
- * Type-level guarantee that CreatableTransactionType stays a subset of TransactionType. If a
78
- * value is ever added here that the entity layer does not know about, this line fails to
79
- * compile rather than failing at the payload boundary.
80
- */
81
- export type CreatableTransactionTypeIsTransactionType = CreatableTransactionType extends TransactionType ? true : never;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ALL_CREATABLE_TRANSACTION_TYPES = void 0;
4
- /**
5
- * The transaction types the Create Transaction flow can originate. A narrow subset of
6
- * TransactionType -- everything else is read-only and arrives via sync.
7
- */
8
- exports.ALL_CREATABLE_TRANSACTION_TYPES = [
9
- 'expense',
10
- 'check',
11
- 'credit_card_credit',
12
- 'transfer',
13
- 'journal_entry',
14
- ];
@@ -1,9 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
4
- import { updateTransaction } from '../../../../entity/transaction/transactionReducer';
5
- import { RootState } from '../../../../rootStateTypes';
6
- import { ZeniAPI } from '../../../../zeniAPI';
7
- import { createTransaction, createTransactionSuccessOrFailure, initializeTransactionDetailLocalData, resetCreateTransactionLocalData } from '../../transactionDetailReducer';
8
- export type ActionType = ReturnType<typeof createTransaction> | ReturnType<typeof createTransactionSuccessOrFailure> | ReturnType<typeof resetCreateTransactionLocalData> | ReturnType<typeof initializeTransactionDetailLocalData> | ReturnType<typeof updateTransaction> | ReturnType<typeof openSnackbar>;
9
- export declare const createTransactionEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createTransactionEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
7
- const transactionIDPayload_1 = require("../../../../entity/transaction/payloadTypes/transactionIDPayload");
8
- const transactionReducer_1 = require("../../../../entity/transaction/transactionReducer");
9
- const responsePayload_1 = require("../../../../responsePayload");
10
- const transactionDetailReducer_1 = require("../../transactionDetailReducer");
11
- const transactionDetailState_1 = require("../../transactionDetailState");
12
- const createTransactionPayload_1 = require("../createTransactionPayload");
13
- const failureActions = (message, status) => [
14
- (0, transactionDetailReducer_1.createTransactionSuccessOrFailure)('Error', undefined, status),
15
- (0, snackbarReducer_1.openSnackbar)({
16
- messageSection: 'create_transaction',
17
- messageText: 'failed',
18
- type: 'error',
19
- // This variable is how the server's own message reaches the user. Per-type required
20
- // fields live in the QBO entity classes, so a rejection comes back as a QBO error with no
21
- // field name -- the message text is the only useful content we get.
22
- variables: [{ variableName: '_api-error_', variableValue: message }],
23
- }),
24
- ];
25
- const createTransactionEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(transactionDetailReducer_1.createTransaction.match), (0, operators_1.mergeMap)((action) => {
26
- const { transactionType } = action.payload;
27
- const state = state$.value;
28
- const localData = state.transactionDetailState.createTransactionsState
29
- .newTransactionState[transactionType];
30
- const payload = (0, createTransactionPayload_1.prepareCreateTransactionPayload)(state, localData);
31
- return zeniAPI
32
- .postAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/transactions/manage`, payload)
33
- .pipe((0, operators_1.mergeMap)((response) => {
34
- if (!(0, responsePayload_1.isSuccessResponse)(response) || response.data == null) {
35
- return (0, rxjs_1.from)(failureActions(response.status.message, response.status));
36
- }
37
- const created = response.data.transactions[0];
38
- if (created == null) {
39
- return (0, rxjs_1.from)(failureActions('Transaction was created but returned no details.', (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Create transaction returned an empty transactions array.')));
40
- }
41
- const newTransactionId = (0, transactionIDPayload_1.toTransactionID)(created);
42
- // The write is QBO-only: transaction_write_handler.py touches no local storage, and
43
- // Zeni's mirror is populated by the delta sync that runs afterwards. Refetching here
44
- // would come back without the new row, so the 200 body is inserted optimistically
45
- // instead -- the same approach createTransferEntryEpic takes.
46
- return (0, rxjs_1.from)([
47
- (0, transactionReducer_1.updateTransaction)((0, transactionDetailState_1.getTransactionDetailKey)(newTransactionId), created),
48
- (0, transactionDetailReducer_1.initializeTransactionDetailLocalData)({
49
- transactionId: newTransactionId,
50
- vendorId: created.vendor_id ?? undefined,
51
- }),
52
- (0, transactionDetailReducer_1.createTransactionSuccessOrFailure)('Completed', newTransactionId),
53
- (0, transactionDetailReducer_1.resetCreateTransactionLocalData)(transactionType),
54
- (0, snackbarReducer_1.openSnackbar)({
55
- messageSection: 'create_transaction',
56
- messageText: 'success',
57
- type: 'success',
58
- }),
59
- ]);
60
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.from)(failureActions(JSON.stringify(error), (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Create Transaction REST API call errored out ${JSON.stringify(error)}`)))));
61
- }));
62
- exports.createTransactionEpic = createTransactionEpic;
@@ -1,20 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { RootState } from '../../../../rootStateTypes';
4
- import { fetchRecommendationByEntityId, fetchRecommendationByEntityName, indicateReadyToInitializeRecommendation } from '../../../recommendation/recommendationReducer';
5
- import { clearRecommendationsForCreateTransactionLines, fetchVendorRecommendationsForCreateTransaction, setRecommendationsForCreateTransactionLines } from '../../transactionDetailReducer';
6
- export type ActionType = ReturnType<typeof fetchVendorRecommendationsForCreateTransaction> | ReturnType<typeof setRecommendationsForCreateTransactionLines> | ReturnType<typeof clearRecommendationsForCreateTransactionLines> | ReturnType<typeof fetchRecommendationByEntityId> | ReturnType<typeof fetchRecommendationByEntityName> | ReturnType<typeof indicateReadyToInitializeRecommendation>;
7
- /**
8
- * On vendor select, populates the category/class dropdowns from that vendor's recommendations.
9
- *
10
- * Deliberately NOT the detail page's fetchEntityRecommendationsForLineUpdate: that one sends
11
- * transaction_id / line_ids and writes into transactionDetailById[key], which no-ops when the
12
- * entry does not exist. A transaction being created has neither.
13
- *
14
- * Two differences from the reimbursement epic this is modelled on:
15
- * 1. the wait filters on the matching entityIdOrName before take(1), so an unrelated
16
- * recommendation landing first cannot satisfy this request, and
17
- * 2. switchMap, so changing the vendor again cancels the earlier wait rather than letting a
18
- * stale result overwrite the newer vendor's prefill.
19
- */
20
- export declare const fetchVendorRecommendationsForCreateTransactionEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
@@ -1,59 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchVendorRecommendationsForCreateTransactionEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
7
- const recommendationReducer_1 = require("../../../recommendation/recommendationReducer");
8
- const recommendationSelector_1 = require("../../../recommendation/recommendationSelector");
9
- const transactionDetailReducer_1 = require("../../transactionDetailReducer");
10
- /**
11
- * The entity-level recommendation fetch, keyed by whatever identifier the endpoint can resolve.
12
- *
13
- * A vendor that has not synced to QBO carries `qboId === name`; the id endpoint has nothing to
14
- * look up in that case, so the by-name variant is used instead.
15
- */
16
- const toEntityIdOrName = (entity) => entity.qboId !== '' && entity.qboId !== entity.name
17
- ? entity.qboId
18
- : entity.name;
19
- const isUnsyncedVendor = (entity) => entity.qboId === '' || entity.qboId === entity.name;
20
- /**
21
- * On vendor select, populates the category/class dropdowns from that vendor's recommendations.
22
- *
23
- * Deliberately NOT the detail page's fetchEntityRecommendationsForLineUpdate: that one sends
24
- * transaction_id / line_ids and writes into transactionDetailById[key], which no-ops when the
25
- * entry does not exist. A transaction being created has neither.
26
- *
27
- * Two differences from the reimbursement epic this is modelled on:
28
- * 1. the wait filters on the matching entityIdOrName before take(1), so an unrelated
29
- * recommendation landing first cannot satisfy this request, and
30
- * 2. switchMap, so changing the vendor again cancels the earlier wait rather than letting a
31
- * stale result overwrite the newer vendor's prefill.
32
- */
33
- const fetchVendorRecommendationsForCreateTransactionEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(transactionDetailReducer_1.fetchVendorRecommendationsForCreateTransaction.match), (0, operators_1.switchMap)((action) => {
34
- const { transactionType, entity, lineIds } = action.payload;
35
- if (entity == null) {
36
- return (0, rxjs_1.of)((0, transactionDetailReducer_1.clearRecommendationsForCreateTransactionLines)(transactionType, lineIds));
37
- }
38
- const entityIdOrName = toEntityIdOrName(entity);
39
- const state = state$.value;
40
- const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state);
41
- const cached = (0, recommendationSelector_1.getRecommendationsForEntity)(state, entityIdOrName, 'vendor');
42
- // Cache hit: apply straight away, no request and no wait.
43
- if (cached.fetchState === 'Completed') {
44
- return (0, rxjs_1.of)((0, transactionDetailReducer_1.setRecommendationsForCreateTransactionLines)(transactionType, lineIds, cached.recommendations ?? [], isAccountingClassesEnabled));
45
- }
46
- const waitThenApply = actions$.pipe((0, operators_1.filter)(recommendationReducer_1.indicateReadyToInitializeRecommendation.match), (0, operators_1.filter)((ready) => ready.payload.entityType === 'vendor' &&
47
- ready.payload.entityIdOrName === entityIdOrName), (0, operators_1.take)(1), // don't listen forever! IMPORTANT!
48
- (0, operators_1.mergeMap)(() => (0, rxjs_1.from)([
49
- (0, transactionDetailReducer_1.setRecommendationsForCreateTransactionLines)(transactionType, lineIds, (0, recommendationSelector_1.getRecommendationsForEntity)(state$.value, entityIdOrName, 'vendor').recommendations ?? [], (0, tenantSelector_1.getIsAccountingClassesEnabled)(state$.value)),
50
- ])));
51
- // A fetch already in flight needs no second request, only the wait.
52
- if (cached.fetchState === 'In-Progress') {
53
- return waitThenApply;
54
- }
55
- return (0, rxjs_1.concat)((0, rxjs_1.of)((isUnsyncedVendor(entity)
56
- ? (0, recommendationReducer_1.fetchRecommendationByEntityName)(entityIdOrName, 'vendor')
57
- : (0, recommendationReducer_1.fetchRecommendationByEntityId)(entityIdOrName, 'vendor'))), waitThenApply);
58
- }));
59
- exports.fetchVendorRecommendationsForCreateTransactionEpic = fetchVendorRecommendationsForCreateTransactionEpic;
@@ -1,12 +0,0 @@
1
- import { ActionsObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { initializeCreateTransactionLocalData, updateCreateTransactionLocalData } from '../../transactionDetailReducer';
4
- export type ActionType = ReturnType<typeof initializeCreateTransactionLocalData> | ReturnType<typeof updateCreateTransactionLocalData>;
5
- /**
6
- * Seeds the working copy when the Create form opens: today's date, the default line set for the
7
- * type, and a check's mandatory payment_type.
8
- *
9
- * Mirrors the `else` branch of initializeScheduleDetailLocalDataEpic -- a create has no
10
- * existing entity to read from, so there is nothing to merge, only defaults to apply.
11
- */
12
- export declare const initializeCreateTransactionLocalDataEpic: (actions$: ActionsObservable<ActionType>) => Observable<ActionType>;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initializeCreateTransactionLocalDataEpic = void 0;
4
- const operators_1 = require("rxjs/operators");
5
- const transactionDetailReducer_1 = require("../../transactionDetailReducer");
6
- const createTransactionLocalDataHelper_1 = require("../createTransactionLocalDataHelper");
7
- /**
8
- * Seeds the working copy when the Create form opens: today's date, the default line set for the
9
- * type, and a check's mandatory payment_type.
10
- *
11
- * Mirrors the `else` branch of initializeScheduleDetailLocalDataEpic -- a create has no
12
- * existing entity to read from, so there is nothing to merge, only defaults to apply.
13
- */
14
- const initializeCreateTransactionLocalDataEpic = (actions$) => actions$.pipe((0, operators_1.filter)(transactionDetailReducer_1.initializeCreateTransactionLocalData.match), (0, operators_1.map)((action) => {
15
- const { transactionType } = action.payload;
16
- return (0, transactionDetailReducer_1.updateCreateTransactionLocalData)(transactionType, (0, createTransactionLocalDataHelper_1.getSeededCreateTransactionLocalData)(transactionType));
17
- }));
18
- exports.initializeCreateTransactionLocalDataEpic = initializeCreateTransactionLocalDataEpic;