@zeniai/client-epic-state 4.19.90-beta3ND → 4.19.90-betaML1

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 (48) hide show
  1. package/lib/entity/reimbursement/reimbursementPayload.d.ts +0 -2
  2. package/lib/entity/reimbursement/reimbursementPayload.js +0 -7
  3. package/lib/entity/reimbursement/reimbursementState.d.ts +0 -2
  4. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +3 -0
  5. package/lib/entity/transaction/payloadTypes/transactionPayload.js +11 -0
  6. package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -0
  7. package/lib/esm/entity/reimbursement/reimbursementPayload.js +0 -7
  8. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +11 -0
  9. package/lib/esm/index.js +2 -3
  10. package/lib/esm/view/financeStatement/financeStatementReducer.js +8 -11
  11. package/lib/esm/view/financeStatement/financeStatementSelector.js +4 -13
  12. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +1 -5
  13. package/lib/esm/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +5 -4
  14. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  15. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
  16. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  17. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  18. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  19. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  20. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  21. package/lib/index.d.ts +3 -5
  22. package/lib/index.js +25 -28
  23. package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
  24. package/lib/view/financeStatement/financeStatementReducer.js +8 -11
  25. package/lib/view/financeStatement/financeStatementSelector.d.ts +0 -2
  26. package/lib/view/financeStatement/financeStatementSelector.js +4 -13
  27. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.d.ts +2 -4
  28. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +2 -6
  29. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +0 -2
  30. package/lib/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +4 -3
  31. package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  32. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  33. package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
  34. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  35. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  36. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  37. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
  38. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  39. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  40. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  41. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  42. package/package.json +1 -1
  43. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -281
  44. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +0 -1
  45. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.d.ts +0 -13
  46. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -285
  47. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.d.ts +0 -57
  48. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +0 -2
@@ -1,7 +1,6 @@
1
1
  import { URLPayload } from '../../commonPayloadTypes/urlPayload';
2
2
  import { SegregatedReimbursementLineWithRecommendation } from '../../view/spendManagement/reimbursement/editRemiView/editRemiViewState';
3
3
  import { AccountBasePayload } from '../account/accountPayload';
4
- import { CustomerBasePayload } from '../customer/customerPayload';
5
4
  import { BillAccountPayload, BillPaymentMethodPayload, BillPaymentStatusPayload, BillStagePayload, BillStatusPayload, BulkOperationDetailPayload, DeletionInfoPayload } from '../billPay/billTransaction/billTransactionPayload';
6
5
  import { ClassBasePayload } from '../class/classPayload';
7
6
  import { MerchantBasePayload } from '../merchant/merchantPayload';
@@ -69,7 +68,6 @@ interface ReimbursementTypePayload {
69
68
  export interface LineDetailPayload {
70
69
  class: ClassBasePayload;
71
70
  account?: AccountBasePayload;
72
- customer?: CustomerBasePayload;
73
71
  }
74
72
  interface ReimbursementInfoPayload {
75
73
  actual_deposit_date: string | null;
@@ -6,7 +6,6 @@ const amount_1 = require("../../commonStateTypes/amount");
6
6
  const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
7
7
  const zeniDayJS_1 = require("../../zeniDayJS");
8
8
  const accountPayload_1 = require("../account/accountPayload");
9
- const customerPayload_1 = require("../customer/customerPayload");
10
9
  const billTransactionPayload_1 = require("../billPay/billTransaction/billTransactionPayload");
11
10
  const classPayload_1 = require("../class/classPayload");
12
11
  const merchantPayload_1 = require("../merchant/merchantPayload");
@@ -172,9 +171,6 @@ const toLineDetailPayload = (lineDetail) => ({
172
171
  account: lineDetail.account != null
173
172
  ? (0, accountPayload_1.toAccountPayload)(lineDetail.account)
174
173
  : undefined,
175
- customer: lineDetail.customer != null
176
- ? (0, customerPayload_1.toCustomerBasePayload)(undefined, lineDetail.customer)
177
- : undefined,
178
174
  });
179
175
  exports.toLineDetailPayload = toLineDetailPayload;
180
176
  const toLineDetail = (payload) => ({
@@ -184,9 +180,6 @@ const toLineDetail = (payload) => ({
184
180
  account: payload.account?.account_id != null
185
181
  ? (0, accountPayload_1.mapAccountBasePayloadToAccountBase)(payload.account)
186
182
  : undefined,
187
- customer: payload.customer?.customer_id != null
188
- ? (0, customerPayload_1.toCustomerBase)(payload.customer, false)
189
- : undefined,
190
183
  });
191
184
  const toDistanceMilage = (payload) => ({
192
185
  unit: payload.unit,
@@ -6,7 +6,6 @@ import { ZeniUrl as Url } from '../../zeniUrl';
6
6
  import { AccountBase } from '../account/accountState';
7
7
  import { BillPaymentStatus, BillStage, BillStatus, BulkProcessingDetail, DeletionInfo } from '../billPay/billTransaction/billTransactionState';
8
8
  import { ClassBase } from '../class/classState';
9
- import { CustomerBase } from '../customer/customerState';
10
9
  import { MerchantBase } from '../merchant/merchant';
11
10
  import { Attachment } from '../transaction/stateTypes/attachment';
12
11
  import { ReimbursementTransactionType } from './reimbursementPayload';
@@ -59,7 +58,6 @@ export interface DistanceMilage {
59
58
  export interface LineDetail {
60
59
  account?: AccountBase;
61
60
  class?: ClassBase;
62
- customer?: CustomerBase;
63
61
  }
64
62
  export interface ReimbursementInfo {
65
63
  billPaymentMethodType: RemiPaymentMethod;
@@ -33,6 +33,9 @@ export interface TransactionPayload extends TransactionIDPayload, AccountBasePay
33
33
  recipient_total_amount?: number;
34
34
  recommendations?: RecommendationPayload[];
35
35
  sync_token?: string;
36
+ target_account_id?: string | null;
37
+ target_account_integration_id?: string | null;
38
+ target_account_name?: string | null;
36
39
  total_amount?: number;
37
40
  transaction_type_name?: string;
38
41
  transaction_update_time?: string;
@@ -65,6 +65,17 @@ const toTransaction = (payload) => {
65
65
  ...(payload.customer_name !== null && payload.customer_name !== ''
66
66
  ? { customerName: payload.customer_name }
67
67
  : {}),
68
+ ...(payload.target_account_id !== null && payload.target_account_id !== ''
69
+ ? { targetAccountId: payload.target_account_id }
70
+ : {}),
71
+ ...(payload.target_account_integration_id !== null &&
72
+ payload.target_account_integration_id !== ''
73
+ ? { targetAccountIntegrationId: payload.target_account_integration_id }
74
+ : {}),
75
+ ...(payload.target_account_name !== null &&
76
+ payload.target_account_name !== ''
77
+ ? { targetAccountName: payload.target_account_name }
78
+ : {}),
68
79
  linkedTransactions: payload.linked_transactions?.map((transactionIDPayload) => (0, transactionIDPayload_1.toTransactionID)(transactionIDPayload)),
69
80
  lines: payload?.lines?.map((linePayload) => (0, transactionLinePayload_1.toLine)(linePayload, amount, recipientAmount)),
70
81
  account: payloadHasAccountInfo(payload)
@@ -40,6 +40,9 @@ export interface Transaction extends BaseTransaction {
40
40
  qboId?: string;
41
41
  recommendations?: RecommendationByLineId;
42
42
  syncToken?: string;
43
+ targetAccountId?: ID;
44
+ targetAccountIntegrationId?: string;
45
+ targetAccountName?: string;
43
46
  updateTime?: ZeniDate;
44
47
  vendorId?: ID;
45
48
  vendorName?: string;
@@ -3,7 +3,6 @@ import { toAmount } from '../../commonStateTypes/amount';
3
3
  import { stringToUnion } from '../../commonStateTypes/stringToUnion';
4
4
  import { date, dateNow } from '../../zeniDayJS';
5
5
  import { mapAccountBasePayloadToAccountBase, toAccountPayload, } from '../account/accountPayload';
6
- import { toCustomerBase, toCustomerBasePayload, } from '../customer/customerPayload';
7
6
  import { toBillPaymentMethod, toBillPaymentStatus, toBillStage, toBillStatus, toBulkProcessingDetail, toDeletionInfo, } from '../billPay/billTransaction/billTransactionPayload';
8
7
  import { mapClassBasePayloadToClassBase, toClassBasePayload, } from '../class/classPayload';
9
8
  import { mapMerchantBasePayloadToMerchantBase, toMerchantBasePayload, } from '../merchant/merchantPayload';
@@ -167,9 +166,6 @@ export const toLineDetailPayload = (lineDetail) => ({
167
166
  account: lineDetail.account != null
168
167
  ? toAccountPayload(lineDetail.account)
169
168
  : undefined,
170
- customer: lineDetail.customer != null
171
- ? toCustomerBasePayload(undefined, lineDetail.customer)
172
- : undefined,
173
169
  });
174
170
  const toLineDetail = (payload) => ({
175
171
  class: payload.class.accounting_class_id != null
@@ -178,9 +174,6 @@ const toLineDetail = (payload) => ({
178
174
  account: payload.account?.account_id != null
179
175
  ? mapAccountBasePayloadToAccountBase(payload.account)
180
176
  : undefined,
181
- customer: payload.customer?.customer_id != null
182
- ? toCustomerBase(payload.customer, false)
183
- : undefined,
184
177
  });
185
178
  const toDistanceMilage = (payload) => ({
186
179
  unit: payload.unit,
@@ -61,6 +61,17 @@ export const toTransaction = (payload) => {
61
61
  ...(payload.customer_name !== null && payload.customer_name !== ''
62
62
  ? { customerName: payload.customer_name }
63
63
  : {}),
64
+ ...(payload.target_account_id !== null && payload.target_account_id !== ''
65
+ ? { targetAccountId: payload.target_account_id }
66
+ : {}),
67
+ ...(payload.target_account_integration_id !== null &&
68
+ payload.target_account_integration_id !== ''
69
+ ? { targetAccountIntegrationId: payload.target_account_integration_id }
70
+ : {}),
71
+ ...(payload.target_account_name !== null &&
72
+ payload.target_account_name !== ''
73
+ ? { targetAccountName: payload.target_account_name }
74
+ : {}),
64
75
  linkedTransactions: payload.linked_transactions?.map((transactionIDPayload) => toTransactionID(transactionIDPayload)),
65
76
  lines: payload?.lines?.map((linePayload) => toLine(linePayload, amount, recipientAmount)),
66
77
  account: payloadHasAccountInfo(payload)
package/lib/esm/index.js CHANGED
@@ -217,8 +217,7 @@ import { changeZeniPersonRoles, deletePerson, fetchAllPeopleRequiredViews, fetch
217
217
  import { getPeople, getPeopleLocalData } from './view/people/peopleSelector';
218
218
  import { fetchProfitAndLoss, fetchProfitAndLossForTimeframe, resetProfitAndLossNodeCollapseState, updateProfitAndLossUIState, } from './view/profitAndLoss/profitAndLossReducer';
219
219
  import { getPandLReportFetchState, getProfitAndLossReport, } from './view/profitAndLoss/profitAndLossSelector';
220
- import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseState, updateAccountViewMode as updateProfitAndLossAccountViewMode, updateClassesToFilterOut as updateProfitAndLossClassesToFilterOut, updateClassViewLayout, updateProfitAndLossClassesViewUIState, } from './view/profitAndLossClassesView/profitAndLossClassesViewReducer';
221
- import { getProfitAndLossClassesHorizontalView } from './view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector';
220
+ import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseState, updateAccountViewMode as updateProfitAndLossAccountViewMode, updateClassesToFilterOut as updateProfitAndLossClassesToFilterOut, updateProfitAndLossClassesViewUIState, } from './view/profitAndLossClassesView/profitAndLossClassesViewReducer';
222
221
  import { getProfitAndLossClassesView } from './view/profitAndLossClassesView/profitAndLossClassesViewSelector';
223
222
  import { isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, } from './view/profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
224
223
  import { fetchEntityRecommendationsByTransactionId, fetchRecommendationByEntityId, fetchRecommendationByEntityName, } from './view/recommendation/recommendationReducer';
@@ -452,7 +451,7 @@ export { fetchDashboard, getDashboard, updateTreasuryVideoClosed, };
452
451
  export { updateDashboardLayout };
453
452
  export { getPandLWithForecast, } from './view/profitAndLoss/pAndLWithForecast/pAndLWithForecastSelector';
454
453
  export { fetchProfitAndLoss, resetProfitAndLossNodeCollapseState, updateProfitAndLossUIState, getProfitAndLossReport, getPandLReportFetchState, fetchProfitAndLossForTimeframe, };
455
- export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, updateClassViewLayout, getProfitAndLossClassesView, getProfitAndLossClassesHorizontalView, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, };
454
+ export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, getProfitAndLossClassesView, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, };
456
455
  export { getAccountingProviderAttachment };
457
456
  export { fetchUserListByType, getUserList };
458
457
  export { fetchAllPeopleRequiredViews, fetchPeoplePage, fetchPeople, deletePerson, resendInvite, changeZeniPersonRoles, invitePeople, inviteZeniPeople, updatePeopleUIState, peopleSaveUpdates, resetUpdateErrorMessage, peopleSaveDataInLocalStore, peopleClearDataInLocalStore, getPeople, getPeopleLocalData, initializeEditPerson, };
@@ -44,20 +44,19 @@ const financeStatement = createSlice({
44
44
  updateFinanceStatementThisPeriod(draft, action) {
45
45
  const { firstMonthOfFY, coaBalances, maxNumOfPeriodsToHighlight } = action.payload;
46
46
  const { timeframe, selectedCOABalancesRange } = draft;
47
- const safeCoaBalances = coaBalances ?? [];
48
- if (safeCoaBalances.length > 0) {
49
- const prevThisPeriod = extractThisPeriod(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, safeCoaBalances);
47
+ if (coaBalances.length > 0) {
48
+ const prevThisPeriod = extractThisPeriod(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, coaBalances);
50
49
  if (prevThisPeriod != null) {
51
50
  const selectedCoaBalancesRangeWithThisPeriod = {
52
51
  ...selectedCOABalancesRange,
53
52
  thisPeriod: prevThisPeriod,
54
53
  };
55
- const newThisPeriod = getMatchingThisPeriod(action.payload.firstMonthOfFY, timeframe, action.payload.thisPeriod, safeCoaBalances);
54
+ const newThisPeriod = getMatchingThisPeriod(action.payload.firstMonthOfFY, timeframe, action.payload.thisPeriod, coaBalances);
56
55
  if (newThisPeriod != null) {
57
56
  const selectionRanges = getSelectedAndHighlightedRangesForThisPeriod({
58
57
  firstMonthOfFY,
59
58
  thisPeriod: newThisPeriod,
60
- coaBalances: safeCoaBalances,
59
+ coaBalances,
61
60
  timeframe,
62
61
  maxNumOfPeriodsToSelect: maxNumOfPeriodsToHighlight,
63
62
  currentSelection: {
@@ -76,9 +75,7 @@ const financeStatement = createSlice({
76
75
  draft.selectedReportId = action.payload;
77
76
  },
78
77
  updateFinanceStatementAdditionalBalancesSelection(draft, action) {
79
- const { firstMonthOfFY, additionalBalances: additionalBalancesPayload, coaBalances, maxNumOfPeriodsToHighlight, } = action.payload;
80
- const safeCoaBalances = coaBalances ?? [];
81
- const additionalBalances = additionalBalancesPayload ?? [];
78
+ const { firstMonthOfFY, additionalBalances, coaBalances, maxNumOfPeriodsToHighlight, } = action.payload;
82
79
  let tempAdditionalBalances = [...additionalBalances];
83
80
  if (additionalBalances.includes('this_period_vs_last_period') ||
84
81
  additionalBalances.includes('this_period_vs_last_period_percent')) {
@@ -94,8 +91,8 @@ const financeStatement = createSlice({
94
91
  draft.isAdditionalBalancesShown =
95
92
  additionalBalances.length != 0 ? true : false;
96
93
  const { timeframe, selectedCOABalancesRange } = draft;
97
- if (safeCoaBalances.length > 0) {
98
- const thisPeriod = extractThisPeriod(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, safeCoaBalances);
94
+ if (coaBalances.length > 0) {
95
+ const thisPeriod = extractThisPeriod(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, coaBalances);
99
96
  if (thisPeriod != null) {
100
97
  const selectedCoaBalancesRangeWithThisPeriod = {
101
98
  ...selectedCOABalancesRange,
@@ -104,7 +101,7 @@ const financeStatement = createSlice({
104
101
  const selectionRanges = getSelectedAndHighlightedRangesForThisPeriod({
105
102
  firstMonthOfFY,
106
103
  thisPeriod: thisPeriod,
107
- coaBalances: safeCoaBalances,
104
+ coaBalances,
108
105
  timeframe,
109
106
  maxNumOfPeriodsToHighlight: maxNumOfPeriodsToHighlight,
110
107
  currentSelection: {
@@ -8,7 +8,6 @@ import { extractThisPeriod } from '../../commonStateTypes/viewAndReport/thisPeri
8
8
  import { getBalanceSheet } from '../balanceSheet/balanceSheetSelector';
9
9
  import { getCashFlow } from '../cashFlow/cashFlowSelector';
10
10
  import { getProfitAndLossReport, } from '../profitAndLoss/profitAndLossSelector';
11
- import { getProfitAndLossClassesHorizontalView } from '../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector';
12
11
  import { getProfitAndLossClassesView } from '../profitAndLossClassesView/profitAndLossClassesViewSelector';
13
12
  function getDateRangeForFinanceReports(profitAndLossState, balanceSheetState, cashFlowState) {
14
13
  const datesSorted = [
@@ -43,15 +42,11 @@ export const getFinanceStatement = createSelector((state) => state.accountState,
43
42
  if (dataAvailable != null) {
44
43
  const noFilter = newBalancesFilterForDateRange(firstMonthOfFY, financeStatementState.timeframe, dataAvailable, 'ascending_date', []);
45
44
  const profitAndLossForTimeframeTicks = getProfitAndLossReport(noFilter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
46
- const expensesSection = profitAndLossForTimeframeTicks.sections.expenses;
47
- const incomeSection = profitAndLossForTimeframeTicks.sections.income;
48
- const expensesBalances = expensesSection?.balances;
49
- const incomeBalances = incomeSection?.balances;
50
- if (expensesSection != null) {
45
+ if (profitAndLossForTimeframeTicks.sections.expenses != null) {
51
46
  balancesInTimeframe =
52
- (expensesBalances?.length ?? 0) > 0
53
- ? expensesBalances ?? []
54
- : incomeBalances ?? [];
47
+ profitAndLossForTimeframeTicks.sections.expenses.balances.length > 0
48
+ ? profitAndLossForTimeframeTicks.sections['expenses'].balances
49
+ : profitAndLossForTimeframeTicks.sections['income'].balances;
55
50
  allTimeframeTicks = balancesInTimeframe.map((balance) => toTimeframeTick(balance));
56
51
  }
57
52
  }
@@ -65,9 +60,6 @@ export const getFinanceStatement = createSelector((state) => state.accountState,
65
60
  const profitAndLossReport = getProfitAndLossReport(filter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
66
61
  const classFilter = newBalancesFilterClassesView(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, profitAndLossClassesViewState.uiState.classesToFilterOut);
67
62
  const profitAndLossByClassReport = getProfitAndLossClassesView(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState);
68
- const profitAndLossByClassHorizontalReport = profitAndLossClassesViewState.uiState.classViewLayout === 'horizontal'
69
- ? getProfitAndLossClassesHorizontalView(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState, thisPeriod)
70
- : getProfitAndLossClassesHorizontalView(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState, undefined);
71
63
  const balanceSheetReport = getBalanceSheet(filter, accountState, accountGroupState, sectionAccountsViewState, balanceSheetState);
72
64
  const cashFlowReport = getCashFlow(filter, accountState, accountGroupState, sectionAccountsViewState, cashFlowState);
73
65
  const allReports = [
@@ -115,7 +107,6 @@ export const getFinanceStatement = createSelector((state) => state.accountState,
115
107
  dataAvailable,
116
108
  profitAndLossReport,
117
109
  profitAndLossByClassReport,
118
- profitAndLossByClassHorizontalReport,
119
110
  balanceSheetReport,
120
111
  cashFlowReport,
121
112
  filter,
@@ -23,7 +23,6 @@ export const initialState = {
23
23
  nodeCollapseState: {},
24
24
  scrollPosition: undefined,
25
25
  accountViewMode: 'account_group',
26
- classViewLayout: 'vertical',
27
26
  classesToFilterOut: [],
28
27
  },
29
28
  firstMonthOfFY: 1,
@@ -95,9 +94,6 @@ const profitAndLossClassesView = createSlice({
95
94
  updateAccountViewMode(draft, action) {
96
95
  draft.uiState.accountViewMode = action.payload.viewMode;
97
96
  },
98
- updateClassViewLayout(draft, action) {
99
- draft.uiState.classViewLayout = action.payload.classViewLayout;
100
- },
101
97
  resetProfitAndLossClassesNodeCollapseState(draft) {
102
98
  draft.uiState.nodeCollapseState = {};
103
99
  },
@@ -106,7 +102,7 @@ const profitAndLossClassesView = createSlice({
106
102
  },
107
103
  },
108
104
  });
109
- export const { fetchProfitAndLossClassesView, fetchProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesViewFailure, updateClassesToFilterOut, updateProfitAndLossClassesViewUIState, updateAccountViewMode, updateClassViewLayout, resetProfitAndLossClassesNodeCollapseState, clearProfitAndLossClassesView, } = profitAndLossClassesView.actions;
105
+ export const { fetchProfitAndLossClassesView, fetchProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesViewFailure, updateClassesToFilterOut, updateProfitAndLossClassesViewUIState, updateAccountViewMode, resetProfitAndLossClassesNodeCollapseState, clearProfitAndLossClassesView, } = profitAndLossClassesView.actions;
110
106
  export default profitAndLossClassesView.reducer;
111
107
  const doUpdatedProfitAndLossClassesView = (draft, timeframe, pandLReport) => {
112
108
  const report = mapReportPayloadV2ToReportV2(pandLReport.report);
@@ -2,13 +2,14 @@ import { of } from 'rxjs';
2
2
  import { filter, switchMap } from 'rxjs/operators';
3
3
  import { updateCashInCashOutCOABalancesRange } from '../cashInCashOut/cashInCashOutReducer';
4
4
  import { updateCashPositionCOABalancesRange } from '../cashPosition/cashPositionReducer';
5
- import { updateCOABalancesRange } from '../financeStatement/financeStatementReducer';
5
+ import { initialFinanceStatementState, updateCOABalancesRange, } from '../financeStatement/financeStatementReducer';
6
6
  import { updateNetBurnOrIncomeCOABalancesRange } from '../netBurnOrIncome/netBurnOrIncomeReducer';
7
7
  import { updateOpExCOABalancesRange } from '../opEx/opExReducer';
8
8
  import { updateRevenueCOABalancesRange } from '../revenue/revenueReducer';
9
9
  import { updateReportUIOptionCOABalancesRange } from './reportUIOptionsReducer';
10
10
  export const updateReportUIOptionCOABalancesRangeEpic = (actions$, state$) => actions$.pipe(filter(updateReportUIOptionCOABalancesRange.match), switchMap((action) => {
11
- const { thisPeriod, orderBy, numberOfPeriods: selectedNumberOfPeriods, } = action.payload.selectedCOABalancesRange;
11
+ const thisPeriod = action.payload.selectedCOABalancesRange.thisPeriod;
12
+ const orderBy = action.payload.selectedCOABalancesRange.orderBy;
12
13
  const highlightedNoOfPeriods = state$.value.reportUIOptionsState.isCompareModeOn === true ? 4 : 1;
13
14
  const highlightedCOABalancesRange = action.payload.highlightedCOABalancesRange == null && thisPeriod != null
14
15
  ? {
@@ -62,8 +63,8 @@ export const updateReportUIOptionCOABalancesRangeEpic = (actions$, state$) => ac
62
63
  ? action.payload.highlightedCOABalancesRange.thisPeriod
63
64
  : thisPeriod,
64
65
  numberOfPeriods: state$.value.reportUIOptionsState.isCompareModeOn === true
65
- ? Math.max(4, selectedNumberOfPeriods)
66
- : selectedNumberOfPeriods,
66
+ ? 4
67
+ : initialFinanceStatementState.maxNumOfPeriodsToHighlight,
67
68
  orderBy,
68
69
  }));
69
70
  }));
@@ -416,6 +416,14 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
416
416
  transactionsWithNoSortKeyValue.push(transaction);
417
417
  }
418
418
  break;
419
+ case 'invoiceNumber':
420
+ if (transaction.documentId != null) {
421
+ transactionsWithSortKeyValue.push(transaction);
422
+ }
423
+ else {
424
+ transactionsWithNoSortKeyValue.push(transaction);
425
+ }
426
+ break;
419
427
  case 'dueDate':
420
428
  if (currentTab === 'draft') {
421
429
  if (Boolean(transaction.dueDate) === true) {
@@ -518,6 +526,8 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
518
526
  return transaction.totalAmountInUSD?.amount ?? 0;
519
527
  case 'paymentMethod':
520
528
  return transaction.billPayInfo.billPaymentMethodType.name;
529
+ case 'invoiceNumber':
530
+ return transaction.documentId;
521
531
  }
522
532
  }, getColumnWiseSortOrder(sortOrder));
523
533
  return [
@@ -43,6 +43,7 @@ const ALL_BILL_PAY_SORT_KEYS = [
43
43
  'invoiceDate',
44
44
  'name',
45
45
  'paymentMethod',
46
+ 'invoiceNumber',
46
47
  ];
47
48
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
48
49
  const toBillPaySortKeyType = (v) => stringToUnion(v, ALL_BILL_PAY_SORT_KEYS);
@@ -75,6 +75,7 @@ const ALL_CHARGE_CARD_SORT_KEYS = [
75
75
  'cardName',
76
76
  'department',
77
77
  'cardType',
78
+ 'accountType',
78
79
  'status',
79
80
  'utilisation',
80
81
  'limit',
@@ -219,6 +219,8 @@ const getCardsBySortKey = (card, sortKey) => {
219
219
  return card.cardName.toLowerCase();
220
220
  case 'cardType':
221
221
  return card.type.code;
222
+ case 'accountType':
223
+ return card.type.code.includes('credit') ? 'credit' : 'debit';
222
224
  case 'status':
223
225
  return card.status.code;
224
226
  case 'utilisation':
@@ -45,6 +45,7 @@ export const getRemiList = (state, currentTimePeriod, isBulkActionFeatureEnabled
45
45
  return {
46
46
  ...reimbursement,
47
47
  submittedBy: getUserByUserId(userState, reimbursement.reimburseeUserId),
48
+ createdByUser: getUserByUserId(userState, reimbursement.createdBy),
48
49
  approvers: approvers,
49
50
  };
50
51
  });
@@ -415,6 +416,14 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
415
416
  reimbursementsWithNoSortKeyValue.push(reimbursement);
416
417
  }
417
418
  break;
419
+ case 'createdBy':
420
+ if (reimbursement.createdByUser != null) {
421
+ reimbursementsWithSortKeyValue.push(reimbursement);
422
+ }
423
+ else {
424
+ reimbursementsWithNoSortKeyValue.push(reimbursement);
425
+ }
426
+ break;
418
427
  }
419
428
  });
420
429
  const getColumnWiseSortOrder = (sortOrder) => {
@@ -422,6 +431,7 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
422
431
  case 'reportName':
423
432
  case 'type':
424
433
  case 'status':
434
+ case 'createdBy':
425
435
  return sortOrder === 'ascending' ? 'asc' : 'desc';
426
436
  default:
427
437
  return sortOrder === 'ascending' ? 'desc' : 'asc';
@@ -441,6 +451,8 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
441
451
  return getStatusPerTab(reimbursement);
442
452
  case 'amount':
443
453
  return reimbursement.amount.amount ?? 0;
454
+ case 'createdBy':
455
+ return `${reimbursement.createdByUser?.firstName ?? ''} ${reimbursement.createdByUser?.lastName ?? ''}`.toLowerCase();
444
456
  }
445
457
  }, getColumnWiseSortOrder(sortOrder));
446
458
  return [
@@ -55,6 +55,7 @@ export const toRemiSubTabUnderScoreType = (v) => stringToUnion(v, REMI_SUB_TAB_U
55
55
  const ALL_REIMBURSEMENT_SORT_KEYS = [
56
56
  'reportName',
57
57
  'submittedOn',
58
+ 'createdBy',
58
59
  'type',
59
60
  'status',
60
61
  'amount',
@@ -91,11 +91,11 @@ export const allTaskStatus = [
91
91
  },
92
92
  {
93
93
  code: 'done',
94
- name: 'Done',
94
+ name: 'In Review',
95
95
  },
96
96
  {
97
97
  code: 'resolved',
98
- name: 'Resolved',
98
+ name: 'Complete',
99
99
  },
100
100
  ];
101
101
  export const allTaskPriority = [
package/lib/index.d.ts CHANGED
@@ -346,12 +346,10 @@ import { PeopleViewSortKey } from './view/people/peopleTypes';
346
346
  import { fetchProfitAndLoss, fetchProfitAndLossForTimeframe, resetProfitAndLossNodeCollapseState, updateProfitAndLossUIState } from './view/profitAndLoss/profitAndLossReducer';
347
347
  import { ProfitAndLossReport, getPandLReportFetchState, getProfitAndLossReport } from './view/profitAndLoss/profitAndLossSelector';
348
348
  import { ProfitAndLossState, ProfitAndLossUIState } from './view/profitAndLoss/profitAndLossState';
349
- import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseState, updateAccountViewMode as updateProfitAndLossAccountViewMode, updateClassesToFilterOut as updateProfitAndLossClassesToFilterOut, updateClassViewLayout, updateProfitAndLossClassesViewUIState } from './view/profitAndLossClassesView/profitAndLossClassesViewReducer';
350
- import { getProfitAndLossClassesHorizontalView } from './view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector';
351
- import { ClassColumnDefinition, HorizontalAccountRow, HorizontalCalculatedSection, HorizontalClassBalance, HorizontalSectionReport, ProfitAndLossByClassHorizontalReport } from './view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes';
349
+ import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseState, updateAccountViewMode as updateProfitAndLossAccountViewMode, updateClassesToFilterOut as updateProfitAndLossClassesToFilterOut, updateProfitAndLossClassesViewUIState } from './view/profitAndLossClassesView/profitAndLossClassesViewReducer';
352
350
  import { getProfitAndLossClassesView } from './view/profitAndLossClassesView/profitAndLossClassesViewSelector';
353
351
  import { PandLReportViewCalculatedSectionID, PandLReportViewSectionID, ProfitAndLossClassesViewReport, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID } from './view/profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
354
- import { ClassViewLayout, ProfitAndLossClassesViewUIState } from './view/profitAndLossClassesView/profitAndLossClassesViewState';
352
+ import { ProfitAndLossClassesViewUIState } from './view/profitAndLossClassesView/profitAndLossClassesViewState';
355
353
  import { fetchEntityRecommendationsByTransactionId, fetchRecommendationByEntityId, fetchRecommendationByEntityName } from './view/recommendation/recommendationReducer';
356
354
  import { clearReferrals, fetchReferrals, fetchRewardsPlan, resendReferralInvite, saveReferralFormDataInLocalStore, sendReferralInvite, updateReferViewed, updateReferralListSortUiState } from './view/referralView/referralReducer';
357
355
  import { ReferralListSelectorView, RewardsPlanCardReport, getInviteFormView, getReferralListView, getRewardsPlanCard } from './view/referralView/referralSelector';
@@ -666,7 +664,7 @@ export { fetchDashboard, getDashboard, DashboardReport, updateTreasuryVideoClose
666
664
  export { updateDashboardLayout };
667
665
  export { PandLWithForecastView, getPandLWithForecast, } from './view/profitAndLoss/pAndLWithForecast/pAndLWithForecastSelector';
668
666
  export { fetchProfitAndLoss, resetProfitAndLossNodeCollapseState, updateProfitAndLossUIState, ProfitAndLossState, ProfitAndLossUIState, getProfitAndLossReport, ProfitAndLossReport, getPandLReportFetchState, fetchProfitAndLossForTimeframe, };
669
- export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, updateClassViewLayout, ProfitAndLossClassesViewUIState, ProfitAndLossClassesViewReport, getProfitAndLossClassesView, getProfitAndLossClassesHorizontalView, PandLReportViewSectionID, PandLReportViewCalculatedSectionID, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, ClassViewLayout, ProfitAndLossByClassHorizontalReport, ClassColumnDefinition, HorizontalAccountRow, HorizontalClassBalance, HorizontalSectionReport, HorizontalCalculatedSection, };
667
+ export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, ProfitAndLossClassesViewUIState, ProfitAndLossClassesViewReport, getProfitAndLossClassesView, PandLReportViewSectionID, PandLReportViewCalculatedSectionID, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, };
670
668
  export { AccountingProviderAttachmentSelector, getAccountingProviderAttachment };
671
669
  export { fetchUserListByType, getUserList, UserListSelectorView };
672
670
  export { fetchAllPeopleRequiredViews, fetchPeoplePage, fetchPeople, deletePerson, resendInvite, changeZeniPersonRoles, invitePeople, inviteZeniPeople, updatePeopleUIState, peopleSaveUpdates, resetUpdateErrorMessage, peopleSaveDataInLocalStore, peopleClearDataInLocalStore, PeopleSelectorView, PeopleLocalDataView, Person, getPeople, getPeopleLocalData, PeopleState, PersonUpdateType, PeoplePageMode, ZeniPersonUserRoleType, PeopleUIState, PeopleLocalData, initializeEditPerson, };