@zeniai/client-epic-state 5.0.0-beta0ND → 5.0.0-betaRD2

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.
Files changed (140) hide show
  1. package/lib/commonPayloadTypes/subAccountView/reportBySubAccountPayload.d.ts +2 -0
  2. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.d.ts +13 -0
  3. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +9 -0
  4. package/lib/commonStateTypes/common.d.ts +1 -1
  5. package/lib/commonStateTypes/projectView/projectViewParentID.d.ts +5 -0
  6. package/lib/commonStateTypes/projectView/projectViewParentID.js +2 -0
  7. package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
  8. package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
  9. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  10. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  11. package/lib/coreEpics.js +1 -2
  12. package/lib/entity/account/accountReducer.js +5 -3
  13. package/lib/entity/account/accountSelector.d.ts +7 -0
  14. package/lib/entity/account/accountSelector.js +4 -2
  15. package/lib/entity/account/accountState.d.ts +3 -1
  16. package/lib/entity/account/accountState.js +4 -1
  17. package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -0
  18. package/lib/entity/account/subAccountSelector.d.ts +2 -0
  19. package/lib/entity/account/subAccountSelector.js +2 -0
  20. package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -0
  21. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  22. package/lib/entity/class/classReducer.d.ts +4 -4
  23. package/lib/entity/class/classState.d.ts +1 -1
  24. package/lib/entity/forecast/forecastState.d.ts +1 -1
  25. package/lib/entity/project/projectPayload.d.ts +13 -0
  26. package/lib/entity/project/projectPayload.js +30 -0
  27. package/lib/entity/project/projectReducer.d.ts +10 -0
  28. package/lib/entity/project/projectReducer.js +31 -0
  29. package/lib/entity/project/projectSelector.d.ts +5 -0
  30. package/lib/entity/project/projectSelector.js +12 -0
  31. package/lib/entity/project/projectState.d.ts +13 -0
  32. package/lib/entity/project/projectState.js +2 -0
  33. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  34. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  35. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  36. package/lib/entity/sectionProjectView/sectionProjectView.d.ts +11 -0
  37. package/lib/entity/sectionProjectView/sectionProjectView.js +6 -0
  38. package/lib/entity/sectionProjectView/sectionProjectViewEpic.d.ts +6 -0
  39. package/lib/entity/sectionProjectView/sectionProjectViewEpic.js +56 -0
  40. package/lib/entity/sectionProjectView/sectionProjectViewHelper.d.ts +10 -0
  41. package/lib/entity/sectionProjectView/sectionProjectViewHelper.js +14 -0
  42. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +15 -0
  43. package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +56 -0
  44. package/lib/entity/sectionProjectView/sectionProjectViewSelector.d.ts +11 -0
  45. package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +94 -0
  46. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.d.ts +16 -0
  47. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +2 -0
  48. package/lib/entity/sectionProjectView/sectionProjectViewState.d.ts +4 -0
  49. package/lib/entity/sectionProjectView/sectionProjectViewState.js +2 -0
  50. package/lib/entity/tenant/clearAllEpic.d.ts +5 -2
  51. package/lib/entity/tenant/clearAllEpic.js +6 -0
  52. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  53. package/lib/entity/tenant/tenantReducer.d.ts +1 -5
  54. package/lib/entity/tenant/tenantReducer.js +3 -23
  55. package/lib/entity/tenant/tenantSelector.d.ts +1 -0
  56. package/lib/entity/tenant/tenantSelector.js +9 -1
  57. package/lib/entity/tenant/tenantState.d.ts +1 -1
  58. package/lib/epic.d.ts +4 -1
  59. package/lib/epic.js +4 -1
  60. package/lib/esm/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +5 -0
  61. package/lib/esm/commonStateTypes/projectView/projectViewParentID.js +1 -0
  62. package/lib/esm/commonStateTypes/viewAndReport/reportIDHelper.js +1 -0
  63. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  64. package/lib/esm/coreEpics.js +1 -2
  65. package/lib/esm/entity/account/accountReducer.js +5 -3
  66. package/lib/esm/entity/account/accountSelector.js +4 -2
  67. package/lib/esm/entity/account/accountState.js +4 -1
  68. package/lib/esm/entity/account/subAccountSelector.js +2 -0
  69. package/lib/esm/entity/project/projectPayload.js +26 -0
  70. package/lib/esm/entity/project/projectReducer.js +27 -0
  71. package/lib/esm/entity/project/projectSelector.js +8 -0
  72. package/lib/esm/entity/project/projectState.js +1 -0
  73. package/lib/esm/entity/sectionProjectView/sectionProjectView.js +3 -0
  74. package/lib/esm/entity/sectionProjectView/sectionProjectViewEpic.js +52 -0
  75. package/lib/esm/entity/sectionProjectView/sectionProjectViewHelper.js +10 -0
  76. package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +52 -0
  77. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +87 -0
  78. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +1 -0
  79. package/lib/esm/entity/sectionProjectView/sectionProjectViewState.js +1 -0
  80. package/lib/esm/entity/tenant/clearAllEpic.js +6 -0
  81. package/lib/esm/entity/tenant/tenantReducer.js +2 -21
  82. package/lib/esm/entity/tenant/tenantSelector.js +7 -0
  83. package/lib/esm/epic.js +4 -1
  84. package/lib/esm/index.js +8 -8
  85. package/lib/esm/reducer.js +9 -0
  86. package/lib/esm/view/financeStatement/financeStatementSelector.js +12 -1
  87. package/lib/esm/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +47 -0
  88. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +30 -0
  89. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +1 -0
  90. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +113 -0
  91. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +67 -0
  92. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +1 -0
  93. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewState.js +1 -0
  94. package/lib/esm/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  95. package/lib/index.d.ts +12 -8
  96. package/lib/index.js +46 -40
  97. package/lib/reducer.d.ts +9 -0
  98. package/lib/reducer.js +9 -0
  99. package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
  100. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  101. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  102. package/lib/view/cardBalance/cardBalanceSelector.d.ts +2 -1
  103. package/lib/view/cashBalance/cashBalanceSelector.d.ts +2 -1
  104. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  105. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  106. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  107. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  108. package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
  109. package/lib/view/financeStatement/financeStatementSelector.js +12 -1
  110. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  111. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.d.ts +9 -0
  112. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +51 -0
  113. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.d.ts +6 -0
  114. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +34 -0
  115. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.d.ts +33 -0
  116. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +2 -0
  117. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.d.ts +33 -0
  118. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +117 -0
  119. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.d.ts +9 -0
  120. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +71 -0
  121. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +19 -0
  122. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +2 -0
  123. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.d.ts +22 -0
  124. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.js +2 -0
  125. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  126. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.d.ts +2 -1
  127. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  128. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  129. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  130. package/lib/view/topEx/topExSelector.d.ts +1 -1
  131. package/package.json +1 -1
  132. package/lib/entity/tenant/SessionManager.d.ts +0 -38
  133. package/lib/entity/tenant/SessionManager.js +0 -171
  134. package/lib/entity/tenant/epic/sessionHeartbeatEpic.d.ts +0 -16
  135. package/lib/entity/tenant/epic/sessionHeartbeatEpic.js +0 -16
  136. package/lib/entity/tenant/sessionTypes.d.ts +0 -26
  137. package/lib/entity/tenant/sessionTypes.js +0 -12
  138. package/lib/esm/entity/tenant/SessionManager.js +0 -167
  139. package/lib/esm/entity/tenant/epic/sessionHeartbeatEpic.js +0 -12
  140. package/lib/esm/entity/tenant/sessionTypes.js +0 -9
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getProjectById = getProjectById;
4
+ exports.getProjectsByIds = getProjectsByIds;
5
+ function getProjectById(projectState, projectId) {
6
+ return projectState.projects[projectId];
7
+ }
8
+ function getProjectsByIds(projectState, projectIds) {
9
+ return projectIds
10
+ .map((projectId) => getProjectById(projectState, projectId))
11
+ .filter((project) => project != null);
12
+ }
@@ -0,0 +1,13 @@
1
+ import { ID } from '../../commonStateTypes/common';
2
+ import { ZeniDate } from '../../zeniDayJS';
3
+ export interface Project {
4
+ projectId: ID;
5
+ projectName: string;
6
+ accountingProviderProjectCustomerId?: ID;
7
+ accountingProviderProjectId?: ID;
8
+ parentCustomerAccountingProviderId?: ID;
9
+ startDate?: ZeniDate;
10
+ status?: string;
11
+ zeniParentCustomerId?: ID;
12
+ zeniProjectCustomerId?: ID;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,5 +10,5 @@ export interface SectionAccountsView {
10
10
  sectionId: ID;
11
11
  balancesByPeriod?: COABalanceGroupedByPeriod;
12
12
  }
13
- export declare function getSectionAccountViewKey(sectionId: ID, reportId: ReportIDPlusForecastID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation` | `${string}-cash_balance+${string}` | `${string}-card_balance+${string}` | `${string}-expense_automation_card+${string}` | `${string}-operating_expenses+${string}` | `${string}-operating_expenses_by_classes+${string}` | `${string}-revenue+${string}` | `${string}-revenue_by_classes+${string}` | `${string}-net_burn_or_income+${string}` | `${string}-net_burn_or_income_story_card+${string}` | `${string}-net_burn_or_income_by_classes+${string}` | `${string}-cash_position+${string}` | `${string}-top_expenses+${string}` | `${string}-profit_and_loss+${string}` | `${string}-profit_and_loss_by_classes+${string}` | `${string}-balance_sheet+${string}` | `${string}-cash_flow+${string}` | `${string}-dashboard+${string}` | `${string}-finance_statement+${string}` | `${string}-transaction_list_of_account+${string}` | `${string}-transaction_list_missing_receipt+${string}` | `${string}-transaction_list_of_account_by_class+${string}` | `${string}-transaction_detail+${string}` | `${string}-cash_in_cash_out+${string}` | `${string}-insights_dashboard+${string}` | `${string}-company_details+${string}` | `${string}-class_list+${string}` | `${string}-account_list+${string}` | `${string}-account_list_by_type+${string}` | `${string}-vendor+${string}` | `${string}-task_card+${string}` | `${string}-bill_pay+${string}` | `${string}-reimbursement+${string}` | `${string}-bill_pay_card+${string}` | `${string}-reimbursement_card+${string}` | `${string}-bill_pay_promo_card+${string}` | `${string}-zeni_accounts+${string}` | `${string}-zeni_accounts_promo_card+${string}` | `${string}-zeni_treasury+${string}` | `${string}-charge_cards+${string}` | `${string}-other_connection+${string}` | `${string}-reimbursement_promo_card+${string}` | `${string}-onboarding+${string}` | `${string}-operating_expenses_by_vendor+${string}` | `${string}-operating_expenses_by_vendor_summary+${string}` | `${string}-vendors_tab+${string}` | `${string}-accounts_payable_aging+${string}` | `${string}-accounts_receivable_aging+${string}` | `${string}-vendor_global_review+${string}` | `${string}-prepaid_expenses+${string}` | `${string}-fixed_assets+${string}` | `${string}-notification+${string}` | `${string}-rewards_card+${string}` | `${string}-billing+${string}` | `${string}-flux_analysis_operating_expense+${string}` | `${string}-account_reconciliation+${string}` | `${string}-zeni_credit_promo_card+${string}` | `${string}-treasury_promo_card+${string}` | `${string}-excluded_account_reconciliation+${string}`;
13
+ export declare function getSectionAccountViewKey(sectionId: ID, reportId: ReportIDPlusForecastID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-profit_and_loss_by_projects` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation` | `${string}-cash_balance+${string}` | `${string}-card_balance+${string}` | `${string}-expense_automation_card+${string}` | `${string}-operating_expenses+${string}` | `${string}-operating_expenses_by_classes+${string}` | `${string}-revenue+${string}` | `${string}-revenue_by_classes+${string}` | `${string}-net_burn_or_income+${string}` | `${string}-net_burn_or_income_story_card+${string}` | `${string}-net_burn_or_income_by_classes+${string}` | `${string}-cash_position+${string}` | `${string}-top_expenses+${string}` | `${string}-profit_and_loss+${string}` | `${string}-profit_and_loss_by_classes+${string}` | `${string}-profit_and_loss_by_projects+${string}` | `${string}-balance_sheet+${string}` | `${string}-cash_flow+${string}` | `${string}-dashboard+${string}` | `${string}-finance_statement+${string}` | `${string}-transaction_list_of_account+${string}` | `${string}-transaction_list_missing_receipt+${string}` | `${string}-transaction_list_of_account_by_class+${string}` | `${string}-transaction_detail+${string}` | `${string}-cash_in_cash_out+${string}` | `${string}-insights_dashboard+${string}` | `${string}-company_details+${string}` | `${string}-class_list+${string}` | `${string}-account_list+${string}` | `${string}-account_list_by_type+${string}` | `${string}-vendor+${string}` | `${string}-task_card+${string}` | `${string}-bill_pay+${string}` | `${string}-reimbursement+${string}` | `${string}-bill_pay_card+${string}` | `${string}-reimbursement_card+${string}` | `${string}-bill_pay_promo_card+${string}` | `${string}-zeni_accounts+${string}` | `${string}-zeni_accounts_promo_card+${string}` | `${string}-zeni_treasury+${string}` | `${string}-charge_cards+${string}` | `${string}-other_connection+${string}` | `${string}-reimbursement_promo_card+${string}` | `${string}-onboarding+${string}` | `${string}-operating_expenses_by_vendor+${string}` | `${string}-operating_expenses_by_vendor_summary+${string}` | `${string}-vendors_tab+${string}` | `${string}-accounts_payable_aging+${string}` | `${string}-accounts_receivable_aging+${string}` | `${string}-vendor_global_review+${string}` | `${string}-prepaid_expenses+${string}` | `${string}-fixed_assets+${string}` | `${string}-notification+${string}` | `${string}-rewards_card+${string}` | `${string}-billing+${string}` | `${string}-flux_analysis_operating_expense+${string}` | `${string}-account_reconciliation+${string}` | `${string}-zeni_credit_promo_card+${string}` | `${string}-treasury_promo_card+${string}` | `${string}-excluded_account_reconciliation+${string}`;
14
14
  export type SectionAccountKey = ReturnType<typeof getSectionAccountViewKey>;
@@ -8,5 +8,5 @@ export interface SectionClassesView {
8
8
  sectionId: ID;
9
9
  balancesByPeriod?: COABalanceGroupedByPeriod;
10
10
  }
11
- export declare function getSectionClassesViewKey(sectionId: ID, reportId: ReportID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation`;
11
+ export declare function getSectionClassesViewKey(sectionId: ID, reportId: ReportID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-profit_and_loss_by_projects` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation`;
12
12
  export type SectionClassesKey = ReturnType<typeof getSectionClassesViewKey>;
@@ -4,9 +4,9 @@ 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" | "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" | "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", 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" | "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" | "profit_and_loss_by_projects" | "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" | "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", sectionPayload: SectionByClassCOABalanceGroupedPayloadV2, classesMetadataPayload: ClassMetadataPayload[], accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
8
8
  timeframe: "month" | "year" | "quarter";
9
- 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" | "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";
9
+ 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" | "profit_and_loss_by_projects" | "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" | "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";
10
10
  sectionId: string;
11
11
  sectionPayload: SectionByClassCOABalanceGroupedPayloadV2;
12
12
  classesMetadataPayload: ClassMetadataPayload[];
@@ -0,0 +1,11 @@
1
+ import { COABalanceGroupedByPeriod } from '../../commonStateTypes/coaBalance/coaBalance';
2
+ import { ID } from '../../commonStateTypes/common';
3
+ import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
4
+ export interface SectionProjectView {
5
+ key: SectionProjectKey;
6
+ projectId: ID;
7
+ sectionId: ID;
8
+ balancesByPeriod?: COABalanceGroupedByPeriod;
9
+ }
10
+ export declare function getSectionProjectViewKey(sectionId: ID, projectId: ID, reportId: ReportID): `${string}-${string}-cash_balance` | `${string}-${string}-card_balance` | `${string}-${string}-expense_automation_card` | `${string}-${string}-operating_expenses` | `${string}-${string}-operating_expenses_by_classes` | `${string}-${string}-revenue` | `${string}-${string}-revenue_by_classes` | `${string}-${string}-net_burn_or_income` | `${string}-${string}-net_burn_or_income_story_card` | `${string}-${string}-net_burn_or_income_by_classes` | `${string}-${string}-cash_position` | `${string}-${string}-top_expenses` | `${string}-${string}-profit_and_loss` | `${string}-${string}-profit_and_loss_by_classes` | `${string}-${string}-profit_and_loss_by_projects` | `${string}-${string}-balance_sheet` | `${string}-${string}-cash_flow` | `${string}-${string}-dashboard` | `${string}-${string}-finance_statement` | `${string}-${string}-transaction_list_of_account` | `${string}-${string}-transaction_list_missing_receipt` | `${string}-${string}-transaction_list_of_account_by_class` | `${string}-${string}-transaction_detail` | `${string}-${string}-cash_in_cash_out` | `${string}-${string}-insights_dashboard` | `${string}-${string}-company_details` | `${string}-${string}-class_list` | `${string}-${string}-account_list` | `${string}-${string}-account_list_by_type` | `${string}-${string}-vendor` | `${string}-${string}-task_card` | `${string}-${string}-bill_pay` | `${string}-${string}-reimbursement` | `${string}-${string}-bill_pay_card` | `${string}-${string}-reimbursement_card` | `${string}-${string}-bill_pay_promo_card` | `${string}-${string}-zeni_accounts` | `${string}-${string}-zeni_accounts_promo_card` | `${string}-${string}-zeni_treasury` | `${string}-${string}-charge_cards` | `${string}-${string}-other_connection` | `${string}-${string}-reimbursement_promo_card` | `${string}-${string}-onboarding` | `${string}-${string}-operating_expenses_by_vendor` | `${string}-${string}-operating_expenses_by_vendor_summary` | `${string}-${string}-vendors_tab` | `${string}-${string}-accounts_payable_aging` | `${string}-${string}-accounts_receivable_aging` | `${string}-${string}-vendor_global_review` | `${string}-${string}-prepaid_expenses` | `${string}-${string}-fixed_assets` | `${string}-${string}-notification` | `${string}-${string}-rewards_card` | `${string}-${string}-billing` | `${string}-${string}-flux_analysis_operating_expense` | `${string}-${string}-account_reconciliation` | `${string}-${string}-zeni_credit_promo_card` | `${string}-${string}-treasury_promo_card` | `${string}-${string}-excluded_account_reconciliation`;
11
+ export type SectionProjectKey = ReturnType<typeof getSectionProjectViewKey>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSectionProjectViewKey = getSectionProjectViewKey;
4
+ function getSectionProjectViewKey(sectionId, projectId, reportId) {
5
+ return `${sectionId}-${projectId}-${reportId}`;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { ActionsObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { updateMultipleSubAccountsWithBalances } from '../account/accountReducer';
4
+ import { updateSectionProjectView } from './sectionProjectViewReducer';
5
+ export type ActionType = ReturnType<typeof updateSectionProjectView> | ReturnType<typeof updateMultipleSubAccountsWithBalances>;
6
+ export declare const updateSectionProjectViewEpic: (actions$: ActionsObservable<ActionType>) => Observable<ActionType>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateSectionProjectViewEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const getNestedAccountIDHierarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
7
+ const accountReducer_1 = require("../account/accountReducer");
8
+ const sectionProjectViewReducer_1 = require("./sectionProjectViewReducer");
9
+ const updateSectionProjectViewEpic = (actions$) => actions$.pipe((0, operators_1.filter)(sectionProjectViewReducer_1.updateSectionProjectView.match), (0, operators_1.mergeMap)((action) => {
10
+ const actions = [];
11
+ const sectionPayload = action.payload.sectionPayload;
12
+ const sectionId = action.payload.sectionId;
13
+ const timeframe = action.payload.timeframe;
14
+ const reportId = action.payload.reportId;
15
+ const currencyPayload = action.payload.currencyPayload;
16
+ const accountsMetadataPayload = action.payload.accountsMetadataPayload;
17
+ const accountMetadataRecordsByID = (0, getNestedAccountIDHierarchyForReport_1.getAllAccountMetadataRecordsByID)(accountsMetadataPayload);
18
+ const accountMetadataWithBalancesPayloads = [];
19
+ if (sectionPayload.projects != null) {
20
+ Object.keys(sectionPayload.projects).forEach((projectId) => {
21
+ const projectAccounts = sectionPayload.projects[projectId].accounts;
22
+ const projectsViewParentID = {
23
+ projectId,
24
+ sectionId,
25
+ };
26
+ getSubAccountsMetadataForProjectAccountList(projectAccounts, accountMetadataRecordsByID, sectionId, projectsViewParentID, accountMetadataWithBalancesPayloads);
27
+ });
28
+ }
29
+ if (accountMetadataWithBalancesPayloads.length > 0) {
30
+ actions.push((0, accountReducer_1.updateMultipleSubAccountsWithBalances)(accountMetadataWithBalancesPayloads, currencyPayload, reportId, timeframe));
31
+ }
32
+ return (0, rxjs_1.from)(actions);
33
+ }));
34
+ exports.updateSectionProjectViewEpic = updateSectionProjectViewEpic;
35
+ const getSubAccountsMetadataForProjectAccountList = (accountListWithBalances, accountMetadataRecordsByID, sectionId, projectsViewParentID, result) => {
36
+ if (accountListWithBalances != null) {
37
+ Object.keys(accountListWithBalances).forEach((eachAccountId) => {
38
+ const accountMetadataRecord = accountMetadataRecordsByID[eachAccountId];
39
+ if (accountMetadataRecord != null) {
40
+ const accountId = accountMetadataRecord.nestedAccountId;
41
+ result.push({
42
+ accountsViewParentID: {
43
+ parentAccountId: (0, getNestedAccountIDHierarchyForReport_1.getParentAccountId)(accountId),
44
+ sectionId,
45
+ },
46
+ accountMetadataPayload: accountMetadataRecord.accountMetadataPayload,
47
+ accountBalancesPayload: accountListWithBalances[eachAccountId],
48
+ projectsViewParentID,
49
+ });
50
+ }
51
+ else {
52
+ console.warn(`Account ${eachAccountId} in Section ${sectionId} Project ${projectsViewParentID.projectId} is missing metadata.`);
53
+ }
54
+ });
55
+ }
56
+ };
@@ -0,0 +1,10 @@
1
+ import { COABalanceGroupedByPeriodPayloadV2 } from '../../commonPayloadTypes/v2/coaBalancePayload';
2
+ import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
3
+ import { ID } from '../../commonStateTypes/common';
4
+ import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
5
+ import { SectionProjectView } from './sectionProjectView';
6
+ export declare const mapProjectCOABalanceGroupedPayloadToSectionProjectView: (timeframe: "month" | "quarter" | "year", projectBalancesPayload: COABalanceGroupedByPeriodPayloadV2, currencyPayload: CurrencyPayload, id: {
7
+ projectId: ID;
8
+ reportId: ReportID;
9
+ sectionId: ID;
10
+ }) => SectionProjectView;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapProjectCOABalanceGroupedPayloadToSectionProjectView = void 0;
4
+ const coaBalancePayload_1 = require("../../commonPayloadTypes/v2/coaBalancePayload");
5
+ const sectionProjectView_1 = require("./sectionProjectView");
6
+ const mapProjectCOABalanceGroupedPayloadToSectionProjectView = (timeframe, projectBalancesPayload, currencyPayload, id) => {
7
+ return {
8
+ key: (0, sectionProjectView_1.getSectionProjectViewKey)(id.sectionId, id.projectId, id.reportId),
9
+ projectId: id.projectId,
10
+ sectionId: id.sectionId,
11
+ balancesByPeriod: (0, coaBalancePayload_1.mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod)(projectBalancesPayload, currencyPayload, timeframe),
12
+ };
13
+ };
14
+ exports.mapProjectCOABalanceGroupedPayloadToSectionProjectView = mapProjectCOABalanceGroupedPayloadToSectionProjectView;
@@ -0,0 +1,15 @@
1
+ import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
2
+ import { AccountMetadataPayload } from '../account/accountPayload';
3
+ import { SectionByProjectCOABalanceGroupedPayloadV2 } from '../../view/profitAndLossProjectView/profitAndLossProjectViewPayload';
4
+ import { SectionProjectViewState } from './sectionProjectViewState';
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" | "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" | "profit_and_loss_by_projects" | "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" | "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", sectionPayload: SectionByProjectCOABalanceGroupedPayloadV2, accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
7
+ timeframe: "month" | "year" | "quarter";
8
+ 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" | "profit_and_loss_by_projects" | "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" | "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";
9
+ sectionId: string;
10
+ sectionPayload: SectionByProjectCOABalanceGroupedPayloadV2;
11
+ accountsMetadataPayload: AccountMetadataPayload[];
12
+ currencyPayload: CurrencyPayload;
13
+ }, "sectionProjectView/updateSectionProjectView", never, never>, clearAllSectionsProjectView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"sectionProjectView/clearAllSectionsProjectView">;
14
+ declare const _default: import("redux").Reducer<SectionProjectViewState>;
15
+ export default _default;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.clearAllSectionsProjectView = exports.updateSectionProjectView = exports.initialState = void 0;
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ const coaBalancePayload_1 = require("../../commonPayloadTypes/v2/coaBalancePayload");
7
+ const sectionProjectView_1 = require("./sectionProjectView");
8
+ const sectionProjectViewHelper_1 = require("./sectionProjectViewHelper");
9
+ exports.initialState = {
10
+ sectionsByKey: {},
11
+ };
12
+ const sectionProjectView = (0, toolkit_1.createSlice)({
13
+ name: 'sectionProjectView',
14
+ initialState: exports.initialState,
15
+ reducers: {
16
+ updateSectionProjectView: {
17
+ prepare(timeframe, sectionId, reportId, sectionPayload, accountsMetadataPayload, currencyPayload) {
18
+ return {
19
+ payload: {
20
+ timeframe,
21
+ reportId,
22
+ sectionId,
23
+ sectionPayload,
24
+ accountsMetadataPayload,
25
+ currencyPayload,
26
+ },
27
+ };
28
+ },
29
+ reducer(draft, action) {
30
+ const { timeframe, sectionPayload, sectionId, reportId, currencyPayload } = action.payload;
31
+ if (sectionPayload.projects != null) {
32
+ Object.keys(sectionPayload.projects).forEach((projectId) => {
33
+ const projectPayload = sectionPayload.projects[projectId];
34
+ updateSectionProject(draft, timeframe, projectPayload, sectionId, projectId, reportId, currencyPayload);
35
+ });
36
+ }
37
+ },
38
+ },
39
+ clearAllSectionsProjectView(draft) {
40
+ Object.assign(draft, exports.initialState);
41
+ },
42
+ },
43
+ });
44
+ _a = sectionProjectView.actions, exports.updateSectionProjectView = _a.updateSectionProjectView, exports.clearAllSectionsProjectView = _a.clearAllSectionsProjectView;
45
+ exports.default = sectionProjectView.reducer;
46
+ const updateSectionProject = (draft, timeframe, projectPayload, sectionId, projectId, reportId, currencyPayload) => {
47
+ const sectionKey = (0, sectionProjectView_1.getSectionProjectViewKey)(sectionId, projectId, reportId);
48
+ const section = draft.sectionsByKey[sectionKey];
49
+ if (section != null) {
50
+ draft.sectionsByKey[sectionKey].balancesByPeriod = Object.assign({}, draft.sectionsByKey[sectionKey].balancesByPeriod, (0, coaBalancePayload_1.mapCOABalanceGroupedByPeriodPayloadV2ToCOABalanceGroupedByPeriod)(projectPayload, currencyPayload, timeframe));
51
+ }
52
+ else {
53
+ draft.sectionsByKey[sectionKey] =
54
+ (0, sectionProjectViewHelper_1.mapProjectCOABalanceGroupedPayloadToSectionProjectView)(timeframe, projectPayload, currencyPayload, { sectionId, projectId, reportId });
55
+ }
56
+ };
@@ -0,0 +1,11 @@
1
+ import { COABalancesFilterProjectView } from '../../commonStateTypes/coaBalance/coaBalancesFilterProjectView';
2
+ import { ID } from '../../commonStateTypes/common';
3
+ import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
4
+ import { AccountState } from '../account/accountState';
5
+ import { ProjectState } from '../project/projectReducer';
6
+ import { SectionProjectViewReport } from './sectionProjectViewSelectorTypes';
7
+ import { SectionProjectViewState } from './sectionProjectViewState';
8
+ export declare const getSectionProjectViewReport: (accountState: AccountState, projectState: ProjectState, sectionState: SectionProjectViewState, projectIds: ID[], id: {
9
+ reportId: ReportID;
10
+ sectionId: ID;
11
+ }, filter: COABalancesFilterProjectView) => SectionProjectViewReport;
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getSectionProjectViewReport = void 0;
7
+ const get_1 = __importDefault(require("lodash/get"));
8
+ const coaBalance_1 = require("../../commonStateTypes/coaBalance/coaBalance");
9
+ const getSumOfBalancesGroupedByPeriod_1 = require("../../commonStateTypes/coaBalance/classBalances/getSumOfBalancesGroupedByPeriod");
10
+ const accountPayload_1 = require("../account/accountPayload");
11
+ const accountState_1 = require("../account/accountState");
12
+ const subAccountSelector_1 = require("../account/subAccountSelector");
13
+ const projectSelector_1 = require("../project/projectSelector");
14
+ const getNestedAccountIDHierarchyForSection_1 = require("../sectionAccountsView/getNestedAccountIDHierarchyForSection");
15
+ const sectionProjectView_1 = require("./sectionProjectView");
16
+ const getSectionProjectViewReport = (accountState, projectState, sectionState, projectIds, id, filter) => {
17
+ const projectIdsToShow = projectIds.filter((projectId) => !filter.projectsToFilterOut.includes(projectId));
18
+ const projectReports = [];
19
+ const sectionBalancesTotalByPeriodArray = [];
20
+ const accountsByProject = getAccountsByProject(accountState, id.sectionId, id.reportId);
21
+ projectIdsToShow.forEach((projectId) => {
22
+ const project = (0, projectSelector_1.getProjectById)(projectState, projectId);
23
+ if (project == null) {
24
+ return;
25
+ }
26
+ const projectAccountIds = accountsByProject[projectId] ?? [];
27
+ const accountsMetadata = projectAccountIds
28
+ .map((accountId) => {
29
+ const key = (0, accountState_1.getAccountKey)(id.reportId, accountId, undefined, undefined, { projectId, sectionId: id.sectionId });
30
+ const account = accountState.accountsByKey[key];
31
+ if (account == null) {
32
+ return undefined;
33
+ }
34
+ return (0, accountPayload_1.mapAccountMetadataPayloadToAccountMetadata)({
35
+ account_id: account.accountId,
36
+ account_name: account.accountName,
37
+ account_description: account.accountDescription,
38
+ labels: account.labels,
39
+ is_sub_account: account.accountsViewParentId != null,
40
+ parent_account_id: account.accountsViewParentId?.parentAccountId?.[0] ?? null,
41
+ });
42
+ })
43
+ .filter((metadata) => metadata != null);
44
+ const nestedAccountHierarchy = (0, getNestedAccountIDHierarchyForSection_1.getNestedAccountIDHierarchyForAccounts)(projectAccountIds, accountsMetadata);
45
+ const nestedAccountReports = [];
46
+ nestedAccountHierarchy.forEach((accountIdHierarchy) => {
47
+ const report = (0, subAccountSelector_1.getNestedAccountReportForAccount)(accountState, {
48
+ accountIdHierarchy,
49
+ reportId: id.reportId,
50
+ projectsViewParentId: {
51
+ projectId,
52
+ sectionId: id.sectionId,
53
+ },
54
+ }, filter, nestedAccountHierarchy.length > 1);
55
+ if (report != null) {
56
+ nestedAccountReports.push(report);
57
+ }
58
+ });
59
+ const projectSectionKey = (0, sectionProjectView_1.getSectionProjectViewKey)(id.sectionId, projectId, id.reportId);
60
+ const projectSectionView = (0, get_1.default)(sectionState.sectionsByKey, projectSectionKey, undefined);
61
+ const projectBalancesTotalByPeriod = projectSectionView?.balancesByPeriod ?? {};
62
+ const projectReport = {
63
+ projectId,
64
+ projectName: project.projectName,
65
+ accounts: nestedAccountReports,
66
+ ...(0, coaBalance_1.getCOABalances)(projectBalancesTotalByPeriod, filter),
67
+ projectBalancesTotalByPeriod,
68
+ };
69
+ projectReports.push(projectReport);
70
+ sectionBalancesTotalByPeriodArray.push(projectBalancesTotalByPeriod);
71
+ });
72
+ const sectionBalancesTotalByPeriod = (0, getSumOfBalancesGroupedByPeriod_1.getSumOfBalancesByGroupedByPeriod)(sectionBalancesTotalByPeriodArray) ?? {};
73
+ return {
74
+ projects: projectReports,
75
+ ...(0, coaBalance_1.getCOABalances)(sectionBalancesTotalByPeriod, filter),
76
+ sectionBalancesTotalByPeriod,
77
+ };
78
+ };
79
+ exports.getSectionProjectViewReport = getSectionProjectViewReport;
80
+ const getAccountsByProject = (accountState, sectionId, reportId) => {
81
+ const result = {};
82
+ Object.values(accountState.accountsByKey).forEach((account) => {
83
+ if (account.projectsViewParentId != null &&
84
+ account.projectsViewParentId.sectionId === sectionId &&
85
+ account.key.endsWith(reportId)) {
86
+ const projectId = account.projectsViewParentId.projectId;
87
+ if (result[projectId] == null) {
88
+ result[projectId] = [];
89
+ }
90
+ result[projectId].push(account.accountId);
91
+ }
92
+ });
93
+ return result;
94
+ };
@@ -0,0 +1,16 @@
1
+ import { COABalanceGroupedByPeriod } from '../../commonStateTypes/coaBalance/coaBalance';
2
+ import { COABalancesSlice } from '../../commonStateTypes/coaBalance/coaBalancesFilter';
3
+ import { ID } from '../../commonStateTypes/common';
4
+ import { NestedAccountReport } from '../account/subAccountSelector';
5
+ export interface ProjectReportV2 {
6
+ accounts: NestedAccountReport[];
7
+ projectId: ID;
8
+ projectName: string;
9
+ }
10
+ export interface ProjectReportWithBalances extends ProjectReportV2, COABalancesSlice {
11
+ projectBalancesTotalByPeriod: COABalanceGroupedByPeriod;
12
+ }
13
+ export interface SectionProjectViewReport extends COABalancesSlice {
14
+ projects: ProjectReportWithBalances[];
15
+ sectionBalancesTotalByPeriod: COABalanceGroupedByPeriod;
16
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { SectionProjectKey, SectionProjectView } from './sectionProjectView';
2
+ export interface SectionProjectViewState {
3
+ sectionsByKey: Record<SectionProjectKey, SectionProjectView>;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,6 +5,7 @@ import { clearAllEntityApprovalStatus } from '../../entity/entityApprovalStatus/
5
5
  import { clearAllMonthEndCloseChecks } from '../../entity/monthEndCloseChecks/monthEndCloseChecksReducer';
6
6
  import { clearAllNotifications } from '../../entity/notification/notificationReducer';
7
7
  import { clearAllSectionsClassesViewV2 } from '../../entity/sectionClassesViewV2/sectionClassesViewReducer';
8
+ import { clearAllSectionsProjectView } from '../../entity/sectionProjectView/sectionProjectViewReducer';
8
9
  import { clearAllTaskGroups } from '../../entity/taskGroup/taskGroupReducer';
9
10
  import { clearAllToastNotifications } from '../../entity/toastNotification/toastNotificationReducer';
10
11
  import { clearAccountList } from '../../view/accountList/accountListReducer';
@@ -63,6 +64,7 @@ import { clearOwnerList } from '../../view/ownerList/ownerListReducer';
63
64
  import { clearPeople } from '../../view/people/peopleReducer';
64
65
  import { clearProfitAndLoss } from '../../view/profitAndLoss/profitAndLossReducer';
65
66
  import { clearProfitAndLossClassesView } from '../../view/profitAndLossClassesView/profitAndLossClassesViewReducer';
67
+ import { clearProfitAndLossProjectView } from '../../view/profitAndLossProjectView/profitAndLossProjectViewReducer';
66
68
  import { clearRecommendation } from '../../view/recommendation/recommendationReducer';
67
69
  import { clearReferrals } from '../../view/referralView/referralReducer';
68
70
  import { clearReimbursementCard } from '../../view/reimbursementCard/reimbursementCardReducer';
@@ -160,6 +162,7 @@ import { clearAllChargeCardRepayments } from '../chargeCardRepayment/chargeCardR
160
162
  import { clearAllChargeCardTransactions } from '../chargeCardTransaction/chargeCardTransactionReducer';
161
163
  import { clearAllClasses } from '../class/classReducer';
162
164
  import { clearAllCompanies } from '../company/companyReducer';
165
+ import { clearAllProjects } from '../project/projectReducer';
163
166
  import { clearCompanyHealthMetric } from '../companyHealthMetric/companyHealthMetricReducer';
164
167
  import { clearAllConnectedAccounts } from '../connectedAccount/connectedAccountReducer';
165
168
  import { clearCountryList } from '../countryList/countryListReducer';
@@ -197,8 +200,8 @@ import { clearAllUserRoles } from '../userRole/userRoleReducer';
197
200
  import { clearAllVendors } from '../vendor/vendorReducer';
198
201
  import { clearAllVendorExpenseTrends } from '../vendorExpense/vendorExpenseReducer';
199
202
  import { clearAll } from './tenantReducer';
200
- type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard>;
201
- type clearActionTypeForEntities = ReturnType<typeof clearAiCfo> | ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardRepayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
203
+ type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard>;
204
+ type clearActionTypeForEntities = ReturnType<typeof clearAiCfo> | ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardRepayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSectionsProjectView> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
202
205
  export type ActionType = clearActionTypeForViews | clearActionTypeForEntities | ReturnType<typeof clearAll>;
203
206
  export declare const clearAllEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<ActionType>;
204
207
  export {};
@@ -9,6 +9,7 @@ const entityApprovalStatusReducer_1 = require("../../entity/entityApprovalStatus
9
9
  const monthEndCloseChecksReducer_1 = require("../../entity/monthEndCloseChecks/monthEndCloseChecksReducer");
10
10
  const notificationReducer_1 = require("../../entity/notification/notificationReducer");
11
11
  const sectionClassesViewReducer_1 = require("../../entity/sectionClassesViewV2/sectionClassesViewReducer");
12
+ const sectionProjectViewReducer_1 = require("../../entity/sectionProjectView/sectionProjectViewReducer");
12
13
  const taskGroupReducer_1 = require("../../entity/taskGroup/taskGroupReducer");
13
14
  const toastNotificationReducer_1 = require("../../entity/toastNotification/toastNotificationReducer");
14
15
  const accountListReducer_1 = require("../../view/accountList/accountListReducer");
@@ -67,6 +68,7 @@ const ownerListReducer_1 = require("../../view/ownerList/ownerListReducer");
67
68
  const peopleReducer_1 = require("../../view/people/peopleReducer");
68
69
  const profitAndLossReducer_1 = require("../../view/profitAndLoss/profitAndLossReducer");
69
70
  const profitAndLossClassesViewReducer_1 = require("../../view/profitAndLossClassesView/profitAndLossClassesViewReducer");
71
+ const profitAndLossProjectViewReducer_1 = require("../../view/profitAndLossProjectView/profitAndLossProjectViewReducer");
70
72
  const recommendationReducer_1 = require("../../view/recommendation/recommendationReducer");
71
73
  const referralReducer_1 = require("../../view/referralView/referralReducer");
72
74
  const reimbursementCardReducer_1 = require("../../view/reimbursementCard/reimbursementCardReducer");
@@ -164,6 +166,7 @@ const chargeCardRepaymentReducer_1 = require("../chargeCardRepayment/chargeCardR
164
166
  const chargeCardTransactionReducer_1 = require("../chargeCardTransaction/chargeCardTransactionReducer");
165
167
  const classReducer_1 = require("../class/classReducer");
166
168
  const companyReducer_1 = require("../company/companyReducer");
169
+ const projectReducer_1 = require("../project/projectReducer");
167
170
  const companyHealthMetricReducer_1 = require("../companyHealthMetric/companyHealthMetricReducer");
168
171
  const connectedAccountReducer_1 = require("../connectedAccount/connectedAccountReducer");
169
172
  const countryListReducer_1 = require("../countryList/countryListReducer");
@@ -212,6 +215,7 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
212
215
  (0, addressViewReducer_1.clearAddressView)(),
213
216
  (0, aiCfoViewReducer_1.clearAiCfoView)(),
214
217
  (0, classReducer_1.clearAllClasses)(),
218
+ (0, projectReducer_1.clearAllProjects)(),
215
219
  (0, monthEndCloseChecksViewReducer_1.clearAllMonthEndCloseChecksView)(),
216
220
  (0, apAgingReducer_1.clearApAging)(),
217
221
  (0, apAgingDetailReducer_1.clearApAgingDetail)(),
@@ -291,6 +295,7 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
291
295
  (0, previousBillsReducer_1.clearPreviousBills)(),
292
296
  (0, profitAndLossReducer_1.clearProfitAndLoss)(),
293
297
  (0, profitAndLossClassesViewReducer_1.clearProfitAndLossClassesView)(),
298
+ (0, profitAndLossProjectViewReducer_1.clearProfitAndLossProjectView)(),
294
299
  (0, recommendationReducer_1.clearRecommendation)(),
295
300
  (0, referralReducer_1.clearReferrals)(),
296
301
  (0, reimbursementCardReducer_1.clearReimbursementCard)(),
@@ -385,6 +390,7 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
385
390
  (0, reimbursementReducer_1.clearAllReimbursements)(),
386
391
  (0, sectionAccountsViewReducer_1.clearAllSectionsAccountsView)(),
387
392
  (0, sectionClassesViewReducer_1.clearAllSectionsClassesViewV2)(),
393
+ (0, sectionProjectViewReducer_1.clearAllSectionsProjectView)(),
388
394
  (0, subscriptionAddOnReducer_1.clearAllSubscriptionAddOns)(),
389
395
  (0, subscriptionCouponReducer_1.clearAllSubscriptionCoupons)(),
390
396
  (0, subscriptionPlanReducer_1.clearAllSubscriptionPlans)(),
@@ -34,6 +34,7 @@ interface TenantPayload {
34
34
  inviter_email: string;
35
35
  inviter_id: ID;
36
36
  is_accounting_classes_enabled: boolean;
37
+ is_accounting_projects_enabled: boolean;
37
38
  is_admin: boolean;
38
39
  is_ap_analyst: boolean;
39
40
  is_banker: boolean;
@@ -51,11 +51,7 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
51
51
  accountLockTime?: string;
52
52
  accountUnlockTime?: string;
53
53
  isAccountLocked?: boolean;
54
- }, "tenant/sendEmailMagicLinkToUserFailure">, updateSignInState: import("@reduxjs/toolkit").ActionCreatorWithPayload<FetchState, "tenant/updateSignInState">, doSignOut: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tenant/doSignOut">, signOutSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tenant/signOutSuccess">, sendSessionHeartbeat: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tenant/sendSessionHeartbeat">, sessionHeartbeatSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[expiresAt: string], {
55
- expiresAt: string;
56
- }, "tenant/sessionHeartbeatSuccess", never, never>, sessionHeartbeatFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], {
57
- error: ZeniAPIStatus<Record<string, unknown>>;
58
- }, "tenant/sessionHeartbeatFailure", never, never>, updateLoggedInUser: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userPayload: LoggedInUserPayload, zeniSessionId: string, authProvider: AuthProvider], {
54
+ }, "tenant/sendEmailMagicLinkToUserFailure">, updateSignInState: import("@reduxjs/toolkit").ActionCreatorWithPayload<FetchState, "tenant/updateSignInState">, doSignOut: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tenant/doSignOut">, signOutSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tenant/signOutSuccess">, updateLoggedInUser: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userPayload: LoggedInUserPayload, zeniSessionId: string, authProvider: AuthProvider], {
59
55
  userPayload: LoggedInUserPayload;
60
56
  zeniSessionId: string;
61
57
  authProvider: AuthProvider;