@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
@@ -48,20 +48,19 @@ const financeStatement = (0, toolkit_1.createSlice)({
48
48
  updateFinanceStatementThisPeriod(draft, action) {
49
49
  const { firstMonthOfFY, coaBalances, maxNumOfPeriodsToHighlight } = action.payload;
50
50
  const { timeframe, selectedCOABalancesRange } = draft;
51
- const safeCoaBalances = coaBalances ?? [];
52
- if (safeCoaBalances.length > 0) {
53
- const prevThisPeriod = (0, thisPeriodHelpers_1.extractThisPeriod)(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, safeCoaBalances);
51
+ if (coaBalances.length > 0) {
52
+ const prevThisPeriod = (0, thisPeriodHelpers_1.extractThisPeriod)(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, coaBalances);
54
53
  if (prevThisPeriod != null) {
55
54
  const selectedCoaBalancesRangeWithThisPeriod = {
56
55
  ...selectedCOABalancesRange,
57
56
  thisPeriod: prevThisPeriod,
58
57
  };
59
- const newThisPeriod = (0, thisPeriodHelpers_1.getMatchingThisPeriod)(action.payload.firstMonthOfFY, timeframe, action.payload.thisPeriod, safeCoaBalances);
58
+ const newThisPeriod = (0, thisPeriodHelpers_1.getMatchingThisPeriod)(action.payload.firstMonthOfFY, timeframe, action.payload.thisPeriod, coaBalances);
60
59
  if (newThisPeriod != null) {
61
60
  const selectionRanges = (0, getSelectedAndHighlightedRanges_1.getSelectedAndHighlightedRangesForThisPeriod)({
62
61
  firstMonthOfFY,
63
62
  thisPeriod: newThisPeriod,
64
- coaBalances: safeCoaBalances,
63
+ coaBalances,
65
64
  timeframe,
66
65
  maxNumOfPeriodsToSelect: maxNumOfPeriodsToHighlight,
67
66
  currentSelection: {
@@ -80,9 +79,7 @@ const financeStatement = (0, toolkit_1.createSlice)({
80
79
  draft.selectedReportId = action.payload;
81
80
  },
82
81
  updateFinanceStatementAdditionalBalancesSelection(draft, action) {
83
- const { firstMonthOfFY, additionalBalances: additionalBalancesPayload, coaBalances, maxNumOfPeriodsToHighlight, } = action.payload;
84
- const safeCoaBalances = coaBalances ?? [];
85
- const additionalBalances = additionalBalancesPayload ?? [];
82
+ const { firstMonthOfFY, additionalBalances, coaBalances, maxNumOfPeriodsToHighlight, } = action.payload;
86
83
  let tempAdditionalBalances = [...additionalBalances];
87
84
  if (additionalBalances.includes('this_period_vs_last_period') ||
88
85
  additionalBalances.includes('this_period_vs_last_period_percent')) {
@@ -98,8 +95,8 @@ const financeStatement = (0, toolkit_1.createSlice)({
98
95
  draft.isAdditionalBalancesShown =
99
96
  additionalBalances.length != 0 ? true : false;
100
97
  const { timeframe, selectedCOABalancesRange } = draft;
101
- if (safeCoaBalances.length > 0) {
102
- const thisPeriod = (0, thisPeriodHelpers_1.extractThisPeriod)(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, safeCoaBalances);
98
+ if (coaBalances.length > 0) {
99
+ const thisPeriod = (0, thisPeriodHelpers_1.extractThisPeriod)(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, coaBalances);
103
100
  if (thisPeriod != null) {
104
101
  const selectedCoaBalancesRangeWithThisPeriod = {
105
102
  ...selectedCOABalancesRange,
@@ -108,7 +105,7 @@ const financeStatement = (0, toolkit_1.createSlice)({
108
105
  const selectionRanges = (0, getSelectedAndHighlightedRanges_1.getSelectedAndHighlightedRangesForThisPeriod)({
109
106
  firstMonthOfFY,
110
107
  thisPeriod: thisPeriod,
111
- coaBalances: safeCoaBalances,
108
+ coaBalances,
112
109
  timeframe,
113
110
  maxNumOfPeriodsToHighlight: maxNumOfPeriodsToHighlight,
114
111
  currentSelection: {
@@ -8,7 +8,6 @@ import { RootState } from '../../reducer';
8
8
  import { BalanceSheetReport } from '../balanceSheet/balanceSheetSelectorTypes';
9
9
  import { CashFlowReport } from '../cashFlow/cashFlowSelectorTypes';
10
10
  import { ProfitAndLossReport } from '../profitAndLoss/profitAndLossSelector';
11
- import { ProfitAndLossByClassHorizontalReport } from '../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes';
12
11
  import { ProfitAndLossClassesViewReport } from '../profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
13
12
  export interface FinanceStatementReport extends SelectorReport {
14
13
  allTimeframeTicks: TimeframeTickWithMetaData[];
@@ -19,7 +18,6 @@ export interface FinanceStatementReport extends SelectorReport {
19
18
  downloadState: FetchState;
20
19
  filter: COABalancesFilter;
21
20
  isCompareModeOn: boolean;
22
- profitAndLossByClassHorizontalReport: ProfitAndLossByClassHorizontalReport;
23
21
  profitAndLossByClassReport: ProfitAndLossClassesViewReport;
24
22
  profitAndLossReport: ProfitAndLossReport;
25
23
  reportFormat: ReportFormat;
@@ -11,7 +11,6 @@ const thisPeriodHelpers_1 = require("../../commonStateTypes/viewAndReport/thisPe
11
11
  const balanceSheetSelector_1 = require("../balanceSheet/balanceSheetSelector");
12
12
  const cashFlowSelector_1 = require("../cashFlow/cashFlowSelector");
13
13
  const profitAndLossSelector_1 = require("../profitAndLoss/profitAndLossSelector");
14
- const profitAndLossClassesByClassHorizontalSelector_1 = require("../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector");
15
14
  const profitAndLossClassesViewSelector_1 = require("../profitAndLossClassesView/profitAndLossClassesViewSelector");
16
15
  function getDateRangeForFinanceReports(profitAndLossState, balanceSheetState, cashFlowState) {
17
16
  const datesSorted = [
@@ -46,15 +45,11 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
46
45
  if (dataAvailable != null) {
47
46
  const noFilter = (0, coaBalancesFilter_1.newBalancesFilterForDateRange)(firstMonthOfFY, financeStatementState.timeframe, dataAvailable, 'ascending_date', []);
48
47
  const profitAndLossForTimeframeTicks = (0, profitAndLossSelector_1.getProfitAndLossReport)(noFilter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
49
- const expensesSection = profitAndLossForTimeframeTicks.sections.expenses;
50
- const incomeSection = profitAndLossForTimeframeTicks.sections.income;
51
- const expensesBalances = expensesSection?.balances;
52
- const incomeBalances = incomeSection?.balances;
53
- if (expensesSection != null) {
48
+ if (profitAndLossForTimeframeTicks.sections.expenses != null) {
54
49
  balancesInTimeframe =
55
- (expensesBalances?.length ?? 0) > 0
56
- ? expensesBalances ?? []
57
- : incomeBalances ?? [];
50
+ profitAndLossForTimeframeTicks.sections.expenses.balances.length > 0
51
+ ? profitAndLossForTimeframeTicks.sections['expenses'].balances
52
+ : profitAndLossForTimeframeTicks.sections['income'].balances;
58
53
  allTimeframeTicks = balancesInTimeframe.map((balance) => (0, timeframeTick_1.toTimeframeTick)(balance));
59
54
  }
60
55
  }
@@ -68,9 +63,6 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
68
63
  const profitAndLossReport = (0, profitAndLossSelector_1.getProfitAndLossReport)(filter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
69
64
  const classFilter = (0, coaBalancesFilterClassesView_1.newBalancesFilterClassesView)(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, profitAndLossClassesViewState.uiState.classesToFilterOut);
70
65
  const profitAndLossByClassReport = (0, profitAndLossClassesViewSelector_1.getProfitAndLossClassesView)(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState);
71
- const profitAndLossByClassHorizontalReport = profitAndLossClassesViewState.uiState.classViewLayout === 'horizontal'
72
- ? (0, profitAndLossClassesByClassHorizontalSelector_1.getProfitAndLossClassesHorizontalView)(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState, thisPeriod)
73
- : (0, profitAndLossClassesByClassHorizontalSelector_1.getProfitAndLossClassesHorizontalView)(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState, undefined);
74
66
  const balanceSheetReport = (0, balanceSheetSelector_1.getBalanceSheet)(filter, accountState, accountGroupState, sectionAccountsViewState, balanceSheetState);
75
67
  const cashFlowReport = (0, cashFlowSelector_1.getCashFlow)(filter, accountState, accountGroupState, sectionAccountsViewState, cashFlowState);
76
68
  const allReports = [
@@ -118,7 +110,6 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
118
110
  dataAvailable,
119
111
  profitAndLossReport,
120
112
  profitAndLossByClassReport,
121
- profitAndLossByClassHorizontalReport,
122
113
  balanceSheetReport,
123
114
  cashFlowReport,
124
115
  filter,
@@ -2,7 +2,7 @@ import { NestedClassID } from '../../commonStateTypes/classesView/nestedClassID'
2
2
  import { AccountViewMode, ID } from '../../commonStateTypes/common';
3
3
  import { ZeniAPIStatus, ZeniReportData } from '../../responsePayload';
4
4
  import { ProfitAndLossClassesViewPayload } from './profitAndLossClassesViewPayload';
5
- import { ClassViewLayout, ProfitAndLossClassesViewState } from './profitAndLossClassesViewState';
5
+ import { ProfitAndLossClassesViewState } from './profitAndLossClassesViewState';
6
6
  export declare const initialState: ProfitAndLossClassesViewState;
7
7
  export declare const fetchProfitAndLossClassesView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride?: boolean | undefined], {
8
8
  cacheOverride: boolean;
@@ -30,8 +30,6 @@ export declare const fetchProfitAndLossClassesView: import("@reduxjs/toolkit").A
30
30
  };
31
31
  }, "profitAndLossClassesView/updateProfitAndLossClassesViewUIState">, updateAccountViewMode: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
32
32
  viewMode: AccountViewMode;
33
- }, "profitAndLossClassesView/updateAccountViewMode">, updateClassViewLayout: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
34
- classViewLayout: ClassViewLayout;
35
- }, "profitAndLossClassesView/updateClassViewLayout">, resetProfitAndLossClassesNodeCollapseState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"profitAndLossClassesView/resetProfitAndLossClassesNodeCollapseState">, clearProfitAndLossClassesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"profitAndLossClassesView/clearProfitAndLossClassesView">;
33
+ }, "profitAndLossClassesView/updateAccountViewMode">, resetProfitAndLossClassesNodeCollapseState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"profitAndLossClassesView/resetProfitAndLossClassesNodeCollapseState">, clearProfitAndLossClassesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"profitAndLossClassesView/clearProfitAndLossClassesView">;
36
34
  declare const _default: import("redux").Reducer<ProfitAndLossClassesViewState>;
37
35
  export default _default;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearProfitAndLossClassesView = exports.resetProfitAndLossClassesNodeCollapseState = exports.updateClassViewLayout = exports.updateAccountViewMode = exports.updateProfitAndLossClassesViewUIState = exports.updateClassesToFilterOut = exports.updateProfitAndLossForTimeframeClassesViewFailure = exports.updateProfitAndLossForTimeframeClassesView = exports.fetchProfitAndLossForTimeframeClassesView = exports.fetchProfitAndLossClassesView = exports.initialState = void 0;
4
+ exports.clearProfitAndLossClassesView = exports.resetProfitAndLossClassesNodeCollapseState = exports.updateAccountViewMode = exports.updateProfitAndLossClassesViewUIState = exports.updateClassesToFilterOut = exports.updateProfitAndLossForTimeframeClassesViewFailure = exports.updateProfitAndLossForTimeframeClassesView = exports.fetchProfitAndLossForTimeframeClassesView = exports.fetchProfitAndLossClassesView = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const viewAndReportPayloadv2_1 = require("../../commonPayloadTypes/v2/viewAndReportPayloadv2");
7
7
  const getNestedClassIDHierarchyForReport_1 = require("../../commonStateTypes/classesView/getNestedClassIDHierarchyForReport");
@@ -27,7 +27,6 @@ exports.initialState = {
27
27
  nodeCollapseState: {},
28
28
  scrollPosition: undefined,
29
29
  accountViewMode: 'account_group',
30
- classViewLayout: 'vertical',
31
30
  classesToFilterOut: [],
32
31
  },
33
32
  firstMonthOfFY: 1,
@@ -99,9 +98,6 @@ const profitAndLossClassesView = (0, toolkit_1.createSlice)({
99
98
  updateAccountViewMode(draft, action) {
100
99
  draft.uiState.accountViewMode = action.payload.viewMode;
101
100
  },
102
- updateClassViewLayout(draft, action) {
103
- draft.uiState.classViewLayout = action.payload.classViewLayout;
104
- },
105
101
  resetProfitAndLossClassesNodeCollapseState(draft) {
106
102
  draft.uiState.nodeCollapseState = {};
107
103
  },
@@ -110,7 +106,7 @@ const profitAndLossClassesView = (0, toolkit_1.createSlice)({
110
106
  },
111
107
  },
112
108
  });
113
- _a = profitAndLossClassesView.actions, exports.fetchProfitAndLossClassesView = _a.fetchProfitAndLossClassesView, exports.fetchProfitAndLossForTimeframeClassesView = _a.fetchProfitAndLossForTimeframeClassesView, exports.updateProfitAndLossForTimeframeClassesView = _a.updateProfitAndLossForTimeframeClassesView, exports.updateProfitAndLossForTimeframeClassesViewFailure = _a.updateProfitAndLossForTimeframeClassesViewFailure, exports.updateClassesToFilterOut = _a.updateClassesToFilterOut, exports.updateProfitAndLossClassesViewUIState = _a.updateProfitAndLossClassesViewUIState, exports.updateAccountViewMode = _a.updateAccountViewMode, exports.updateClassViewLayout = _a.updateClassViewLayout, exports.resetProfitAndLossClassesNodeCollapseState = _a.resetProfitAndLossClassesNodeCollapseState, exports.clearProfitAndLossClassesView = _a.clearProfitAndLossClassesView;
109
+ _a = profitAndLossClassesView.actions, exports.fetchProfitAndLossClassesView = _a.fetchProfitAndLossClassesView, exports.fetchProfitAndLossForTimeframeClassesView = _a.fetchProfitAndLossForTimeframeClassesView, exports.updateProfitAndLossForTimeframeClassesView = _a.updateProfitAndLossForTimeframeClassesView, exports.updateProfitAndLossForTimeframeClassesViewFailure = _a.updateProfitAndLossForTimeframeClassesViewFailure, exports.updateClassesToFilterOut = _a.updateClassesToFilterOut, exports.updateProfitAndLossClassesViewUIState = _a.updateProfitAndLossClassesViewUIState, exports.updateAccountViewMode = _a.updateAccountViewMode, exports.resetProfitAndLossClassesNodeCollapseState = _a.resetProfitAndLossClassesNodeCollapseState, exports.clearProfitAndLossClassesView = _a.clearProfitAndLossClassesView;
114
110
  exports.default = profitAndLossClassesView.reducer;
115
111
  const doUpdatedProfitAndLossClassesView = (draft, timeframe, pandLReport) => {
116
112
  const report = (0, viewAndReportPayloadv2_1.mapReportPayloadV2ToReportV2)(pandLReport.report);
@@ -1,11 +1,9 @@
1
1
  import { NestedClassHierarchyForReport, NestedClassID } from '../../commonStateTypes/classesView/nestedClassID';
2
2
  import { AccountViewMode, FetchStateAndError, ID } from '../../commonStateTypes/common';
3
3
  import { Report } from '../../commonStateTypes/viewAndReport/viewAndReport';
4
- export type ClassViewLayout = 'vertical' | 'horizontal';
5
4
  export interface ProfitAndLossClassesViewUIState {
6
5
  accountViewMode: AccountViewMode;
7
6
  classesToFilterOut: NestedClassID[];
8
- classViewLayout: ClassViewLayout;
9
7
  nodeCollapseState: Record<ID, boolean>;
10
8
  scrollPosition: {
11
9
  scrollTop: number;
@@ -11,7 +11,8 @@ const opExReducer_1 = require("../opEx/opExReducer");
11
11
  const revenueReducer_1 = require("../revenue/revenueReducer");
12
12
  const reportUIOptionsReducer_1 = require("./reportUIOptionsReducer");
13
13
  const updateReportUIOptionCOABalancesRangeEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(reportUIOptionsReducer_1.updateReportUIOptionCOABalancesRange.match), (0, operators_1.switchMap)((action) => {
14
- const { thisPeriod, orderBy, numberOfPeriods: selectedNumberOfPeriods, } = action.payload.selectedCOABalancesRange;
14
+ const thisPeriod = action.payload.selectedCOABalancesRange.thisPeriod;
15
+ const orderBy = action.payload.selectedCOABalancesRange.orderBy;
15
16
  const highlightedNoOfPeriods = state$.value.reportUIOptionsState.isCompareModeOn === true ? 4 : 1;
16
17
  const highlightedCOABalancesRange = action.payload.highlightedCOABalancesRange == null && thisPeriod != null
17
18
  ? {
@@ -65,8 +66,8 @@ const updateReportUIOptionCOABalancesRangeEpic = (actions$, state$) => actions$.
65
66
  ? action.payload.highlightedCOABalancesRange.thisPeriod
66
67
  : thisPeriod,
67
68
  numberOfPeriods: state$.value.reportUIOptionsState.isCompareModeOn === true
68
- ? Math.max(4, selectedNumberOfPeriods)
69
- : selectedNumberOfPeriods,
69
+ ? 4
70
+ : financeStatementReducer_1.initialFinanceStatementState.maxNumOfPeriodsToHighlight,
70
71
  orderBy,
71
72
  }));
72
73
  }));
@@ -424,6 +424,14 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
424
424
  transactionsWithNoSortKeyValue.push(transaction);
425
425
  }
426
426
  break;
427
+ case 'invoiceNumber':
428
+ if (transaction.documentId != null) {
429
+ transactionsWithSortKeyValue.push(transaction);
430
+ }
431
+ else {
432
+ transactionsWithNoSortKeyValue.push(transaction);
433
+ }
434
+ break;
427
435
  case 'dueDate':
428
436
  if (currentTab === 'draft') {
429
437
  if (Boolean(transaction.dueDate) === true) {
@@ -526,6 +534,8 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
526
534
  return transaction.totalAmountInUSD?.amount ?? 0;
527
535
  case 'paymentMethod':
528
536
  return transaction.billPayInfo.billPaymentMethodType.name;
537
+ case 'invoiceNumber':
538
+ return transaction.documentId;
529
539
  }
530
540
  }, getColumnWiseSortOrder(sortOrder));
531
541
  return [
@@ -37,7 +37,7 @@ declare const toBillTabType: (v: string) => "paid" | "pending_approval" | "sched
37
37
  export type BillTab = ReturnType<typeof toBillTabType>;
38
38
  declare const toBillsSubTabType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "offline";
39
39
  export type BillsSubTabType = ReturnType<typeof toBillsSubTabType>;
40
- declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "invoiceDate";
40
+ declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "invoiceNumber" | "invoiceDate";
41
41
  export declare type BillPayViewSortKey = ReturnType<typeof toBillPaySortKeyType>;
42
42
  export interface BillPayFilters {
43
43
  categories: BillPayFilterCategory[];
@@ -47,6 +47,7 @@ const ALL_BILL_PAY_SORT_KEYS = [
47
47
  'invoiceDate',
48
48
  'name',
49
49
  'paymentMethod',
50
+ 'invoiceNumber',
50
51
  ];
51
52
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
52
53
  const toBillPaySortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_BILL_PAY_SORT_KEYS);
@@ -61,7 +61,7 @@ export declare const initialCreditAcc: CreditAccount;
61
61
  export declare const initialDebitCardSummaries: DebitCardSummaries;
62
62
  export declare const initialResendRevokeCardInvite: ResendRevokeCardInvite;
63
63
  export declare const initialCreditAccountRepayment: CreditAccountRepayment;
64
- export declare const toChargeCardSortKeyType: (v: string) => "status" | "owner" | "cardName" | "limit" | "department" | "cardType" | "utilisation";
64
+ export declare const toChargeCardSortKeyType: (v: string) => "status" | "accountType" | "owner" | "cardName" | "limit" | "department" | "cardType" | "utilisation";
65
65
  export declare type ChargeCardViewSortKey = ReturnType<typeof toChargeCardSortKeyType>;
66
66
  export declare const ALL_CASHBACK_SORT_KEYS: readonly ["month", "cashback"];
67
67
  export declare const toCashbackSortKeyType: (v: string) => "month" | "cashback";
@@ -78,6 +78,7 @@ const ALL_CHARGE_CARD_SORT_KEYS = [
78
78
  'cardName',
79
79
  'department',
80
80
  'cardType',
81
+ 'accountType',
81
82
  'status',
82
83
  'utilisation',
83
84
  'limit',
@@ -233,6 +233,8 @@ const getCardsBySortKey = (card, sortKey) => {
233
233
  return card.cardName.toLowerCase();
234
234
  case 'cardType':
235
235
  return card.type.code;
236
+ case 'accountType':
237
+ return card.type.code.includes('credit') ? 'credit' : 'debit';
236
238
  case 'status':
237
239
  return card.status.code;
238
240
  case 'utilisation':
@@ -42,6 +42,7 @@ export interface ReimbursementView extends Reimbursement {
42
42
  approvers: Approvers;
43
43
  submittedBy: User | undefined;
44
44
  bulkSelectInfo?: RemiBulkSelectInfo;
45
+ createdByUser?: User;
45
46
  }
46
47
  export declare const getRemiList: (state: RootState, currentTimePeriod: TimePeriod, isBulkActionFeatureEnabled: boolean) => RemiListReport;
47
48
  export declare const getApproversOrRejectors: (reimbursement: Reimbursement, entityApprovalStatusState: EntityApprovalStatusState, userState: UserState) => Approvers;
@@ -51,6 +51,7 @@ const getRemiList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
51
51
  return {
52
52
  ...reimbursement,
53
53
  submittedBy: (0, userSelector_1.getUserByUserId)(userState, reimbursement.reimburseeUserId),
54
+ createdByUser: (0, userSelector_1.getUserByUserId)(userState, reimbursement.createdBy),
54
55
  approvers: approvers,
55
56
  };
56
57
  });
@@ -423,6 +424,14 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
423
424
  reimbursementsWithNoSortKeyValue.push(reimbursement);
424
425
  }
425
426
  break;
427
+ case 'createdBy':
428
+ if (reimbursement.createdByUser != null) {
429
+ reimbursementsWithSortKeyValue.push(reimbursement);
430
+ }
431
+ else {
432
+ reimbursementsWithNoSortKeyValue.push(reimbursement);
433
+ }
434
+ break;
426
435
  }
427
436
  });
428
437
  const getColumnWiseSortOrder = (sortOrder) => {
@@ -430,6 +439,7 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
430
439
  case 'reportName':
431
440
  case 'type':
432
441
  case 'status':
442
+ case 'createdBy':
433
443
  return sortOrder === 'ascending' ? 'asc' : 'desc';
434
444
  default:
435
445
  return sortOrder === 'ascending' ? 'desc' : 'asc';
@@ -449,6 +459,8 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
449
459
  return getStatusPerTab(reimbursement);
450
460
  case 'amount':
451
461
  return reimbursement.amount.amount ?? 0;
462
+ case 'createdBy':
463
+ return `${reimbursement.createdByUser?.firstName ?? ''} ${reimbursement.createdByUser?.lastName ?? ''}`.toLowerCase();
452
464
  }
453
465
  }, getColumnWiseSortOrder(sortOrder));
454
466
  return [
@@ -38,7 +38,7 @@ export declare const toRemiSubTabTypeStrict: (v: string) => "rejected" | "failed
38
38
  export type RemiSubTabType = ReturnType<typeof toRemiSubTabType>;
39
39
  export declare const toRemiSubTabUnderScoreType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "my_drafts" | "awaiting_all_approval";
40
40
  export type RemiSubTabUnderScoreType = ReturnType<typeof toRemiSubTabUnderScoreType>;
41
- declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "submittedOn" | "reportName";
41
+ declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "createdBy" | "submittedOn" | "reportName";
42
42
  export type ReimbursementViewSortKey = ReturnType<typeof toReimbursementSortKeyType>;
43
43
  export interface ReimbursementFilters {
44
44
  categories: ReimbursementFilterCategory[];
@@ -64,6 +64,7 @@ exports.toRemiSubTabUnderScoreType = toRemiSubTabUnderScoreType;
64
64
  const ALL_REIMBURSEMENT_SORT_KEYS = [
65
65
  'reportName',
66
66
  'submittedOn',
67
+ 'createdBy',
67
68
  'type',
68
69
  'status',
69
70
  'amount',
@@ -98,11 +98,11 @@ exports.allTaskStatus = [
98
98
  },
99
99
  {
100
100
  code: 'done',
101
- name: 'Done',
101
+ name: 'In Review',
102
102
  },
103
103
  {
104
104
  code: 'resolved',
105
- name: 'Resolved',
105
+ name: 'Complete',
106
106
  },
107
107
  ];
108
108
  exports.allTaskPriority = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.19.90-beta3ND",
3
+ "version": "4.19.90-betaML1",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",