@zeniai/client-epic-state 4.11.32 → 4.11.33
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 +2 -2
- 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/user/userSelector.js +7 -2
- package/lib/epic.d.ts +2 -1
- package/lib/epic.js +2 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +19 -18
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cardPayment/cardPaymentViewReducer.js +5 -4
- 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/companyView/selector/companyManagementViewSelector.js +47 -27
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/people/peopleSelector.js +2 -2
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/settingsView/epic/fetchBillingAccountsViewEpic.d.ts +7 -0
- package/lib/view/settingsView/epic/fetchBillingAccountsViewEpic.js +15 -0
- package/lib/view/settingsView/settingsViewReducer.d.ts +1 -1
- package/lib/view/settingsView/settingsViewReducer.js +5 -2
- package/lib/view/settingsView/settingsViewSelector.d.ts +2 -1
- package/lib/view/settingsView/settingsViewSelector.js +18 -3
- package/lib/view/settingsView/types/settingsViewSelectorTypes.d.ts +5 -0
- package/lib/view/spendManagement/billPay/billList/billListSelector.d.ts +2 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +126 -67
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +1 -1
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +4 -0
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +4 -4
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +2 -1
- package/lib/view/spendManagement/commonSetup/setupViewState.js +3 -2
- package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/getPaymentAccountsEpic.js +10 -3
- package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +3 -2
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +11 -11
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +9 -2
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +1 -1
- package/lib/view/spendManagement/zeniAccounts/zeniAccountList/fetchZeniAccountListPageEpic.js +4 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/package.json +2 -2
|
@@ -14,6 +14,7 @@ const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
|
14
14
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
15
15
|
const customerSatisfactionState_1 = require("../../../entity/customerSatisfaction/customerSatisfactionState");
|
|
16
16
|
const cockpitHelpers_1 = require("../helpers/cockpitHelpers");
|
|
17
|
+
const sortOrderPayload_1 = require("../../../commonPayloadTypes/sortOrderPayload");
|
|
17
18
|
const getManagementViewFromCompanyIds = (rootState, companyIds, fetchState) => {
|
|
18
19
|
const uiState = rootState.companyViewState.managementView.uiState;
|
|
19
20
|
const { sortKey, sortOrder, filterText, filters } = uiState;
|
|
@@ -334,12 +335,27 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, companies, userS
|
|
|
334
335
|
break;
|
|
335
336
|
}
|
|
336
337
|
});
|
|
338
|
+
const sortOrderKey = (0, sortOrderPayload_1.getSortOrder)(sortOrder);
|
|
339
|
+
const sortOrderKeys = [];
|
|
340
|
+
if (sortKey === 'plans') {
|
|
341
|
+
let maxPlansCount = 0;
|
|
342
|
+
companiesWithSortKeyValue.forEach((company) => {
|
|
343
|
+
var _a;
|
|
344
|
+
maxPlansCount = Math.max(maxPlansCount, (_a = (0, exports.getPlanList)(company)) === null || _a === void 0 ? void 0 : _a.length);
|
|
345
|
+
});
|
|
346
|
+
for (let i = 0; i < maxPlansCount; i++) {
|
|
347
|
+
sortOrderKeys.push(sortOrderKey);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
if (sortOrderKeys.length === 0) {
|
|
351
|
+
sortOrderKeys.push(sortOrderKey, sortOrderKey);
|
|
352
|
+
}
|
|
337
353
|
const sortedCompaniesWithSortKeyValue = (0, orderBy_1.default)(companiesWithSortKeyValue, [
|
|
338
354
|
(company) => {
|
|
339
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q
|
|
355
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
340
356
|
let primarySortValue;
|
|
341
|
-
let
|
|
342
|
-
let
|
|
357
|
+
let multiSortValues = [];
|
|
358
|
+
let isMultiSortApplicable = false;
|
|
343
359
|
const managegmentInfo = company.company.company.managegmentInfo;
|
|
344
360
|
switch (sortKey) {
|
|
345
361
|
case 'companyName':
|
|
@@ -350,10 +366,11 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, companies, userS
|
|
|
350
366
|
primarySortValue = (_a = managegmentInfo.companyGroupId) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
351
367
|
break;
|
|
352
368
|
case 'plans':
|
|
353
|
-
|
|
369
|
+
isMultiSortApplicable = true;
|
|
370
|
+
multiSortValues = (0, exports.getPlanList)(company).map((plan) => plan === null || plan === void 0 ? void 0 : plan.zeniSku);
|
|
354
371
|
break;
|
|
355
372
|
case 'task':
|
|
356
|
-
primarySortValue = (
|
|
373
|
+
primarySortValue = (_b = company.taskSummary) === null || _b === void 0 ? void 0 : _b.count;
|
|
357
374
|
break;
|
|
358
375
|
case 'controller':
|
|
359
376
|
primarySortValue = (0, userSelector_1.getUserNameById)(userState, managegmentInfo.controllerUserIds[0]).toLowerCase();
|
|
@@ -371,50 +388,53 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, companies, userS
|
|
|
371
388
|
primarySortValue = (0, userSelector_1.getUserNameById)(userState, managegmentInfo.apAnalystUserIds[0]).toLowerCase();
|
|
372
389
|
break;
|
|
373
390
|
case 'reportSent':
|
|
374
|
-
primarySortValue = ((
|
|
391
|
+
primarySortValue = ((_c = managegmentInfo.lastReportSentDate) !== null && _c !== void 0 ? _c : (0, zeniDayJS_1.date)('1970-01-01T00:00:00.000Z')).valueOf();
|
|
375
392
|
break;
|
|
376
393
|
case 'taxStatus':
|
|
377
|
-
primarySortValue = (
|
|
394
|
+
primarySortValue = (_d = managegmentInfo.taxStatusCode) === null || _d === void 0 ? void 0 : _d.toLowerCase();
|
|
378
395
|
break;
|
|
379
396
|
case 'taxLead':
|
|
380
397
|
primarySortValue = (0, userSelector_1.getUserNameById)(userState, managegmentInfo.taxLeadUserIds[0]).toLowerCase();
|
|
381
398
|
break;
|
|
382
399
|
case 'monthlyRecurringRevenue':
|
|
383
400
|
primarySortValue =
|
|
384
|
-
(
|
|
401
|
+
(_g = (_f = (_e = company.primarySubscription) === null || _e === void 0 ? void 0 : _e.summary) === null || _f === void 0 ? void 0 : _f.summary.monthlyRecurringRevenue.amount) !== null && _g !== void 0 ? _g : 0;
|
|
385
402
|
break;
|
|
386
403
|
case 'annualRecurringRevenue':
|
|
387
404
|
primarySortValue =
|
|
388
|
-
(
|
|
405
|
+
(_k = (_j = (_h = company.primarySubscription) === null || _h === void 0 ? void 0 : _h.summary) === null || _j === void 0 ? void 0 : _j.summary.annualRecurringRevenue.amount) !== null && _k !== void 0 ? _k : 0;
|
|
389
406
|
break;
|
|
390
407
|
case 'notes':
|
|
391
|
-
primarySortValue = (
|
|
408
|
+
primarySortValue = (_l = managegmentInfo.note) === null || _l === void 0 ? void 0 : _l.length;
|
|
392
409
|
break;
|
|
393
410
|
case 'satisfaction':
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
? customerSatisfactionState_1.teamRatingValues[managegmentInfo.customerSatisfaction.teamRating]
|
|
402
|
-
: 0;
|
|
411
|
+
isMultiSortApplicable = true;
|
|
412
|
+
multiSortValues.push(((_m = managegmentInfo.customerSatisfaction) === null || _m === void 0 ? void 0 : _m.customerRating) != null
|
|
413
|
+
? customerSatisfactionState_1.customerRatingValues[managegmentInfo.customerSatisfaction.customerRating]
|
|
414
|
+
: 0);
|
|
415
|
+
multiSortValues.push(((_o = managegmentInfo.customerSatisfaction) === null || _o === void 0 ? void 0 : _o.teamRating) != null
|
|
416
|
+
? customerSatisfactionState_1.teamRatingValues[managegmentInfo.customerSatisfaction.teamRating]
|
|
417
|
+
: 0);
|
|
403
418
|
break;
|
|
404
419
|
case 'bookCloseDate':
|
|
405
|
-
primarySortValue = ((
|
|
420
|
+
primarySortValue = ((_p = company.company.company.companyInfo.bookCloseDate) !== null && _p !== void 0 ? _p : (0, zeniDayJS_1.date)('1970-01-01T00:00:00.000Z')).valueOf();
|
|
406
421
|
break;
|
|
407
422
|
case 'status':
|
|
408
|
-
default:
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
423
|
+
default: {
|
|
424
|
+
isMultiSortApplicable = true;
|
|
425
|
+
let statusCode = '';
|
|
426
|
+
if (managegmentInfo.statusCode) {
|
|
427
|
+
statusCode = (0, cockpitTypes_1.toManagementStatusCodeType)(managegmentInfo.statusCode.toLowerCase());
|
|
428
|
+
}
|
|
429
|
+
multiSortValues.push(cockpitTypes_1.MANAGEMENT_STATUS_CODES.indexOf(statusCode));
|
|
430
|
+
multiSortValues.push((_q = managegmentInfo.companyGroupId) === null || _q === void 0 ? void 0 : _q.toLowerCase());
|
|
431
|
+
}
|
|
412
432
|
}
|
|
413
|
-
return
|
|
414
|
-
?
|
|
433
|
+
return isMultiSortApplicable === true
|
|
434
|
+
? multiSortValues
|
|
415
435
|
: primarySortValue;
|
|
416
436
|
},
|
|
417
|
-
],
|
|
437
|
+
], sortOrderKeys);
|
|
418
438
|
return [...sortedCompaniesWithSortKeyValue, ...companiesWithNoSortKeyValue];
|
|
419
439
|
};
|
|
420
440
|
const getTotalRecurringRevenue = (companies) => companies.reduce((prev, curr) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { DashboardState } from './dashboardState';
|
|
2
2
|
export declare const initialState: DashboardState;
|
|
3
|
-
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("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" | "fixed_assets" | "notification" | "rewards_card")[] | undefined], {
|
|
3
|
+
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("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" | "fixed_assets" | "notification" | "rewards_card" | "billing")[] | undefined], {
|
|
4
4
|
userId: string;
|
|
5
5
|
companyId: string;
|
|
6
6
|
fetchFullReport: any;
|
|
7
7
|
cacheOverride: any;
|
|
8
|
-
excludeResources: ("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" | "fixed_assets" | "notification" | "rewards_card")[];
|
|
8
|
+
excludeResources: ("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" | "fixed_assets" | "notification" | "rewards_card" | "billing")[];
|
|
9
9
|
}, string, never, never>, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
10
10
|
declare const _default: import("@reduxjs/toolkit").Reducer<DashboardState, import("@reduxjs/toolkit").AnyAction>;
|
|
11
11
|
export default _default;
|
|
@@ -16,7 +16,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
|
|
|
16
16
|
thisPeriod: TimeframeTick;
|
|
17
17
|
coaBalances: COABalance[];
|
|
18
18
|
maxNumOfPeriodsToHighlight: number;
|
|
19
|
-
}, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"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" | "fixed_assets" | "notification" | "rewards_card", string>, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
19
|
+
}, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"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" | "fixed_assets" | "notification" | "rewards_card" | "billing", string>, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
20
20
|
firstMonthOfFY: Month;
|
|
21
21
|
isCompareModeOn: boolean;
|
|
22
22
|
additionalBalances: COABalanceType[];
|
|
@@ -4,9 +4,9 @@ import { ID } from '../../commonStateTypes/common';
|
|
|
4
4
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
5
5
|
import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
|
|
6
6
|
export declare const initialState: GlobalMerchantViewState;
|
|
7
|
-
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "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" | "fixed_assets" | "notification" | "rewards_card" | undefined], {
|
|
7
|
+
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "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" | "fixed_assets" | "notification" | "rewards_card" | "billing" | undefined], {
|
|
8
8
|
merchantId: string | undefined;
|
|
9
|
-
context: "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" | "fixed_assets" | "notification" | "rewards_card" | undefined;
|
|
9
|
+
context: "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" | "fixed_assets" | "notification" | "rewards_card" | "billing" | undefined;
|
|
10
10
|
}, string, never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
11
11
|
merchantId: ID;
|
|
12
12
|
}, string>, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -142,8 +142,8 @@ const sortPeopleBySortKey = (person, sortKey, userState, classState) => {
|
|
|
142
142
|
default:
|
|
143
143
|
return person.user != null
|
|
144
144
|
? person.user.firstName
|
|
145
|
-
? (_b = person.user) === null || _b === void 0 ? void 0 : _b.firstName.toLowerCase()
|
|
146
|
-
: (_c = person.user) === null || _c === void 0 ? void 0 : _c.email.toLowerCase()
|
|
145
|
+
? (_b = person.user) === null || _b === void 0 ? void 0 : _b.firstName.toLowerCase().trim()
|
|
146
|
+
: (_c = person.user) === null || _c === void 0 ? void 0 : _c.email.toLowerCase().trim()
|
|
147
147
|
: undefined;
|
|
148
148
|
}
|
|
149
149
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getReimbursementCardReport: (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" | "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" | "fixed_assets" | "notification" | "rewards_card";
|
|
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" | "fixed_assets" | "notification" | "rewards_card" | "billing";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
fetchState: import("../..").FetchState;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionsObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { fetchBillingAccountsView } from '../settingsViewReducer';
|
|
4
|
+
import { getPaymentAccounts } from '../../spendManagement/plaidAccount/plaidAccountViewReducer';
|
|
5
|
+
import { fetchPaymentSources } from '../../cardPayment/cardPaymentViewReducer';
|
|
6
|
+
export declare type ActionType = ReturnType<typeof fetchBillingAccountsView> | ReturnType<typeof fetchPaymentSources> | ReturnType<typeof getPaymentAccounts>;
|
|
7
|
+
export declare const fetchBillingAccountsListEpic: (actions$: ActionsObservable<ActionType>) => Observable<ActionType>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchBillingAccountsListEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const settingsViewReducer_1 = require("../settingsViewReducer");
|
|
7
|
+
const plaidAccountViewReducer_1 = require("../../spendManagement/plaidAccount/plaidAccountViewReducer");
|
|
8
|
+
const cardPaymentViewReducer_1 = require("../../cardPayment/cardPaymentViewReducer");
|
|
9
|
+
const fetchBillingAccountsListEpic = (actions$) => actions$.pipe((0, operators_1.filter)(settingsViewReducer_1.fetchBillingAccountsView.match), (0, operators_1.switchMap)(() => {
|
|
10
|
+
return (0, rxjs_1.from)([
|
|
11
|
+
(0, cardPaymentViewReducer_1.fetchPaymentSources)(),
|
|
12
|
+
(0, plaidAccountViewReducer_1.getPaymentAccounts)('billing', 'billing_setup', false),
|
|
13
|
+
]);
|
|
14
|
+
}));
|
|
15
|
+
exports.fetchBillingAccountsListEpic = fetchBillingAccountsListEpic;
|
|
@@ -11,7 +11,7 @@ export declare const fetchMyProfileView: import("@reduxjs/toolkit").ActionCreato
|
|
|
11
11
|
companyId: string;
|
|
12
12
|
}, string, never, never>, updateMyProfileOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string], {
|
|
13
13
|
userId: string;
|
|
14
|
-
}, string, never, never>, updateMyProfileOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, fetchBankConnectionsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateBankConnectionOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
14
|
+
}, string, never, never>, updateMyProfileOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, fetchBankConnectionsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, fetchBillingAccountsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateBankConnectionOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
15
15
|
bankAccountIds: ID[];
|
|
16
16
|
}, string>, updateBankConnectionOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, fetchBankAccountsList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, fetchNotificationSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateNotificationSettingsOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[data: NotificationSettingsPayload, loggedInUserEmail: string], {
|
|
17
17
|
data: NotificationSettingsPayload;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearSettingsView = exports.updateSettingsViewUIState = exports.refreshQBODataFailure = exports.refreshQBODataSuccess = exports.refreshQBOData = exports.resetNotificationSettingsUpdateStatus = exports.updateNotificationSettingsOnSaveFailure = exports.updateNotificationSettingsOnSaveSuccess = exports.saveNotificationSettings = exports.resetNotificationSettingsLocalData = exports.updateNotificationSettingsLocalData = exports.updateNotificationSettingsOnFailure = exports.updateNotificationSettingsOnSuccess = exports.fetchNotificationSettings = exports.fetchBankAccountsList = exports.updateBankConnectionOnFailure = exports.updateBankConnectionOnSuccess = exports.fetchBankConnectionsView = exports.updateMyProfileOnFailure = exports.updateMyProfileOnSuccess = exports.fetchNotificationSettingsView = exports.fetchMyProfile = exports.fetchMyProfileView = exports.initialState = void 0;
|
|
4
|
+
exports.clearSettingsView = exports.updateSettingsViewUIState = exports.refreshQBODataFailure = exports.refreshQBODataSuccess = exports.refreshQBOData = exports.resetNotificationSettingsUpdateStatus = exports.updateNotificationSettingsOnSaveFailure = exports.updateNotificationSettingsOnSaveSuccess = exports.saveNotificationSettings = exports.resetNotificationSettingsLocalData = exports.updateNotificationSettingsLocalData = exports.updateNotificationSettingsOnFailure = exports.updateNotificationSettingsOnSuccess = exports.fetchNotificationSettings = exports.fetchBankAccountsList = exports.updateBankConnectionOnFailure = exports.updateBankConnectionOnSuccess = exports.fetchBillingAccountsView = exports.fetchBankConnectionsView = exports.updateMyProfileOnFailure = exports.updateMyProfileOnSuccess = exports.fetchNotificationSettingsView = exports.fetchMyProfile = exports.fetchMyProfileView = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const settingsViewState_1 = require("./settingsViewState");
|
|
7
7
|
const initialNotificationSettingsData = {
|
|
@@ -97,6 +97,9 @@ const settings = (0, toolkit_1.createSlice)({
|
|
|
97
97
|
fetchBankConnectionsView() {
|
|
98
98
|
// Do nothing.
|
|
99
99
|
},
|
|
100
|
+
fetchBillingAccountsView() {
|
|
101
|
+
// Do nothing.
|
|
102
|
+
},
|
|
100
103
|
fetchBankAccountsList(draft) {
|
|
101
104
|
draft.bankConnection.fetchState = 'In-Progress';
|
|
102
105
|
draft.bankConnection.error = undefined;
|
|
@@ -196,7 +199,7 @@ const settings = (0, toolkit_1.createSlice)({
|
|
|
196
199
|
},
|
|
197
200
|
},
|
|
198
201
|
});
|
|
199
|
-
_a = settings.actions, exports.fetchMyProfileView = _a.fetchMyProfileView, exports.fetchMyProfile = _a.fetchMyProfile, exports.fetchNotificationSettingsView = _a.fetchNotificationSettingsView, exports.updateMyProfileOnSuccess = _a.updateMyProfileOnSuccess, exports.updateMyProfileOnFailure = _a.updateMyProfileOnFailure, exports.fetchBankConnectionsView = _a.fetchBankConnectionsView, exports.updateBankConnectionOnSuccess = _a.updateBankConnectionOnSuccess, exports.updateBankConnectionOnFailure = _a.updateBankConnectionOnFailure, exports.fetchBankAccountsList = _a.fetchBankAccountsList, exports.fetchNotificationSettings = _a.fetchNotificationSettings, exports.updateNotificationSettingsOnSuccess = _a.updateNotificationSettingsOnSuccess, exports.updateNotificationSettingsOnFailure = _a.updateNotificationSettingsOnFailure, exports.updateNotificationSettingsLocalData = _a.updateNotificationSettingsLocalData, exports.resetNotificationSettingsLocalData = _a.resetNotificationSettingsLocalData, exports.saveNotificationSettings = _a.saveNotificationSettings, exports.updateNotificationSettingsOnSaveSuccess = _a.updateNotificationSettingsOnSaveSuccess, exports.updateNotificationSettingsOnSaveFailure = _a.updateNotificationSettingsOnSaveFailure, exports.resetNotificationSettingsUpdateStatus = _a.resetNotificationSettingsUpdateStatus, exports.refreshQBOData = _a.refreshQBOData, exports.refreshQBODataSuccess = _a.refreshQBODataSuccess, exports.refreshQBODataFailure = _a.refreshQBODataFailure, exports.updateSettingsViewUIState = _a.updateSettingsViewUIState, exports.clearSettingsView = _a.clearSettingsView;
|
|
202
|
+
_a = settings.actions, exports.fetchMyProfileView = _a.fetchMyProfileView, exports.fetchMyProfile = _a.fetchMyProfile, exports.fetchNotificationSettingsView = _a.fetchNotificationSettingsView, exports.updateMyProfileOnSuccess = _a.updateMyProfileOnSuccess, exports.updateMyProfileOnFailure = _a.updateMyProfileOnFailure, exports.fetchBankConnectionsView = _a.fetchBankConnectionsView, exports.fetchBillingAccountsView = _a.fetchBillingAccountsView, exports.updateBankConnectionOnSuccess = _a.updateBankConnectionOnSuccess, exports.updateBankConnectionOnFailure = _a.updateBankConnectionOnFailure, exports.fetchBankAccountsList = _a.fetchBankAccountsList, exports.fetchNotificationSettings = _a.fetchNotificationSettings, exports.updateNotificationSettingsOnSuccess = _a.updateNotificationSettingsOnSuccess, exports.updateNotificationSettingsOnFailure = _a.updateNotificationSettingsOnFailure, exports.updateNotificationSettingsLocalData = _a.updateNotificationSettingsLocalData, exports.resetNotificationSettingsLocalData = _a.resetNotificationSettingsLocalData, exports.saveNotificationSettings = _a.saveNotificationSettings, exports.updateNotificationSettingsOnSaveSuccess = _a.updateNotificationSettingsOnSaveSuccess, exports.updateNotificationSettingsOnSaveFailure = _a.updateNotificationSettingsOnSaveFailure, exports.resetNotificationSettingsUpdateStatus = _a.resetNotificationSettingsUpdateStatus, exports.refreshQBOData = _a.refreshQBOData, exports.refreshQBODataSuccess = _a.refreshQBODataSuccess, exports.refreshQBODataFailure = _a.refreshQBODataFailure, exports.updateSettingsViewUIState = _a.updateSettingsViewUIState, exports.clearSettingsView = _a.clearSettingsView;
|
|
200
203
|
exports.default = settings.reducer;
|
|
201
204
|
/**
|
|
202
205
|
* Helpers
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
import { FetchStateAndError, ID } from '../../commonStateTypes/common';
|
|
3
|
-
import { MyBankConnectionsView, BankConnectionsSetupView, MyProfileSelectorView, NotificationSettingsSelectorView, IntegrationsView } from './types/settingsViewSelectorTypes';
|
|
3
|
+
import { MyBankConnectionsView, BankConnectionsSetupView, MyProfileSelectorView, NotificationSettingsSelectorView, IntegrationsView, BillingView } from './types/settingsViewSelectorTypes';
|
|
4
4
|
import { NotificationSettings } from './settingsViewState';
|
|
5
5
|
export declare function getApprovalRuleViewDetails(state: RootState): FetchStateAndError;
|
|
6
6
|
export declare function getBankConnectionsSetupViewDetails(state: RootState, companyId: ID): BankConnectionsSetupView;
|
|
7
|
+
export declare function getBillingAccountsViewDetails(state: RootState, companyId: ID): BillingView;
|
|
7
8
|
export declare function getMyBankConnectionsDetails(state: RootState, userId: ID): MyBankConnectionsView;
|
|
8
9
|
export declare function getIntegrationsView(state: RootState, companyId: ID): IntegrationsView;
|
|
9
10
|
export declare const getMyProfileView: (state: RootState, shouldFetchClasses: boolean) => MyProfileSelectorView;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getNotificationSettingsView = exports.getNotificationSettings = exports.getMyProfileView = exports.getIntegrationsView = exports.getMyBankConnectionsDetails = exports.getBankConnectionsSetupViewDetails = exports.getApprovalRuleViewDetails = void 0;
|
|
6
|
+
exports.getNotificationSettingsView = exports.getNotificationSettings = exports.getMyProfileView = exports.getIntegrationsView = exports.getMyBankConnectionsDetails = exports.getBillingAccountsViewDetails = exports.getBankConnectionsSetupViewDetails = exports.getApprovalRuleViewDetails = void 0;
|
|
7
7
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
8
8
|
const values_1 = __importDefault(require("lodash/values"));
|
|
9
9
|
const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
|
|
@@ -19,6 +19,7 @@ const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
|
|
|
19
19
|
const companyPassportViewSelector_1 = require("../companyView/selector/companyPassportViewSelector");
|
|
20
20
|
const userFinancialAccountSelector_1 = require("../userFinancialAccount/userFinancialAccountSelector");
|
|
21
21
|
const setupViewSelector_1 = require("../../view/spendManagement/commonSetup/setupViewSelector");
|
|
22
|
+
const cardPaymentViewSelector_1 = require("../cardPayment/cardPaymentViewSelector");
|
|
22
23
|
function getApprovalRuleViewDetails(state) {
|
|
23
24
|
const { billPaySetupApproverViewState, remiSetupApproverViewState } = state;
|
|
24
25
|
const fetchState = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
@@ -32,7 +33,7 @@ function getApprovalRuleViewDetails(state) {
|
|
|
32
33
|
exports.getApprovalRuleViewDetails = getApprovalRuleViewDetails;
|
|
33
34
|
function getBankConnectionsSetupViewDetails(state, companyId) {
|
|
34
35
|
const { accountState, plaidAccountViewState, settingsViewState } = state;
|
|
35
|
-
const { bankConnection
|
|
36
|
+
const { bankConnection } = settingsViewState;
|
|
36
37
|
const allBankAccounts = bankConnection.bankAccountIds
|
|
37
38
|
.map((accountId) => (0, accountSelector_1.getAccountBase)(accountState, accountId, 'bill_pay'))
|
|
38
39
|
.filter((account) => account != null);
|
|
@@ -42,11 +43,25 @@ function getBankConnectionsSetupViewDetails(state, companyId) {
|
|
|
42
43
|
]);
|
|
43
44
|
return {
|
|
44
45
|
setupView: Object.assign(Object.assign({}, (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'bill_pay', 'spend_management_setup')), { allBankAccounts }),
|
|
45
|
-
uiState,
|
|
46
46
|
fetchState: fetchState.fetchState,
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
exports.getBankConnectionsSetupViewDetails = getBankConnectionsSetupViewDetails;
|
|
50
|
+
function getBillingAccountsViewDetails(state, companyId) {
|
|
51
|
+
const { plaidAccountViewState, settingsViewState } = state;
|
|
52
|
+
const { uiState } = settingsViewState;
|
|
53
|
+
const fetchState = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
54
|
+
settingsViewState.bankConnection,
|
|
55
|
+
plaidAccountViewState['billing_setup'].accountDetails.fetchStatus,
|
|
56
|
+
]);
|
|
57
|
+
return {
|
|
58
|
+
setupView: Object.assign({}, (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'billing', 'billing_setup')),
|
|
59
|
+
uiState,
|
|
60
|
+
cardPaymentView: (0, cardPaymentViewSelector_1.getAllCardsAndBankPaymentMethods)(state),
|
|
61
|
+
fetchState: fetchState.fetchState,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
exports.getBillingAccountsViewDetails = getBillingAccountsViewDetails;
|
|
50
65
|
function getMyBankConnectionsDetails(state, userId) {
|
|
51
66
|
var _a, _b;
|
|
52
67
|
const userFinancialAccount = (0, userFinancialAccountSelector_1.getUserFinancialAccount)(state, userId);
|
|
@@ -10,6 +10,7 @@ import { UserFinancialAccountSelectorView } from '../../userFinancialAccount/use
|
|
|
10
10
|
import { IntegrationsSettings, NotificationSettings, SettingsViewUIState } from '../settingsViewState';
|
|
11
11
|
import { TenantExternalConnections } from '../../../entity/tenant/tenantState';
|
|
12
12
|
import { Company } from '../../../entity/company/companyStateTypes';
|
|
13
|
+
import { CardPaymentSelectorView } from '../../cardPayment/cardPaymentViewSelector';
|
|
13
14
|
export interface MyProfileSelectorView extends SelectorView {
|
|
14
15
|
isZeniUser: boolean;
|
|
15
16
|
person: MyProfile;
|
|
@@ -29,6 +30,10 @@ export interface MyBankConnectionsView extends UserFinancialAccountSelectorView
|
|
|
29
30
|
}
|
|
30
31
|
export interface BankConnectionsSetupView extends FetchStateAndError {
|
|
31
32
|
setupView: SetupView;
|
|
33
|
+
}
|
|
34
|
+
export interface BillingView extends FetchStateAndError {
|
|
35
|
+
setupView: SetupView;
|
|
36
|
+
cardPaymentView: CardPaymentSelectorView;
|
|
32
37
|
uiState: SettingsViewUIState;
|
|
33
38
|
}
|
|
34
39
|
export interface NotificationSettingsSelectorView extends NotificationSettings {
|
|
@@ -13,6 +13,7 @@ import { RecurringBillConfig } from '../../../../entity/billPay/recurringBills/r
|
|
|
13
13
|
import { BulkOperationType, BulkSelectExceptionInfoType } from '../billsBulkActionView/billsBulkActionViewState';
|
|
14
14
|
export interface BillBulkSelectInfo {
|
|
15
15
|
isSelectableForBulkAction: boolean;
|
|
16
|
+
isSelectableForBulkActionSelectAll: boolean;
|
|
16
17
|
bulkSelectExceptionInfo?: BulkSelectExceptionInfoType;
|
|
17
18
|
}
|
|
18
19
|
export interface BillListBulkActionInfo {
|
|
@@ -49,4 +50,4 @@ export declare const getBillList: (state: RootState, currentTimePeriod: TimePeri
|
|
|
49
50
|
export declare const getApproversOrRejectors: (billTransaction: BillTransaction, entityApprovalStatusState: EntityApprovalStatusState, userState: UserState) => Approvers;
|
|
50
51
|
export declare const getBillListOnSort: (sortKey: BillPayViewSortKey, sortOrder: SortOrder, currentTab: BillTab, transactions: BillTransactionView[]) => BillTransactionView[];
|
|
51
52
|
export declare const checkIfBulkActionAllowed: (selectedTab: BillTab, selectedSubTab: BillsSubTabType) => boolean;
|
|
52
|
-
export declare const getAllowedBulkActions: (selectedTab: BillTab, selectedSubTab: BillsSubTabType, isAllAwaitingMyApproval: boolean, isFirstBillProcessing: boolean) => BulkOperationType[];
|
|
53
|
+
export declare const getAllowedBulkActions: (selectedTab: BillTab, selectedSubTab: BillsSubTabType, isAllAwaitingMyApproval: boolean, isFirstBillProcessing: boolean, isBookClosedForAnySelectedBill: boolean, isRecurringBillInBulkActionList: boolean) => BulkOperationType[];
|