@zeniai/client-epic-state 4.10.7 → 4.10.9

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 (98) hide show
  1. package/lib/commonPayloadTypes/agingReportPayloadTypes.d.ts +1 -0
  2. package/lib/commonPayloadTypes/subAccountView/subAccountPayloadHelper.js +2 -2
  3. package/lib/commonStateTypes/accountView/{getNestedAccountIDHeirarchyForReport.d.ts → getNestedAccountIDHierarchyForReport.d.ts} +2 -2
  4. package/lib/commonStateTypes/accountView/nestedAccountID.d.ts +2 -2
  5. package/lib/commonStateTypes/agingBalance/agingBalance.d.ts +4 -0
  6. package/lib/commonStateTypes/agingBalance/agingBalance.js +4 -1
  7. package/lib/commonStateTypes/classesView/getNestedClassIDHierarchyForReport.d.ts +2 -2
  8. package/lib/commonStateTypes/classesView/nestedClassID.d.ts +2 -2
  9. package/lib/commonStateTypes/customerView/getNestedCustomerHierarchy.d.ts +9 -0
  10. package/lib/commonStateTypes/customerView/getNestedCustomerHierarchy.js +46 -0
  11. package/lib/commonStateTypes/customerView/nestedCustomerID.d.ts +42 -0
  12. package/lib/commonStateTypes/customerView/nestedCustomerID.js +9 -0
  13. package/lib/commonStateTypes/selectorTypes/classesViewSelectorReport.d.ts +2 -2
  14. package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +4 -7
  15. package/lib/entity/account/subAccountSelector.d.ts +1 -1
  16. package/lib/entity/account/subAccountSelector.js +7 -7
  17. package/lib/entity/accountGroup/accountGroupV2Selector.js +3 -3
  18. package/lib/entity/class/classSelectorV2.d.ts +1 -1
  19. package/lib/entity/class/classSelectorV2.js +10 -10
  20. package/lib/entity/customer/customerPayload.d.ts +1 -1
  21. package/lib/entity/customer/customerPayload.js +1 -1
  22. package/lib/entity/customer/customerReducer.d.ts +1 -1
  23. package/lib/entity/customer/customerSelector.d.ts +1 -1
  24. package/lib/entity/customerIncome/customerIncomeTrend.d.ts +1 -1
  25. package/lib/entity/customerIncome/customerIncomeTrendReducer.d.ts +1 -1
  26. package/lib/entity/sectionAccountsView/getNestedAccountIDHierarchyForSection.js +9 -9
  27. package/lib/entity/sectionAccountsView/sectionAccountsViewEpic.js +2 -2
  28. package/lib/entity/sectionAccountsView/sectionAccountsViewSelector.js +3 -3
  29. package/lib/entity/sectionClassesViewV2/sectionClassesViewEpic.js +2 -2
  30. package/lib/entity/sectionClassesViewV2/sectionClassesViewSelector.js +7 -7
  31. package/lib/entity/sectionClassesViewV2/selectorHelpers/getNestedClassIDHierarchyForSection.js +7 -7
  32. package/lib/entity/transaction/stateTypes/customerTransaction.d.ts +1 -1
  33. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  34. package/lib/index.d.ts +14 -12
  35. package/lib/index.js +7 -6
  36. package/lib/reducer.d.ts +1 -1
  37. package/lib/view/accountList/accountListReducer.js +2 -2
  38. package/lib/view/accountList/accountListSelector.d.ts +3 -3
  39. package/lib/view/accountList/accountListSelector.js +3 -3
  40. package/lib/view/accountList/accountListState.d.ts +2 -2
  41. package/lib/view/accountMappingView/accountMappingPayload.js +25 -0
  42. package/lib/view/accountMappingView/accountMappingReducer.js +19 -19
  43. package/lib/view/accountMappingView/accountMappingState.d.ts +8 -8
  44. package/lib/view/accountMappingView/accountMappingViewSelector.d.ts +8 -8
  45. package/lib/view/accountMappingView/accountMappingViewSelector.js +7 -7
  46. package/lib/view/apAgingView/apAgingReport/apAgingReducer.d.ts +7 -5
  47. package/lib/view/apAgingView/apAgingReport/apAgingReducer.js +34 -15
  48. package/lib/view/apAgingView/apAgingReport/apAgingSelector.d.ts +1 -1
  49. package/lib/view/apAgingView/apAgingReport/apAgingSelector.js +29 -16
  50. package/lib/view/apAgingView/apAgingReport/apAgingState.d.ts +6 -3
  51. package/lib/view/apAgingView/apAgingReport/fetchApAgingEpic.js +11 -7
  52. package/lib/view/arAgingView/arAgingDetail/arAgingDetailSelector.d.ts +1 -1
  53. package/lib/view/arAgingView/arAgingReport/arAgingPayload.js +8 -1
  54. package/lib/view/arAgingView/arAgingReport/arAgingReducer.d.ts +13 -7
  55. package/lib/view/arAgingView/arAgingReport/arAgingReducer.js +49 -15
  56. package/lib/view/arAgingView/arAgingReport/arAgingSelector.d.ts +12 -6
  57. package/lib/view/arAgingView/arAgingReport/arAgingSelector.js +68 -35
  58. package/lib/view/arAgingView/arAgingReport/arAgingState.d.ts +12 -4
  59. package/lib/view/arAgingView/arAgingReport/fetchArAgingEpic.js +10 -7
  60. package/lib/view/classList/classListSelector.d.ts +3 -3
  61. package/lib/view/classList/classListSelector.js +3 -3
  62. package/lib/view/classList/classListState.d.ts +2 -2
  63. package/lib/view/commonVendorView/transactionVendorView/transactionVendorViewSelector.d.ts +4 -4
  64. package/lib/view/commonVendorView/transactionVendorView/transactionVendorViewSelector.js +4 -4
  65. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +4 -4
  66. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +4 -4
  67. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +4 -4
  68. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +4 -4
  69. package/lib/view/dashboard/dashboardEpic.js +6 -4
  70. package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer.js +3 -3
  71. package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewSelector.js +3 -3
  72. package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewState.d.ts +2 -2
  73. package/lib/view/opExClassesView/opExClassesViewReducer.js +3 -3
  74. package/lib/view/opExClassesView/opExClassesViewSelector.js +3 -3
  75. package/lib/view/opExClassesView/opExClassesViewState.d.ts +2 -2
  76. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +3 -3
  77. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +2 -2
  78. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +2 -2
  79. package/lib/view/revenueClassesView/revenueClassesViewReducer.js +3 -3
  80. package/lib/view/revenueClassesView/revenueClassesViewSelector.js +3 -3
  81. package/lib/view/revenueClassesView/revenueClassesViewState.d.ts +2 -2
  82. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.d.ts +5 -5
  83. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +5 -5
  84. package/lib/view/scheduleView/scheduleListView/scheduleListHelper.d.ts +2 -2
  85. package/lib/view/scheduleView/scheduleListView/scheduleListSelector.d.ts +2 -2
  86. package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +1 -1
  87. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +4 -4
  88. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +4 -4
  89. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.d.ts +4 -4
  90. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -4
  91. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +4 -4
  92. package/lib/view/transactionDetail/transactionDetailSelector.js +4 -4
  93. package/lib/view/transactionDetail/transactionDetailState.d.ts +1 -1
  94. package/lib/view/transactionDetail/transactionDetailTypes.d.ts +1 -1
  95. package/package.json +1 -1
  96. package/lib/commonStateTypes/accountView/{getNestedAccountIDHeirarchyForReport.js → getNestedAccountIDHierarchyForReport.js} +0 -0
  97. package/lib/entity/customer/{customer.d.ts → customerState.d.ts} +4 -4
  98. /package/lib/entity/customer/{customer.js → customerState.js} +0 -0
@@ -3,6 +3,7 @@ import { ID } from '../commonStateTypes/common';
3
3
  import { AgingReportInvoice } from '../commonStateTypes/viewAndReport/agingReportStateTypes';
4
4
  interface AgingAmountPayload {
5
5
  value: number | null;
6
+ total_value?: number | null;
6
7
  }
7
8
  export interface AgingBalancePayload {
8
9
  amount?: AgingAmountPayload;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSubAccountsMetadataForAccountList = void 0;
4
- const getNestedAccountIDHeirarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHeirarchyForReport");
4
+ const getNestedAccountIDHierarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
5
5
  const getSubAccountsMetadataForAccountList = (accountListWithBalances, accountMetadataRecordsByID, sectionId, classesViewParentID) => {
6
6
  const accountMetadataWithBalances = [];
7
7
  accountListWithBalances != null &&
@@ -11,7 +11,7 @@ const getSubAccountsMetadataForAccountList = (accountListWithBalances, accountMe
11
11
  if (accountId != null) {
12
12
  accountMetadataWithBalances.push({
13
13
  accountsViewParentID: {
14
- parentAccountId: (0, getNestedAccountIDHeirarchyForReport_1.getParentAccountId)(accountId),
14
+ parentAccountId: (0, getNestedAccountIDHierarchyForReport_1.getParentAccountId)(accountId),
15
15
  sectionId,
16
16
  },
17
17
  accountMetadataPayload: accountMetadataRecordsByID[eachAccountId].accountMetadataPayload,
@@ -1,14 +1,14 @@
1
1
  import { AccountMetadataPayload } from '../../entity/account/accountPayload';
2
2
  import { AccountMetadata } from '../../entity/account/accountState';
3
3
  import { ID } from '../common';
4
- import { AccountMetadataRecordsByID, NestedAccountHeirarchyForReport, NestedAccountID } from './nestedAccountID';
4
+ import { AccountMetadataRecordsByID, NestedAccountHierarchyForReport, NestedAccountID } from './nestedAccountID';
5
5
  /**
6
6
  * This function builds the hierarchy which is used to display all accounts
7
7
  * in the selection view
8
8
  * @param accountsMetadata
9
9
  * @returns
10
10
  */
11
- export declare function geNestedAccountIDHierarchyForReport(accountsMetadata: AccountMetadata[]): NestedAccountHeirarchyForReport[];
11
+ export declare function geNestedAccountIDHierarchyForReport(accountsMetadata: AccountMetadata[]): NestedAccountHierarchyForReport[];
12
12
  /**
13
13
  * Modified this function to remove recursion. The accounts metadata will ALWAYS be sorted such that all
14
14
  * parent accounts of any will appear before any child account.
@@ -45,12 +45,12 @@ export interface NestedAccountIDHierarchy {
45
45
  id: NestedAccountID;
46
46
  children: NestedAccountIDHierarchy[];
47
47
  }
48
- export interface NestedAccountHeirarchyForReport {
48
+ export interface NestedAccountHierarchyForReport {
49
49
  accountId: NestedAccountID;
50
50
  accountName: string;
51
51
  qboId: ID | undefined;
52
52
  coaId?: ID;
53
- children: NestedAccountHeirarchyForReport[];
53
+ children: NestedAccountHierarchyForReport[];
54
54
  hasSiblings: boolean;
55
55
  }
56
56
  export declare type AccountMetadataRecordsByID = Record<ID, {
@@ -1,10 +1,14 @@
1
+ import { ZeniDate } from '../../zeniDayJS';
1
2
  import { Amount } from '../amount';
2
3
  export declare const AGING_PERIODS: readonly ["current_due", "due_1-30_days", "due_31-60_days", "due_61-90_days", "due_over_90_days"];
3
4
  export declare const toAgingPeriod: (v: string) => "current_due" | "due_1-30_days" | "due_31-60_days" | "due_61-90_days" | "due_over_90_days";
4
5
  export declare type AgingPeriod = ReturnType<typeof toAgingPeriod>;
6
+ export declare const getAgingBalancesKey: (reportDate: ZeniDate) => string;
7
+ export declare type AgingBalancesKey = ReturnType<typeof getAgingBalancesKey>;
5
8
  export interface AgingBalance {
6
9
  balance: Amount;
7
10
  period: AgingPeriod;
8
11
  id?: string;
9
12
  label?: string;
13
+ totalBalance?: Amount;
10
14
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toAgingPeriod = exports.AGING_PERIODS = void 0;
3
+ exports.getAgingBalancesKey = exports.toAgingPeriod = exports.AGING_PERIODS = void 0;
4
+ const formatZeniDateFY_1 = require("../fiscalYearHelpers/formatZeniDateFY");
4
5
  const stringToUnion_1 = require("../stringToUnion");
5
6
  exports.AGING_PERIODS = [
6
7
  'current_due',
@@ -11,3 +12,5 @@ exports.AGING_PERIODS = [
11
12
  ];
12
13
  const toAgingPeriod = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.AGING_PERIODS);
13
14
  exports.toAgingPeriod = toAgingPeriod;
15
+ const getAgingBalancesKey = (reportDate) => `${reportDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)}`;
16
+ exports.getAgingBalancesKey = getAgingBalancesKey;
@@ -1,4 +1,4 @@
1
- import { NestedClassID, NestedClassHeirarchyForReport, ClassMetadataRecordsByID } from './nestedClassID';
1
+ import { NestedClassID, NestedClassHierarchyForReport, ClassMetadataRecordsByID } from './nestedClassID';
2
2
  import { ClassMetadata } from '../../entity/class/classState';
3
3
  import { ID } from '../common';
4
4
  import { ClassMetadataPayload } from '../../entity/class/classPayload';
@@ -8,7 +8,7 @@ import { ClassMetadataPayload } from '../../entity/class/classPayload';
8
8
  * @param classesMetadata
9
9
  * @returns
10
10
  */
11
- export declare function geNestedClassIDHierarchyForReport(classesMetadata: ClassMetadata[]): NestedClassHeirarchyForReport[];
11
+ export declare function geNestedClassIDHierarchyForReport(classesMetadata: ClassMetadata[]): NestedClassHierarchyForReport[];
12
12
  /**
13
13
  * Modified this function to remove recursion. The classes metadata will ALWAYS be sorted such that all
14
14
  * parent classes of any will appear before any child class.
@@ -41,13 +41,13 @@ export interface NestedClassIDHierarchy {
41
41
  id: NestedClassID;
42
42
  children: NestedClassIDHierarchy[];
43
43
  }
44
- export interface NestedClassHeirarchyForReport {
44
+ export interface NestedClassHierarchyForReport {
45
45
  classId: NestedClassID;
46
46
  className: string;
47
47
  qboId: ID | undefined;
48
48
  fullyQualifiedAccountingClassName: string;
49
49
  accountingClassNumber: string | undefined;
50
- children: NestedClassHeirarchyForReport[];
50
+ children: NestedClassHierarchyForReport[];
51
51
  hasSiblings: boolean;
52
52
  }
53
53
  export declare type ClassMetadataRecordsByID = Record<ID, {
@@ -0,0 +1,9 @@
1
+ import { Customer } from '../../entity/customer/customerState';
2
+ import { NestedCustomerHierarchy } from './nestedCustomerID';
3
+ /**
4
+ * This function builds the hierarchy which is used to display all customers
5
+ * in the selection view
6
+ * @param customers
7
+ * @returns
8
+ */
9
+ export declare function getNestedCustomerHierarchy(customers: Customer[]): NestedCustomerHierarchy[];
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getNestedCustomerHierarchy = void 0;
4
+ /**
5
+ * This function builds the hierarchy which is used to display all customers
6
+ * in the selection view
7
+ * @param customers
8
+ * @returns
9
+ */
10
+ function getNestedCustomerHierarchy(customers) {
11
+ const parentCustomers = [];
12
+ customers.forEach((customerMeta) => {
13
+ if (customerMeta.isSubCustomer === false ||
14
+ // look for its parent in the entire metadata. If not found, then push this also as a rootNode
15
+ customers.find((eachCustomer) => eachCustomer.id === customerMeta.parentCustomerId) == null) {
16
+ parentCustomers.push(customerMeta);
17
+ }
18
+ });
19
+ const nestedParents = parentCustomers.map((parentCustomer) => {
20
+ const customerId = parentCustomer.id;
21
+ return {
22
+ customerId: [customerId],
23
+ customerName: parentCustomer.name,
24
+ qboId: parentCustomer.qboId,
25
+ children: getNestedChildren([customerId], customers),
26
+ hasSiblings: parentCustomers.length > 1,
27
+ };
28
+ });
29
+ return nestedParents;
30
+ }
31
+ exports.getNestedCustomerHierarchy = getNestedCustomerHierarchy;
32
+ const getNestedChildren = (parentCustomer, allCustomers) => {
33
+ const parentId = parentCustomer[0];
34
+ const children = allCustomers.filter((eachCustomer) => eachCustomer.parentCustomerId === parentId);
35
+ const nestedChildren = children.map((child) => {
36
+ const childId = [child.id, ...parentCustomer];
37
+ return {
38
+ customerId: childId,
39
+ customerName: child.name,
40
+ qboId: child.qboId,
41
+ children: getNestedChildren(childId, allCustomers),
42
+ hasSiblings: children.length > 1,
43
+ };
44
+ });
45
+ return nestedChildren;
46
+ };
@@ -0,0 +1,42 @@
1
+ import { ID } from '../common';
2
+ export declare type CustomerIDPlus0SubCustomer = [thisCustomerId: string];
3
+ export declare type CustomerIDPlus1SubCustomer = [
4
+ thisCustomerId: string,
5
+ parentCustomerId: string
6
+ ];
7
+ export declare type CustomerIDPlus2SubCustomer = [
8
+ thisCustomerId: string,
9
+ parentCustomerId: string,
10
+ greatParentCustomerId: string
11
+ ];
12
+ export declare type CustomerIDPlus3SubCustomer = [
13
+ thisCustomerId: string,
14
+ parentCustomerId: string,
15
+ greatParentCustomerId: string,
16
+ greatGreatParentCustomerId: string
17
+ ];
18
+ export declare type CustomerIDPlus4SubCustomer = [
19
+ thisCustomerId: string,
20
+ parentCustomerId: string,
21
+ greatParentCustomerId: string,
22
+ greatGreatParentCustomerId: string,
23
+ greatGreatGreatParentCustomerId: string
24
+ ];
25
+ export declare const MAX_SUB_CUSTOMERS_SUPPORTED = 4;
26
+ /**
27
+ * Example usage:
28
+ * Root level customer ID = ["thisCustomerId"]
29
+ * ID of a customer with one parent customer, 1 level nesting = ["parentCustomerId", "thisCustomerId"];
30
+ * ID of a customer which has a parent and a grand parent, 2 level nesting = ["grandParentCustomerId", "parentCustomerId", "thisCustomerId"]
31
+ * and so on..
32
+ */
33
+ export declare type NestedCustomerID = CustomerIDPlus0SubCustomer | CustomerIDPlus1SubCustomer | CustomerIDPlus2SubCustomer | CustomerIDPlus3SubCustomer | CustomerIDPlus4SubCustomer;
34
+ export declare function getNestedCustomerIDStr(nestedCustomerId: NestedCustomerID): `${string}-${string}-${string}-${string}-${string}`;
35
+ export declare type NestedCustomerIDStr = ReturnType<typeof getNestedCustomerIDStr>;
36
+ export interface NestedCustomerHierarchy {
37
+ customerId: NestedCustomerID;
38
+ customerName: string;
39
+ qboId: ID | undefined;
40
+ children: NestedCustomerHierarchy[];
41
+ hasSiblings: boolean;
42
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getNestedCustomerIDStr = exports.MAX_SUB_CUSTOMERS_SUPPORTED = void 0;
4
+ exports.MAX_SUB_CUSTOMERS_SUPPORTED = 4; // QBO limitation, there can only be 4 nested subcustomers under a customer (i.e) customer -> subcustomer1 -> subcustomer2 -> subcustomer3 -> subcustomer4.
5
+ function getNestedCustomerIDStr(nestedCustomerId) {
6
+ const [customerId, parentCustomerId, greatParentCustomerId, greatGreatParentCustomerId, greatGreatGreatParentCustomerId,] = nestedCustomerId;
7
+ return `${customerId}-${parentCustomerId !== null && parentCustomerId !== void 0 ? parentCustomerId : ''}-${greatParentCustomerId !== null && greatParentCustomerId !== void 0 ? greatParentCustomerId : ''}-${greatGreatParentCustomerId !== null && greatGreatParentCustomerId !== void 0 ? greatGreatParentCustomerId : ''}-${greatGreatGreatParentCustomerId !== null && greatGreatGreatParentCustomerId !== void 0 ? greatGreatGreatParentCustomerId : ''}`;
8
+ }
9
+ exports.getNestedCustomerIDStr = getNestedCustomerIDStr;
@@ -1,5 +1,5 @@
1
1
  import { SectionClassesViewReportV2 } from '../../entity/sectionClassesViewV2/sectionClassesViewSelectorTypes';
2
- import { NestedClassHeirarchyForReport, NestedClassID } from '../classesView/nestedClassID';
2
+ import { NestedClassHierarchyForReport, NestedClassID } from '../classesView/nestedClassID';
3
3
  import { COABalancesFilterClassesView } from '../coaBalance/coaBalancesFilterClassesView';
4
4
  import { DataAvailable } from '../dataAvailable';
5
5
  import { SelectorReport } from '../viewAndReport/viewAndReport';
@@ -9,7 +9,7 @@ export interface ClassesViewSelectorReportV2<SectionID extends string, Calculate
9
9
  calculatedSections: Record<CalculatedSectionID, CalculatedSection>;
10
10
  idsInOrder: (SectionID | CalculatedSectionID)[];
11
11
  dataAvailable?: DataAvailable;
12
- classHeirarchy: NestedClassHeirarchyForReport[];
12
+ classHierarchy: NestedClassHierarchyForReport[];
13
13
  classesToFilterOut: NestedClassID[];
14
14
  filter: COABalancesFilterClassesView;
15
15
  }
@@ -1,12 +1,12 @@
1
- import { Customer } from '../../entity/customer/customer';
1
+ import { Customer } from '../../entity/customer/customerState';
2
2
  import { TransactionType } from '../../entity/transaction/stateTypes/transactionType';
3
3
  import { Vendor } from '../../entity/vendor/vendorState';
4
4
  import { ZeniDate } from '../../zeniDayJS';
5
5
  import { Amount } from '../amount';
6
- import { COABalanceMonthQuarterTimeframe } from '../coaBalance/coaBalance';
7
6
  import { FetchState, ID } from '../common';
8
7
  import { SortOrder } from '../selectorTypes/sortOrderTypes';
9
8
  import { ReportID } from './viewAndReport';
9
+ export declare type AgingDateSelectionType = 'last_month' | 'last_quarter' | 'custom_date';
10
10
  export declare type AgingReportId = Extract<ReportID, 'accounts_payable_aging' | 'accounts_receivable_aging'>;
11
11
  export declare const AGING_REPORT_SORT_KEYS: readonly ["current_due", "due_1-30_days", "due_31-60_days", "due_61-90_days", "due_over_90_days", "vendor", "total", "customer"];
12
12
  export declare const toAgingReportSortKey: (v: string) => "total" | "vendor" | "customer" | "current_due" | "due_1-30_days" | "due_31-60_days" | "due_61-90_days" | "due_over_90_days";
@@ -22,16 +22,13 @@ export interface AgingReportInvoice {
22
22
  transactionType: TransactionType;
23
23
  entityId: ID;
24
24
  }
25
- export interface AgingSelectedDate {
26
- date: ZeniDate;
27
- timeframe?: COABalanceMonthQuarterTimeframe;
28
- }
29
25
  export interface AgingReportUIState {
30
26
  searchString: string;
31
27
  sortKey: AgingReportSortKey;
32
28
  sortOrder: SortOrder;
33
29
  downloadState: FetchState;
34
- selectedDate?: AgingSelectedDate;
30
+ selectedDate: ZeniDate;
31
+ agingDateSelectionType: AgingDateSelectionType;
35
32
  }
36
33
  export interface AgingDetailReportUIState {
37
34
  sortKey: keyof AgingReportInvoice;
@@ -19,7 +19,7 @@ export interface NestedAccountReport {
19
19
  */
20
20
  export declare const getNestedAccountReportForAccount: (accountState: AccountState, id: {
21
21
  reportId: ReportIDPlusForecastID;
22
- accountIdHeirarchy: NestedAccountIDHierarchy;
22
+ accountIdHierarchy: NestedAccountIDHierarchy;
23
23
  classesViewParentId?: ClassesViewParentID;
24
24
  accountsViewParentId?: AccountsViewParentID;
25
25
  }, filter: COABalancesFilter, accountHasSiblings: boolean, additionalBalancesOptions?: AdditionalBalancesOptions | undefined) => NestedAccountReport | undefined;
@@ -15,7 +15,7 @@ const getNestedAccountReportForAccount = (accountState, id, filter, accountHasSi
15
15
  balancesRange: filter.balancesRange,
16
16
  };
17
17
  const accountReport = (0, accountSelector_1.getAccount)(accountState, {
18
- accountId: id.accountIdHeirarchy.id[0],
18
+ accountId: id.accountIdHierarchy.id[0],
19
19
  reportId: id.reportId,
20
20
  classesViewParentId: id.classesViewParentId,
21
21
  accountsViewParentId: id.accountsViewParentId,
@@ -24,18 +24,18 @@ const getNestedAccountReportForAccount = (accountState, id, filter, accountHasSi
24
24
  return undefined;
25
25
  }
26
26
  const childrenReports = [];
27
- id.accountIdHeirarchy.children.forEach((childAccount) => {
27
+ id.accountIdHierarchy.children.forEach((childAccount) => {
28
28
  const report = (0, exports.getNestedAccountReportForAccount)(accountState, {
29
29
  reportId: id.reportId,
30
- accountIdHeirarchy: childAccount,
30
+ accountIdHierarchy: childAccount,
31
31
  classesViewParentId: id.classesViewParentId,
32
32
  accountsViewParentId: id.accountsViewParentId != null
33
33
  ? {
34
- parentAccountId: id.accountIdHeirarchy.id,
34
+ parentAccountId: id.accountIdHierarchy.id,
35
35
  sectionId: id.accountsViewParentId.sectionId,
36
36
  }
37
37
  : undefined,
38
- }, filter, id.accountIdHeirarchy.children.length > 1, additionalBalancesOptions);
38
+ }, filter, id.accountIdHierarchy.children.length > 1, additionalBalancesOptions);
39
39
  if (report != null) {
40
40
  childrenReports.push(report);
41
41
  }
@@ -43,9 +43,9 @@ const getNestedAccountReportForAccount = (accountState, id, filter, accountHasSi
43
43
  // sort the children accounts based on their totals.
44
44
  const sortedChildren = (0, exports.sortNestedAccounts)(childrenReports, filter);
45
45
  return {
46
- id: id.accountIdHeirarchy.id,
46
+ id: id.accountIdHierarchy.id,
47
47
  account: accountReport,
48
- isLeafAccount: id.accountIdHeirarchy.children.length === 0,
48
+ isLeafAccount: id.accountIdHierarchy.children.length === 0,
49
49
  children: sortedChildren,
50
50
  hasSiblings: accountHasSiblings,
51
51
  };
@@ -9,7 +9,7 @@ const coaBalance_1 = require("../../commonStateTypes/coaBalance/coaBalance");
9
9
  const pickAndMergeForecast_1 = require("../../commonStateTypes/coaBalance/pickAndMergeForecast");
10
10
  const pickAndMergeForecastAccountReport_1 = require("../account/pickAndMergeForecastAccountReport");
11
11
  const subAccountSelector_1 = require("../account/subAccountSelector");
12
- const getNestedAccountIDHeirarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHeirarchyForReport");
12
+ const getNestedAccountIDHierarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
13
13
  const sortBalancesByFreeRangeTotal_1 = require("../../commonStateTypes/coaBalance/sortBalancesByFreeRangeTotal");
14
14
  const getAccountGroupReportV2 = (accountGroupState, accountState, id, filter, additionalBalancesOptions) => {
15
15
  const accountGroup = accountGroupState.accountGroupsByKey[id.accountGroupKey];
@@ -22,10 +22,10 @@ const getAccountGroupReportV2 = (accountGroupState, accountState, id, filter, ad
22
22
  accountGroup.nestedAccountIds.forEach((nestedAccountId) => {
23
23
  const report = (0, subAccountSelector_1.getNestedAccountReportForAccount)(accountState, {
24
24
  reportId: id.reportId,
25
- accountIdHeirarchy: nestedAccountId,
25
+ accountIdHierarchy: nestedAccountId,
26
26
  accountsViewParentId: {
27
27
  sectionId: id.sectionId,
28
- parentAccountId: (0, getNestedAccountIDHeirarchyForReport_1.getParentAccountId)(nestedAccountId.id),
28
+ parentAccountId: (0, getNestedAccountIDHierarchyForReport_1.getParentAccountId)(nestedAccountId.id),
29
29
  },
30
30
  }, filter, accGroupAcLength > 1, additionalBalancesOptions);
31
31
  if (report != null) {
@@ -28,5 +28,5 @@ export declare function getClassReportV2(classState: ClassState, accountState: A
28
28
  export declare const getNestedClassReportForClass: (classState: ClassState, accountState: AccountState, id: {
29
29
  reportId: ReportID;
30
30
  sectionId: ID;
31
- classIdHeirarchy: NestedClassIDHierarchy;
31
+ classIdHierarchy: NestedClassIDHierarchy;
32
32
  }, filter: COABalancesFilterClassesView) => NestedClassReportV2 | undefined;
@@ -10,7 +10,7 @@ const coaBalance_1 = require("../../commonStateTypes/coaBalance/coaBalance");
10
10
  const classState_1 = require("./classState");
11
11
  const getSumOfBalancesGroupedByPeriod_1 = require("../../commonStateTypes/coaBalance/classBalances/getSumOfBalancesGroupedByPeriod");
12
12
  const subAccountSelector_1 = require("../account/subAccountSelector");
13
- const getNestedAccountIDHeirarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHeirarchyForReport");
13
+ const getNestedAccountIDHierarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
14
14
  function getClassesByIds(classState, id) {
15
15
  const classes = id.classIds
16
16
  .map((classId) => getClassById(classState, {
@@ -43,7 +43,7 @@ function getClassReportV2(classState, accountState, id, filter) {
43
43
  var _a;
44
44
  const report = (0, subAccountSelector_1.getNestedAccountReportForAccount)(accountState, {
45
45
  reportId: id.reportId,
46
- accountIdHeirarchy: nestedAccountId,
46
+ accountIdHierarchy: nestedAccountId,
47
47
  classesViewParentId: id.classesViewParentId != null
48
48
  ? {
49
49
  sectionId: id.classesViewParentId.sectionId,
@@ -53,7 +53,7 @@ function getClassReportV2(classState, accountState, id, filter) {
53
53
  accountsViewParentId: id.classesViewParentId != null
54
54
  ? {
55
55
  sectionId: (_a = id.classesViewParentId) === null || _a === void 0 ? void 0 : _a.sectionId,
56
- parentAccountId: (0, getNestedAccountIDHeirarchyForReport_1.getParentAccountId)(nestedAccountId.id),
56
+ parentAccountId: (0, getNestedAccountIDHierarchyForReport_1.getParentAccountId)(nestedAccountId.id),
57
57
  }
58
58
  : undefined,
59
59
  }, filter, classAcLength > 1);
@@ -72,7 +72,7 @@ exports.getClassReportV2 = getClassReportV2;
72
72
  * This function helps build the nested class report for a given classId in a section in a report
73
73
  */
74
74
  const getNestedClassReportForClass = (classState, accountState, id, filter) => {
75
- const parentId = (0, getNestedClassIDHierarchyForReport_1.getParentClassId)(id.classIdHeirarchy.id);
75
+ const parentId = (0, getNestedClassIDHierarchyForReport_1.getParentClassId)(id.classIdHierarchy.id);
76
76
  const newFilter = {
77
77
  firstMonthOfFY: filter.firstMonthOfFY,
78
78
  timeframe: filter.timeframe,
@@ -80,7 +80,7 @@ const getNestedClassReportForClass = (classState, accountState, id, filter) => {
80
80
  balancesRange: filter.balancesRange,
81
81
  };
82
82
  const classReport = getClassReportV2(classState, accountState, {
83
- nestedClassId: id.classIdHeirarchy.id,
83
+ nestedClassId: id.classIdHierarchy.id,
84
84
  reportId: id.reportId,
85
85
  classesViewParentId: {
86
86
  sectionId: id.sectionId,
@@ -91,7 +91,7 @@ const getNestedClassReportForClass = (classState, accountState, id, filter) => {
91
91
  return undefined;
92
92
  }
93
93
  const classObject = getClassById(classState, {
94
- classId: id.classIdHeirarchy.id[0],
94
+ classId: id.classIdHierarchy.id[0],
95
95
  reportId: id.reportId,
96
96
  classesViewParentId: {
97
97
  sectionId: id.sectionId,
@@ -103,11 +103,11 @@ const getNestedClassReportForClass = (classState, accountState, id, filter) => {
103
103
  }
104
104
  const childrenReports = [];
105
105
  const childrenBalancesTotalByPeriodArray = [];
106
- id.classIdHeirarchy.children.forEach((childClass) => {
106
+ id.classIdHierarchy.children.forEach((childClass) => {
107
107
  const report = (0, exports.getNestedClassReportForClass)(classState, accountState, {
108
108
  reportId: id.reportId,
109
109
  sectionId: id.sectionId,
110
- classIdHeirarchy: childClass,
110
+ classIdHierarchy: childClass,
111
111
  }, filter);
112
112
  if (report != null) {
113
113
  childrenReports.push(report);
@@ -121,9 +121,9 @@ const getNestedClassReportForClass = (classState, accountState, id, filter) => {
121
121
  // uncategorized transactions hence we show its balances to be equal to that of the class balance
122
122
  const childrenBalancesTotalByPeriod = (0, getSumOfBalancesGroupedByPeriod_1.getSumOfBalancesByGroupedByPeriod)(childrenBalancesTotalByPeriodArray);
123
123
  return {
124
- id: id.classIdHeirarchy.id,
124
+ id: id.classIdHierarchy.id,
125
125
  class: classReport,
126
- isLeafClass: id.classIdHeirarchy.children.length === 0,
126
+ isLeafClass: id.classIdHierarchy.children.length === 0,
127
127
  children: childrenReports,
128
128
  classesToFilterOut: filter.classesToFilterOut,
129
129
  childrenBalancesTotal: (0, coaBalance_1.getCOABalances)(childrenBalancesTotalByPeriod, filter),
@@ -1,5 +1,5 @@
1
1
  import { URLPayload } from '../../commonPayloadTypes/urlPayload';
2
- import { Customer, CustomerBase } from './customer';
2
+ import { Customer, CustomerBase } from './customerState';
3
3
  export interface CustomerBasePayload {
4
4
  customer_id: string;
5
5
  customer_name: string;
@@ -7,7 +7,7 @@ const toCustomerBase = (payload) => ({
7
7
  id: payload.customer_id,
8
8
  name: payload.customer_name,
9
9
  qboId: payload.qbo_id,
10
- logo: (0, urlPayload_1.toURL)(payload.logo),
10
+ logo: payload.logo != null ? (0, urlPayload_1.toURL)(payload.logo) : undefined,
11
11
  });
12
12
  exports.toCustomerBase = toCustomerBase;
13
13
  const toCustomerBasePayload = (customer) => {
@@ -1,4 +1,4 @@
1
- import { CustomerState } from './customer';
1
+ import { CustomerState } from './customerState';
2
2
  import { CustomerPayload } from './customerPayload';
3
3
  export declare const initialState: CustomerState;
4
4
  export declare const updateCustomers: import("@reduxjs/toolkit").ActionCreatorWithPayload<CustomerPayload[], string>, updateCustomer: import("@reduxjs/toolkit").ActionCreatorWithPayload<CustomerPayload, string>, removeCustomer: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, clearAllCustomers: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
@@ -1,4 +1,4 @@
1
1
  import { ID } from '../../commonStateTypes/common';
2
- import { Customer, CustomerState } from './customer';
2
+ import { Customer, CustomerState } from './customerState';
3
3
  export declare function getCustomer(customerState: CustomerState, cutomerId: ID): Customer | undefined;
4
4
  export declare function getCustomers(customerState: CustomerState, cutomerIds: ID[]): Customer[];
@@ -3,7 +3,7 @@ import { BalanceKind, TrendTimeseries } from '../../commonStateTypes/balanceTime
3
3
  import { COABalance, COABalanceGrouped } from '../../commonStateTypes/coaBalance/coaBalance';
4
4
  import { TimePeriod } from '../../commonStateTypes/timePeriod';
5
5
  import { InsightSummary } from '../insights/insightSummary';
6
- import { CustomerBase } from '../customer/customer';
6
+ import { CustomerBase } from '../customer/customerState';
7
7
  export interface CustomerIncomeTrendData {
8
8
  customer: CustomerBase;
9
9
  timePeriod: TimePeriod;
@@ -2,7 +2,7 @@ import { COABalanceGroupedPayload } from '../../commonPayloadTypes/coaBalancePay
2
2
  import { TimeframeTick } from '../../commonStateTypes/timeframeTick';
3
3
  import { InsightSummaryPayload } from '../insights/insightSummaryPayload';
4
4
  import { CustomerIncomeState } from './customerIncomeTrendState';
5
- import { CustomerBase } from '../customer/customer';
5
+ import { CustomerBase } from '../customer/customerState';
6
6
  export declare const initialState: CustomerIncomeState;
7
7
  export declare const updateCustomerIncomeTrend: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[customer: CustomerBase, timePeriod: TimeframeTick, balances: COABalanceGroupedPayload | undefined, insights: InsightSummaryPayload[] | undefined], {
8
8
  customer: CustomerBase;
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getNestedAccountIDHierarchyForAccounts = void 0;
4
- const getNestedAccountIDHeirarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHeirarchyForReport");
4
+ const getNestedAccountIDHierarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
5
5
  /**
6
6
  * Given section class names, generate the nested class hierarchy.
7
7
  * @param _accountNames
8
8
  * @param _accountsMetadata
9
9
  */
10
10
  function getNestedAccountIDHierarchyForAccounts(accountNames, accountsMetadata) {
11
- const nestedHeirarchy = [];
12
- const pushIntoParentNodeHeirarchy = (accountMeta, nestedAccounts) => {
11
+ const nestedHierarchy = [];
12
+ const pushIntoParentNodeHierarchy = (accountMeta, nestedAccounts) => {
13
13
  for (let index = 0; index < nestedAccounts.length; index++) {
14
14
  if (nestedAccounts[index].id[0] === accountMeta.parentAccountId) {
15
15
  nestedAccounts[index].children.push({
@@ -23,7 +23,7 @@ function getNestedAccountIDHierarchyForAccounts(accountNames, accountsMetadata)
23
23
  }
24
24
  else {
25
25
  if (nestedAccounts[index].children.length > 0) {
26
- pushIntoParentNodeHeirarchy(accountMeta, nestedAccounts[index].children);
26
+ pushIntoParentNodeHierarchy(accountMeta, nestedAccounts[index].children);
27
27
  }
28
28
  }
29
29
  }
@@ -32,20 +32,20 @@ function getNestedAccountIDHierarchyForAccounts(accountNames, accountsMetadata)
32
32
  orderedAccountnames.forEach((eachAccount) => {
33
33
  if (eachAccount.parentAccountId != null &&
34
34
  orderedAccountnames.find((accountMeta) => accountMeta.accountId === eachAccount.parentAccountId) != null) {
35
- pushIntoParentNodeHeirarchy(eachAccount, nestedHeirarchy);
35
+ pushIntoParentNodeHierarchy(eachAccount, nestedHierarchy);
36
36
  }
37
37
  else {
38
- nestedHeirarchy.push({
39
- id: (0, getNestedAccountIDHeirarchyForReport_1.getNestedAccountIDForAccount)(eachAccount.accountId, accountsMetadata),
38
+ nestedHierarchy.push({
39
+ id: (0, getNestedAccountIDHierarchyForReport_1.getNestedAccountIDForAccount)(eachAccount.accountId, accountsMetadata),
40
40
  children: [],
41
41
  });
42
42
  }
43
43
  });
44
- return nestedHeirarchy;
44
+ return nestedHierarchy;
45
45
  }
46
46
  exports.getNestedAccountIDHierarchyForAccounts = getNestedAccountIDHierarchyForAccounts;
47
47
  /**
48
- * This function will return an ordered list of all the section names that need to be part of the heirarchy
48
+ * This function will return an ordered list of all the section names that need to be part of the hierarchy
49
49
  * @param sectionNames
50
50
  * @param accountMetadata
51
51
  * @returns
@@ -4,7 +4,7 @@ exports.updateSectionAccountsViewEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const sectionAccountsViewReducer_1 = require("./sectionAccountsViewReducer");
7
- const getNestedAccountIDHeirarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHeirarchyForReport");
7
+ const getNestedAccountIDHierarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
8
8
  const getNestedAccountIDHierarchyForSection_1 = require("./getNestedAccountIDHierarchyForSection");
9
9
  const accountPayload_1 = require("../account/accountPayload");
10
10
  const accountGroupReducer_1 = require("../accountGroup/accountGroupReducer");
@@ -20,7 +20,7 @@ const updateSectionAccountsViewEpic = (actions$) => actions$.pipe((0, operators_
20
20
  const accountGroupMetadataPayload = action.payload.accountGroupMetadataPayload;
21
21
  const currencyPayload = action.payload.currencyPayload;
22
22
  const accountsMetadata = accountsMetadataPayload.map((eachAccount) => (0, accountPayload_1.mapAccountMetadataPayloadToAccountMetadata)(eachAccount));
23
- const accountMetadataRecordsByID = (0, getNestedAccountIDHeirarchyForReport_1.getAllAccountMetadataRecordsByID)(accountsMetadataPayload);
23
+ const accountMetadataRecordsByID = (0, getNestedAccountIDHierarchyForReport_1.getAllAccountMetadataRecordsByID)(accountsMetadataPayload);
24
24
  // This would mean a non-zeni COA
25
25
  if (sectionPayload.accounts != null) {
26
26
  const accounts = sectionPayload.accounts;
@@ -11,7 +11,7 @@ const sectionAccountsView_1 = require("./sectionAccountsView");
11
11
  const coaBalance_1 = require("../../commonStateTypes/coaBalance/coaBalance");
12
12
  const pickAndMergeForecast_1 = require("../../commonStateTypes/coaBalance/pickAndMergeForecast");
13
13
  const pickAndMergeForecastAccountReport_1 = require("../account/pickAndMergeForecastAccountReport");
14
- const getNestedAccountIDHeirarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHeirarchyForReport");
14
+ const getNestedAccountIDHierarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
15
15
  const getSectionAccountsViewReport = (accountState, accountGroupState, sectionState, id, filter, additionalBalancesOptions) => {
16
16
  const sectionKey = (0, sectionAccountsView_1.getSectionAccountViewKey)(id.sectionId, id.reportId);
17
17
  const sectionView = (0, get_1.default)(sectionState.sectionsByKey, sectionKey, undefined);
@@ -20,10 +20,10 @@ const getSectionAccountsViewReport = (accountState, accountGroupState, sectionSt
20
20
  sectionView.nestedAccountIds.forEach((nestedAccountId) => {
21
21
  const report = (0, subAccountSelector_1.getNestedAccountReportForAccount)(accountState, {
22
22
  reportId: id.reportId,
23
- accountIdHeirarchy: nestedAccountId,
23
+ accountIdHierarchy: nestedAccountId,
24
24
  accountsViewParentId: {
25
25
  sectionId: id.sectionId,
26
- parentAccountId: (0, getNestedAccountIDHeirarchyForReport_1.getParentAccountId)(nestedAccountId.id),
26
+ parentAccountId: (0, getNestedAccountIDHierarchyForReport_1.getParentAccountId)(nestedAccountId.id),
27
27
  },
28
28
  }, filter, sectionView.nestedAccountIds.length > 1, additionalBalancesOptions);
29
29
  if (report != null) {
@@ -7,7 +7,7 @@ const getNestedClassIDHierarchyForReport_1 = require("../../commonStateTypes/cla
7
7
  const sectionClassesViewReducer_1 = require("./sectionClassesViewReducer");
8
8
  const getNestedAccountIDHierarchyForSection_1 = require("../sectionAccountsView/getNestedAccountIDHierarchyForSection");
9
9
  const accountPayload_1 = require("../account/accountPayload");
10
- const getNestedAccountIDHeirarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHeirarchyForReport");
10
+ const getNestedAccountIDHierarchyForReport_1 = require("../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
11
11
  const subAccountPayloadHelper_1 = require("../../commonPayloadTypes/subAccountView/subAccountPayloadHelper");
12
12
  const accountReducer_1 = require("../account/accountReducer");
13
13
  const classReducer_1 = require("../class/classReducer");
@@ -24,7 +24,7 @@ const updateSectionClassesViewEpic = (actions$) => actions$.pipe((0, operators_1
24
24
  const classMetadataWithBalancesPayloads = [];
25
25
  const accountMetadataWithBalancesPayloads = [];
26
26
  const accountsMetadata = accountsMetadataPayload.map((eachAccount) => (0, accountPayload_1.mapAccountMetadataPayloadToAccountMetadata)(eachAccount));
27
- const accountMetadataRecordsByID = (0, getNestedAccountIDHeirarchyForReport_1.getAllAccountMetadataRecordsByID)(accountsMetadataPayload);
27
+ const accountMetadataRecordsByID = (0, getNestedAccountIDHierarchyForReport_1.getAllAccountMetadataRecordsByID)(accountsMetadataPayload);
28
28
  sectionPayload.classes != null &&
29
29
  Object.keys(sectionPayload.classes).forEach((eachClassId) => {
30
30
  const classId = classMetadataRecordsByID[eachClassId].nestedClassId;