@zeniai/client-epic-state 4.8.34 → 4.8.35
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 +0 -1
- 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 +1 -2
- package/lib/entity/tenant/clearAllEpic.js +0 -2
- package/lib/epic.d.ts +1 -2
- package/lib/epic.js +1 -2
- package/lib/index.d.ts +0 -4
- package/lib/index.js +1 -5
- package/lib/reducer.d.ts +0 -3
- package/lib/reducer.js +0 -3
- 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 +1 -2
- package/lib/view/dashboard/dashboardEpic.js +0 -10
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/dashboard/dashboardSelector.d.ts +0 -2
- package/lib/view/dashboard/dashboardSelector.js +2 -7
- 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 +2 -4
- package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +2 -1
- package/lib/view/spendManagement/helpers.js +6 -39
- package/lib/view/spendManagement/spendManagementFilterHelpers.js +3 -4
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailReducer.js +0 -10
- package/lib/view/taskManager/taskListView/taskListReducer.js +1 -8
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/package.json +1 -1
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.d.ts +0 -13
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.js +0 -20
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.d.ts +0 -10
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.js +0 -2
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.d.ts +0 -7
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.js +0 -56
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.d.ts +0 -14
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.js +0 -18
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.d.ts +0 -9
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.js +0 -2
|
@@ -125,18 +125,8 @@ const getTotalPayments = (startDate, endDate, frequency, currentInstance) => {
|
|
|
125
125
|
pastPayments = currentInstance.instance - 1;
|
|
126
126
|
}
|
|
127
127
|
let totalPayments = 0;
|
|
128
|
-
|
|
129
|
-
|
|
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
|
-
}
|
|
128
|
+
const offSetValue = getRecurringFrequencyInDays(frequency);
|
|
129
|
+
totalPayments = endDate.diff(currentStartDate, 'day') / offSetValue;
|
|
140
130
|
return Math.floor(totalPayments + pastPayments) + 1; //+1 to include startDate
|
|
141
131
|
};
|
|
142
132
|
exports.getTotalPayments = getTotalPayments;
|
|
@@ -148,40 +138,17 @@ const getEndDate = (startDate, frequency, totalPayments, currentInstance) => {
|
|
|
148
138
|
currentStartDate = currentInstance.vendorReceiveDate;
|
|
149
139
|
currentTotalPayments = totalPayments - currentInstance.instance + 1;
|
|
150
140
|
}
|
|
151
|
-
|
|
152
|
-
|
|
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
|
-
}
|
|
141
|
+
const offSetValue = getRecurringFrequencyInDays(frequency);
|
|
142
|
+
endDate = currentStartDate.add(offSetValue * (currentTotalPayments - 1), 'day');
|
|
163
143
|
return endDate;
|
|
164
144
|
};
|
|
165
145
|
exports.getEndDate = getEndDate;
|
|
166
146
|
function getRecurringBillInstances(startDate, frequency, totalPayments, currentInstance, billAmount) {
|
|
167
147
|
const updatedInstances = [];
|
|
168
|
-
const
|
|
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);
|
|
148
|
+
const offSetValue = getRecurringFrequencyInDays(frequency);
|
|
181
149
|
for (let i = 0; i < totalPayments; i++) {
|
|
182
|
-
updatedInstances.push(Object.assign({ instance: currentInstance + i, isDeleted: false, amount: billAmount }, checkIfHolidayAndGetNextDate(startDate.add(i * offSetValue,
|
|
150
|
+
updatedInstances.push(Object.assign({ instance: currentInstance + i, isDeleted: false, amount: billAmount }, checkIfHolidayAndGetNextDate(startDate.add(i * offSetValue, 'day'))));
|
|
183
151
|
}
|
|
184
|
-
;
|
|
185
152
|
return updatedInstances;
|
|
186
153
|
}
|
|
187
154
|
function getRecurringFrequencyInDays(frequency) {
|
|
@@ -31,8 +31,8 @@ const filterItemOnRangeCategoryType = (valueForItem, currentFilter) => {
|
|
|
31
31
|
const currentValue = valueForItem;
|
|
32
32
|
const lowerValue = currentFilter.values[0];
|
|
33
33
|
const higherValue = currentFilter.values[1];
|
|
34
|
-
if (currentValue.
|
|
35
|
-
currentValue.
|
|
34
|
+
if (currentValue.isAfter(lowerValue) &&
|
|
35
|
+
currentValue.isBefore(higherValue)) {
|
|
36
36
|
doesItemFallInValueRange = true;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -120,8 +120,7 @@ const applyAdvancedFiltersOnList = (entity, allItems, filters, filteredItems = [
|
|
|
120
120
|
}
|
|
121
121
|
return false;
|
|
122
122
|
}
|
|
123
|
-
else if (
|
|
124
|
-
currentFilter.field === 'assignee') &&
|
|
123
|
+
else if (currentFilter.field === 'status' &&
|
|
125
124
|
Array.isArray(categoryValue)) {
|
|
126
125
|
return (0, exports.filterItemOnCategoriesWithMultipleValues)(categoryValue, currentFilter);
|
|
127
126
|
}
|
|
@@ -46,16 +46,6 @@ 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
|
-
},
|
|
59
49
|
transferMoneySuccessOrFailure(draft, action) {
|
|
60
50
|
draft.fetchState = action.payload.fetchState;
|
|
61
51
|
draft.error = action.payload.error;
|
|
@@ -14,14 +14,7 @@ exports.initialState = {
|
|
|
14
14
|
},
|
|
15
15
|
filters: {
|
|
16
16
|
categoryCombinationOperator: 'AND',
|
|
17
|
-
categories: [
|
|
18
|
-
{
|
|
19
|
-
field: 'status',
|
|
20
|
-
matchingOperator: 'not-equal',
|
|
21
|
-
values: ['resolved'],
|
|
22
|
-
valuesCombinationOperator: 'ANY',
|
|
23
|
-
},
|
|
24
|
-
],
|
|
17
|
+
categories: [],
|
|
25
18
|
},
|
|
26
19
|
hasValidState() {
|
|
27
20
|
return this.fetchState == 'Completed';
|
|
@@ -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" | "
|
|
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";
|
|
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" | "
|
|
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";
|
|
9
9
|
reportTitle: string;
|
|
10
10
|
version: string | number | undefined;
|
|
11
11
|
status: import("../..").Status | undefined;
|
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.35",
|
|
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",
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
}>;
|
|
@@ -1,20 +0,0 @@
|
|
|
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;
|
|
@@ -1,10 +0,0 @@
|
|
|
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>;
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,56 +0,0 @@
|
|
|
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;
|
|
@@ -1,14 +0,0 @@
|
|
|
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>;
|
|
@@ -1,18 +0,0 @@
|
|
|
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;
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
}
|