@zeniai/client-epic-state 4.18.89 → 4.18.91
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/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +0 -4
- package/lib/commonStateTypes/classesView/getNestedClassIDHierarchyForReport.js +0 -2
- package/lib/commonStateTypes/classesView/nestedClassID.d.ts +0 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- 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/chargeCard/chargeCard.d.ts +1 -2
- package/lib/entity/chargeCard/chargeCard.js +0 -2
- package/lib/entity/chargeCard/chargeCardPayload.d.ts +1 -2
- package/lib/entity/chargeCard/chargeCardPayload.js +9 -10
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
- package/lib/entity/chargeCardTransaction/chargeCardTransactionPayload.d.ts +2 -1
- package/lib/entity/class/classPayload.d.ts +0 -1
- package/lib/entity/class/classPayload.js +9 -9
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -2
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +0 -8
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +0 -14
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +0 -8
- 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/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -12
- package/lib/entity/tenant/tenantPayload.d.ts +0 -1
- package/lib/entity/tenant/tenantReducer.d.ts +1 -1
- package/lib/entity/tenant/tenantReducer.js +2 -8
- package/lib/entity/tenant/tenantState.d.ts +0 -1
- package/lib/epic.d.ts +1 -13
- package/lib/epic.js +1 -13
- package/lib/index.d.ts +12 -14
- package/lib/index.js +30 -53
- package/lib/init.d.ts +1 -2
- package/lib/init.js +2 -3
- package/lib/responsePayload.d.ts +0 -3
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- 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/classList/classListReducer.d.ts +1 -3
- package/lib/view/classList/classListReducer.js +3 -8
- package/lib/view/classList/fetchClassListEpic.js +2 -6
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +1 -2
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +2 -10
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportViewEpic.js +4 -2
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/dashboard/dashboardSelector.d.ts +1 -2
- package/lib/view/dashboard/dashboardSelector.js +6 -14
- package/lib/view/dashboardLayout/dashboardLayoutReducer.js +0 -1
- package/lib/view/dashboardLayout/fetchDashboardLayoutEpic.js +1 -14
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +1 -1
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.js +1 -1
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.d.ts +0 -8
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.d.ts +1 -11
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.js +3 -47
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.d.ts +0 -3
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.js +13 -18
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.d.ts +1 -7
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +4 -3
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +2 -17
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +3 -38
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailPayload.d.ts +1 -11
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -40
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +26 -189
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +1 -19
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +12 -87
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchDepositAccountLimitEpic.js +4 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +0 -7
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListPayload.d.ts +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +4 -34
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +3 -142
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +0 -46
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +4 -198
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.d.ts +1 -3
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +0 -18
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.d.ts +1 -1
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.js +2 -24
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewState.d.ts +0 -1
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/zeniAPI.d.ts +1 -12
- package/lib/zeniAPI.js +6 -33
- package/package.json +1 -1
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthClosePerformanceTrendEpic.d.ts +0 -7
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthClosePerformanceTrendEpic.js +0 -47
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/closeChargeCardEpic.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/closeChargeCardEpic.js +0 -71
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardsRecurringExpensesEpic.d.ts +0 -7
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardsRecurringExpensesEpic.js +0 -44
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/lockChargeCardEpic.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/lockChargeCardEpic.js +0 -78
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/unlockChargeCardEpic.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/unlockChargeCardEpic.js +0 -75
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateChargeCardNameEpic.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateChargeCardNameEpic.js +0 -83
- package/lib/view/spendManagement/chargeCards/chargeCardList/closeChargeCardsEpic.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/chargeCardList/closeChargeCardsEpic.js +0 -69
- package/lib/view/spendManagement/chargeCards/chargeCardList/lockChargeCardsEpic.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/chargeCardList/lockChargeCardsEpic.js +0 -69
- package/lib/view/spendManagement/chargeCards/chargeCardList/revokeChargeCardsInviteEpic.d.ts +0 -8
- package/lib/view/spendManagement/chargeCards/chargeCardList/revokeChargeCardsInviteEpic.js +0 -71
- package/lib/view/spendManagement/chargeCards/chargeCardList/unlockChargeCardsEpic.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/chargeCardList/unlockChargeCardsEpic.js +0 -68
- package/lib/view/spendManagement/chargeCards/chargeCardList/updateChargeCardsLimitEpic.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/chargeCardList/updateChargeCardsLimitEpic.js +0 -76
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.d.ts +0 -8
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +0 -22
|
@@ -2,8 +2,6 @@ import { ZeniAPIStatus } from '../../responsePayload';
|
|
|
2
2
|
import { ClassListResponse } from './classListPayload';
|
|
3
3
|
import { ClassListState } from './classListState';
|
|
4
4
|
export declare const initialState: ClassListState;
|
|
5
|
-
export declare const fetchClassList: import("@reduxjs/toolkit").
|
|
6
|
-
isIncludeDeleted: boolean;
|
|
7
|
-
}, "classList/fetchClassList", never, never>, updateClassList: import("@reduxjs/toolkit").ActionCreatorWithPayload<ClassListResponse, "classList/updateClassList">, updateClassListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "classList/updateClassListFailure">, clearClassList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"classList/clearClassList">;
|
|
5
|
+
export declare const fetchClassList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"classList/fetchClassList">, updateClassList: import("@reduxjs/toolkit").ActionCreatorWithPayload<ClassListResponse, "classList/updateClassList">, updateClassListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "classList/updateClassListFailure">, clearClassList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"classList/clearClassList">;
|
|
8
6
|
declare const _default: import("redux").Reducer<ClassListState>;
|
|
9
7
|
export default _default;
|
|
@@ -18,14 +18,9 @@ const classList = (0, toolkit_1.createSlice)({
|
|
|
18
18
|
name: 'classList',
|
|
19
19
|
initialState: exports.initialState,
|
|
20
20
|
reducers: {
|
|
21
|
-
fetchClassList
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
draft.error = undefined;
|
|
25
|
-
},
|
|
26
|
-
prepare(isIncludeDeleted) {
|
|
27
|
-
return { payload: { isIncludeDeleted: isIncludeDeleted !== null && isIncludeDeleted !== void 0 ? isIncludeDeleted : false } };
|
|
28
|
-
},
|
|
21
|
+
fetchClassList(draft) {
|
|
22
|
+
draft.fetchState = 'In-Progress';
|
|
23
|
+
draft.error = undefined;
|
|
29
24
|
},
|
|
30
25
|
updateClassList(draft, action) {
|
|
31
26
|
var _a, _b, _c, _d;
|
|
@@ -6,13 +6,9 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const classReducer_1 = require("../../entity/class/classReducer");
|
|
7
7
|
const responsePayload_1 = require("../../responsePayload");
|
|
8
8
|
const classListReducer_1 = require("./classListReducer");
|
|
9
|
-
const fetchClassListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(classListReducer_1.fetchClassList.match), (0, operators_1.switchMap)((
|
|
10
|
-
const { isIncludeDeleted } = action.payload;
|
|
11
|
-
const queryParams = isIncludeDeleted === true
|
|
12
|
-
? `?query=${encodeURIComponent(JSON.stringify({ is_include_deleted: true }))}`
|
|
13
|
-
: '';
|
|
9
|
+
const fetchClassListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(classListReducer_1.fetchClassList.match), (0, operators_1.switchMap)(() => {
|
|
14
10
|
return zeniAPI
|
|
15
|
-
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/classes
|
|
11
|
+
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/classes`)
|
|
16
12
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
17
13
|
var _a, _b;
|
|
18
14
|
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
@@ -19,12 +19,11 @@ export declare const fetchImproveUsingZeniGPT: import("@reduxjs/toolkit").Action
|
|
|
19
19
|
}, "reviewCompanyView/updateImproveUsingZeniGPTSuccess", never, never>, updateImproveUsingZeniGPTFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[status: ZeniAPIStatus<Record<string, unknown>>, companyId: string], {
|
|
20
20
|
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
21
21
|
companyId: string;
|
|
22
|
-
}, "reviewCompanyView/updateImproveUsingZeniGPTFailure", never, never>, fetchCompanyMonthEndReportView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride: any, companyId: string, tenantId?: string | undefined, insightDate?: string | undefined
|
|
22
|
+
}, "reviewCompanyView/updateImproveUsingZeniGPTFailure", never, never>, fetchCompanyMonthEndReportView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride: any, companyId: string, tenantId?: string | undefined, insightDate?: string | undefined], {
|
|
23
23
|
cacheOverride: any;
|
|
24
24
|
companyId: string;
|
|
25
25
|
tenantId: string | undefined;
|
|
26
26
|
insightDate: string | undefined;
|
|
27
|
-
refreshInsights: boolean | undefined;
|
|
28
27
|
}, "reviewCompanyView/fetchCompanyMonthEndReportView", never, never>, updateCompanyMonthEndReportViewOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, data: CompanyMonthEndReportViewPayload], {
|
|
29
28
|
companyId: string;
|
|
30
29
|
data: CompanyMonthEndReportViewPayload;
|
|
@@ -48,16 +48,8 @@ const companyMonthEndReportView = (0, toolkit_1.createSlice)({
|
|
|
48
48
|
initialState: exports.initialState,
|
|
49
49
|
reducers: {
|
|
50
50
|
fetchCompanyMonthEndReportView: {
|
|
51
|
-
prepare(cacheOverride = true, companyId, tenantId, insightDate
|
|
52
|
-
return {
|
|
53
|
-
payload: {
|
|
54
|
-
cacheOverride,
|
|
55
|
-
companyId,
|
|
56
|
-
tenantId,
|
|
57
|
-
insightDate,
|
|
58
|
-
refreshInsights,
|
|
59
|
-
},
|
|
60
|
-
};
|
|
51
|
+
prepare(cacheOverride = true, companyId, tenantId, insightDate) {
|
|
52
|
+
return { payload: { cacheOverride, companyId, tenantId, insightDate } };
|
|
61
53
|
},
|
|
62
54
|
reducer(draft, action) {
|
|
63
55
|
const companyId = action.payload.companyId;
|
|
@@ -7,13 +7,15 @@ const fileReducer_1 = require("../../../entity/file/fileReducer");
|
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const companyMonthEndReportViewReducer_1 = require("../companyMonthEndReportViewReducer");
|
|
9
9
|
const fetchCompanyMonthEndReportViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportView.match), (0, operators_1.switchMap)((action) => {
|
|
10
|
-
const { cacheOverride, companyId, tenantId,
|
|
10
|
+
const { cacheOverride, companyId, tenantId, insightDate } = action.payload;
|
|
11
11
|
const state = state$.value;
|
|
12
12
|
const fetchState = state.companyMonthEndReportViewState.monthEndReportDataByCompanyId[companyId].fetchState;
|
|
13
13
|
const zeniTenantId = tenantId !== null && tenantId !== void 0 ? tenantId : state.companyState.companiesById[companyId].companyInfo.tenantId;
|
|
14
14
|
if (zeniTenantId != null &&
|
|
15
15
|
(cacheOverride === true || fetchState !== 'Completed')) {
|
|
16
|
-
const queryParam =
|
|
16
|
+
const queryParam = {
|
|
17
|
+
insight_date: insightDate !== null && insightDate !== void 0 ? insightDate : null,
|
|
18
|
+
};
|
|
17
19
|
const apiUrl = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}/emails/month-end?query=${encodeURIComponent(JSON.stringify(queryParam))}`;
|
|
18
20
|
return zeniAPI
|
|
19
21
|
.getJSON(apiUrl, {
|
|
@@ -1,12 +1,12 @@
|
|
|
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, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card"
|
|
3
|
+
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card")[] | undefined], {
|
|
4
4
|
userId: string;
|
|
5
5
|
companyId: string;
|
|
6
6
|
tenantId: string;
|
|
7
7
|
fetchFullReport: any;
|
|
8
8
|
cacheOverride: any;
|
|
9
|
-
excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card"
|
|
9
|
+
excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card")[];
|
|
10
10
|
}, "dashboard/fetchDashboard", never, never>, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/clearDashboard">;
|
|
11
11
|
declare const _default: import("redux").Reducer<DashboardState>;
|
|
12
12
|
export default _default;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ReportID, SelectorReport, SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
2
2
|
import { TenantsOrdered } from '../../entity/tenant/tenantSelector';
|
|
3
3
|
import { LoggedInUser, Tenant } from '../../entity/tenant/tenantState';
|
|
4
|
-
import { RoleMap } from '../../entity/userRole/userRoleType';
|
|
5
4
|
import { RootState } from '../../reducer';
|
|
6
5
|
import { CardType } from './dashboardState';
|
|
7
6
|
export interface DashboardReport extends SelectorReport {
|
|
@@ -12,4 +11,4 @@ export interface DashboardReport extends SelectorReport {
|
|
|
12
11
|
currentTenant?: Tenant;
|
|
13
12
|
}
|
|
14
13
|
export declare const getDashboard: (state: RootState, additionalExcludedReports: ReportID[], // used when reports are excluded through statsig
|
|
15
|
-
signedInUser: LoggedInUser | undefined, isExpenseAutomationFeatureEnabledV2: boolean, isExpenseAutomationFeatureEnabled: boolean, isDebitCardFeatureEnabled: boolean
|
|
14
|
+
signedInUser: LoggedInUser | undefined, isExpenseAutomationFeatureEnabledV2: boolean, isExpenseAutomationFeatureEnabled: boolean, isDebitCardFeatureEnabled: boolean) => DashboardReport;
|
|
@@ -45,8 +45,8 @@ const tenantSelector = (0, toolkit_1.createSelector)(tenantSelector_1.getTenants
|
|
|
45
45
|
exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalanceSelector_1.getCardBalance, cashBalanceSelector_1.getCashBalance, getOperatingExpensesForLast5Periods, getRevenueForLast4Periods, topExSelector_1.getTop6Expenses, getNetBurnOrIncomeForLast4Periods, getNetBurnOrIncomeStoryCard, getCashPositionLast5Periods, getCashInCashOutLast4Periods, insightsCardSelector_1.getInsights, companyPassportViewSelector_1.getCompanyPassportView, tasksCardSelector_1.getTasksCardReport, billPayCardSelector_1.getBillPayCardReport, reimbursementCardSelector_1.getReimbursementCardReport, apAgingSelector, arAgingSelector, zeniAccountsPromoCardSelector_1.getZeniAccountsPromoCard, referralSelector_1.getRewardsPlanCard, dashboardLayoutSelector_1.getDashboardCardsOrdered, (state) => {
|
|
46
46
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
47
47
|
return (0, monthEndCloseChecksViewSelector_1.getMonthEndCloseChecksViewByTenantId)(state, currentTenant.tenantId);
|
|
48
|
-
}, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (_state, _additionalExcludedReports, signedInUser) => signedInUser, (_state, _excluded, _signedInUser, isExpenseAutomationFeatureEnabledV2) => isExpenseAutomationFeatureEnabledV2, (_state, _excluded, _signedInUser, _enabledV2, isExpenseAutomationFeatureEnabled) => isExpenseAutomationFeatureEnabled, (_state, _excluded, _signedInUser, _enabledV2, _enabled, isDebitCardFeatureEnabled) => isDebitCardFeatureEnabled, (
|
|
49
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y
|
|
48
|
+
}, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (_state, _additionalExcludedReports, signedInUser) => signedInUser, (_state, _excluded, _signedInUser, isExpenseAutomationFeatureEnabledV2) => isExpenseAutomationFeatureEnabledV2, (_state, _excluded, _signedInUser, _enabledV2, isExpenseAutomationFeatureEnabled) => isExpenseAutomationFeatureEnabled, (_state, _excluded, _signedInUser, _enabledV2, _enabled, isDebitCardFeatureEnabled) => isDebitCardFeatureEnabled, (tenants, cardBalance, cashBalance, opEx, revenue, topEx, netBurnOrIncome, netBurnOrIncomeStoryCard, cashPosition, cashInCashOut, insightsView, companyPassportView, tasksCard, billPayCard, reimbursementCard, apAgingReport, arAgingReport, zeniAccountsPromoCard, rewardsPlanCard, cards, monthEndCloseChecksView, tenantState, additionalExcludedReports, signedInUser, isExpenseAutomationFeatureEnabledV2, isExpenseAutomationFeatureEnabled, isDebitCardFeatureEnabled) => {
|
|
49
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
50
50
|
const isReimbursementFeatureEnabled = (_a = tenants.currentTenant.company) === null || _a === void 0 ? void 0 : _a.featuresActivationInfo.isReimbursementFeatureEnabled;
|
|
51
51
|
const isBillPayFeatureEnabled = (_b = tenants.currentTenant.company) === null || _b === void 0 ? void 0 : _b.featuresActivationInfo.isBillPayFeatureEnabled;
|
|
52
52
|
const isAdmin = Boolean((_c = tenants.currentTenant) === null || _c === void 0 ? void 0 : _c.userRole) === true
|
|
@@ -61,20 +61,20 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
|
|
|
61
61
|
const cardsToRemove = new Set();
|
|
62
62
|
const chargeCardInfo = (_l = tenants.currentTenant.companyChargeCardInfo) === null || _l === void 0 ? void 0 : _l.info;
|
|
63
63
|
const creditAccountLimit = (_m = chargeCardInfo === null || chargeCardInfo === void 0 ? void 0 : chargeCardInfo.chargeCardsCreditAccountLimit) !== null && _m !== void 0 ? _m : 0;
|
|
64
|
-
let
|
|
64
|
+
let isZeniPromoCardOn3rdPosition = true;
|
|
65
65
|
const isChargeCardEnabled = (_o = chargeCardInfo === null || chargeCardInfo === void 0 ? void 0 : chargeCardInfo.isChargeCardEnabled) !== null && _o !== void 0 ? _o : false;
|
|
66
66
|
if (cardBalance != null &&
|
|
67
67
|
cardBalance.fetchState === 'Completed' &&
|
|
68
68
|
(cardBalance.accountsInOrder.length === 0 ||
|
|
69
69
|
((_p = cardBalance.status) === null || _p === void 0 ? void 0 : _p.code) !== 200)) {
|
|
70
70
|
cardsToRemove.add('card_balance');
|
|
71
|
-
|
|
71
|
+
isZeniPromoCardOn3rdPosition = false;
|
|
72
72
|
}
|
|
73
73
|
else if (isChargeCardEnabled ||
|
|
74
74
|
creditAccountLimit === -1 ||
|
|
75
75
|
(isDebitCardFeatureEnabled && creditAccountLimit === 0)) {
|
|
76
76
|
cardsToRemove.add('zeni_promo_card');
|
|
77
|
-
|
|
77
|
+
isZeniPromoCardOn3rdPosition = false;
|
|
78
78
|
}
|
|
79
79
|
if (hasTopExAccess === false) {
|
|
80
80
|
cardsToRemove.add('top_expenses');
|
|
@@ -166,7 +166,7 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
|
|
|
166
166
|
}
|
|
167
167
|
// //show cards carousel as priority, if ZC promo is coming in 2nd position, follow show promos based on Checking promo > Bills & Reimbursement promo
|
|
168
168
|
// //else if ZC promo is coming in 3rd position, follow ZC promo > Checking promo > Bills & Reimbursement promo
|
|
169
|
-
if (
|
|
169
|
+
if (isZeniPromoCardOn3rdPosition) {
|
|
170
170
|
cardsToRemove.add('bill_pay_promo_card');
|
|
171
171
|
cardsToRemove.add('reimbursement_promo_card');
|
|
172
172
|
cardsToRemove.add('zeni_accounts_promo_card');
|
|
@@ -181,14 +181,6 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
|
|
|
181
181
|
cardsToRemove.add('zeni_accounts_promo_card');
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
// remove treasury promo card if its already enabled
|
|
185
|
-
const isUserHasTreasuryAccess = (0, userRoleType_1.hasTreasuryAccess)(userRoleMap);
|
|
186
|
-
const isTreasuryTOSAccepted = (_0 = (_z = tenants.currentTenant.companyTreasuryInfo) === null || _z === void 0 ? void 0 : _z.info) === null || _0 === void 0 ? void 0 : _0.isTreasuryTOSAccepted;
|
|
187
|
-
if (isTreasuryTOSAccepted === true ||
|
|
188
|
-
isTreasuryFeatureEnabled === false ||
|
|
189
|
-
isUserHasTreasuryAccess === false) {
|
|
190
|
-
cardsToRemove.add('treasury_promo_card');
|
|
191
|
-
}
|
|
192
184
|
cardsCopy = cardsCopy.filter((c) => !cardsToRemove.has(c));
|
|
193
185
|
const reportsInOrder = [
|
|
194
186
|
cashBalance,
|
|
@@ -10,20 +10,7 @@ const fetchDashboardLayoutEpic = (actions$, _, zeniAPI) => actions$.pipe((0, ope
|
|
|
10
10
|
.getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/webapp-preferences`)
|
|
11
11
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
12
12
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data) {
|
|
13
|
-
|
|
14
|
-
.card_order;
|
|
15
|
-
let updatedCardOrder = cardOrder;
|
|
16
|
-
// if treasury promo card is not in the response, add it at third position
|
|
17
|
-
// and update in the backend
|
|
18
|
-
if (cardOrder.includes('treasury_promo_card') === false) {
|
|
19
|
-
updatedCardOrder = [
|
|
20
|
-
...cardOrder.slice(0, 2),
|
|
21
|
-
'treasury_promo_card',
|
|
22
|
-
...cardOrder.slice(2),
|
|
23
|
-
];
|
|
24
|
-
return (0, rxjs_1.of)((0, dashboardLayoutReducer_1.updateDashboardLayout)(updatedCardOrder));
|
|
25
|
-
}
|
|
26
|
-
return (0, rxjs_1.of)((0, dashboardLayoutReducer_1.fetchDashboardLayoutSuccess)(updatedCardOrder));
|
|
13
|
+
return (0, rxjs_1.of)((0, dashboardLayoutReducer_1.fetchDashboardLayoutSuccess)(response.data.preferences.card_order));
|
|
27
14
|
}
|
|
28
15
|
else {
|
|
29
16
|
const shouldCallPost = response.status.code === 404;
|
package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js
CHANGED
|
@@ -48,7 +48,7 @@ const refreshExpenseAutomationCurrentTabEpic = (actions$, state$) => actions$.pi
|
|
|
48
48
|
]);
|
|
49
49
|
case 'month_end_insights':
|
|
50
50
|
return (0, rxjs_1.from)([
|
|
51
|
-
(0, companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportView)(true, companyId, currentTenant.tenantId, undefined
|
|
51
|
+
(0, companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportView)(true, companyId, currentTenant.tenantId, undefined),
|
|
52
52
|
(0, companyMonthEndReportViewReducer_1.fetchCompanyMonthEndReportTemplates)(companyId, currentTenant.tenantId),
|
|
53
53
|
]);
|
|
54
54
|
case 'reconciliation': {
|
|
@@ -17,7 +17,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
|
|
|
17
17
|
firstMonthOfFY: Month;
|
|
18
18
|
maxNumOfPeriodsToHighlight: number;
|
|
19
19
|
thisPeriod: TimeframeTick;
|
|
20
|
-
}, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card"
|
|
20
|
+
}, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
21
21
|
additionalBalances: COABalanceType[];
|
|
22
22
|
coaBalances: COABalance[];
|
|
23
23
|
firstMonthOfFY: Month;
|
|
@@ -3,9 +3,9 @@ import { ZeniAPIStatus } from '../../responsePayload';
|
|
|
3
3
|
import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
|
|
4
4
|
import { GlobalMerchantViewState, GlobalRecommendationFetchSource, NewGlobalMerchantCurrentSelection } from './globalMerchantViewState';
|
|
5
5
|
export declare const initialState: GlobalMerchantViewState;
|
|
6
|
-
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" |
|
|
6
|
+
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | undefined], {
|
|
7
7
|
merchantId: string | undefined;
|
|
8
|
-
context: "cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" |
|
|
8
|
+
context: "cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | undefined;
|
|
9
9
|
}, "globalMerchantView/createGlobalMerchant", never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
10
10
|
merchantId: ID;
|
|
11
11
|
}, "globalMerchantView/createGlobalMerchantSuccess">, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -8,7 +8,7 @@ const responsePayload_1 = require("../../../responsePayload");
|
|
|
8
8
|
const monthEndCloseChecksViewReducer_1 = require("../monthEndCloseChecksViewReducer");
|
|
9
9
|
const fetchMonthEndCloseChecksEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(monthEndCloseChecksViewReducer_1.fetchMonthEndCloseChecks.match), (0, operators_1.switchMap)((action) => {
|
|
10
10
|
const { period, tenantId, refreshViewInBackground } = action.payload;
|
|
11
|
-
const month =
|
|
11
|
+
const month = period.month < 10 ? `0${period.month}` : period.month;
|
|
12
12
|
const queryParam = {
|
|
13
13
|
month_and_year: `${month}-${period.year}`,
|
|
14
14
|
history_month_and_year_flag: true,
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
import { MonthEndCloseChecksPayload } from '../../entity/monthEndCloseChecks/monthEndCloseChecksPayload';
|
|
2
2
|
import { ZeniAPIResponse } from '../../responsePayload';
|
|
3
3
|
export type FetchMonthEndCloseChecksResponse = ZeniAPIResponse<MonthEndCloseChecksPayload>;
|
|
4
|
-
export type MonthClosePerformanceTrendPayload = {
|
|
5
|
-
audit_score_percentage: number;
|
|
6
|
-
month_and_year: string;
|
|
7
|
-
};
|
|
8
|
-
export interface MonthClosePerformanceTrendResponsePayload {
|
|
9
|
-
performance_trend: MonthClosePerformanceTrendPayload[];
|
|
10
|
-
}
|
|
11
|
-
export type FetchMonthClosePerformanceTrendResponse = ZeniAPIResponse<MonthClosePerformanceTrendResponsePayload>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FetchState, ID } from '../../commonStateTypes/common';
|
|
2
2
|
import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
|
|
3
3
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
4
|
-
import { MonthClosePerformanceTrendPayload } from './monthEndCloseChecksViewPayload';
|
|
5
4
|
import { MonthEndCloseChecksViewState } from './monthEndCloseChecksViewState';
|
|
6
5
|
export declare const initialState: MonthEndCloseChecksViewState;
|
|
7
6
|
export declare const fetchMonthEndCloseChecks: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -14,15 +13,6 @@ export declare const fetchMonthEndCloseChecks: import("@reduxjs/toolkit").Action
|
|
|
14
13
|
refreshViewInBackground: boolean;
|
|
15
14
|
tenantId: ID;
|
|
16
15
|
error?: ZeniAPIStatus;
|
|
17
|
-
}, "monthEndCloseChecksView/updateMonthEndCloseChecksView">, clearAllMonthEndCloseChecksView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"monthEndCloseChecksView/clearAllMonthEndCloseChecksView"
|
|
18
|
-
period: MonthYearPeriod;
|
|
19
|
-
}, "monthEndCloseChecksView/fetchMonthClosePerformanceTrend", never, never>, updateMonthClosePerformanceTrend: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
20
|
-
performanceTrend: MonthClosePerformanceTrendPayload[];
|
|
21
|
-
period: MonthYearPeriod;
|
|
22
|
-
}, "monthEndCloseChecksView/updateMonthClosePerformanceTrend">, updateMonthClosePerformanceTrendFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
23
|
-
fetchState: FetchState;
|
|
24
|
-
period: MonthYearPeriod;
|
|
25
|
-
error?: ZeniAPIStatus;
|
|
26
|
-
}, "monthEndCloseChecksView/updateMonthClosePerformanceTrendFetchStatus">;
|
|
16
|
+
}, "monthEndCloseChecksView/updateMonthEndCloseChecksView">, clearAllMonthEndCloseChecksView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"monthEndCloseChecksView/clearAllMonthEndCloseChecksView">;
|
|
27
17
|
declare const _default: import("redux").Reducer<MonthEndCloseChecksViewState>;
|
|
28
18
|
export default _default;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.clearAllMonthEndCloseChecksView = exports.updateMonthEndCloseChecksView = exports.fetchMonthEndCloseChecks = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
-
const formatZeniDateFY_1 = require("../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
7
6
|
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
8
|
-
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
9
7
|
exports.initialState = {
|
|
10
8
|
monthEndCloseChecksViewByTenantId: {},
|
|
11
9
|
refreshStatus: {
|
|
12
10
|
fetchState: 'Not-Started',
|
|
13
11
|
},
|
|
14
|
-
monthClosePerformanceTrend: {},
|
|
15
|
-
monthClosePerformanceTrendFetchStatus: {},
|
|
16
12
|
};
|
|
17
13
|
const monthEndCloseChecksView = (0, toolkit_1.createSlice)({
|
|
18
14
|
name: 'monthEndCloseChecksView',
|
|
@@ -44,50 +40,10 @@ const monthEndCloseChecksView = (0, toolkit_1.createSlice)({
|
|
|
44
40
|
draft.refreshStatus.fetchState = 'Completed';
|
|
45
41
|
}
|
|
46
42
|
},
|
|
47
|
-
fetchMonthClosePerformanceTrend: {
|
|
48
|
-
prepare(period) {
|
|
49
|
-
return { payload: { period } };
|
|
50
|
-
},
|
|
51
|
-
reducer(draft, action) {
|
|
52
|
-
const { period } = action.payload;
|
|
53
|
-
draft.monthClosePerformanceTrendFetchStatus[(0, timePeriod_1.toMonthYearPeriodId)(period)] = {
|
|
54
|
-
fetchState: 'In-Progress',
|
|
55
|
-
error: undefined,
|
|
56
|
-
};
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
updateMonthClosePerformanceTrend(draft, action) {
|
|
60
|
-
const { performanceTrend, period } = action.payload;
|
|
61
|
-
draft.monthClosePerformanceTrend[(0, timePeriod_1.toMonthYearPeriodId)(period)] = [];
|
|
62
|
-
performanceTrend.forEach((curr) => {
|
|
63
|
-
const parsedDate = (0, zeniDayJS_1.date)(curr.month_and_year, formatZeniDateFY_1.MM_YYYY_FORMAT);
|
|
64
|
-
const parsedPeriod = {
|
|
65
|
-
month: (0, timePeriod_1.toMonth)(parsedDate.month() + 1),
|
|
66
|
-
year: parsedDate.year(),
|
|
67
|
-
};
|
|
68
|
-
draft.monthClosePerformanceTrend[(0, timePeriod_1.toMonthYearPeriodId)(period)].push({
|
|
69
|
-
auditScore: curr.audit_score_percentage,
|
|
70
|
-
period: parsedPeriod,
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
draft.monthClosePerformanceTrendFetchStatus[(0, timePeriod_1.toMonthYearPeriodId)(period)] =
|
|
74
|
-
{
|
|
75
|
-
fetchState: 'Completed',
|
|
76
|
-
error: undefined,
|
|
77
|
-
};
|
|
78
|
-
},
|
|
79
|
-
updateMonthClosePerformanceTrendFetchStatus(draft, action) {
|
|
80
|
-
const { period, fetchState, error } = action.payload;
|
|
81
|
-
draft.monthClosePerformanceTrendFetchStatus[(0, timePeriod_1.toMonthYearPeriodId)(period)] =
|
|
82
|
-
{
|
|
83
|
-
fetchState,
|
|
84
|
-
error,
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
43
|
clearAllMonthEndCloseChecksView(draft) {
|
|
88
|
-
|
|
44
|
+
draft.monthEndCloseChecksViewByTenantId = {};
|
|
89
45
|
},
|
|
90
46
|
},
|
|
91
47
|
});
|
|
92
|
-
_a = monthEndCloseChecksView.actions, exports.fetchMonthEndCloseChecks = _a.fetchMonthEndCloseChecks, exports.updateMonthEndCloseChecksView = _a.updateMonthEndCloseChecksView, exports.clearAllMonthEndCloseChecksView = _a.clearAllMonthEndCloseChecksView
|
|
48
|
+
_a = monthEndCloseChecksView.actions, exports.fetchMonthEndCloseChecks = _a.fetchMonthEndCloseChecks, exports.updateMonthEndCloseChecksView = _a.updateMonthEndCloseChecksView, exports.clearAllMonthEndCloseChecksView = _a.clearAllMonthEndCloseChecksView;
|
|
93
49
|
exports.default = monthEndCloseChecksView.reducer;
|
|
@@ -4,10 +4,7 @@ import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport
|
|
|
4
4
|
import { MonthEndAuditSummary, MonthEndCloseChecksInfo } from '../../entity/monthEndCloseChecks/monthEndCloseChecksState';
|
|
5
5
|
import { CurrentTenant } from '../../entity/tenant/tenantSelector';
|
|
6
6
|
import { RootState } from '../../reducer';
|
|
7
|
-
import { MonthClosePerformanceTrend } from './monthEndCloseChecksViewState';
|
|
8
7
|
export interface MonthEndCloseChecksView extends SelectorView {
|
|
9
|
-
monthClosePerformanceTrend: MonthClosePerformanceTrend[];
|
|
10
|
-
monthClosePerformanceTrendFetchStatus: FetchStateAndError;
|
|
11
8
|
refreshStatus: FetchStateAndError;
|
|
12
9
|
selectedPeriod: MonthYearPeriod;
|
|
13
10
|
monthEndCloseChecks?: MonthEndCloseChecksInfo;
|
|
@@ -40,23 +40,26 @@ const isMonthEndInsightDisabled = (currentTenant, selectedPeriod, userAllowedToA
|
|
|
40
40
|
};
|
|
41
41
|
exports.isMonthEndInsightDisabled = isMonthEndInsightDisabled;
|
|
42
42
|
exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((state) => state.monthEndCloseChecksState, (state) => state.monthEndCloseChecksViewState, (state) => state.expenseAutomationViewState, (state) => (0, tenantSelector_1.getCurrentTenant)(state), (state) => state.companyState, (state) => state.tenantState, (_state, tenantId) => tenantId, (monthEndCloseChecksState, monthEndCloseChecksViewState, expenseAutomationViewState, currentTenant, companyState, tenantState, tenantId) => {
|
|
43
|
-
var _a, _b, _c
|
|
43
|
+
var _a, _b, _c;
|
|
44
44
|
const { refreshStatus } = monthEndCloseChecksViewState;
|
|
45
45
|
const { loggedInUser } = tenantState;
|
|
46
46
|
const selectedPeriod = (_a = expenseAutomationViewState.selectedPeriodByTenantId[tenantId]) !== null && _a !== void 0 ? _a : fetchAllTenantsEpic_1.defaultMonthYearPeriod;
|
|
47
|
-
const { monthEndCloseChecksViewByTenantId
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
const { monthEndCloseChecksViewByTenantId } = monthEndCloseChecksViewState;
|
|
48
|
+
const monthYearPeriodId = selectedPeriod != null ? (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod) : null;
|
|
49
|
+
const monthEndCloseChecksView = monthYearPeriodId != null
|
|
50
|
+
? (_b = monthEndCloseChecksViewByTenantId[tenantId]) === null || _b === void 0 ? void 0 : _b[monthYearPeriodId]
|
|
51
|
+
: undefined;
|
|
52
|
+
const monthEndCloseChecks = monthYearPeriodId != null
|
|
53
|
+
? (0, monthEndCloseChecksSelector_1.getMonthEndCloseChecksByTenantId)(monthEndCloseChecksState, tenantId, monthYearPeriodId)
|
|
54
|
+
: undefined;
|
|
52
55
|
if (monthEndCloseChecksView != null && monthEndCloseChecks != null) {
|
|
53
56
|
const sortedMonthEndCloseCheckList = [
|
|
54
57
|
...monthEndCloseChecks.monthEndCloseCheckList,
|
|
55
58
|
].sort((a, b) => b.frequency.localeCompare(a.frequency));
|
|
56
59
|
const currentCompany = companyState.companiesById[currentTenant.companyId];
|
|
57
60
|
const managementInfo = currentCompany === null || currentCompany === void 0 ? void 0 : currentCompany.managementInfo;
|
|
58
|
-
const preparerUserIds =
|
|
59
|
-
const isZeniUser = Boolean((
|
|
61
|
+
const preparerUserIds = managementInfo != null ? managementInfo.preparerUserIds : [];
|
|
62
|
+
const isZeniUser = Boolean((_c = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.userEmail) === null || _c === void 0 ? void 0 : _c.includes('zeni.ai'));
|
|
60
63
|
const isPreparer = loggedInUser != null && preparerUserIds.includes(loggedInUser.userId);
|
|
61
64
|
const userAllowedToAccessMonthEndInsights = isZeniUser === false || isPreparer === false;
|
|
62
65
|
const monthEndCloseCheckListWithDisabledState = sortedMonthEndCloseCheckList.map((check) => {
|
|
@@ -68,11 +71,8 @@ exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((st
|
|
|
68
71
|
}
|
|
69
72
|
return check;
|
|
70
73
|
});
|
|
71
|
-
return Object.assign(Object.assign({}, monthEndCloseChecksView), {
|
|
72
|
-
refreshStatus
|
|
73
|
-
fetchState: 'Not-Started',
|
|
74
|
-
error: undefined,
|
|
75
|
-
} });
|
|
74
|
+
return Object.assign(Object.assign({}, monthEndCloseChecksView), { monthEndCloseChecks: Object.assign(Object.assign({}, monthEndCloseChecks), { monthEndCloseCheckList: monthEndCloseCheckListWithDisabledState }), reportId: 'expense_automation_card', selectedPeriod,
|
|
75
|
+
refreshStatus });
|
|
76
76
|
}
|
|
77
77
|
return {
|
|
78
78
|
fetchState: 'Not-Started',
|
|
@@ -80,10 +80,5 @@ exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((st
|
|
|
80
80
|
reportId: 'expense_automation_card',
|
|
81
81
|
selectedPeriod,
|
|
82
82
|
refreshStatus,
|
|
83
|
-
monthClosePerformanceTrend: monthClosePerformanceTrendForSelectedPeriod,
|
|
84
|
-
monthClosePerformanceTrendFetchStatus: (_g = monthClosePerformanceTrendFetchStatus[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]) !== null && _g !== void 0 ? _g : {
|
|
85
|
-
fetchState: 'Not-Started',
|
|
86
|
-
error: undefined,
|
|
87
|
-
},
|
|
88
83
|
};
|
|
89
84
|
});
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../commonStateTypes/common';
|
|
2
|
-
import {
|
|
3
|
-
export interface MonthClosePerformanceTrend {
|
|
4
|
-
auditScore: number;
|
|
5
|
-
period: MonthYearPeriod;
|
|
6
|
-
}
|
|
2
|
+
import { MonthYearPeriodId } from '../../commonStateTypes/timePeriod';
|
|
7
3
|
export interface MonthEndCloseChecksViewState {
|
|
8
|
-
monthClosePerformanceTrend: Record<MonthYearPeriodId, MonthClosePerformanceTrend[]>;
|
|
9
|
-
monthClosePerformanceTrendFetchStatus: Record<MonthYearPeriodId, FetchStateAndError>;
|
|
10
4
|
monthEndCloseChecksViewByTenantId: Record<ID, Record<MonthYearPeriodId, FetchStateAndError>>;
|
|
11
5
|
refreshStatus: FetchStateAndError;
|
|
12
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getReimbursementCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card"
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
fetchState: import("../..").FetchState;
|
|
@@ -2,8 +2,8 @@ import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
|
2
2
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
3
3
|
import { ReportsResyncState } from './reportsResyncState';
|
|
4
4
|
export declare const initialReportsResyncState: ReportsResyncState;
|
|
5
|
-
export declare const initiateReportsResync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportIdToResync: "cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card"
|
|
6
|
-
reportIdToResync: "cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card"
|
|
5
|
+
export declare const initiateReportsResync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportIdToResync: "cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card"], {
|
|
6
|
+
reportIdToResync: "cash_balance" | "card_balance" | "expense_automation_card" | "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" | "zeni_treasury" | "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" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card";
|
|
7
7
|
}, "initiateReportsResync/initiateReportsResync", never, never>, initiateReportsClassViewRefetching: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
8
8
|
reportIdToResync: ReportID;
|
|
9
9
|
}, "initiateReportsResync/initiateReportsClassViewRefetching">, reportsResyncSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -27,7 +27,7 @@ const fetchEditBillDetailPageEpic = (actions$, state$) => actions$.pipe((0, oper
|
|
|
27
27
|
const isCompanyZeniAccountsSetUpDone = (_c = currentCompany === null || currentCompany === void 0 ? void 0 : currentCompany.company.companyZeniAccountInfo.isZeniAccountEnabled) !== null && _c !== void 0 ? _c : false;
|
|
28
28
|
if (cacheOverride) {
|
|
29
29
|
billDetailActions.push((0, accountListReducer_1.fetchAccountList)('billPayAccountList', true, true, true));
|
|
30
|
-
billDetailActions.push((0, classListReducer_1.fetchClassList)(
|
|
30
|
+
billDetailActions.push((0, classListReducer_1.fetchClassList)());
|
|
31
31
|
billDetailActions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
|
|
32
32
|
billDetailActions.push((0, ownerListReducer_1.fetchOwnerList)());
|
|
33
33
|
billDetailActions.push((0, billPayConfigReducer_1.fetchBillPayConfig)(isInternationalWireEnabled));
|
|
@@ -54,8 +54,9 @@ const fetchEditBillDetailPageEpic = (actions$, state$) => actions$.pipe((0, oper
|
|
|
54
54
|
billDetailActions.push((0, accountListReducer_1.fetchAccountList)('billPayAccountList', true, true, true));
|
|
55
55
|
}
|
|
56
56
|
const classList = state.classListState;
|
|
57
|
-
if (classList.
|
|
58
|
-
|
|
57
|
+
if (classList.hasValidState() === false &&
|
|
58
|
+
classList.fetchState !== 'In-Progress') {
|
|
59
|
+
billDetailActions.push((0, classListReducer_1.fetchClassList)());
|
|
59
60
|
}
|
|
60
61
|
if (state.vendorTypeListState.hasValidState() === false &&
|
|
61
62
|
state.vendorTypeListState.fetchState !== 'In-Progress') {
|