@zeniai/client-epic-state 5.2.32 → 5.2.34
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/commonPayloadTypes/classesView/reportByClassPayloadV2.d.ts +13 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewEpic.js +10 -7
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +3 -3
- package/lib/entity/sectionProjectView/sectionProjectViewEpic.js +6 -2
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +3 -3
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +4 -3
- package/lib/epic.js +12 -0
- package/lib/esm/entity/class/classReducer.js +1 -1
- package/lib/esm/entity/sectionClassesViewV2/sectionClassesViewEpic.js +10 -7
- package/lib/esm/entity/sectionProjectView/sectionProjectViewEpic.js +6 -2
- package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +5 -4
- package/lib/esm/epic.js +12 -0
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +266 -1
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +50 -0
- package/lib/esm/view/aiCfoView/epics/deleteRoutineEpic.js +35 -0
- package/lib/esm/view/aiCfoView/epics/fetchRoutineRunsEpic.js +35 -0
- package/lib/esm/view/aiCfoView/epics/fetchRoutinesEpic.js +37 -0
- package/lib/esm/view/aiCfoView/epics/runRoutineEpic.js +34 -0
- package/lib/esm/view/aiCfoView/epics/saveRoutineEpic.js +65 -0
- package/lib/esm/view/aiCfoView/epics/setRoutineEnabledEpic.js +28 -0
- package/lib/esm/view/aiCfoView/epics/toRoutine.js +64 -0
- package/lib/esm/view/aiCfoView/epics/toRoutineRun.js +42 -0
- package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +12 -10
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -11
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +10 -11
- package/lib/index.d.ts +3 -3
- package/lib/index.js +55 -40
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +90 -0
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +164 -123
- package/lib/view/aiCfoView/aiCfoViewReducer.js +268 -3
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +13 -1
- package/lib/view/aiCfoView/aiCfoViewSelector.js +55 -0
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +157 -0
- package/lib/view/aiCfoView/epics/deleteRoutineEpic.d.ts +18 -0
- package/lib/view/aiCfoView/epics/deleteRoutineEpic.js +39 -0
- package/lib/view/aiCfoView/epics/fetchRoutineRunsEpic.d.ts +13 -0
- package/lib/view/aiCfoView/epics/fetchRoutineRunsEpic.js +39 -0
- package/lib/view/aiCfoView/epics/fetchRoutinesEpic.d.ts +7 -0
- package/lib/view/aiCfoView/epics/fetchRoutinesEpic.js +41 -0
- package/lib/view/aiCfoView/epics/runRoutineEpic.d.ts +14 -0
- package/lib/view/aiCfoView/epics/runRoutineEpic.js +38 -0
- package/lib/view/aiCfoView/epics/saveRoutineEpic.d.ts +13 -0
- package/lib/view/aiCfoView/epics/saveRoutineEpic.js +69 -0
- package/lib/view/aiCfoView/epics/setRoutineEnabledEpic.d.ts +15 -0
- package/lib/view/aiCfoView/epics/setRoutineEnabledEpic.js +32 -0
- package/lib/view/aiCfoView/epics/toRoutine.d.ts +17 -0
- package/lib/view/aiCfoView/epics/toRoutine.js +69 -0
- package/lib/view/aiCfoView/epics/toRoutineRun.d.ts +12 -0
- package/lib/view/aiCfoView/epics/toRoutineRun.js +47 -0
- package/lib/view/cashFlowClassesView/cashFlowClassesViewPayload.d.ts +4 -4
- package/lib/view/cashFlowProjectView/cashFlowProjectViewPayload.d.ts +4 -4
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +12 -10
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -11
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +10 -11
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.d.ts +12 -0
- package/package.json +1 -1
|
@@ -18,8 +18,20 @@ interface ClassCOABalanceGroupedPayloadByClassIdV2 {
|
|
|
18
18
|
export interface SectionByClassCOABalanceGroupedPayloadV2 extends COABalanceGroupedPayloadV2 {
|
|
19
19
|
classes: ClassCOABalanceGroupedPayloadByClassIdV2;
|
|
20
20
|
}
|
|
21
|
+
interface CalculatedClassCOABalanceGroupedPayloadByClassIdV2 {
|
|
22
|
+
[class_Id: string]: COABalanceGroupedPayloadV2;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A section whose per-class entries carry a time series and nothing else: the
|
|
26
|
+
* backend fills the account-wise map only for the account sections, so the
|
|
27
|
+
* calculated sections (net income, the operating total, change in cash) are
|
|
28
|
+
* grouped by class with no accounts underneath.
|
|
29
|
+
*/
|
|
30
|
+
export interface CalculatedSectionByClassCOABalanceGroupedPayloadV2 extends COABalanceGroupedPayloadV2 {
|
|
31
|
+
classes: CalculatedClassCOABalanceGroupedPayloadByClassIdV2;
|
|
32
|
+
}
|
|
21
33
|
export interface ClassMetadataWithBalancesPayloadV2 {
|
|
22
|
-
classBalances:
|
|
34
|
+
classBalances: COABalanceGroupedPayloadV2;
|
|
23
35
|
classMetadata: ClassMetadataPayload;
|
|
24
36
|
nestedAccountIds: NestedAccountIDHierarchy[];
|
|
25
37
|
nestedClassId: NestedClassID;
|
|
@@ -29,17 +29,20 @@ const updateSectionClassesViewEpic = (actions$) => actions$.pipe((0, operators_1
|
|
|
29
29
|
Object.keys(sectionPayload.classes).forEach((eachClassId) => {
|
|
30
30
|
const classId = classMetadataRecordsByID[eachClassId].nestedClassId;
|
|
31
31
|
const classMetadataPayload = classMetadataRecordsByID[eachClassId].classMetadataPayload;
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
const classPayload = sectionPayload.classes[eachClassId];
|
|
33
|
+
// A calculated section is grouped by class with no accounts under it.
|
|
34
|
+
const classAccounts = 'accounts' in classPayload ? classPayload.accounts : undefined;
|
|
35
|
+
if (classAccounts != null) {
|
|
36
|
+
accountMetadataWithBalancesPayloads.push(...(0, subAccountPayloadHelper_1.getSubAccountsMetadataForAccountList)(classAccounts, accountMetadataRecordsByID, sectionId, { parentClassId: classId, sectionId }));
|
|
37
|
+
}
|
|
38
|
+
const nestedAccountIds = classAccounts != null
|
|
39
|
+
? (0, getNestedAccountIDHierarchyForSection_1.getNestedAccountIDHierarchyForAccounts)(Object.keys(classAccounts), accountsMetadata)
|
|
40
|
+
: [];
|
|
38
41
|
if (classMetadataPayload != null) {
|
|
39
42
|
classMetadataWithBalancesPayloads.push({
|
|
40
43
|
nestedClassId: classId,
|
|
41
44
|
classMetadata: classMetadataPayload,
|
|
42
|
-
classBalances:
|
|
45
|
+
classBalances: classPayload,
|
|
43
46
|
nestedAccountIds,
|
|
44
47
|
});
|
|
45
48
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { SectionByClassCOABalanceGroupedPayloadV2 } from '../../commonPayloadTypes/classesView/reportByClassPayloadV2';
|
|
1
|
+
import { CalculatedSectionByClassCOABalanceGroupedPayloadV2, SectionByClassCOABalanceGroupedPayloadV2 } from '../../commonPayloadTypes/classesView/reportByClassPayloadV2';
|
|
2
2
|
import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
|
|
3
3
|
import { AccountMetadataPayload } from '../account/accountPayload';
|
|
4
4
|
import { ClassMetadataPayload } from '../class/classPayload';
|
|
5
5
|
import { SectionClassesViewStateV2 } from './sectionClassesViewState';
|
|
6
6
|
export declare const initialState: SectionClassesViewStateV2;
|
|
7
|
-
export declare const updateSectionClassesView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "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" | "other_connection" | "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" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts", sectionPayload: SectionByClassCOABalanceGroupedPayloadV2, classesMetadataPayload: ClassMetadataPayload[], accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
|
|
7
|
+
export declare const updateSectionClassesView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "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" | "other_connection" | "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" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts", sectionPayload: SectionByClassCOABalanceGroupedPayloadV2 | CalculatedSectionByClassCOABalanceGroupedPayloadV2, classesMetadataPayload: ClassMetadataPayload[], accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
|
|
8
8
|
timeframe: "month" | "year" | "quarter";
|
|
9
9
|
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "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" | "other_connection" | "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" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts";
|
|
10
10
|
sectionId: string;
|
|
11
|
-
sectionPayload: SectionByClassCOABalanceGroupedPayloadV2;
|
|
11
|
+
sectionPayload: SectionByClassCOABalanceGroupedPayloadV2 | CalculatedSectionByClassCOABalanceGroupedPayloadV2;
|
|
12
12
|
classesMetadataPayload: ClassMetadataPayload[];
|
|
13
13
|
accountsMetadataPayload: AccountMetadataPayload[];
|
|
14
14
|
currencyPayload: CurrencyPayload;
|
|
@@ -18,12 +18,16 @@ const updateSectionProjectViewEpic = (actions$) => actions$.pipe((0, operators_1
|
|
|
18
18
|
const accountMetadataWithBalancesPayloads = [];
|
|
19
19
|
if (sectionPayload.projects != null) {
|
|
20
20
|
Object.keys(sectionPayload.projects).forEach((projectId) => {
|
|
21
|
-
const
|
|
21
|
+
const projectPayload = sectionPayload.projects[projectId];
|
|
22
|
+
// A calculated section is grouped by project with no accounts under it.
|
|
23
|
+
const projectAccounts = 'accounts' in projectPayload ? projectPayload.accounts : undefined;
|
|
22
24
|
const projectsViewParentID = {
|
|
23
25
|
projectId,
|
|
24
26
|
sectionId,
|
|
25
27
|
};
|
|
26
|
-
|
|
28
|
+
if (projectAccounts != null) {
|
|
29
|
+
getSubAccountsMetadataForProjectAccountList(projectAccounts, accountMetadataRecordsByID, sectionId, projectsViewParentID, accountMetadataWithBalancesPayloads);
|
|
30
|
+
}
|
|
27
31
|
});
|
|
28
32
|
}
|
|
29
33
|
if (accountMetadataWithBalancesPayloads.length > 0) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
|
|
2
|
-
import { SectionByProjectCOABalanceGroupedPayloadV2 } from '../../view/profitAndLossProjectView/profitAndLossProjectViewPayload';
|
|
2
|
+
import { CalculatedSectionByProjectCOABalanceGroupedPayloadV2, SectionByProjectCOABalanceGroupedPayloadV2 } from '../../view/profitAndLossProjectView/profitAndLossProjectViewPayload';
|
|
3
3
|
import { AccountMetadataPayload } from '../account/accountPayload';
|
|
4
4
|
import { SectionProjectViewState } from './sectionProjectViewState';
|
|
5
5
|
export declare const initialState: SectionProjectViewState;
|
|
6
|
-
export declare const updateSectionProjectView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "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" | "other_connection" | "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" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts", sectionPayload: SectionByProjectCOABalanceGroupedPayloadV2, accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
|
|
6
|
+
export declare const updateSectionProjectView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "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" | "other_connection" | "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" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts", sectionPayload: SectionByProjectCOABalanceGroupedPayloadV2 | CalculatedSectionByProjectCOABalanceGroupedPayloadV2, accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
|
|
7
7
|
timeframe: "month" | "year" | "quarter";
|
|
8
8
|
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "cash_flow_by_classes" | "cash_flow_by_projects" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "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" | "other_connection" | "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" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts";
|
|
9
9
|
sectionId: string;
|
|
10
|
-
sectionPayload: SectionByProjectCOABalanceGroupedPayloadV2;
|
|
10
|
+
sectionPayload: SectionByProjectCOABalanceGroupedPayloadV2 | CalculatedSectionByProjectCOABalanceGroupedPayloadV2;
|
|
11
11
|
accountsMetadataPayload: AccountMetadataPayload[];
|
|
12
12
|
currencyPayload: CurrencyPayload;
|
|
13
13
|
}, "sectionProjectView/updateSectionProjectView", never, never>;
|
|
@@ -34,10 +34,11 @@ const sectionProjectView = (0, toolkit_1.createSlice)({
|
|
|
34
34
|
const accountsMetadata = accountsMetadataPayload.map((eachAccount) => (0, accountPayload_1.mapAccountMetadataPayloadToAccountMetadata)(eachAccount));
|
|
35
35
|
Object.keys(sectionPayload.projects).forEach((projectId) => {
|
|
36
36
|
const projectPayload = sectionPayload.projects[projectId];
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
// A calculated section is grouped by project with no accounts under it.
|
|
38
|
+
const projectAccounts = 'accounts' in projectPayload ? projectPayload.accounts : undefined;
|
|
39
|
+
const nestedAccountIds = projectAccounts != null
|
|
40
|
+
? (0, getNestedAccountIDHierarchyForSection_1.getNestedAccountIDHierarchyForAccounts)(Object.keys(projectAccounts), accountsMetadata)
|
|
39
41
|
: [];
|
|
40
|
-
const nestedAccountIds = (0, getNestedAccountIDHierarchyForSection_1.getNestedAccountIDHierarchyForAccounts)(projectAccountIds, accountsMetadata);
|
|
41
42
|
updateSectionProject(draft, timeframe, projectPayload, sectionId, projectId, reportId, currencyPayload, nestedAccountIds);
|
|
42
43
|
});
|
|
43
44
|
}
|
package/lib/epic.js
CHANGED
|
@@ -61,6 +61,12 @@ const fetchSkillVersionBodyEpic_1 = require("./view/aiCfoView/epics/fetchSkillVe
|
|
|
61
61
|
const fetchSkillVersionsEpic_1 = require("./view/aiCfoView/epics/fetchSkillVersionsEpic");
|
|
62
62
|
const fetchSkillsEpic_1 = require("./view/aiCfoView/epics/fetchSkillsEpic");
|
|
63
63
|
const fetchSuggestedQuestionsEpic_1 = require("./view/aiCfoView/epics/fetchSuggestedQuestionsEpic");
|
|
64
|
+
const deleteRoutineEpic_1 = require("./view/aiCfoView/epics/deleteRoutineEpic");
|
|
65
|
+
const fetchRoutineRunsEpic_1 = require("./view/aiCfoView/epics/fetchRoutineRunsEpic");
|
|
66
|
+
const fetchRoutinesEpic_1 = require("./view/aiCfoView/epics/fetchRoutinesEpic");
|
|
67
|
+
const runRoutineEpic_1 = require("./view/aiCfoView/epics/runRoutineEpic");
|
|
68
|
+
const saveRoutineEpic_1 = require("./view/aiCfoView/epics/saveRoutineEpic");
|
|
69
|
+
const setRoutineEnabledEpic_1 = require("./view/aiCfoView/epics/setRoutineEnabledEpic");
|
|
64
70
|
const saveSkillEpic_1 = require("./view/aiCfoView/epics/saveSkillEpic");
|
|
65
71
|
const setSkillVisibilityEpic_1 = require("./view/aiCfoView/epics/setSkillVisibilityEpic");
|
|
66
72
|
const stopSubmitEpic_1 = require("./view/aiCfoView/epics/stopSubmitEpic");
|
|
@@ -845,6 +851,7 @@ const ALL_EPICS = [
|
|
|
845
851
|
deletePersonEpic_1.deletePersonEpic,
|
|
846
852
|
deleteRemiApprovalRuleEpic_1.deleteRemiApprovalRuleEpic,
|
|
847
853
|
deleteRemiEpic_1.deleteRemiEpic,
|
|
854
|
+
deleteRoutineEpic_1.deleteRoutineEpic,
|
|
848
855
|
deleteScheduleAccruedDetailEpic_1.deleteScheduleAccruedDetailEpic,
|
|
849
856
|
deleteScheduleDetailEpic_1.deleteScheduleDetailEpic,
|
|
850
857
|
deleteSkillEpic_1.deleteSkillEpic,
|
|
@@ -1169,6 +1176,8 @@ const ALL_EPICS = [
|
|
|
1169
1176
|
fetchReviewCompanyViewEpic_1.fetchReviewCompanyViewEpic,
|
|
1170
1177
|
fetchReviewTransferDetailEpic_1.fetchReviewTransferDetailEpic,
|
|
1171
1178
|
fetchRewardsPlanEpic_1.fetchRewardsPlanEpic,
|
|
1179
|
+
fetchRoutineRunsEpic_1.fetchRoutineRunsEpic,
|
|
1180
|
+
fetchRoutinesEpic_1.fetchRoutinesEpic,
|
|
1172
1181
|
fetchScheduleAccruedDetailsEpic_1.fetchScheduleAccruedDetailsEpic,
|
|
1173
1182
|
fetchScheduleAccruedDetailsPageEpic_1.fetchScheduleAccruedDetailsPageEpic,
|
|
1174
1183
|
fetchScheduleDetailsEpic_1.fetchScheduleDetailsEpic,
|
|
@@ -1347,6 +1356,7 @@ const ALL_EPICS = [
|
|
|
1347
1356
|
runInvoicingInvoiceActionEpic_1.runInvoicingInvoiceActionEpic,
|
|
1348
1357
|
runInvoicingPaymentActionEpic_1.runInvoicingPaymentActionEpic,
|
|
1349
1358
|
runInvoicingSubscriptionActionEpic_1.runInvoicingSubscriptionActionEpic,
|
|
1359
|
+
runRoutineEpic_1.runRoutineEpic,
|
|
1350
1360
|
saveAccountMappingViewEpic_1.saveAccountMappingViewEpic,
|
|
1351
1361
|
saveAccountSettingsViewEpic_1.saveAccountSettingsViewEpic,
|
|
1352
1362
|
saveAPIKeyConnectionEpic_1.saveAPIKeyConnectionEpic,
|
|
@@ -1382,6 +1392,7 @@ const ALL_EPICS = [
|
|
|
1382
1392
|
saveReasonForAuditRuleEpic_1.saveReasonForAuditRuleEpic,
|
|
1383
1393
|
saveRemiDetailEpic_1.saveRemiDetailEpic,
|
|
1384
1394
|
saveRemiSetupApproverViewUpdatesEpic_1.saveRemiSetupApproverViewUpdatesEpic,
|
|
1395
|
+
saveRoutineEpic_1.saveRoutineEpic,
|
|
1385
1396
|
saveScheduleAccruedDetailsEpic_1.saveScheduleAccruedDetailsEpic,
|
|
1386
1397
|
saveScheduleDetailsEpic_1.saveScheduleDetailsEpic,
|
|
1387
1398
|
saveSkillEpic_1.saveSkillEpic,
|
|
@@ -1410,6 +1421,7 @@ const ALL_EPICS = [
|
|
|
1410
1421
|
sendOtpEpic_1.sendOtpEpic,
|
|
1411
1422
|
sendReferralInviteEpic_1.sendReferralInviteEpic,
|
|
1412
1423
|
sessionHeartbeatEpic_1.sessionHeartbeatEpic,
|
|
1424
|
+
setRoutineEnabledEpic_1.setRoutineEnabledEpic,
|
|
1413
1425
|
setSkillVisibilityEpic_1.setSkillVisibilityEpic,
|
|
1414
1426
|
snoozeTaskEpic_1.snoozeTaskEpic,
|
|
1415
1427
|
startInvoicingQboBackfillEpic_1.startInvoicingQboBackfillEpic,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
2
|
import assignWith from 'lodash/assignWith';
|
|
3
3
|
import recordGet from 'lodash/get';
|
|
4
|
-
import { mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod } from '../../commonPayloadTypes/v2/coaBalancePayload';
|
|
4
|
+
import { mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod, } from '../../commonPayloadTypes/v2/coaBalancePayload';
|
|
5
5
|
import { getParentClassId } from '../../commonStateTypes/classesView/getNestedClassIDHierarchyForReport';
|
|
6
6
|
import { clearAll } from '../../rootActions';
|
|
7
7
|
import { mapClassBasePayloadToClass, } from './classPayload';
|
|
@@ -26,17 +26,20 @@ export const updateSectionClassesViewEpic = (actions$) => actions$.pipe(filter(u
|
|
|
26
26
|
Object.keys(sectionPayload.classes).forEach((eachClassId) => {
|
|
27
27
|
const classId = classMetadataRecordsByID[eachClassId].nestedClassId;
|
|
28
28
|
const classMetadataPayload = classMetadataRecordsByID[eachClassId].classMetadataPayload;
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
const classPayload = sectionPayload.classes[eachClassId];
|
|
30
|
+
// A calculated section is grouped by class with no accounts under it.
|
|
31
|
+
const classAccounts = 'accounts' in classPayload ? classPayload.accounts : undefined;
|
|
32
|
+
if (classAccounts != null) {
|
|
33
|
+
accountMetadataWithBalancesPayloads.push(...getSubAccountsMetadataForAccountList(classAccounts, accountMetadataRecordsByID, sectionId, { parentClassId: classId, sectionId }));
|
|
34
|
+
}
|
|
35
|
+
const nestedAccountIds = classAccounts != null
|
|
36
|
+
? getNestedAccountIDHierarchyForAccounts(Object.keys(classAccounts), accountsMetadata)
|
|
37
|
+
: [];
|
|
35
38
|
if (classMetadataPayload != null) {
|
|
36
39
|
classMetadataWithBalancesPayloads.push({
|
|
37
40
|
nestedClassId: classId,
|
|
38
41
|
classMetadata: classMetadataPayload,
|
|
39
|
-
classBalances:
|
|
42
|
+
classBalances: classPayload,
|
|
40
43
|
nestedAccountIds,
|
|
41
44
|
});
|
|
42
45
|
}
|
|
@@ -15,12 +15,16 @@ export const updateSectionProjectViewEpic = (actions$) => actions$.pipe(filter(u
|
|
|
15
15
|
const accountMetadataWithBalancesPayloads = [];
|
|
16
16
|
if (sectionPayload.projects != null) {
|
|
17
17
|
Object.keys(sectionPayload.projects).forEach((projectId) => {
|
|
18
|
-
const
|
|
18
|
+
const projectPayload = sectionPayload.projects[projectId];
|
|
19
|
+
// A calculated section is grouped by project with no accounts under it.
|
|
20
|
+
const projectAccounts = 'accounts' in projectPayload ? projectPayload.accounts : undefined;
|
|
19
21
|
const projectsViewParentID = {
|
|
20
22
|
projectId,
|
|
21
23
|
sectionId,
|
|
22
24
|
};
|
|
23
|
-
|
|
25
|
+
if (projectAccounts != null) {
|
|
26
|
+
getSubAccountsMetadataForProjectAccountList(projectAccounts, accountMetadataRecordsByID, sectionId, projectsViewParentID, accountMetadataWithBalancesPayloads);
|
|
27
|
+
}
|
|
24
28
|
});
|
|
25
29
|
}
|
|
26
30
|
if (accountMetadataWithBalancesPayloads.length > 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
import { mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod } from '../../commonPayloadTypes/v2/coaBalancePayload';
|
|
2
|
+
import { mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod, } from '../../commonPayloadTypes/v2/coaBalancePayload';
|
|
3
3
|
import { clearAll } from '../../rootActions';
|
|
4
4
|
import { mapAccountMetadataPayloadToAccountMetadata, } from '../account/accountPayload';
|
|
5
5
|
import { getNestedAccountIDHierarchyForAccounts } from '../sectionAccountsView/getNestedAccountIDHierarchyForSection';
|
|
@@ -31,10 +31,11 @@ const sectionProjectView = createSlice({
|
|
|
31
31
|
const accountsMetadata = accountsMetadataPayload.map((eachAccount) => mapAccountMetadataPayloadToAccountMetadata(eachAccount));
|
|
32
32
|
Object.keys(sectionPayload.projects).forEach((projectId) => {
|
|
33
33
|
const projectPayload = sectionPayload.projects[projectId];
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
// A calculated section is grouped by project with no accounts under it.
|
|
35
|
+
const projectAccounts = 'accounts' in projectPayload ? projectPayload.accounts : undefined;
|
|
36
|
+
const nestedAccountIds = projectAccounts != null
|
|
37
|
+
? getNestedAccountIDHierarchyForAccounts(Object.keys(projectAccounts), accountsMetadata)
|
|
36
38
|
: [];
|
|
37
|
-
const nestedAccountIds = getNestedAccountIDHierarchyForAccounts(projectAccountIds, accountsMetadata);
|
|
38
39
|
updateSectionProject(draft, timeframe, projectPayload, sectionId, projectId, reportId, currencyPayload, nestedAccountIds);
|
|
39
40
|
});
|
|
40
41
|
}
|
package/lib/esm/epic.js
CHANGED
|
@@ -58,6 +58,12 @@ import { fetchSkillVersionBodyEpic } from './view/aiCfoView/epics/fetchSkillVers
|
|
|
58
58
|
import { fetchSkillVersionsEpic } from './view/aiCfoView/epics/fetchSkillVersionsEpic';
|
|
59
59
|
import { fetchSkillsEpic, } from './view/aiCfoView/epics/fetchSkillsEpic';
|
|
60
60
|
import { fetchSuggestedQuestionsEpic, } from './view/aiCfoView/epics/fetchSuggestedQuestionsEpic';
|
|
61
|
+
import { deleteRoutineEpic } from './view/aiCfoView/epics/deleteRoutineEpic';
|
|
62
|
+
import { fetchRoutineRunsEpic } from './view/aiCfoView/epics/fetchRoutineRunsEpic';
|
|
63
|
+
import { fetchRoutinesEpic } from './view/aiCfoView/epics/fetchRoutinesEpic';
|
|
64
|
+
import { runRoutineEpic } from './view/aiCfoView/epics/runRoutineEpic';
|
|
65
|
+
import { saveRoutineEpic } from './view/aiCfoView/epics/saveRoutineEpic';
|
|
66
|
+
import { setRoutineEnabledEpic } from './view/aiCfoView/epics/setRoutineEnabledEpic';
|
|
61
67
|
import { saveSkillEpic } from './view/aiCfoView/epics/saveSkillEpic';
|
|
62
68
|
import { setSkillVisibilityEpic } from './view/aiCfoView/epics/setSkillVisibilityEpic';
|
|
63
69
|
import { stopSubmitEpic, } from './view/aiCfoView/epics/stopSubmitEpic';
|
|
@@ -842,6 +848,7 @@ const ALL_EPICS = [
|
|
|
842
848
|
deletePersonEpic,
|
|
843
849
|
deleteRemiApprovalRuleEpic,
|
|
844
850
|
deleteRemiEpic,
|
|
851
|
+
deleteRoutineEpic,
|
|
845
852
|
deleteScheduleAccruedDetailEpic,
|
|
846
853
|
deleteScheduleDetailEpic,
|
|
847
854
|
deleteSkillEpic,
|
|
@@ -1166,6 +1173,8 @@ const ALL_EPICS = [
|
|
|
1166
1173
|
fetchReviewCompanyViewEpic,
|
|
1167
1174
|
fetchReviewTransferDetailEpic,
|
|
1168
1175
|
fetchRewardsPlanEpic,
|
|
1176
|
+
fetchRoutineRunsEpic,
|
|
1177
|
+
fetchRoutinesEpic,
|
|
1169
1178
|
fetchScheduleAccruedDetailsEpic,
|
|
1170
1179
|
fetchScheduleAccruedDetailsPageEpic,
|
|
1171
1180
|
fetchScheduleDetailsEpic,
|
|
@@ -1344,6 +1353,7 @@ const ALL_EPICS = [
|
|
|
1344
1353
|
runInvoicingInvoiceActionEpic,
|
|
1345
1354
|
runInvoicingPaymentActionEpic,
|
|
1346
1355
|
runInvoicingSubscriptionActionEpic,
|
|
1356
|
+
runRoutineEpic,
|
|
1347
1357
|
saveAccountMappingViewEpic,
|
|
1348
1358
|
saveAccountSettingsViewEpic,
|
|
1349
1359
|
saveAPIKeyConnectionEpic,
|
|
@@ -1379,6 +1389,7 @@ const ALL_EPICS = [
|
|
|
1379
1389
|
saveReasonForAuditRuleEpic,
|
|
1380
1390
|
saveRemiDetailEpic,
|
|
1381
1391
|
saveRemiSetupApproverViewUpdatesEpic,
|
|
1392
|
+
saveRoutineEpic,
|
|
1382
1393
|
saveScheduleAccruedDetailsEpic,
|
|
1383
1394
|
saveScheduleDetailsEpic,
|
|
1384
1395
|
saveSkillEpic,
|
|
@@ -1407,6 +1418,7 @@ const ALL_EPICS = [
|
|
|
1407
1418
|
sendOtpEpic,
|
|
1408
1419
|
sendReferralInviteEpic,
|
|
1409
1420
|
sessionHeartbeatEpic,
|
|
1421
|
+
setRoutineEnabledEpic,
|
|
1410
1422
|
setSkillVisibilityEpic,
|
|
1411
1423
|
snoozeTaskEpic,
|
|
1412
1424
|
startInvoicingQboBackfillEpic,
|
package/lib/esm/index.js
CHANGED
|
@@ -691,8 +691,8 @@ export { updateAiAccountantCustomers, updateAiAccountantCustomer, updateAiAccoun
|
|
|
691
691
|
export { getAiAccountantCustomers, getAiAccountantJobsByTenantId, } from './entity/aiAccountantCustomer/aiAccountantCustomerSelector';
|
|
692
692
|
export { cancelAiAccountantOnboarding, fetchAiAccountantCustomers, fetchAiAccountantJobs, setSelectedTenantIdsForJobTrigger, triggerAiAccountantJob, updateAiAccountantUIState, } from './view/aiAccountantView/aiAccountantViewReducer';
|
|
693
693
|
export { getAiAccountantCockpitView, } from './view/aiAccountantView/aiAccountantViewSelector';
|
|
694
|
-
export {
|
|
695
|
-
export { getAiCfoView,
|
|
694
|
+
export { acceptMasterTOS, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, clearCurrentSessionId, clearDeleteChatSessionStatus, clearLastContextMessage, clearSkillDetail, clearSkillMutation, closeRoutineRuns, closeRoutinesBrowser, closeSkillsBrowser, createSession, createSessionAndSubmit, deleteChatSession, deleteRoutine, deleteSkill, fetchChatHistory, fetchChatSessionsForUser, fetchRoutineRuns, fetchRoutines, fetchSkillDetail, fetchSkills, fetchSkillsFailure, fetchSkillsSuccess, fetchSkillVersionBody, fetchSkillVersions, fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess, openRoutinesBrowser, openSkillsBrowser, runRoutine, saveRoutine, saveSkill, setRoutineEnabled, setSession, setSkillVisibility, stopSubmit, stopSubmitQuestion, submitFeedback, submitQuestion, updateAiCfoViewScrollPosition, updateCotCollapsedState, updateCurrentInput, updateResponseState, } from './view/aiCfoView/aiCfoViewReducer';
|
|
695
|
+
export { canCreateRoutine, getAiCfoView, getRoutineMutation, getRoutineRuns, getRoutines, getRoutinesEnabled, getSkillDetail, getSkillMutation, getSkills, getSkillsEnabled, getSkillVersionBody, getSkillVersions, getSuggestedQuestionsForPageContext, } from './view/aiCfoView/aiCfoViewSelector';
|
|
696
696
|
export { setNewSession, setSessions, updateAiCfoAnswerCardPolicyWizardPlan, upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, addQuestionPayload, clearSession, toAiCfoExports, toAiCfoVisualization, appendSyntheticAiCfoAnswer, updateSyntheticAiCfoAnswer, removeSyntheticAiCfoAnswer, } from './entity/aiCfo/aiCfoReducer';
|
|
697
697
|
export { getAllQuestionAnswersForChatSession, getQuestionAnswerByIdForChatSession, getAllQuestionsForChatSession, getAiCfoSelectorView, getSyntheticAiCfoAnswersForChatSession, getSyntheticAiCfoAnswerByQuestionAnswerId, } from './entity/aiCfo/aiCfoSelector';
|
|
698
698
|
export { ALL_AI_CFO_CHARTS_TYPES, ALL_AI_CFO_VISUALIZATION_TYPES, ALL_AI_CFO_ANSWER_STATE_TYPES, ALL_AI_CFO_ANSWER_RESPONSE_TYPES, ALL_INTERACTIVE_FORM_TYPES, toAiCfoVisualizationType, toAiCfoVisualizationTypeStrict, toAiCfoChartType, toAiCfoChartTypeStrict, toAiCfoAnswerStateType, toAiCfoAnswerStateTypeStrict, toAiCfoAnswerResponseType, toAiCfoAnswerResponseTypeStrict, toInteractiveFormType, toInteractiveFormTypeStrict, ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS, toMessageSender, toMessageType, } from './entity/aiCfo/aiCfoState';
|