@zeniai/client-epic-state 4.8.27 → 4.8.28
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/viewAndReport/viewAndReport.d.ts +1 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -1
- package/lib/entity/tenant/clearAllEpic.js +2 -0
- package/lib/epic.d.ts +2 -1
- package/lib/epic.js +2 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.js +5 -1
- package/lib/reducer.d.ts +3 -0
- package/lib/reducer.js +3 -0
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/dashboard/dashboardEpic.d.ts +2 -1
- package/lib/view/dashboard/dashboardEpic.js +10 -0
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/dashboard/dashboardSelector.d.ts +2 -0
- package/lib/view/dashboard/dashboardSelector.js +7 -2
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/scheduleView/scheduleDetailView/epics/initializeScheduleDetailLocalDataEpic.js +4 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +1 -2
- package/lib/view/spendManagement/helpers.js +39 -6
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailReducer.js +10 -0
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.d.ts +13 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.js +20 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.d.ts +10 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.js +2 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.d.ts +7 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.js +56 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.d.ts +14 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.js +18 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.d.ts +9 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.js +2 -0
- package/package.json +1 -1
|
@@ -125,8 +125,18 @@ const getTotalPayments = (startDate, endDate, frequency, currentInstance) => {
|
|
|
125
125
|
pastPayments = currentInstance.instance - 1;
|
|
126
126
|
}
|
|
127
127
|
let totalPayments = 0;
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
switch (frequency) {
|
|
129
|
+
case 'weekly':
|
|
130
|
+
case 'biweekly':
|
|
131
|
+
totalPayments = endDate.diff(currentStartDate, 'day') / getRecurringFrequencyInDays(frequency);
|
|
132
|
+
break;
|
|
133
|
+
case 'monthly':
|
|
134
|
+
totalPayments = endDate.diff(currentStartDate, 'month');
|
|
135
|
+
break;
|
|
136
|
+
case 'quarterly':
|
|
137
|
+
totalPayments = endDate.diff(currentStartDate, 'quarter');
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
130
140
|
return Math.floor(totalPayments + pastPayments) + 1; //+1 to include startDate
|
|
131
141
|
};
|
|
132
142
|
exports.getTotalPayments = getTotalPayments;
|
|
@@ -138,17 +148,40 @@ const getEndDate = (startDate, frequency, totalPayments, currentInstance) => {
|
|
|
138
148
|
currentStartDate = currentInstance.vendorReceiveDate;
|
|
139
149
|
currentTotalPayments = totalPayments - currentInstance.instance + 1;
|
|
140
150
|
}
|
|
141
|
-
|
|
142
|
-
|
|
151
|
+
switch (frequency) {
|
|
152
|
+
case 'weekly':
|
|
153
|
+
case 'biweekly':
|
|
154
|
+
endDate = currentStartDate.add(getRecurringFrequencyInDays(frequency) * (currentTotalPayments - 1), 'day');
|
|
155
|
+
break;
|
|
156
|
+
case 'monthly':
|
|
157
|
+
endDate = currentStartDate.add(currentTotalPayments - 1, 'month');
|
|
158
|
+
break;
|
|
159
|
+
case 'quarterly':
|
|
160
|
+
endDate = currentStartDate.add(currentTotalPayments - 1, 'quarter');
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
143
163
|
return endDate;
|
|
144
164
|
};
|
|
145
165
|
exports.getEndDate = getEndDate;
|
|
146
166
|
function getRecurringBillInstances(startDate, frequency, totalPayments, currentInstance, billAmount) {
|
|
147
167
|
const updatedInstances = [];
|
|
148
|
-
const
|
|
168
|
+
const getRecurringFrequencyWithOffset = (frequency) => {
|
|
169
|
+
switch (frequency) {
|
|
170
|
+
case 'weekly':
|
|
171
|
+
return { offSetValue: getRecurringFrequencyInDays(frequency), offSetUnit: 'day' };
|
|
172
|
+
case 'biweekly':
|
|
173
|
+
return { offSetValue: getRecurringFrequencyInDays(frequency), offSetUnit: 'day' };
|
|
174
|
+
case 'monthly':
|
|
175
|
+
return { offSetValue: 1, offSetUnit: 'month' };
|
|
176
|
+
case 'quarterly':
|
|
177
|
+
return { offSetValue: 1, offSetUnit: 'quarter' };
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
const { offSetValue, offSetUnit } = getRecurringFrequencyWithOffset(frequency);
|
|
149
181
|
for (let i = 0; i < totalPayments; i++) {
|
|
150
|
-
updatedInstances.push(Object.assign({ instance: currentInstance + i, isDeleted: false, amount: billAmount }, checkIfHolidayAndGetNextDate(startDate.add(i * offSetValue,
|
|
182
|
+
updatedInstances.push(Object.assign({ instance: currentInstance + i, isDeleted: false, amount: billAmount }, checkIfHolidayAndGetNextDate(startDate.add(i * offSetValue, offSetUnit))));
|
|
151
183
|
}
|
|
184
|
+
;
|
|
152
185
|
return updatedInstances;
|
|
153
186
|
}
|
|
154
187
|
function getRecurringFrequencyInDays(frequency) {
|
|
@@ -46,6 +46,16 @@ const transferDetail = (0, toolkit_1.createSlice)({
|
|
|
46
46
|
};
|
|
47
47
|
draft.localData = Object.assign(Object.assign({}, draft.localData), { transferTo: transferMoneyParty });
|
|
48
48
|
},
|
|
49
|
+
updateTransferFromLocalData(draft, action) {
|
|
50
|
+
const transferMoneyParty = {
|
|
51
|
+
id: action.payload.paymentAccountId,
|
|
52
|
+
accType: 'paymentAccount',
|
|
53
|
+
label: action.payload.accountName,
|
|
54
|
+
maskedAccountNumber: action.payload.maskedAccountNumber,
|
|
55
|
+
logo: undefined,
|
|
56
|
+
};
|
|
57
|
+
draft.localData = Object.assign(Object.assign({}, draft.localData), { transferTo: transferMoneyParty });
|
|
58
|
+
},
|
|
49
59
|
transferMoneySuccessOrFailure(draft, action) {
|
|
50
60
|
draft.fetchState = action.payload.fetchState;
|
|
51
61
|
draft.error = action.payload.error;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getTasksCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses";
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
status: import("../..").Status | undefined;
|
|
@@ -5,7 +5,7 @@ import { AccountState } from '../../entity/account/accountState';
|
|
|
5
5
|
import { EntityOrder } from '../../commonStateTypes/selectorTypes/selectorTypes';
|
|
6
6
|
import { TopExReport, TopExTimePeriodWithMetaData } from './topExSelectorTypes';
|
|
7
7
|
export declare const getTopExpenses: (accountState: AccountState, topExState: TopExState, numberOfExpenses?: number | undefined) => {
|
|
8
|
-
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses";
|
|
8
|
+
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses";
|
|
9
9
|
reportTitle: string;
|
|
10
10
|
version: string | number | undefined;
|
|
11
11
|
status: import("../..").Status | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { fetchZeniAccountsPromoCard, updateZeniAccountsPromoCard, updateZeniAccountsPromoCardFailure } from './zeniAccountsPromoCardReducer';
|
|
3
|
+
import { updateAccounts } from '../../entity/account/accountReducer';
|
|
4
|
+
import { ZeniAPI } from '../../zeniAPI';
|
|
5
|
+
import { RootState } from '../../reducer';
|
|
6
|
+
export declare 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("../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
|
|
9
|
+
type: string;
|
|
10
|
+
} | {
|
|
11
|
+
payload: import("./zeniAccountsPromoCardPayload").ZeniAccountsPromoCardPayload;
|
|
12
|
+
type: string;
|
|
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 zeniAccountsPromoCardReducer_1 = require("./zeniAccountsPromoCardReducer");
|
|
7
|
+
const responsePayload_1 = require("../../responsePayload");
|
|
8
|
+
const fetchZeniAccountsPromoCardEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(zeniAccountsPromoCardReducer_1.fetchZeniAccountsPromoCard.match), (0, operators_1.switchMap)(() => zeniAPI
|
|
9
|
+
.getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/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,10 @@
|
|
|
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_insured_amount: number;
|
|
7
|
+
max_possible_interest: number | null;
|
|
8
|
+
primary_deposit_account_id: ID | null;
|
|
9
|
+
}
|
|
10
|
+
export declare type ZeniAccountsPromoCardResponse = ZeniAPIResponse<ZeniAccountsPromoCardPayload>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ZeniAccountsPromoCardPayload } from './zeniAccountsPromoCardPayload';
|
|
2
|
+
import { ZeniAccountsPromoCardState } from './zeniAccountsPromoCardState';
|
|
3
|
+
import { ZeniAPIStatus } from '../../responsePayload';
|
|
4
|
+
export declare const initialState: ZeniAccountsPromoCardState;
|
|
5
|
+
export declare const fetchZeniAccountsPromoCard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateZeniAccountsPromoCard: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAccountsPromoCardPayload, string>, updateZeniAccountsPromoCardFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, clearZeniAccountsPromoCard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
6
|
+
declare const _default: import("@reduxjs/toolkit").Reducer<ZeniAccountsPromoCardState, import("@reduxjs/toolkit").AnyAction>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
exports.initialState = {
|
|
7
|
+
fetchState: 'Not-Started',
|
|
8
|
+
error: undefined,
|
|
9
|
+
depositAccountId: undefined,
|
|
10
|
+
maxInsuredAmount: 0,
|
|
11
|
+
maxAnnualPercentageYield: 0,
|
|
12
|
+
maxPossibleInterest: 0,
|
|
13
|
+
isShowDepositAccountsPromo: false,
|
|
14
|
+
firstMonthOfFY: 1,
|
|
15
|
+
reportId: 'zeni_accounts_promo_card',
|
|
16
|
+
reportTitle: '',
|
|
17
|
+
hasValidState() {
|
|
18
|
+
return this.fetchState == 'Completed';
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const zeniAccountsPromoCard = (0, toolkit_1.createSlice)({
|
|
22
|
+
name: 'zeniAccountsPromoCard',
|
|
23
|
+
initialState: exports.initialState,
|
|
24
|
+
reducers: {
|
|
25
|
+
fetchZeniAccountsPromoCard(draft) {
|
|
26
|
+
draft.fetchState = 'In-Progress';
|
|
27
|
+
draft.error = undefined;
|
|
28
|
+
},
|
|
29
|
+
updateZeniAccountsPromoCard(draft, action) {
|
|
30
|
+
draft.fetchState = 'Completed';
|
|
31
|
+
draft.error = undefined;
|
|
32
|
+
const promoPayload = action.payload;
|
|
33
|
+
draft.isShowDepositAccountsPromo =
|
|
34
|
+
promoPayload.is_show_deposit_accounts_promo_card;
|
|
35
|
+
draft.maxAnnualPercentageYield = promoPayload.max_apy;
|
|
36
|
+
draft.maxPossibleInterest =
|
|
37
|
+
promoPayload.max_possible_interest != null
|
|
38
|
+
? promoPayload.max_possible_interest
|
|
39
|
+
: undefined;
|
|
40
|
+
draft.maxInsuredAmount = promoPayload.max_insured_amount;
|
|
41
|
+
draft.depositAccountId =
|
|
42
|
+
promoPayload.primary_deposit_account_id != null
|
|
43
|
+
? promoPayload.primary_deposit_account_id
|
|
44
|
+
: undefined;
|
|
45
|
+
},
|
|
46
|
+
updateZeniAccountsPromoCardFailure(draft, action) {
|
|
47
|
+
draft.fetchState = 'Error';
|
|
48
|
+
draft.error = action.payload;
|
|
49
|
+
},
|
|
50
|
+
clearZeniAccountsPromoCard(draft) {
|
|
51
|
+
Object.assign(draft, exports.initialState);
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
_a = zeniAccountsPromoCard.actions, exports.fetchZeniAccountsPromoCard = _a.fetchZeniAccountsPromoCard, exports.updateZeniAccountsPromoCard = _a.updateZeniAccountsPromoCard, exports.updateZeniAccountsPromoCardFailure = _a.updateZeniAccountsPromoCardFailure, exports.clearZeniAccountsPromoCard = _a.clearZeniAccountsPromoCard;
|
|
56
|
+
exports.default = zeniAccountsPromoCard.reducer;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RootState } from '../../reducer';
|
|
2
|
+
export declare const getZeniAccountsPromoCard: (state: RootState) => {
|
|
3
|
+
isShowDepositAccountsPromo: boolean;
|
|
4
|
+
maxAnnualPercentageYield: number;
|
|
5
|
+
maxPossibleInterest: number | undefined;
|
|
6
|
+
maxInsuredAmount: number;
|
|
7
|
+
depositAccountId: string | undefined;
|
|
8
|
+
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses";
|
|
9
|
+
reportTitle: string;
|
|
10
|
+
firstMonthOfFY: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
11
|
+
fetchState: import("../..").FetchState;
|
|
12
|
+
error: import("../..").ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
13
|
+
};
|
|
14
|
+
export declare type ZeniAccountsPromoCardReport = ReturnType<typeof getZeniAccountsPromoCard>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getZeniAccountsPromoCard = void 0;
|
|
4
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
+
const getZeniAccountsPromoCardSelector = (0, toolkit_1.createSelector)((state) => state.zeniAccountsPromoCardState, (zeniAccountsPromoCardState) => ({
|
|
6
|
+
isShowDepositAccountsPromo: zeniAccountsPromoCardState.isShowDepositAccountsPromo,
|
|
7
|
+
maxAnnualPercentageYield: zeniAccountsPromoCardState.maxAnnualPercentageYield,
|
|
8
|
+
maxPossibleInterest: zeniAccountsPromoCardState.maxPossibleInterest,
|
|
9
|
+
maxInsuredAmount: zeniAccountsPromoCardState.maxInsuredAmount,
|
|
10
|
+
depositAccountId: zeniAccountsPromoCardState.depositAccountId,
|
|
11
|
+
reportId: zeniAccountsPromoCardState.reportId,
|
|
12
|
+
reportTitle: 'Business Banking',
|
|
13
|
+
firstMonthOfFY: zeniAccountsPromoCardState.firstMonthOfFY,
|
|
14
|
+
fetchState: zeniAccountsPromoCardState.fetchState,
|
|
15
|
+
error: zeniAccountsPromoCardState.error,
|
|
16
|
+
}));
|
|
17
|
+
const getZeniAccountsPromoCard = (state) => getZeniAccountsPromoCardSelector(state);
|
|
18
|
+
exports.getZeniAccountsPromoCard = getZeniAccountsPromoCard;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ID, FetchedState } from '../../commonStateTypes/common';
|
|
2
|
+
import { Report } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
+
export interface ZeniAccountsPromoCardState extends FetchedState, Report {
|
|
4
|
+
isShowDepositAccountsPromo: boolean;
|
|
5
|
+
maxAnnualPercentageYield: number;
|
|
6
|
+
maxPossibleInterest?: number;
|
|
7
|
+
maxInsuredAmount: number;
|
|
8
|
+
depositAccountId?: ID;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.28",
|
|
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
|
"types": "lib/index.d.ts",
|