@zeniai/client-epic-state 4.8.7 → 4.8.8
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/view/accountList/accountListSelector.d.ts +5 -4
- package/lib/view/classList/classListSelector.js +1 -0
- package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsPageEpic.js +3 -2
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.d.ts +2 -0
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +11 -1
- package/lib/view/scheduleView/scheduleListView/epics/fetchScheduleListEpic.js +2 -2
- package/lib/view/scheduleView/scheduleListView/epics/fetchSchedulesAccountEpic.js +1 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListHelper.d.ts +7 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListHelper.js +28 -3
- package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +1 -1
- package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.js +16 -3
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +24 -12
- package/lib/view/transactionDetail/epics/saveTransactionHelper.d.ts +2 -5
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.d.ts +3 -8
- package/lib/view/transactionDetail/transactionDetailReducer.d.ts +3 -8
- package/lib/view/vendorReviewView/common/payload/commonTypes.js +15 -10
- package/lib/view/vendorReviewView/common/state/commonTypes.js +11 -9
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/fetchVendorFirstReviewViewEpic.js +3 -7
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +4 -3
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewSelector.js +4 -4
- package/lib/view/vendorReviewView/vendorGlobalReviewView/epics/fetchVendorGlobalReviewViewEpic.js +6 -9
- package/package.json +1 -1
|
@@ -6,12 +6,13 @@ import { AccountListState, AccountListKeyType } from './accountListState';
|
|
|
6
6
|
export interface AccountListSelectorView extends SelectorView {
|
|
7
7
|
accounts: AccountBase[];
|
|
8
8
|
}
|
|
9
|
-
export
|
|
10
|
-
export declare const getAccountListFetchState: (accountListState: AccountListState, accountListKey: AccountListKeyType) => FetchState;
|
|
11
|
-
export declare const getUncategorizedAccounts: (accountState: AccountState, accountListState: AccountListState, accountListKey: AccountListKeyType) => {
|
|
9
|
+
export interface UncategorizedAccounts {
|
|
12
10
|
income: AccountBase | undefined;
|
|
13
11
|
expense: AccountBase | undefined;
|
|
14
|
-
}
|
|
12
|
+
}
|
|
13
|
+
export declare const getAccountList: (accountState: AccountState, accountListState: AccountListState, accountListKey: AccountListKeyType) => AccountListSelectorView;
|
|
14
|
+
export declare const getAccountListFetchState: (accountListState: AccountListState, accountListKey: AccountListKeyType) => FetchState;
|
|
15
|
+
export declare const getUncategorizedAccounts: (accountState: AccountState, accountListState: AccountListState, accountListKey: AccountListKeyType) => UncategorizedAccounts;
|
|
15
16
|
export declare const getNestedAccountListHeirarchy: (accountListState: AccountListState, accountListKey: AccountListKeyType) => NestedAccountHeirarchyForReport[];
|
|
16
17
|
/**
|
|
17
18
|
* This function gets the list for given label and will filter out the accounts and
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getNestedClassListHeirarchy = exports.getClassList = void 0;
|
|
4
4
|
const classSelector_1 = require("../../entity/class/classSelector");
|
|
5
|
+
// TODO - Fix return type, currently it's returning Class[] but ClassListSelectorView --> classes is ClassBase[]
|
|
5
6
|
const getClassList = (classState, classListState) => {
|
|
6
7
|
return {
|
|
7
8
|
classes: (0, classSelector_1.getClassesByIds)(classState, {
|
|
@@ -6,10 +6,11 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const accountListReducer_1 = require("../../../accountList/accountListReducer");
|
|
7
7
|
const classListReducer_1 = require("../../../classList/classListReducer");
|
|
8
8
|
const scheduleDetailReducer_1 = require("../scheduleDetailReducer");
|
|
9
|
-
const
|
|
9
|
+
const scheduleListHelper_1 = require("../../scheduleListView/scheduleListHelper");
|
|
10
10
|
const fetchScheduleDetailsPageEpic = (actions$) => actions$.pipe((0, operators_1.filter)(scheduleDetailReducer_1.fetchScheduleDetailsPage.match), (0, operators_1.mergeMap)((action) => {
|
|
11
11
|
const scheduleDetailsActions = [];
|
|
12
|
-
|
|
12
|
+
const accountType = (0, scheduleListHelper_1.getAccountsTypesForScheduleEpics)('prepaid_expenses');
|
|
13
|
+
scheduleDetailsActions.push((0, accountListReducer_1.fetchAccountList)(accountType.accountListKey, true, false, false, false, accountType.allowedAccountList));
|
|
13
14
|
scheduleDetailsActions.push((0, classListReducer_1.fetchClassList)());
|
|
14
15
|
scheduleDetailsActions.push((0, scheduleDetailReducer_1.fetchScheduleDetails)(action.payload.tab, action.payload.selectedJeScheduleDetailId));
|
|
15
16
|
return (0, rxjs_1.concat)((0, rxjs_1.from)(scheduleDetailsActions));
|
|
@@ -4,11 +4,13 @@ import { NestedClassHeirarchyForReport } from '../../../commonStateTypes/classes
|
|
|
4
4
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
5
5
|
import { ClassBase } from '../../../entity/class/classState';
|
|
6
6
|
import { JEScheduledTransaction } from '../../../entity/jeSchedules/jeSchedulesSelector';
|
|
7
|
+
import { UncategorizedAccounts } from '../../accountList/accountListSelector';
|
|
7
8
|
import { ScheduleDetailUIState, ScheduleDetailsLocalData } from './scheduleDetailState';
|
|
8
9
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
9
10
|
import { FetchStateAndError } from '../../../commonStateTypes/common';
|
|
10
11
|
export interface ScheduleDetailsView extends SelectorView {
|
|
11
12
|
allAccountList: AccountBase[];
|
|
13
|
+
uncategorizedAccounts: UncategorizedAccounts;
|
|
12
14
|
accountListNestedAccountHierarchy: NestedAccountHeirarchyForReport[];
|
|
13
15
|
allClassList: ClassBase[];
|
|
14
16
|
classListNestedAccountHierarchy: NestedClassHeirarchyForReport[];
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.getScheduleDetailsView = void 0;
|
|
7
|
+
const omit_1 = __importDefault(require("lodash/omit"));
|
|
4
8
|
const jeSchedulesSelector_1 = require("../../../entity/jeSchedules/jeSchedulesSelector");
|
|
5
9
|
const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
6
10
|
const classListSelector_1 = require("../../classList/classListSelector");
|
|
@@ -11,12 +15,14 @@ const scheduleDetailLocalDataHelper_1 = require("./scheduleDetailLocalDataHelper
|
|
|
11
15
|
const getScheduleDetailsView = (state) => {
|
|
12
16
|
const { accountState, accountListState, classState, classListState, scheduleDetailState, } = state;
|
|
13
17
|
const jeScheduleKey = scheduleDetailState.selectedJEScheduleKey;
|
|
18
|
+
const uncategorizedAccounts = (0, accountListSelector_1.getUncategorizedAccounts)(accountState, accountListState, 'prepaidExpenseAccountList');
|
|
14
19
|
if (jeScheduleKey == null) {
|
|
15
20
|
return {
|
|
16
21
|
uiState: scheduleDetailState.uiState,
|
|
17
22
|
selectedJEScheduleTransaction: undefined,
|
|
18
23
|
allAccountList: [],
|
|
19
24
|
allClassList: [],
|
|
25
|
+
uncategorizedAccounts,
|
|
20
26
|
accountListNestedAccountHierarchy: [],
|
|
21
27
|
classListNestedAccountHierarchy: [],
|
|
22
28
|
scheduleDetailsLocalData: {
|
|
@@ -36,6 +42,9 @@ const getScheduleDetailsView = (state) => {
|
|
|
36
42
|
const allAccountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'prepaidExpenseAccountList');
|
|
37
43
|
const filteredAccounts = allAccountList.accounts.filter((account) => scheduleDetailAccountIds.includes(account.accountId));
|
|
38
44
|
const allClassList = (0, classListSelector_1.getClassList)(classState, classListState);
|
|
45
|
+
const allClasses = allClassList.classes.map((classData) => {
|
|
46
|
+
return (0, omit_1.default)(classData, ['accountIds', 'key']);
|
|
47
|
+
});
|
|
39
48
|
const accountListNestedAccountHierarchy = (0, accountListSelector_1.getNestedAccountListHeirarchy)(accountListState, 'prepaidExpenseAccountList').filter((account) => account.accountId[0] != null &&
|
|
40
49
|
scheduleDetailAccountIds.includes(account.accountId[0]));
|
|
41
50
|
const classListNestedAccountHierarchy = (0, classListSelector_1.getNestedClassListHeirarchy)(classListState);
|
|
@@ -60,7 +69,8 @@ const getScheduleDetailsView = (state) => {
|
|
|
60
69
|
uiState: scheduleDetailState.uiState,
|
|
61
70
|
selectedJEScheduleTransaction: jeScheduleTransactionState,
|
|
62
71
|
allAccountList: filteredAccounts,
|
|
63
|
-
allClassList:
|
|
72
|
+
allClassList: allClasses,
|
|
73
|
+
uncategorizedAccounts,
|
|
64
74
|
accountListNestedAccountHierarchy,
|
|
65
75
|
classListNestedAccountHierarchy,
|
|
66
76
|
scheduleDetailsLocalData,
|
|
@@ -29,7 +29,7 @@ const fetchScheduleListEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, o
|
|
|
29
29
|
action.payload.cacheOverride === false) {
|
|
30
30
|
return (0, rxjs_1.from)([]);
|
|
31
31
|
}
|
|
32
|
-
const scheduleListCurrentTabAccountTypes = (0, scheduleListHelper_1.
|
|
32
|
+
const scheduleListCurrentTabAccountTypes = (0, scheduleListHelper_1.getAccountsTypesForScheduleList)(scheduleListState.currentTab).allowedAccountList;
|
|
33
33
|
const scheduleListCurrentTabAccountIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, scheduleListCurrentTabAccountTypes);
|
|
34
34
|
let categoryIds = [categoryId];
|
|
35
35
|
if (categoryId === 'all') {
|
|
@@ -67,7 +67,7 @@ exports.fetchScheduleListEpic = fetchScheduleListEpic;
|
|
|
67
67
|
* @returns
|
|
68
68
|
*/
|
|
69
69
|
const getAllAccountIdsForTab = (tab, accountListState, filterAccountIds) => {
|
|
70
|
-
const accountStateForReport = accountListState.byReportId[(0, scheduleListHelper_1.
|
|
70
|
+
const accountStateForReport = accountListState.byReportId[(0, scheduleListHelper_1.getAccountsTypesForScheduleList)(tab).accountListKey];
|
|
71
71
|
let accountIds = accountStateForReport.accountIds.filter((accountId) => filterAccountIds.includes(accountId));
|
|
72
72
|
if (tab === 'prepaid_expenses') {
|
|
73
73
|
const filteredList = accountStateForReport.accountIdsByLabel['prepaid_expenses'];
|
|
@@ -12,7 +12,7 @@ _state$) => actions$.pipe((0, operators_1.filter)(scheduleListReducer_1.fetchSch
|
|
|
12
12
|
const fetchScheduleListActions = [];
|
|
13
13
|
const scheduleTabIds = ['prepaid_expenses'];
|
|
14
14
|
scheduleTabIds.forEach((scheduleTab) => {
|
|
15
|
-
const accountType = (0, scheduleListHelper_1.
|
|
15
|
+
const accountType = (0, scheduleListHelper_1.getAccountsTypesForScheduleEpics)(scheduleTab);
|
|
16
16
|
fetchScheduleListActions.push((0, accountListReducer_1.fetchAccountList)(accountType.accountListKey, false, false, false, false, accountType.allowedAccountList));
|
|
17
17
|
});
|
|
18
18
|
return (0, rxjs_1.from)(fetchScheduleListActions);
|
|
@@ -84,5 +84,11 @@ declare type AccountListTypesPayload = {
|
|
|
84
84
|
* @param scheduleType
|
|
85
85
|
* @returns
|
|
86
86
|
*/
|
|
87
|
-
export declare const
|
|
87
|
+
export declare const getAccountsTypesForScheduleList: (scheduleType: SchedulesTypes) => AccountListTypesPayload;
|
|
88
|
+
/**
|
|
89
|
+
* Function to get accountListKey and allowedAccountList for a given tab
|
|
90
|
+
* @param scheduleType
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
93
|
+
export declare const getAccountsTypesForScheduleEpics: (scheduleType: SchedulesTypes) => AccountListTypesPayload;
|
|
88
94
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getAccountsTypesForScheduleEpics = exports.getAccountsTypesForScheduleList = exports.getDurationOfMonthOutTotalMonth = exports.calculateCOABalanceGroupedByPeriod = exports.mapScheduleJournalToCOABalance = exports.calculateTotalBalanceTimeframeTick = exports.setDefaultTotalBalanceTimeframeTicks = exports.mapTotalBalanceTimeframeTickToCOAGroupedBalance = exports.getAllTimeframeTicks = exports.getAllAccountNested = exports.getAllAccountBase = exports.getAccountListKeyForSchedulesTab = exports.getCalculatedScheduleTotals = void 0;
|
|
4
4
|
const amount_1 = require("../../../commonStateTypes/amount");
|
|
5
5
|
const formatZeniDateFY_1 = require("../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
6
6
|
const getFYMonths_1 = require("../../../commonStateTypes/fiscalYearHelpers/getFYMonths");
|
|
7
7
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
8
|
+
const scheduleDetailLocalDataHelper_1 = require("../scheduleDetailView/scheduleDetailLocalDataHelper");
|
|
8
9
|
/**
|
|
9
10
|
* This helper function calculates Total Amount and Total Running balances
|
|
10
11
|
* for all the JE transactions which can be used to display the totals on the Schedule List page.
|
|
@@ -207,7 +208,7 @@ exports.getDurationOfMonthOutTotalMonth = getDurationOfMonthOutTotalMonth;
|
|
|
207
208
|
* @param scheduleType
|
|
208
209
|
* @returns
|
|
209
210
|
*/
|
|
210
|
-
const
|
|
211
|
+
const getAccountsTypesForScheduleList = (scheduleType) => {
|
|
211
212
|
switch (scheduleType) {
|
|
212
213
|
case 'prepaid_expenses':
|
|
213
214
|
return {
|
|
@@ -221,4 +222,28 @@ const getAccountsTypesForSchedulePayload = (scheduleType) => {
|
|
|
221
222
|
};
|
|
222
223
|
}
|
|
223
224
|
};
|
|
224
|
-
exports.
|
|
225
|
+
exports.getAccountsTypesForScheduleList = getAccountsTypesForScheduleList;
|
|
226
|
+
/**
|
|
227
|
+
* Function to get accountListKey and allowedAccountList for a given tab
|
|
228
|
+
* @param scheduleType
|
|
229
|
+
* @returns
|
|
230
|
+
*/
|
|
231
|
+
const getAccountsTypesForScheduleEpics = (scheduleType) => {
|
|
232
|
+
const allowedAccountTypes = [
|
|
233
|
+
...(0, exports.getAccountsTypesForScheduleList)(scheduleType).allowedAccountList,
|
|
234
|
+
...(0, scheduleDetailLocalDataHelper_1.getAccountsTypesForScheduleDetails)(scheduleType),
|
|
235
|
+
];
|
|
236
|
+
switch (scheduleType) {
|
|
237
|
+
case 'prepaid_expenses':
|
|
238
|
+
return {
|
|
239
|
+
accountListKey: 'prepaidExpenseAccountList',
|
|
240
|
+
allowedAccountList: [...new Set(allowedAccountTypes)],
|
|
241
|
+
};
|
|
242
|
+
default:
|
|
243
|
+
return {
|
|
244
|
+
accountListKey: 'accountList',
|
|
245
|
+
allowedAccountList: [],
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
exports.getAccountsTypesForScheduleEpics = getAccountsTypesForScheduleEpics;
|
|
@@ -71,7 +71,7 @@ const getScheduleListReport = (state) => {
|
|
|
71
71
|
const allScheduleAccounts = (0, accountListSelector_1.getAccountList)(accountState, accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedulesTab)(scheduleListState.currentTab));
|
|
72
72
|
let allNestedAccounts = (0, accountListSelector_1.getNestedAccountListHeirarchy)(accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedulesTab)(scheduleListState.currentTab));
|
|
73
73
|
let allAccounts = allScheduleAccounts.accounts;
|
|
74
|
-
const scheduleListCurrentTabAccountTypes = (0, scheduleListHelper_2.
|
|
74
|
+
const scheduleListCurrentTabAccountTypes = (0, scheduleListHelper_2.getAccountsTypesForScheduleList)(scheduleListState.currentTab).allowedAccountList;
|
|
75
75
|
const scheduleListCurrentTabAccountIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, scheduleListCurrentTabAccountTypes);
|
|
76
76
|
if (scheduleListState.currentTab === 'prepaid_expenses') {
|
|
77
77
|
const filteredList = (0, accountListSelector_1.getFilteredNestedAndAccountListsForLabel)(accountState, accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedulesTab)(scheduleListState.currentTab), 'prepaid_expenses');
|
package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.js
CHANGED
|
@@ -14,6 +14,9 @@ const editBillViewState_1 = require("../editBillViewState");
|
|
|
14
14
|
const editBillViewSelector_1 = require("../editBillViewSelector");
|
|
15
15
|
const accountListSelector_1 = require("../../../../accountList/accountListSelector");
|
|
16
16
|
const classListSelector_1 = require("../../../../classList/classListSelector");
|
|
17
|
+
const workingDayHelper_1 = require("../../../../../commonStateTypes/workingDayHelper");
|
|
18
|
+
const zeniDayJS_1 = require("../../../../../zeniDayJS");
|
|
19
|
+
const companySelector_1 = require("../../../../../entity/company/companySelector");
|
|
17
20
|
const isClassRecommendation = (recommendations, classObj) => {
|
|
18
21
|
if (classObj == null) {
|
|
19
22
|
return false;
|
|
@@ -87,7 +90,7 @@ const getLineRecommendationsLocalData = (lineId, line, recommendations, accountL
|
|
|
87
90
|
};
|
|
88
91
|
exports.getLineRecommendationsLocalData = getLineRecommendationsLocalData;
|
|
89
92
|
const initializeBillToLocalStoreEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(editBillViewReducer_1.initializeBillToLocalStore.match), (0, operators_1.mergeMap)((action) => {
|
|
90
|
-
var _a, _b, _c, _d, _e, _f;
|
|
93
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
91
94
|
const { billId } = action.payload;
|
|
92
95
|
const state = state$.value;
|
|
93
96
|
const detailKey = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId);
|
|
@@ -136,9 +139,19 @@ const initializeBillToLocalStoreEpic = (actions$, state$) => actions$.pipe((0, o
|
|
|
136
139
|
(_e = transaction.lines) === null || _e === void 0 ? void 0 : _e.forEach((line) => {
|
|
137
140
|
updatesByLineId[line.id] = Object.assign(Object.assign({}, line), (0, exports.getLineRecommendationsLocalData)(line.id, line, recommendations, accountList, classList, vendor));
|
|
138
141
|
});
|
|
142
|
+
const { tenantState, companyState } = state;
|
|
143
|
+
const { currentTenantId } = tenantState;
|
|
144
|
+
const companyId = currentTenantId != null
|
|
145
|
+
? (_g = (_f = tenantState.tenantsById) === null || _f === void 0 ? void 0 : _f[currentTenantId]) === null || _g === void 0 ? void 0 : _g.companyId
|
|
146
|
+
: undefined;
|
|
147
|
+
const currentCompany = (0, companySelector_1.getCompanyByCompanyId)(companyState, companyId !== null && companyId !== void 0 ? companyId : '');
|
|
148
|
+
const payNowCutOffTime = currentCompany === null || currentCompany === void 0 ? void 0 : currentCompany.company.companyBillPayInfo.payNowCutOffTimeByMethod.ach;
|
|
149
|
+
const isPayNowEnabled = payNowCutOffTime != null
|
|
150
|
+
? (0, zeniDayJS_1.dateNow)().isSameOrBefore(payNowCutOffTime)
|
|
151
|
+
: false;
|
|
139
152
|
const paymentDetailsSection = {
|
|
140
153
|
paymentType: (0, editBillViewSelector_1.getPaymentMethodType)(state.billPayConfigState, transaction.billPayInfo.billPaymentMethodType, transaction.billPayInfo.internationalTransferFeeBearerPaymentMethod),
|
|
141
|
-
paymentDate: transaction.billPayInfo.paymentDate,
|
|
154
|
+
paymentDate: (_h = transaction.billPayInfo.paymentDate) !== null && _h !== void 0 ? _h : (0, zeniDayJS_1.date)((0, workingDayHelper_1.getNextNthWorkingDay)((0, zeniDayJS_1.dateNow)().toDate(), [0, 6], isPayNowEnabled ? 0 : 1).toISOString()),
|
|
142
155
|
withdrawFrom: transaction.billPayInfo.fromAccount.billAccountId != null &&
|
|
143
156
|
transaction.billPayInfo.fromAccount.billAccountId.length > 0
|
|
144
157
|
? transaction.billPayInfo.fromAccount.billAccountId
|
|
@@ -151,7 +164,7 @@ const initializeBillToLocalStoreEpic = (actions$, state$) => actions$.pipe((0, o
|
|
|
151
164
|
};
|
|
152
165
|
const totalAmount = transaction.amount;
|
|
153
166
|
const isCancelled = transaction.billPayInfo.isCancelled;
|
|
154
|
-
const file = (
|
|
167
|
+
const file = (_j = transaction.attachments) === null || _j === void 0 ? void 0 : _j[0];
|
|
155
168
|
const candidateVendorname = transaction.candidateVendorName;
|
|
156
169
|
const toAccountVendorEmail = transaction.billPayInfo.toAccountVendorEmail;
|
|
157
170
|
const isCollectToAccountInfoFromVendorContact = transaction.billPayInfo.isCollectToAccountInfoFromVendorContact;
|
|
@@ -25,6 +25,8 @@ const initializeBillToLocalStoreEpic_1 = require("./initializeBillToLocalStoreEp
|
|
|
25
25
|
const transactionPayload_1 = require("../../../../../entity/transaction/payloadTypes/transactionPayload");
|
|
26
26
|
const billPayConfigPayload_1 = require("../../billPayConfig/billPayConfigPayload");
|
|
27
27
|
const billTransactionState_1 = require("../../../../../entity/billPay/billTransaction/billTransactionState");
|
|
28
|
+
const workingDayHelper_1 = require("../../../../../commonStateTypes/workingDayHelper");
|
|
29
|
+
const companySelector_1 = require("../../../../../entity/company/companySelector");
|
|
28
30
|
const parseInvoiceToBillEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(editBillViewReducer_1.parseInvoiceToBill.match), (0, operators_1.mergeMap)((action) => {
|
|
29
31
|
var _a, _b, _c, _d, _e, _f;
|
|
30
32
|
const { invoiceProcessingPayload, isVendorRecommendationFeatureEnabled } = action.payload;
|
|
@@ -118,7 +120,7 @@ const parseInvoiceToBillEpic = (actions$, state$) => actions$.pipe((0, operators
|
|
|
118
120
|
}));
|
|
119
121
|
exports.parseInvoiceToBillEpic = parseInvoiceToBillEpic;
|
|
120
122
|
const toBillDetailLocalData = (state, billPayload, vendor, recommendedVendorId) => {
|
|
121
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
123
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
122
124
|
const currency = {
|
|
123
125
|
currencyCode: (_a = billPayload.currency_code) !== null && _a !== void 0 ? _a : '',
|
|
124
126
|
currencySymbol: (_b = billPayload.currency_symbol) !== null && _b !== void 0 ? _b : '', //api not returning symbol
|
|
@@ -170,6 +172,16 @@ const toBillDetailLocalData = (state, billPayload, vendor, recommendedVendorId)
|
|
|
170
172
|
: undefined, internationalTransferFeeBearerPaymentMethod != null
|
|
171
173
|
? (0, billTransactionState_1.toInternationalTransferFeeBearerPaymentMethod)(internationalTransferFeeBearerPaymentMethod)
|
|
172
174
|
: undefined);
|
|
175
|
+
const { tenantState, companyState } = state;
|
|
176
|
+
const { currentTenantId } = tenantState;
|
|
177
|
+
const companyId = currentTenantId != null
|
|
178
|
+
? (_k = (_j = tenantState.tenantsById) === null || _j === void 0 ? void 0 : _j[currentTenantId]) === null || _k === void 0 ? void 0 : _k.companyId
|
|
179
|
+
: undefined;
|
|
180
|
+
const currentCompany = (0, companySelector_1.getCompanyByCompanyId)(companyState, companyId !== null && companyId !== void 0 ? companyId : '');
|
|
181
|
+
const payNowCutOffTime = currentCompany === null || currentCompany === void 0 ? void 0 : currentCompany.company.companyBillPayInfo.payNowCutOffTimeByMethod.ach;
|
|
182
|
+
const isPayNowEnabled = payNowCutOffTime != null
|
|
183
|
+
? (0, zeniDayJS_1.dateNow)().isSameOrBefore(payNowCutOffTime)
|
|
184
|
+
: false;
|
|
173
185
|
return {
|
|
174
186
|
recommendedVendorId,
|
|
175
187
|
lastRecommendedVendorName: recommendedVendorId != null ? vendor === null || vendor === void 0 ? void 0 : vendor.name : undefined,
|
|
@@ -196,24 +208,24 @@ const toBillDetailLocalData = (state, billPayload, vendor, recommendedVendorId)
|
|
|
196
208
|
? (0, billPayConfigPayload_1.getInternationalSubConfigCodeKey)(internationalSubCode)
|
|
197
209
|
: undefined))
|
|
198
210
|
: undefined,
|
|
199
|
-
paymentDate: ((
|
|
200
|
-
? (0, zeniDayJS_1.date)((
|
|
201
|
-
:
|
|
202
|
-
withdrawFrom: (
|
|
203
|
-
internationalTransferFeeBearerPaymentMethod: ((
|
|
204
|
-
? (0, billTransactionState_1.toInternationalTransferFeeBearerPaymentMethod)((
|
|
211
|
+
paymentDate: ((_l = billPayload.bill_pay_info) === null || _l === void 0 ? void 0 : _l.payment_date) != null
|
|
212
|
+
? (0, zeniDayJS_1.date)((_m = billPayload.bill_pay_info) === null || _m === void 0 ? void 0 : _m.payment_date)
|
|
213
|
+
: (0, zeniDayJS_1.date)((0, workingDayHelper_1.getNextNthWorkingDay)((0, zeniDayJS_1.dateNow)().toDate(), [0, 6], isPayNowEnabled ? 0 : 1).toISOString()),
|
|
214
|
+
withdrawFrom: (_p = (_o = billPayload.bill_pay_info) === null || _o === void 0 ? void 0 : _o.from_account.account_id) !== null && _p !== void 0 ? _p : undefined,
|
|
215
|
+
internationalTransferFeeBearerPaymentMethod: ((_q = billPayload.bill_pay_info) === null || _q === void 0 ? void 0 : _q.international_transfer_fee_bearer_payment_method) != null
|
|
216
|
+
? (0, billTransactionState_1.toInternationalTransferFeeBearerPaymentMethod)((_r = billPayload.bill_pay_info) === null || _r === void 0 ? void 0 : _r.international_transfer_fee_bearer_payment_method)
|
|
205
217
|
: undefined,
|
|
206
218
|
},
|
|
207
219
|
totalAmount: billPayload.amount != null
|
|
208
220
|
? (0, amount_1.toAmountWC)(billPayload.amount, {
|
|
209
|
-
currencyCode: (
|
|
210
|
-
currencySymbol: (
|
|
221
|
+
currencyCode: (_s = billPayload.currency_code) !== null && _s !== void 0 ? _s : 'USD',
|
|
222
|
+
currencySymbol: (_t = billPayload.currency_symbol) !== null && _t !== void 0 ? _t : '$',
|
|
211
223
|
})
|
|
212
224
|
: undefined,
|
|
213
225
|
isCancelled: false,
|
|
214
|
-
toAccountVendorEmail: (
|
|
215
|
-
isCollectToAccountInfoFromVendorContact: (
|
|
216
|
-
isRecurring: (
|
|
226
|
+
toAccountVendorEmail: (_v = (_u = billPayload.bill_pay_info) === null || _u === void 0 ? void 0 : _u.to_account_vendor_email) !== null && _v !== void 0 ? _v : undefined,
|
|
227
|
+
isCollectToAccountInfoFromVendorContact: (_x = (_w = billPayload.bill_pay_info) === null || _w === void 0 ? void 0 : _w.is_collect_to_account_info_from_vendor_contact) !== null && _x !== void 0 ? _x : false,
|
|
228
|
+
isRecurring: (_y = billPayload.is_recurring) !== null && _y !== void 0 ? _y : false,
|
|
217
229
|
};
|
|
218
230
|
};
|
|
219
231
|
exports.toBillDetailLocalData = toBillDetailLocalData;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AccountBase } from '../../../entity/account/accountState';
|
|
2
1
|
import { SupportedTransaction } from '../../../entity/transaction/transactionState';
|
|
2
|
+
import { UncategorizedAccounts } from '../../accountList/accountListSelector';
|
|
3
3
|
import { TransactionSaveUpdates } from '../transactionDetailState';
|
|
4
4
|
import { TransactionDetailLocalData } from '../transactionDetailTypes';
|
|
5
5
|
/**
|
|
@@ -18,7 +18,4 @@ import { TransactionDetailLocalData } from '../transactionDetailTypes';
|
|
|
18
18
|
* 4. Only difference between this and Miscategorized will be that we will
|
|
19
19
|
* additionally fire “Mark as not miscat” for every point above.
|
|
20
20
|
*/
|
|
21
|
-
export declare const toTransactionUpdatesFromTransactionDetailLocalData: (transactionDetailLocalData: TransactionDetailLocalData, transaction: SupportedTransaction, uncategorizedIncomeExpense:
|
|
22
|
-
income: AccountBase | undefined;
|
|
23
|
-
expense: AccountBase | undefined;
|
|
24
|
-
}) => TransactionSaveUpdates;
|
|
21
|
+
export declare const toTransactionUpdatesFromTransactionDetailLocalData: (transactionDetailLocalData: TransactionDetailLocalData, transaction: SupportedTransaction, uncategorizedIncomeExpense: UncategorizedAccounts) => TransactionSaveUpdates;
|
|
@@ -4,11 +4,9 @@ import { AccountBase } from '../../entity/account/accountState';
|
|
|
4
4
|
import { ClassBase } from '../../entity/class/classState';
|
|
5
5
|
import { Entity } from '../../entity/genericEntity/entity';
|
|
6
6
|
import { SupportedTransaction } from '../../entity/transaction/transactionState';
|
|
7
|
+
import { UncategorizedAccounts } from '../accountList/accountListSelector';
|
|
7
8
|
import { TransactionDetailLocalData } from './transactionDetailTypes';
|
|
8
|
-
export declare const toTransactionDetailLocalData: (transaction: SupportedTransaction, vendorId: ID | undefined, uncategorizedIncomeExpense?:
|
|
9
|
-
income: AccountBase | undefined;
|
|
10
|
-
expense: AccountBase | undefined;
|
|
11
|
-
} | undefined) => TransactionDetailLocalData;
|
|
9
|
+
export declare const toTransactionDetailLocalData: (transaction: SupportedTransaction, vendorId: ID | undefined, uncategorizedIncomeExpense?: UncategorizedAccounts | undefined) => TransactionDetailLocalData;
|
|
12
10
|
export declare const toUpdateLineItemsOriginalCategoryClass: (transaction: SupportedTransaction, transactionDetailLocalData: TransactionDetailLocalData, lineIdsForReplace: ID[], lineIdsForUpdateAll: ID[], replace: 'account' | 'class' | 'both', updateAll?: boolean | undefined) => TransactionDetailLocalData;
|
|
13
11
|
export declare const toSetAllLineItemsToCategoryClass: (transaction: SupportedTransaction, transactionDetailLocalData: TransactionDetailLocalData, isUpdateAll: boolean, lineEntity?: Entity | undefined, chosenAccount?: {
|
|
14
12
|
account: AccountBase;
|
|
@@ -18,9 +16,6 @@ export declare const toSetAllLineItemsToCategoryClass: (transaction: SupportedTr
|
|
|
18
16
|
updateOrRetain: 'update' | 'retain';
|
|
19
17
|
} | undefined, recommendations?: Recommendation[] | undefined) => TransactionDetailLocalData;
|
|
20
18
|
export declare const toSetAllLineItemsLocalDataIsUpdateAllChecked: (transaction: SupportedTransaction, transactionDetailLocalData: TransactionDetailLocalData, isUpdateAll: boolean, entity?: Entity | undefined) => TransactionDetailLocalData;
|
|
21
|
-
export declare const setEntityRecommendationForLineIdInLocalData: (transaction: SupportedTransaction, transactionDetailLocalData: TransactionDetailLocalData, entity: Entity, recommendationLineIds: ID[], recommendations?: Recommendation[] | undefined, uncategorizedIncomeExpense?:
|
|
22
|
-
income: AccountBase | undefined;
|
|
23
|
-
expense: AccountBase | undefined;
|
|
24
|
-
} | undefined) => TransactionDetailLocalData;
|
|
19
|
+
export declare const setEntityRecommendationForLineIdInLocalData: (transaction: SupportedTransaction, transactionDetailLocalData: TransactionDetailLocalData, entity: Entity, recommendationLineIds: ID[], recommendations?: Recommendation[] | undefined, uncategorizedIncomeExpense?: UncategorizedAccounts | undefined) => TransactionDetailLocalData;
|
|
25
20
|
export declare const removeEntityRecommendationForLineIdInLocalData: (transaction: SupportedTransaction, transactionDetailLocalData: TransactionDetailLocalData, recommendationLineIds: ID[]) => TransactionDetailLocalData;
|
|
26
21
|
export declare const getChangedLineItemCountFromLocalData: (transaction: SupportedTransaction, transactionLocalData: TransactionDetailLocalData) => number;
|
|
@@ -8,6 +8,7 @@ import { AccountBase } from '../../entity/account/accountState';
|
|
|
8
8
|
import { ClassBase } from '../../entity/class/classState';
|
|
9
9
|
import { Entity } from '../../entity/genericEntity/entity';
|
|
10
10
|
import { Recommendation } from '../../commonStateTypes/recommendationBase';
|
|
11
|
+
import { UncategorizedAccounts } from '../accountList/accountListSelector';
|
|
11
12
|
export declare const initialState: TransactionDetailState;
|
|
12
13
|
export declare const fetchTransactionDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: TransactionID, cacheOverride?: any], {
|
|
13
14
|
transactionId: TransactionID;
|
|
@@ -83,20 +84,14 @@ export declare const fetchTransactionDetail: import("@reduxjs/toolkit").ActionCr
|
|
|
83
84
|
transaction: SupportedTransaction;
|
|
84
85
|
isUpdateAll: boolean;
|
|
85
86
|
entity: Entity | undefined;
|
|
86
|
-
}, string, never, never>, setEntityRecommendationForLineIdsForTransactionDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: TransactionID, transaction: SupportedTransaction, lineIds: string[], entity: Entity, amount: number, recommendations?: Recommendation[] | undefined, uncategorizedIncomeExpense?: {
|
|
87
|
-
income: AccountBase | undefined;
|
|
88
|
-
expense: AccountBase | undefined;
|
|
89
|
-
} | undefined], {
|
|
87
|
+
}, string, never, never>, setEntityRecommendationForLineIdsForTransactionDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: TransactionID, transaction: SupportedTransaction, lineIds: string[], entity: Entity, amount: number, recommendations?: Recommendation[] | undefined, uncategorizedIncomeExpense?: UncategorizedAccounts | undefined], {
|
|
90
88
|
transactionId: TransactionID;
|
|
91
89
|
transaction: SupportedTransaction;
|
|
92
90
|
lineIds: string[];
|
|
93
91
|
entity: Entity;
|
|
94
92
|
amount: number;
|
|
95
93
|
recommendations: Recommendation[] | undefined;
|
|
96
|
-
uncategorizedIncomeExpense:
|
|
97
|
-
income: AccountBase | undefined;
|
|
98
|
-
expense: AccountBase | undefined;
|
|
99
|
-
} | undefined;
|
|
94
|
+
uncategorizedIncomeExpense: UncategorizedAccounts | undefined;
|
|
100
95
|
}, string, never, never>, removeEntityRecommendationForLineIdForTransactionDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: TransactionID, transaction: SupportedTransaction, lineId: string], {
|
|
101
96
|
transactionId: TransactionID;
|
|
102
97
|
transaction: SupportedTransaction;
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.toGlobalMerchantsBasePayload = exports.toVendorReviewViewRecommendationPayload = exports.toNonExistingRecommendationGlobalMerchantBasePayload = exports.toUserPayload = void 0;
|
|
7
|
-
const flatMap_1 = __importDefault(require("lodash/flatMap"));
|
|
8
7
|
const omit_1 = __importDefault(require("lodash/omit"));
|
|
9
8
|
const globalMerchantPayload_1 = require("../../../../entity/globalMerchant/globalMerchantPayload");
|
|
10
9
|
/**
|
|
@@ -69,19 +68,25 @@ const toVendorReviewViewRecommendationPayload = (recommendations, nonExistingRec
|
|
|
69
68
|
global_merchants: recommendationEntities,
|
|
70
69
|
};
|
|
71
70
|
});
|
|
72
|
-
const allRecommendations =
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
const allRecommendations = [
|
|
72
|
+
{
|
|
73
|
+
global_merchants: [
|
|
74
|
+
...recommendationsPayload[0].global_merchants,
|
|
75
|
+
...nonExistingRecommendationsPayload[0].global_merchants,
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
];
|
|
75
79
|
return allRecommendations;
|
|
76
80
|
};
|
|
77
81
|
exports.toVendorReviewViewRecommendationPayload = toVendorReviewViewRecommendationPayload;
|
|
78
82
|
const toGlobalMerchantsBasePayload = (vendorsRecommendationsPayload) => {
|
|
79
|
-
var _a
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
.
|
|
84
|
-
|
|
83
|
+
var _a;
|
|
84
|
+
const globalMerchantBasePayload = [];
|
|
85
|
+
(_a = vendorsRecommendationsPayload[0]) === null || _a === void 0 ? void 0 : _a.global_merchants.forEach((globalMerchantPayload) => {
|
|
86
|
+
if (globalMerchantPayload.global_merchant_id != null) {
|
|
87
|
+
globalMerchantBasePayload.push(globalMerchantPayload);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
85
90
|
return globalMerchantBasePayload;
|
|
86
91
|
};
|
|
87
92
|
exports.toGlobalMerchantsBasePayload = toGlobalMerchantsBasePayload;
|
|
@@ -67,15 +67,17 @@ const toNonExistingGlobalMerchantBase = (globalMerchantPayload) => {
|
|
|
67
67
|
};
|
|
68
68
|
exports.toNonExistingGlobalMerchantBase = toNonExistingGlobalMerchantBase;
|
|
69
69
|
const toAllRecommendationsFromPayload = (recommendationsPayload) => {
|
|
70
|
-
var _a
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
var _a;
|
|
71
|
+
const recommendations = [];
|
|
72
|
+
const nonExistingRecommendations = [];
|
|
73
|
+
(_a = recommendationsPayload[0]) === null || _a === void 0 ? void 0 : _a.global_merchants.forEach((globalmerchant) => {
|
|
74
|
+
if (globalmerchant.global_merchant_id != null) {
|
|
75
|
+
recommendations.push((0, globalMerchantPayload_1.toGlobalMerchantBase)(globalmerchant));
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
nonExistingRecommendations.push((0, exports.toNonExistingGlobalMerchantBase)(globalmerchant));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
79
81
|
const recommendationIds = recommendations.map((recommendation) => recommendation.globalMerchantId);
|
|
80
82
|
return {
|
|
81
83
|
recommendationIds,
|
package/lib/view/vendorReviewView/vendorFirstReviewView/epics/fetchVendorFirstReviewViewEpic.js
CHANGED
|
@@ -82,17 +82,13 @@ exports.mapUsersPayloadFromVendorFirstReviewViewResponse = mapUsersPayloadFromVe
|
|
|
82
82
|
const mapGlobalMerchantsBasePayloadFromVendorFirstReviewViewResponse = (vendorsResponse) => {
|
|
83
83
|
const globalMerchantBasePayload = [];
|
|
84
84
|
vendorsResponse.forEach((vendor) => {
|
|
85
|
-
var _a
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
85
|
+
var _a;
|
|
86
|
+
const existingMerchants = (_a = vendor.recommendations[0]) === null || _a === void 0 ? void 0 : _a.global_merchants.filter((merchant) => merchant.global_merchant_id != null);
|
|
87
|
+
mapEntitiesRecommendationsPayloadToGlobalMerchantsBasePayload(existingMerchants, globalMerchantBasePayload);
|
|
89
88
|
});
|
|
90
89
|
return globalMerchantBasePayload;
|
|
91
90
|
};
|
|
92
91
|
exports.mapGlobalMerchantsBasePayloadFromVendorFirstReviewViewResponse = mapGlobalMerchantsBasePayloadFromVendorFirstReviewViewResponse;
|
|
93
|
-
const mapVendorRecommendationsToGlobalMerchantBasePayload = (recommendations, globalMerchantBasePayload) => {
|
|
94
|
-
recommendations.forEach((recommendation) => mapEntitiesRecommendationsPayloadToGlobalMerchantsBasePayload(recommendation.global_merchants, globalMerchantBasePayload));
|
|
95
|
-
};
|
|
96
92
|
const mapEntitiesRecommendationsPayloadToGlobalMerchantsBasePayload = (entities, globalMerchantBasePayload) => {
|
|
97
93
|
entities.forEach((entity) => globalMerchantBasePayload.push(entity));
|
|
98
94
|
};
|
|
@@ -83,8 +83,9 @@ const vendorFirstReviewView = (0, toolkit_1.createSlice)({
|
|
|
83
83
|
const isRecommendationSelected = selectedGlobalMerchantId != null &&
|
|
84
84
|
(selectedGlobalMerchantId ===
|
|
85
85
|
vendorLocalData.recommendationIds[0] ||
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
(vendorLocalData.recommendationIds.length === 0 &&
|
|
87
|
+
selectedGlobalMerchantId ===
|
|
88
|
+
((_a = vendorLocalData.recommendedNonExistingGlobalMerchants[0]) === null || _a === void 0 ? void 0 : _a.globalMerchantName)));
|
|
88
89
|
const isRetainSelected = selectedGlobalMerchantId != null &&
|
|
89
90
|
selectedGlobalMerchantId === vendorLocalData.vendorId;
|
|
90
91
|
currentSelection =
|
|
@@ -244,7 +245,7 @@ const mapPayloadToVendorFirstReviewView = (payload) => {
|
|
|
244
245
|
},
|
|
245
246
|
currentSelection: null,
|
|
246
247
|
recommendationIds,
|
|
247
|
-
recommendedNonExistingGlobalMerchants:
|
|
248
|
+
recommendedNonExistingGlobalMerchants: nonExistingRecommendations,
|
|
248
249
|
lastUpdatedVendorNameByUserId: (_a = payload.last_updated_vendor_name_by_user) === null || _a === void 0 ? void 0 : _a.user_id,
|
|
249
250
|
};
|
|
250
251
|
};
|
|
@@ -19,10 +19,10 @@ const getVendorFirstReviewView = (state) => {
|
|
|
19
19
|
const currentVendor = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorLocalData.vendorId);
|
|
20
20
|
const users = (0, userSelector_1.getUsersByUserIds)(userState, userIds);
|
|
21
21
|
let recommendations = (0, globalMerchantSelector_1.getGlobalMerchantsByMerchantIds)(globalMerchantState, vendorLocalData.recommendationIds);
|
|
22
|
-
recommendations =
|
|
23
|
-
recommendations
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
recommendations = [
|
|
23
|
+
...recommendations,
|
|
24
|
+
...vendorLocalData.recommendedNonExistingGlobalMerchants,
|
|
25
|
+
];
|
|
26
26
|
let selectedVendor;
|
|
27
27
|
const vendor = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorLocalData.selectedVendorId);
|
|
28
28
|
if (vendor != null) {
|
package/lib/view/vendorReviewView/vendorGlobalReviewView/epics/fetchVendorGlobalReviewViewEpic.js
CHANGED
|
@@ -71,15 +71,12 @@ exports.toUsersPayload = toUsersPayload;
|
|
|
71
71
|
const mapGlobalReviewPayloadToGlobalMerchantsBasePayload = (vendorsResponse) => {
|
|
72
72
|
let globalMerchantBasePayload = [];
|
|
73
73
|
vendorsResponse.forEach((vendor) => {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
...
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
]),
|
|
81
|
-
];
|
|
82
|
-
}
|
|
74
|
+
globalMerchantBasePayload = [
|
|
75
|
+
...new Set([
|
|
76
|
+
...globalMerchantBasePayload,
|
|
77
|
+
...(0, commonTypes_1.toGlobalMerchantsBasePayload)(vendor.recommendations),
|
|
78
|
+
]),
|
|
79
|
+
];
|
|
83
80
|
});
|
|
84
81
|
return globalMerchantBasePayload;
|
|
85
82
|
};
|
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.8",
|
|
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",
|