@zeniai/client-epic-state 5.2.10 → 5.2.11-betaRD1
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.
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSection.d.ts +0 -0
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSection.js +1 -0
- package/lib/entity/invoicing/coupon/couponConstants.d.ts +11 -0
- package/lib/entity/invoicing/coupon/couponConstants.js +29 -0
- package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +1 -0
- package/lib/entity/jeSchedules/jeScheduleHelper.js +7 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +66 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +135 -0
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +4 -2
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +30 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +11 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +38 -3
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +79 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +24 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +88 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +2 -0
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +2 -0
- package/lib/epic.d.ts +9 -1
- package/lib/epic.js +16 -0
- package/lib/esm/commonStateTypes/selectorTypes/pickAndMergeForecastSection.js +1 -0
- package/lib/esm/entity/invoicing/coupon/couponConstants.js +26 -0
- package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +6 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +135 -1
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +30 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +36 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +78 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
- package/lib/esm/epic.js +16 -0
- package/lib/esm/index.js +14 -8
- package/lib/esm/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +6 -2
- package/lib/esm/view/companyMonthEndReportView/companyMonthEndReportViewState.js +4 -0
- package/lib/esm/view/companyMonthEndReportView/epics/saveCompanyMonthEndReportEpic.js +10 -6
- package/lib/esm/view/companyMonthEndReportView/epics/sendCompanyMonthEndReportEpic.js +9 -5
- package/lib/esm/view/companyMonthEndReportView/monthEndTemplateData.js +32 -0
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +6 -3
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +41 -5
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +45 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +14 -2
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +99 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +25 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +110 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +79 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +139 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +106 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +22 -0
- package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +140 -0
- package/lib/esm/view/expenseAutomationView/payload/jeSchedulesPayload.js +55 -0
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +306 -29
- package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +1 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +106 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +294 -22
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +5 -6
- package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.js +25 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.js +15 -0
- package/lib/esm/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
- package/lib/esm/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +7 -2
- package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +5 -3
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +18 -0
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +18 -0
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +18 -0
- package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.js +16 -0
- package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.js +1 -0
- package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.js +60 -0
- package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.js +12 -0
- package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.js +1 -0
- package/lib/index.d.ts +19 -13
- package/lib/index.js +91 -47
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewPayload.d.ts +8 -0
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +6 -2
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +6 -2
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewState.d.ts +2 -0
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewState.js +4 -0
- package/lib/view/companyMonthEndReportView/epics/saveCompanyMonthEndReportEpic.js +10 -6
- package/lib/view/companyMonthEndReportView/epics/sendCompanyMonthEndReportEpic.js +9 -5
- package/lib/view/companyMonthEndReportView/monthEndTemplateData.d.ts +16 -0
- package/lib/view/companyMonthEndReportView/monthEndTemplateData.js +36 -0
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +6 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +3 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +39 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.d.ts +20 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +49 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +14 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +103 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +29 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +45 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +114 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +83 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.d.ts +12 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +146 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.d.ts +64 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +110 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +26 -0
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +36 -0
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +145 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +72 -3
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +58 -1
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +91 -12
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +308 -29
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +42 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +36 -7
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +21 -0
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +112 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +34 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +302 -21
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +82 -8
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -8
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.js +29 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.d.ts +6 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.js +19 -0
- package/lib/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
- package/lib/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +7 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.d.ts +4 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +5 -3
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.d.ts +8 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +22 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.d.ts +8 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +22 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.d.ts +8 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +22 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.d.ts +13 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.js +20 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.d.ts +11 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.js +2 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.d.ts +7 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.js +64 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.d.ts +12 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.js +15 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.d.ts +9 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.js +2 -0
- package/package.json +1 -1
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
2
|
+
import { Amount } from '../../../commonStateTypes/amount';
|
|
2
3
|
import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
|
|
3
4
|
import { Recommendation } from '../../../commonStateTypes/recommendationBase';
|
|
4
5
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
5
|
-
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
6
|
+
import { MonthYearPeriodId, ScheduleDaysOfMonth } from '../../../commonStateTypes/timePeriod';
|
|
6
7
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
7
|
-
import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
8
|
+
import { JEOneTimeAccrualKey, JEScheduleKey, JEScheduleTransactionKey, ScheduleJournalEntryStatusCodeType, ScheduleTransactionID, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
8
9
|
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
9
|
-
|
|
10
|
+
import { ZeniDate } from '../../../zeniDayJS';
|
|
11
|
+
import { JETransactionLink } from '../../scheduleView/scheduleDetailView/scheduleDetailState';
|
|
12
|
+
export declare const toJEScheduleSortKey: (v: string) => "type" | "vendor" | "category" | "class" | "memo" | "jePostingDate" | "runningBalance" | "depCategory" | "scheduleCategory" | "startMonth" | "amortizationPeriod" | "remainingMonths" | "totalAmount" | "transactionDate";
|
|
10
13
|
export type JEScheduleSortKey = ReturnType<typeof toJEScheduleSortKey>;
|
|
11
|
-
export declare const
|
|
12
|
-
export type
|
|
14
|
+
export declare const toJEPageTab: (v: string) => "schedules" | "existing_schedules";
|
|
15
|
+
export type JEPageTab = ReturnType<typeof toJEPageTab>;
|
|
16
|
+
export declare const ALL_JE_PAGE_TABS: readonly JEPageTab[];
|
|
17
|
+
export type JESchedulePeriodTabKey = `${JEPageTab}_${MonthYearPeriodId}`;
|
|
18
|
+
export declare const getJESchedulePeriodTabKey: (selectedPageTab: JEPageTab, monthYearPeriodId: MonthYearPeriodId) => JESchedulePeriodTabKey;
|
|
13
19
|
export interface JESchedulesViewUIState {
|
|
20
|
+
createdGroupCollapsed: boolean;
|
|
21
|
+
pendingGroupCollapsed: boolean;
|
|
14
22
|
scrollPosition: {
|
|
15
23
|
scrollTop: number;
|
|
16
24
|
scrollLeft?: number;
|
|
17
25
|
} | undefined;
|
|
18
26
|
searchString: string;
|
|
19
|
-
|
|
27
|
+
selectedJETypeFilter: ScheduleTypes | null;
|
|
28
|
+
selectedPageTab: JEPageTab;
|
|
20
29
|
sortKey: JEScheduleSortKey;
|
|
21
30
|
sortOrder: SortOrder;
|
|
22
31
|
totalCount: number;
|
|
@@ -33,14 +42,79 @@ export interface JEScheduleLocalData {
|
|
|
33
42
|
}
|
|
34
43
|
export interface JESchedulesViewState extends FetchedState {
|
|
35
44
|
accountSettings: AccountSettingsState;
|
|
36
|
-
|
|
45
|
+
failedJeScheduleTransactionKeysByPeriodAndTab: Record<JESchedulePeriodTabKey, JEScheduleTransactionKey[]>;
|
|
37
46
|
ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
|
|
47
|
+
jeScheduleAccruedKeysByPeriodAndTab: Record<JESchedulePeriodTabKey, JEScheduleKey[]>;
|
|
38
48
|
jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
|
|
39
|
-
|
|
49
|
+
jeScheduleOneTimeAccrualKeysByPeriodAndTab: Record<JESchedulePeriodTabKey, JEOneTimeAccrualKey[]>;
|
|
50
|
+
jeScheduleTransactionKeysByPeriodAndTab: Record<JESchedulePeriodTabKey, JEScheduleTransactionKey[]>;
|
|
51
|
+
newSchedule: NewJeScheduleState;
|
|
52
|
+
oneTimeAccrualActionStatusById: Record<ID, FetchStateAndError>;
|
|
53
|
+
oneTimeAccrualFetchStatusById: Record<ID, FetchStateAndError>;
|
|
40
54
|
postStatusById: Record<ID, FetchStateAndError>;
|
|
41
55
|
refreshStatus: FetchStateAndError;
|
|
56
|
+
revertStatusById: Record<JEScheduleKey | JEScheduleTransactionKey, FetchStateAndError>;
|
|
42
57
|
uiState: JESchedulesViewUIState;
|
|
43
58
|
}
|
|
59
|
+
export interface NewJeDetailLocalData {
|
|
60
|
+
amount: Amount;
|
|
61
|
+
jeLink: JETransactionLink;
|
|
62
|
+
memo: string;
|
|
63
|
+
postingDate: ZeniDate;
|
|
64
|
+
postingStatus: ScheduleJournalEntryStatusCodeType;
|
|
65
|
+
runningBalance: Amount;
|
|
66
|
+
}
|
|
67
|
+
export interface NewScheduleLocalData {
|
|
68
|
+
jeScheduleDetails: NewJeDetailLocalData[];
|
|
69
|
+
scheduleType: ScheduleTypes;
|
|
70
|
+
lastDayOfMonth?: boolean;
|
|
71
|
+
selectedAccount?: ID;
|
|
72
|
+
selectedBaseTransactionId?: ScheduleTransactionID;
|
|
73
|
+
selectedClass?: ID;
|
|
74
|
+
selectedDate?: ZeniDate;
|
|
75
|
+
selectedDayOfMonth?: ScheduleDaysOfMonth;
|
|
76
|
+
selectedJEScheduleKey?: JEScheduleTransactionKey;
|
|
77
|
+
selectedMonths?: number;
|
|
78
|
+
selectedVendor?: VendorBase;
|
|
79
|
+
}
|
|
80
|
+
export interface NewScheduleLocalDataFixedAssets extends NewScheduleLocalData {
|
|
81
|
+
assetId?: string;
|
|
82
|
+
selectedAccumulatedDepreciationCategory?: ID;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The form values for creating a one-time accrual. Not stored in the slice — a one-time accrual is
|
|
86
|
+
* created in a single POST with no draft/resume step, so this is passed straight through the action
|
|
87
|
+
* to the payload builder.
|
|
88
|
+
*/
|
|
89
|
+
export interface NewOneTimeAccrualLocalData {
|
|
90
|
+
amount: number;
|
|
91
|
+
creditAccountId: ID;
|
|
92
|
+
debitAccountId: ID;
|
|
93
|
+
memo: string;
|
|
94
|
+
reverseNextMonth: boolean;
|
|
95
|
+
serviceMonth: ZeniDate;
|
|
96
|
+
vendorId: ID;
|
|
97
|
+
vendorName: string;
|
|
98
|
+
creditAccountName?: string;
|
|
99
|
+
debitAccountName?: string;
|
|
100
|
+
debitClassId?: ID;
|
|
101
|
+
debitClassName?: string;
|
|
102
|
+
}
|
|
103
|
+
export interface SearchTransactionsState extends FetchStateAndError {
|
|
104
|
+
searchResults: JEScheduleTransactionKey[];
|
|
105
|
+
searchString?: string;
|
|
106
|
+
}
|
|
107
|
+
export declare const MIN_NEW_SCHEDULE_SEARCH_LENGTH = 2;
|
|
108
|
+
export interface NewJeScheduleState extends FetchStateAndError {
|
|
109
|
+
createOneTimeAccrualStatus: FetchStateAndError;
|
|
110
|
+
newScheduleState: {
|
|
111
|
+
fixed_assets: NewScheduleLocalDataFixedAssets;
|
|
112
|
+
prepaid_expenses: NewScheduleLocalData;
|
|
113
|
+
};
|
|
114
|
+
saveStatus: FetchStateAndError;
|
|
115
|
+
searchTransactions: SearchTransactionsState;
|
|
116
|
+
selectedDetailScheduleType?: ScheduleTypes;
|
|
117
|
+
}
|
|
44
118
|
export interface AccountSettingsLocalData {
|
|
45
119
|
previousAccruedExpensesAccount: AccountBase[];
|
|
46
120
|
previousFixedAssetsAccount: AccountBase[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.MIN_NEW_SCHEDULE_SEARCH_LENGTH = exports.getJESchedulePeriodTabKey = exports.ALL_JE_PAGE_TABS = exports.toJEPageTab = exports.toJEScheduleSortKey = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
const JE_SCHEDULE_SORT_KEYS = [
|
|
6
6
|
'vendor',
|
|
@@ -20,10 +20,10 @@ const JE_SCHEDULE_SORT_KEYS = [
|
|
|
20
20
|
];
|
|
21
21
|
const toJEScheduleSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_SORT_KEYS);
|
|
22
22
|
exports.toJEScheduleSortKey = toJEScheduleSortKey;
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
exports.
|
|
23
|
+
const JE_PAGE_TABS = ['schedules', 'existing_schedules'];
|
|
24
|
+
const toJEPageTab = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_PAGE_TABS);
|
|
25
|
+
exports.toJEPageTab = toJEPageTab;
|
|
26
|
+
exports.ALL_JE_PAGE_TABS = JE_PAGE_TABS;
|
|
27
|
+
const getJESchedulePeriodTabKey = (selectedPageTab, monthYearPeriodId) => `${selectedPageTab}_${monthYearPeriodId}`;
|
|
28
|
+
exports.getJESchedulePeriodTabKey = getJESchedulePeriodTabKey;
|
|
29
|
+
exports.MIN_NEW_SCHEDULE_SEARCH_LENGTH = 2;
|
|
@@ -200,7 +200,7 @@ export interface SaveReconciliationDetailFailurePayload {
|
|
|
200
200
|
}
|
|
201
201
|
export declare const toReconciliationTabsType: (v: string) => "review" | "reconcile";
|
|
202
202
|
export declare type ReconciliationViewTabType = ReturnType<typeof toReconciliationTabsType>;
|
|
203
|
-
declare const toReconReconcileSortKeysType: (v: string) => "type" | "date" | "amount" | "memo" | "account" | "
|
|
203
|
+
declare const toReconReconcileSortKeysType: (v: string) => "type" | "date" | "amount" | "memo" | "account" | "recommended" | "clearedDate" | "payee" | "transactionDirection";
|
|
204
204
|
export declare type ReconReconcileSortKey = ReturnType<typeof toReconReconcileSortKeysType>;
|
|
205
205
|
export interface ReconciliationReconcileTabLocalData {
|
|
206
206
|
selectedTransactionIds: ID[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
+
import { InvoicingQboViewActionType } from './invoicingQboViewActionType';
|
|
6
|
+
export declare const fetchInvoicingQboAccountsEpic: (actions$: ActionsObservable<InvoicingQboViewActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<InvoicingQboViewActionType>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchInvoicingQboAccountsEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
+
const invoicingQboViewPayload_1 = require("../invoicingQboViewPayload");
|
|
8
|
+
const invoicingQboViewReducer_1 = require("../invoicingQboViewReducer");
|
|
9
|
+
const fetchInvoicingQboAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingQboViewReducer_1.fetchInvoicingQboAccounts.match), (0, operators_1.mergeMap)((action) => {
|
|
10
|
+
const { accountTypes } = action.payload;
|
|
11
|
+
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/qbo/accounts?account_types=${encodeURIComponent(accountTypes)}`;
|
|
12
|
+
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.map)((response) => {
|
|
13
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
14
|
+
return (0, invoicingQboViewReducer_1.updateInvoicingQboAccounts)({
|
|
15
|
+
accountTypes,
|
|
16
|
+
accounts: (0, invoicingQboViewPayload_1.mapInvoicingQboAccountOptions)(response.data?.accounts ?? []),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return (0, invoicingQboViewReducer_1.updateInvoicingQboAccountsFailure)({
|
|
20
|
+
accountTypes,
|
|
21
|
+
status: response.status,
|
|
22
|
+
});
|
|
23
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingQboViewReducer_1.updateInvoicingQboAccountsFailure)({
|
|
24
|
+
accountTypes,
|
|
25
|
+
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch QBO accounts REST API call errored out ' +
|
|
26
|
+
JSON.stringify(error)),
|
|
27
|
+
}))));
|
|
28
|
+
}));
|
|
29
|
+
exports.fetchInvoicingQboAccountsEpic = fetchInvoicingQboAccountsEpic;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
+
import { InvoicingQboViewActionType } from './invoicingQboViewActionType';
|
|
6
|
+
export declare const fetchInvoicingQboClassesEpic: (actions$: ActionsObservable<InvoicingQboViewActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<InvoicingQboViewActionType>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchInvoicingQboClassesEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
+
const invoicingQboViewPayload_1 = require("../invoicingQboViewPayload");
|
|
8
|
+
const invoicingQboViewReducer_1 = require("../invoicingQboViewReducer");
|
|
9
|
+
const fetchInvoicingQboClassesEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingQboViewReducer_1.fetchInvoicingQboClasses.match), (0, operators_1.switchMap)(() => {
|
|
10
|
+
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/qbo/classes`;
|
|
11
|
+
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.map)((response) => {
|
|
12
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
13
|
+
return (0, invoicingQboViewReducer_1.updateInvoicingQboClasses)((0, invoicingQboViewPayload_1.mapInvoicingQboAccountOptions)(response.data?.accounts ?? []));
|
|
14
|
+
}
|
|
15
|
+
return (0, invoicingQboViewReducer_1.updateInvoicingQboClassesFailure)(response.status);
|
|
16
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingQboViewReducer_1.updateInvoicingQboClassesFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch QBO classes REST API call errored out ' +
|
|
17
|
+
JSON.stringify(error))))));
|
|
18
|
+
}));
|
|
19
|
+
exports.fetchInvoicingQboClassesEpic = fetchInvoicingQboClassesEpic;
|
|
@@ -33,7 +33,7 @@ const fetchAccruedScheduleListEpic = (actions$, state$, zeniAPI) => actions$.pip
|
|
|
33
33
|
je_schedule_type: scheduleType,
|
|
34
34
|
sort_by: 'transaction_date',
|
|
35
35
|
sort_order: 'desc',
|
|
36
|
-
filter:
|
|
36
|
+
filter: action.payload.statusFilter,
|
|
37
37
|
};
|
|
38
38
|
return zeniAPI
|
|
39
39
|
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/schedules?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
@@ -10,9 +10,14 @@ const responsePayload_1 = require("../../../../responsePayload");
|
|
|
10
10
|
const scheduleListReducer_1 = require("../scheduleListReducer");
|
|
11
11
|
const scheduleListTypes_1 = require("../scheduleListTypes");
|
|
12
12
|
const fetchDownloadSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(scheduleListReducer_1.fetchDownloadSchedules.match), (0, operators_1.mergeMap)((action) => {
|
|
13
|
-
const { scheduleType, downloadCategories } = action.payload;
|
|
13
|
+
const { scheduleType, downloadCategories, statusFilter } = action.payload;
|
|
14
14
|
const scheduleListState = state$.value.scheduleListState;
|
|
15
15
|
// if parameters are provided, use those. else go to localdata
|
|
16
|
+
// Accrued is deliberately not served here. Its rows come back in a different shape, this
|
|
17
|
+
// epic writes them through updateJESchedules (the prepaid / fixed mapper), and
|
|
18
|
+
// doUpdateScheduleList never flips downloadState for accrued -- so a request would store the
|
|
19
|
+
// wrong data and then never report completion. Accrued downloads go through
|
|
20
|
+
// fetchAccruedScheduleList, which owns that shape end to end.
|
|
16
21
|
let scheduleState;
|
|
17
22
|
if (scheduleType !== 'accrued_expenses') {
|
|
18
23
|
scheduleState = (0, scheduleListReducer_1.getState)(scheduleListState, scheduleType);
|
|
@@ -37,7 +42,7 @@ const fetchDownloadSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
37
42
|
base_txn_account_ids: downloadCategories,
|
|
38
43
|
sort_by: 'transaction_date',
|
|
39
44
|
sort_order: 'desc',
|
|
40
|
-
filter:
|
|
45
|
+
filter: statusFilter,
|
|
41
46
|
};
|
|
42
47
|
return zeniAPI
|
|
43
48
|
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/schedules/download?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
@@ -16,7 +16,7 @@ export declare const initialState: ScheduleListViewState;
|
|
|
16
16
|
export declare const fetchDownloadSchedules: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue", timeframeAndCategory: {
|
|
17
17
|
selectedCategoryId: ID;
|
|
18
18
|
selectedTimeframe: TimeframeTick;
|
|
19
|
-
}, downloadCategories: string[], cacheOverride?: any], {
|
|
19
|
+
}, downloadCategories: string[], statusFilter?: "completed" | "new" | "ongoing" | "all" | undefined, cacheOverride?: any], {
|
|
20
20
|
timeframeAndCategory: {
|
|
21
21
|
selectedCategoryId: ID;
|
|
22
22
|
selectedTimeframe: TimeframeTick;
|
|
@@ -24,16 +24,18 @@ export declare const fetchDownloadSchedules: import("@reduxjs/toolkit").ActionCr
|
|
|
24
24
|
scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
|
|
25
25
|
cacheOverride: any;
|
|
26
26
|
downloadCategories: string[];
|
|
27
|
+
statusFilter: "completed" | "new" | "ongoing" | "all";
|
|
27
28
|
}, "scheduleListView/fetchDownloadSchedules", never, never>, fetchAccruedScheduleList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue", timeframeAndCategory?: {
|
|
28
29
|
selectedCategoryId: ID;
|
|
29
30
|
selectedTimeframe: TimeframeTick;
|
|
30
|
-
} | undefined, cacheOverride?: any], {
|
|
31
|
+
} | undefined, cacheOverride?: any, statusFilter?: "completed" | "new" | "ongoing" | "all" | undefined], {
|
|
31
32
|
timeframeAndCategory: {
|
|
32
33
|
selectedCategoryId: ID;
|
|
33
34
|
selectedTimeframe: TimeframeTick;
|
|
34
35
|
} | undefined;
|
|
35
36
|
scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
|
|
36
37
|
cacheOverride: any;
|
|
38
|
+
statusFilter: "completed" | "new" | "ongoing" | "all";
|
|
37
39
|
}, "scheduleListView/fetchAccruedScheduleList", never, never>, fetchScheduleList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue", timeframeAndCategory?: {
|
|
38
40
|
selectedCategoryId: ID;
|
|
39
41
|
selectedTimeframe: TimeframeTick;
|
|
@@ -90,8 +90,8 @@ const scheduleListView = (0, toolkit_1.createSlice)({
|
|
|
90
90
|
reducers: {
|
|
91
91
|
fetchDownloadSchedules: {
|
|
92
92
|
reducer(draft, action) {
|
|
93
|
+
// Accrued is not downloaded through this action -- see fetchDownloadSchedulesEpic for why.
|
|
93
94
|
if (action.payload.scheduleType !== 'accrued_expenses') {
|
|
94
|
-
//if condition added for type narrowing
|
|
95
95
|
const state = getState(draft, action.payload.scheduleType);
|
|
96
96
|
const selectedTimeframe = action.payload.timeframeAndCategory.selectedTimeframe;
|
|
97
97
|
const selectedCategoryId = action.payload.timeframeAndCategory.selectedCategoryId;
|
|
@@ -115,13 +115,14 @@ const scheduleListView = (0, toolkit_1.createSlice)({
|
|
|
115
115
|
updateState(draft, action.payload.scheduleType, state);
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
|
-
prepare(scheduleType, timeframeAndCategory, downloadCategories, cacheOverride = false) {
|
|
118
|
+
prepare(scheduleType, timeframeAndCategory, downloadCategories, statusFilter = 'all', cacheOverride = false) {
|
|
119
119
|
return {
|
|
120
120
|
payload: {
|
|
121
121
|
timeframeAndCategory,
|
|
122
122
|
scheduleType,
|
|
123
123
|
cacheOverride,
|
|
124
124
|
downloadCategories,
|
|
125
|
+
statusFilter,
|
|
125
126
|
},
|
|
126
127
|
};
|
|
127
128
|
},
|
|
@@ -157,12 +158,13 @@ const scheduleListView = (0, toolkit_1.createSlice)({
|
|
|
157
158
|
updateState(draft, action.payload.scheduleType, state);
|
|
158
159
|
}
|
|
159
160
|
},
|
|
160
|
-
prepare(scheduleType, timeframeAndCategory, cacheOverride = false) {
|
|
161
|
+
prepare(scheduleType, timeframeAndCategory, cacheOverride = false, statusFilter = 'all') {
|
|
161
162
|
return {
|
|
162
163
|
payload: {
|
|
163
164
|
timeframeAndCategory,
|
|
164
165
|
scheduleType,
|
|
165
166
|
cacheOverride,
|
|
167
|
+
statusFilter,
|
|
166
168
|
},
|
|
167
169
|
};
|
|
168
170
|
},
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser } from '../../../../../entity/tenant/tenantReducer';
|
|
4
|
+
import { RootState } from '../../../../../reducer';
|
|
5
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
6
|
+
import { updateTreasuryPromoIntroClosedByOutsideClick, updateTreasuryPromoIntroClosedByOutsideClickFailure, updateTreasuryPromoIntroClosedByOutsideClickSuccess } from '../treasurySetupViewReducer';
|
|
7
|
+
export type ActionType = ReturnType<typeof updateTreasuryPromoIntroClosedByOutsideClick> | ReturnType<typeof updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser> | ReturnType<typeof updateTreasuryPromoIntroClosedByOutsideClickSuccess> | ReturnType<typeof updateTreasuryPromoIntroClosedByOutsideClickFailure>;
|
|
8
|
+
export declare const updateTreasuryPromoIntroClosedByOutsideClickEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateTreasuryPromoIntroClosedByOutsideClickEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const tenantReducer_1 = require("../../../../../entity/tenant/tenantReducer");
|
|
7
|
+
const responsePayload_1 = require("../../../../../responsePayload");
|
|
8
|
+
const treasurySetupViewReducer_1 = require("../treasurySetupViewReducer");
|
|
9
|
+
const updateTreasuryPromoIntroClosedByOutsideClickEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(treasurySetupViewReducer_1.updateTreasuryPromoIntroClosedByOutsideClick.match), (0, operators_1.switchMap)(() => {
|
|
10
|
+
return zeniAPI
|
|
11
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/user/self`, { is_treasury_promo_intro_closed_by_outside_click: true })
|
|
12
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
13
|
+
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
14
|
+
return (0, rxjs_1.of)((0, tenantReducer_1.updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser)(), (0, treasurySetupViewReducer_1.updateTreasuryPromoIntroClosedByOutsideClickSuccess)());
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryPromoIntroClosedByOutsideClickFailure)(response.status));
|
|
18
|
+
}
|
|
19
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryPromoIntroClosedByOutsideClickFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Update treasury promo intro closed by outside click REST API call errored out' +
|
|
20
|
+
(error?.message ?? JSON.stringify(error)))))));
|
|
21
|
+
}));
|
|
22
|
+
exports.updateTreasuryPromoIntroClosedByOutsideClickEpic = updateTreasuryPromoIntroClosedByOutsideClickEpic;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { updateTreasuryPromoRemindMeLaterClickedForLoggedInUser } from '../../../../../entity/tenant/tenantReducer';
|
|
4
|
+
import { RootState } from '../../../../../reducer';
|
|
5
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
6
|
+
import { updateTreasuryPromoRemindMeLaterClicked, updateTreasuryPromoRemindMeLaterClickedFailure, updateTreasuryPromoRemindMeLaterClickedSuccess } from '../treasurySetupViewReducer';
|
|
7
|
+
export type ActionType = ReturnType<typeof updateTreasuryPromoRemindMeLaterClicked> | ReturnType<typeof updateTreasuryPromoRemindMeLaterClickedForLoggedInUser> | ReturnType<typeof updateTreasuryPromoRemindMeLaterClickedSuccess> | ReturnType<typeof updateTreasuryPromoRemindMeLaterClickedFailure>;
|
|
8
|
+
export declare const updateTreasuryPromoRemindMeLaterClickedEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateTreasuryPromoRemindMeLaterClickedEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const tenantReducer_1 = require("../../../../../entity/tenant/tenantReducer");
|
|
7
|
+
const responsePayload_1 = require("../../../../../responsePayload");
|
|
8
|
+
const treasurySetupViewReducer_1 = require("../treasurySetupViewReducer");
|
|
9
|
+
const updateTreasuryPromoRemindMeLaterClickedEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(treasurySetupViewReducer_1.updateTreasuryPromoRemindMeLaterClicked.match), (0, operators_1.switchMap)(() => {
|
|
10
|
+
return zeniAPI
|
|
11
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/user/self`, { is_treasury_promo_video_remind_me_later_clicked: true })
|
|
12
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
13
|
+
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
14
|
+
return (0, rxjs_1.of)((0, tenantReducer_1.updateTreasuryPromoRemindMeLaterClickedForLoggedInUser)(), (0, treasurySetupViewReducer_1.updateTreasuryPromoRemindMeLaterClickedSuccess)());
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryPromoRemindMeLaterClickedFailure)(response.status));
|
|
18
|
+
}
|
|
19
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryPromoRemindMeLaterClickedFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Update treasury promo remind me later REST API call errored out' +
|
|
20
|
+
(error?.message ?? JSON.stringify(error)))))));
|
|
21
|
+
}));
|
|
22
|
+
exports.updateTreasuryPromoRemindMeLaterClickedEpic = updateTreasuryPromoRemindMeLaterClickedEpic;
|
package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { updateTreasuryVideoViewedForLoggedInUser } from '../../../../../entity/tenant/tenantReducer';
|
|
4
|
+
import { RootState } from '../../../../../reducer';
|
|
5
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
6
|
+
import { updateTreasuryVideoViewed, updateTreasuryVideoViewedFailure, updateTreasuryVideoViewedSuccess } from '../treasurySetupViewReducer';
|
|
7
|
+
export type ActionType = ReturnType<typeof updateTreasuryVideoViewed> | ReturnType<typeof updateTreasuryVideoViewedForLoggedInUser> | ReturnType<typeof updateTreasuryVideoViewedSuccess> | ReturnType<typeof updateTreasuryVideoViewedFailure>;
|
|
8
|
+
export declare const updateTreasuryVideoViewedEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateTreasuryVideoViewedEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const tenantReducer_1 = require("../../../../../entity/tenant/tenantReducer");
|
|
7
|
+
const responsePayload_1 = require("../../../../../responsePayload");
|
|
8
|
+
const treasurySetupViewReducer_1 = require("../treasurySetupViewReducer");
|
|
9
|
+
const updateTreasuryVideoViewedEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(treasurySetupViewReducer_1.updateTreasuryVideoViewed.match), (0, operators_1.switchMap)(() => {
|
|
10
|
+
return zeniAPI
|
|
11
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/user/self`, { is_treasury_promo_video_played: true })
|
|
12
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
13
|
+
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
14
|
+
return (0, rxjs_1.of)((0, tenantReducer_1.updateTreasuryVideoViewedForLoggedInUser)(), (0, treasurySetupViewReducer_1.updateTreasuryVideoViewedSuccess)());
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryVideoViewedFailure)(response.status));
|
|
18
|
+
}
|
|
19
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryVideoViewedFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Update treasury video viewed REST API call errored out' +
|
|
20
|
+
(error?.message ?? JSON.stringify(error)))))));
|
|
21
|
+
}));
|
|
22
|
+
exports.updateTreasuryVideoViewedEpic = updateTreasuryVideoViewedEpic;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { updateAccounts } from '../../entity/account/accountReducer';
|
|
3
|
+
import { RootState } from '../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../zeniAPI';
|
|
5
|
+
import { fetchZeniAccountsPromoCard, updateZeniAccountsPromoCard, updateZeniAccountsPromoCardFailure } from './zeniAccountsPromoCardReducer';
|
|
6
|
+
export type ActionType = ReturnType<typeof fetchZeniAccountsPromoCard> | ReturnType<typeof updateZeniAccountsPromoCard> | ReturnType<typeof updateZeniAccountsPromoCardFailure> | ReturnType<typeof updateAccounts>;
|
|
7
|
+
export declare const fetchZeniAccountsPromoCardEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
8
|
+
payload: import("./zeniAccountsPromoCardPayload").ZeniAccountsPromoCardPayload;
|
|
9
|
+
type: "zeniAccountsPromoCard/updateZeniAccountsPromoCard";
|
|
10
|
+
} | {
|
|
11
|
+
payload: import("../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
|
|
12
|
+
type: "zeniAccountsPromoCard/updateZeniAccountsPromoCardFailure";
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchZeniAccountsPromoCardEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../responsePayload");
|
|
7
|
+
const zeniAccountsPromoCardReducer_1 = require("./zeniAccountsPromoCardReducer");
|
|
8
|
+
const fetchZeniAccountsPromoCardEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(zeniAccountsPromoCardReducer_1.fetchZeniAccountsPromoCard.match), (0, operators_1.switchMap)(() => zeniAPI
|
|
9
|
+
.getJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/promo-card`)
|
|
10
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
11
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
12
|
+
return (0, rxjs_1.of)((0, zeniAccountsPromoCardReducer_1.updateZeniAccountsPromoCard)(response.data) // eslint-disable-line @typescript-eslint/no-non-null-assertion
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return (0, rxjs_1.of)((0, zeniAccountsPromoCardReducer_1.updateZeniAccountsPromoCardFailure)(response.status));
|
|
17
|
+
}
|
|
18
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, zeniAccountsPromoCardReducer_1.updateZeniAccountsPromoCardFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Zeni Accounts Promo Card REST API call errored out' +
|
|
19
|
+
JSON.stringify(error))))))));
|
|
20
|
+
exports.fetchZeniAccountsPromoCardEpic = fetchZeniAccountsPromoCardEpic;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { ZeniAPIResponse } from '../../responsePayload';
|
|
3
|
+
export interface ZeniAccountsPromoCardPayload {
|
|
4
|
+
is_show_deposit_accounts_promo_card: boolean;
|
|
5
|
+
max_apy: number;
|
|
6
|
+
max_cash_balance_available: number | null;
|
|
7
|
+
max_insured_amount: number;
|
|
8
|
+
max_possible_interest: number | null;
|
|
9
|
+
primary_deposit_account_id: ID | null;
|
|
10
|
+
}
|
|
11
|
+
export type ZeniAccountsPromoCardResponse = ZeniAPIResponse<ZeniAccountsPromoCardPayload>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ZeniAPIStatus } from '../../responsePayload';
|
|
2
|
+
import { ZeniAccountsPromoCardPayload } from './zeniAccountsPromoCardPayload';
|
|
3
|
+
import { ZeniAccountsPromoCardState } from './zeniAccountsPromoCardState';
|
|
4
|
+
export declare const initialState: ZeniAccountsPromoCardState;
|
|
5
|
+
export declare const fetchZeniAccountsPromoCard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"zeniAccountsPromoCard/fetchZeniAccountsPromoCard">, updateZeniAccountsPromoCard: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAccountsPromoCardPayload, "zeniAccountsPromoCard/updateZeniAccountsPromoCard">, updateZeniAccountsPromoCardFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "zeniAccountsPromoCard/updateZeniAccountsPromoCardFailure">, clearZeniAccountsPromoCard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"zeniAccountsPromoCard/clearZeniAccountsPromoCard">;
|
|
6
|
+
declare const _default: import("redux").Reducer<ZeniAccountsPromoCardState>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearZeniAccountsPromoCard = exports.updateZeniAccountsPromoCardFailure = exports.updateZeniAccountsPromoCard = exports.fetchZeniAccountsPromoCard = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const rootActions_1 = require("../../rootActions");
|
|
7
|
+
exports.initialState = {
|
|
8
|
+
fetchState: 'Not-Started',
|
|
9
|
+
error: undefined,
|
|
10
|
+
depositAccountId: undefined,
|
|
11
|
+
maxInsuredAmount: 0,
|
|
12
|
+
maxAnnualPercentageYield: 0,
|
|
13
|
+
maxPossibleInterest: 0,
|
|
14
|
+
maxCashBalanceAvailable: 0,
|
|
15
|
+
isShowDepositAccountsPromo: false,
|
|
16
|
+
hasValidState() {
|
|
17
|
+
return this.fetchState == 'Completed';
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
const zeniAccountsPromoCard = (0, toolkit_1.createSlice)({
|
|
21
|
+
name: 'zeniAccountsPromoCard',
|
|
22
|
+
initialState: exports.initialState,
|
|
23
|
+
reducers: {
|
|
24
|
+
fetchZeniAccountsPromoCard(draft) {
|
|
25
|
+
draft.fetchState = 'In-Progress';
|
|
26
|
+
draft.error = undefined;
|
|
27
|
+
},
|
|
28
|
+
updateZeniAccountsPromoCard(draft, action) {
|
|
29
|
+
draft.fetchState = 'Completed';
|
|
30
|
+
draft.error = undefined;
|
|
31
|
+
const promoPayload = action.payload;
|
|
32
|
+
draft.isShowDepositAccountsPromo =
|
|
33
|
+
promoPayload.is_show_deposit_accounts_promo_card;
|
|
34
|
+
draft.maxAnnualPercentageYield = promoPayload.max_apy;
|
|
35
|
+
draft.maxPossibleInterest =
|
|
36
|
+
promoPayload.max_possible_interest != null
|
|
37
|
+
? promoPayload.max_possible_interest
|
|
38
|
+
: undefined;
|
|
39
|
+
draft.maxCashBalanceAvailable =
|
|
40
|
+
promoPayload.max_cash_balance_available != null
|
|
41
|
+
? promoPayload.max_cash_balance_available
|
|
42
|
+
: undefined;
|
|
43
|
+
draft.maxInsuredAmount = promoPayload.max_insured_amount;
|
|
44
|
+
draft.depositAccountId =
|
|
45
|
+
promoPayload.primary_deposit_account_id != null
|
|
46
|
+
? promoPayload.primary_deposit_account_id
|
|
47
|
+
: undefined;
|
|
48
|
+
},
|
|
49
|
+
updateZeniAccountsPromoCardFailure(draft, action) {
|
|
50
|
+
draft.fetchState = 'Error';
|
|
51
|
+
draft.error = action.payload;
|
|
52
|
+
},
|
|
53
|
+
clearZeniAccountsPromoCard(draft) {
|
|
54
|
+
Object.assign(draft, exports.initialState);
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
extraReducers: (builder) => {
|
|
58
|
+
builder.addCase(rootActions_1.clearAll, (draft) => {
|
|
59
|
+
Object.assign(draft, exports.initialState);
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
_a = zeniAccountsPromoCard.actions, exports.fetchZeniAccountsPromoCard = _a.fetchZeniAccountsPromoCard, exports.updateZeniAccountsPromoCard = _a.updateZeniAccountsPromoCard, exports.updateZeniAccountsPromoCardFailure = _a.updateZeniAccountsPromoCardFailure, exports.clearZeniAccountsPromoCard = _a.clearZeniAccountsPromoCard;
|
|
64
|
+
exports.default = zeniAccountsPromoCard.reducer;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
+
import { RootState } from '../../reducer';
|
|
4
|
+
export interface ZeniAccountsPromoCardReport extends SelectorView {
|
|
5
|
+
isShowDepositAccountsPromo: boolean;
|
|
6
|
+
maxAnnualPercentageYield: number;
|
|
7
|
+
maxInsuredAmount: number;
|
|
8
|
+
depositAccountId?: ID;
|
|
9
|
+
maxCashBalanceAvailable?: number;
|
|
10
|
+
maxPossibleInterest?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const getZeniAccountsPromoCard: (state: RootState) => ZeniAccountsPromoCardReport;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getZeniAccountsPromoCard = void 0;
|
|
4
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
+
exports.getZeniAccountsPromoCard = (0, toolkit_1.createSelector)((state) => state.zeniAccountsPromoCardState, (zeniAccountsPromoCardState) => ({
|
|
6
|
+
isShowDepositAccountsPromo: zeniAccountsPromoCardState.isShowDepositAccountsPromo,
|
|
7
|
+
maxAnnualPercentageYield: zeniAccountsPromoCardState.maxAnnualPercentageYield,
|
|
8
|
+
maxPossibleInterest: zeniAccountsPromoCardState.maxPossibleInterest,
|
|
9
|
+
maxCashBalanceAvailable: zeniAccountsPromoCardState.maxCashBalanceAvailable,
|
|
10
|
+
maxInsuredAmount: zeniAccountsPromoCardState.maxInsuredAmount,
|
|
11
|
+
depositAccountId: zeniAccountsPromoCardState.depositAccountId,
|
|
12
|
+
reportId: 'zeni_accounts_promo_card',
|
|
13
|
+
fetchState: zeniAccountsPromoCardState.fetchState,
|
|
14
|
+
error: zeniAccountsPromoCardState.error,
|
|
15
|
+
}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FetchedState, ID } from '../../commonStateTypes/common';
|
|
2
|
+
export interface ZeniAccountsPromoCardState extends FetchedState {
|
|
3
|
+
isShowDepositAccountsPromo: boolean;
|
|
4
|
+
maxAnnualPercentageYield: number;
|
|
5
|
+
maxInsuredAmount: number;
|
|
6
|
+
depositAccountId?: ID;
|
|
7
|
+
maxCashBalanceAvailable?: number;
|
|
8
|
+
maxPossibleInterest?: number;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.11-betaRD1",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|