@zeniai/client-epic-state 4.12.23 → 4.12.25

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 (115) hide show
  1. package/lib/commonStateTypes/selectorTypes/selectorTypes.d.ts +3 -1
  2. package/lib/entity/account/accountSelector.d.ts +1 -0
  3. package/lib/entity/account/accountSelector.js +13 -1
  4. package/lib/entity/class/classPayload.d.ts +1 -0
  5. package/lib/entity/class/classPayload.js +13 -29
  6. package/lib/entity/class/classState.d.ts +1 -0
  7. package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +2 -0
  8. package/lib/entity/jeSchedules/jeScheduleHelper.js +7 -0
  9. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +22 -5
  10. package/lib/entity/jeSchedules/jeSchedulesPayload.js +104 -29
  11. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +14 -4
  12. package/lib/entity/jeSchedules/jeSchedulesReducer.js +86 -6
  13. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +15 -3
  14. package/lib/entity/jeSchedules/jeSchedulesSelector.js +68 -5
  15. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +14 -2
  16. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +4 -2
  17. package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -0
  18. package/lib/entity/jeSchedules/updateAccruedJESchedulesEpic.d.ts +9 -0
  19. package/lib/entity/jeSchedules/updateAccruedJESchedulesEpic.js +41 -0
  20. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  21. package/lib/entity/snackbar/snackbarTypes.js +2 -0
  22. package/lib/entity/tenant/clearAllEpic.d.ts +4 -3
  23. package/lib/entity/tenant/clearAllEpic.js +3 -0
  24. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
  25. package/lib/entity/transaction/payloadTypes/otherTransactionPayload.d.ts +0 -2
  26. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +1 -1
  27. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +3 -0
  28. package/lib/entity/transaction/payloadTypes/transactionPayload.js +7 -3
  29. package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.d.ts +1 -1
  30. package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -0
  31. package/lib/epic.d.ts +12 -1
  32. package/lib/epic.js +12 -1
  33. package/lib/index.d.ts +11 -5
  34. package/lib/index.js +27 -5
  35. package/lib/reducer.d.ts +3 -0
  36. package/lib/reducer.js +3 -0
  37. package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
  38. package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
  39. package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
  40. package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
  41. package/lib/view/commonVendorView/vendorView/epics/fetchVendorEpic.js +0 -1
  42. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  43. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  44. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  45. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  46. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  47. package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts +3 -0
  48. package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.js +12 -0
  49. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/cancelScheduleAccruedJournalEntryEpic.d.ts +8 -0
  50. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/cancelScheduleAccruedJournalEntryEpic.js +81 -0
  51. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/createNewSchedulesAccruedEpic.d.ts +6 -0
  52. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/createNewSchedulesAccruedEpic.js +35 -0
  53. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/deleteScheduleAccruedDetailEpic.d.ts +8 -0
  54. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/deleteScheduleAccruedDetailEpic.js +79 -0
  55. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/fetchRecommendedTransactionRowIndexEpic.d.ts +7 -0
  56. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/fetchRecommendedTransactionRowIndexEpic.js +73 -0
  57. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/fetchScheduleAccruedDetailsEpic.d.ts +8 -0
  58. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/fetchScheduleAccruedDetailsEpic.js +53 -0
  59. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/fetchScheduleAccruedDetailsPageEpic.d.ts +8 -0
  60. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/fetchScheduleAccruedDetailsPageEpic.js +28 -0
  61. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/initializeScheduleAccruedDetailLocalDataEpic.d.ts +6 -0
  62. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/initializeScheduleAccruedDetailLocalDataEpic.js +37 -0
  63. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/saveScheduleAccruedDetailsEpic.d.ts +12 -0
  64. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/saveScheduleAccruedDetailsEpic.js +126 -0
  65. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/updateAmountsInScheduleAccruedDetailEpic.d.ts +6 -0
  66. package/lib/view/scheduleView/scheduleAccruedDetailView/epics/updateAmountsInScheduleAccruedDetailEpic.js +30 -0
  67. package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailLocalDataHelper.d.ts +16 -0
  68. package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailLocalDataHelper.js +121 -0
  69. package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailPayload.d.ts +60 -0
  70. package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailPayload.js +288 -0
  71. package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailReducer.d.ts +83 -0
  72. package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailReducer.js +363 -0
  73. package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailSelector.d.ts +36 -0
  74. package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailSelector.js +127 -0
  75. package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailState.d.ts +45 -0
  76. package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailState.js +2 -0
  77. package/lib/view/scheduleView/scheduleDetailView/epics/createNewSchedulesEpic.js +1 -1
  78. package/lib/view/scheduleView/scheduleDetailView/epics/deleteScheduleDetailEpic.js +1 -1
  79. package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsPageEpic.js +3 -1
  80. package/lib/view/scheduleView/scheduleDetailView/epics/initializeScheduleDetailLocalDataEpic.js +1 -1
  81. package/lib/view/scheduleView/scheduleDetailView/epics/markAsCompleteScheduleDetailEpic.js +1 -1
  82. package/lib/view/scheduleView/scheduleDetailView/epics/saveScheduleDetailsEpic.d.ts +2 -2
  83. package/lib/view/scheduleView/scheduleDetailView/epics/saveScheduleDetailsEpic.js +1 -1
  84. package/lib/view/scheduleView/scheduleDetailView/epics/updateAmountsInScheduleDetailEpic.js +1 -1
  85. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper.js +2 -0
  86. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.d.ts +11 -5
  87. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +66 -2
  88. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +2 -5
  89. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.js +2 -17
  90. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +7 -3
  91. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailState.d.ts +3 -2
  92. package/lib/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.d.ts +8 -0
  93. package/lib/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +52 -0
  94. package/lib/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +7 -1
  95. package/lib/view/scheduleView/scheduleListView/epics/fetchScheduleListEpic.js +7 -1
  96. package/lib/view/scheduleView/scheduleListView/scheduleListHelper.d.ts +33 -2
  97. package/lib/view/scheduleView/scheduleListView/scheduleListHelper.js +117 -1
  98. package/lib/view/scheduleView/scheduleListView/scheduleListPayload.d.ts +6 -1
  99. package/lib/view/scheduleView/scheduleListView/scheduleListReducer.d.ts +32 -4
  100. package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +207 -69
  101. package/lib/view/scheduleView/scheduleListView/scheduleListSelector.d.ts +23 -1
  102. package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +176 -5
  103. package/lib/view/scheduleView/scheduleListView/scheduleListState.d.ts +15 -3
  104. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  105. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.js +2 -0
  106. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  107. package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
  108. package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
  109. package/lib/view/vendorList/vendorListSelector.d.ts +1 -1
  110. package/lib/view/vendorList/vendorListSelector.js +1 -0
  111. package/lib/view/vendorTabView/fetchVendorTabViewEpic.d.ts +2 -2
  112. package/lib/view/vendorTabView/fetchVendorTabViewEpic.js +11 -1
  113. package/lib/view/vendorTabView/vendorTabViewReducer.d.ts +2 -0
  114. package/lib/view/vendorTabView/vendorTabViewReducer.js +2 -1
  115. package/package.json +1 -1
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getFetchStateForScheduleListByType = exports.getFetchStateForScheduleAccountList = exports.getScheduleListReport = void 0;
6
+ exports.getFetchStateForScheduleListByType = exports.getFetchStateForScheduleAccountList = exports.getAccruedScheduleListReport = exports.getScheduleListReport = void 0;
7
7
  const get_1 = __importDefault(require("lodash/get"));
8
8
  const orderBy_1 = __importDefault(require("lodash/orderBy"));
9
9
  const accountListSelector_1 = require("../../accountList/accountListSelector");
@@ -71,6 +71,58 @@ const sortedJETransactionsView = (jeTransactions, sortKey, sortOrder) => {
71
71
  }
72
72
  }, sortOrder === 'ascending' ? 'asc' : 'desc');
73
73
  };
74
+ const sortedJEAccruedSchedules = (jeAccruedSchedules, sortKey, sortOrder) => {
75
+ return (0, orderBy_1.default)(jeAccruedSchedules, (jeAccruedSchedule) => {
76
+ var _a, _b, _c;
77
+ switch (sortKey) {
78
+ case 'createTime':
79
+ return jeAccruedSchedule.createTime.valueOf();
80
+ case 'vendor':
81
+ return jeAccruedSchedule.vendor.name != null
82
+ ? jeAccruedSchedule.vendor.name.toLowerCase()
83
+ : jeAccruedSchedule.vendor.name;
84
+ case 'expenseCategory':
85
+ return jeAccruedSchedule.jeDebit.account != null
86
+ ? jeAccruedSchedule.jeDebit.account.accountName.toLowerCase()
87
+ : null;
88
+ case 'accruedExpenseCategory':
89
+ return jeAccruedSchedule.jeCredit.account != null
90
+ ? jeAccruedSchedule.jeCredit.account.accountName.toLowerCase()
91
+ : null;
92
+ case 'class':
93
+ return jeAccruedSchedule.jeDebit.accountingClass != null
94
+ ? jeAccruedSchedule.jeDebit.accountingClass.className.toLowerCase()
95
+ : null;
96
+ case 'startMonth':
97
+ return jeAccruedSchedule.startDate != null
98
+ ? jeAccruedSchedule.startDate.valueOf()
99
+ : null;
100
+ case 'endMonth':
101
+ return jeAccruedSchedule.endDate != null
102
+ ? jeAccruedSchedule.endDate.valueOf()
103
+ : null;
104
+ case 'months':
105
+ return (_a = jeAccruedSchedule.period) !== null && _a !== void 0 ? _a : null;
106
+ case 'amount':
107
+ return jeAccruedSchedule.recurringAmount != null
108
+ ? jeAccruedSchedule.recurringAmount.amount
109
+ : 0;
110
+ case 'balanceAsOfToday':
111
+ return jeAccruedSchedule.balanceAsOfToday != null
112
+ ? jeAccruedSchedule.balanceAsOfToday.amount
113
+ : 0;
114
+ case 'memo':
115
+ return (_c = (_b = jeAccruedSchedule.memo) === null || _b === void 0 ? void 0 : _b.toLowerCase()) !== null && _c !== void 0 ? _c : '';
116
+ case 'status':
117
+ return jeAccruedSchedule.status.code.toLowerCase();
118
+ case 'user':
119
+ default:
120
+ return jeAccruedSchedule.updatedByUser != null
121
+ ? jeAccruedSchedule.updatedByUser.firstName.toLowerCase()
122
+ : null;
123
+ }
124
+ }, sortOrder === 'ascending' ? 'asc' : 'desc');
125
+ };
74
126
  const getScheduleListReport = (state, scheduleType) => {
75
127
  const { scheduleListState, accountListState, accountState } = state;
76
128
  const scheduleState = (0, scheduleListReducer_1.getState)(scheduleListState, scheduleType);
@@ -126,7 +178,7 @@ const getScheduleListReport = (state, scheduleType) => {
126
178
  const { fetchState, error } = scheduleJETransactions;
127
179
  const { sortKey, sortOrder } = uiState;
128
180
  const scheduleTransactionsUnsorted = jeScheduleIds
129
- .map((jeScheduleId) => (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleKey)(jeScheduleId, state))
181
+ .map((jeScheduleId) => (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleTransactionKey)(jeScheduleId, state))
130
182
  .filter((value) => {
131
183
  if (value == null) {
132
184
  console.error("Can't have null transaction at this stage!");
@@ -196,6 +248,119 @@ const getScheduleListReport = (state, scheduleType) => {
196
248
  }
197
249
  };
198
250
  exports.getScheduleListReport = getScheduleListReport;
251
+ const getAccruedScheduleListReport = (state, scheduleType) => {
252
+ const { scheduleListState, accountListState, accountState } = state;
253
+ const scheduleAccruedListState = (0, scheduleListReducer_1.getState)(scheduleListState, scheduleType);
254
+ const downloadState = scheduleAccruedListState.downloadState;
255
+ const allScheduleAccounts = (0, accountListSelector_1.getAccountList)(accountState, accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedules)());
256
+ let allNestedAccounts = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedules)());
257
+ let allAccounts = allScheduleAccounts.accounts;
258
+ const accountTypes = (0, scheduleListHelper_1.getAccountsTypesForScheduleList)(scheduleType);
259
+ const accountLabel = (0, scheduleListHelper_1.getAccountLabelForScheduleType)(scheduleType);
260
+ const scheduleListCurrentTabAccountIds = accountLabel != null
261
+ ? (0, accountListSelector_1.getAccountIdsForLabel)(accountListState, accountTypes.accountListKey, accountLabel)
262
+ : [];
263
+ if (accountLabel != null) {
264
+ const filteredList = (0, accountListSelector_1.getFilteredNestedAndAccountListsForLabel)(accountState, accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedules)(), accountLabel);
265
+ allAccounts = filteredList.accountList.filter((account) => scheduleListCurrentTabAccountIds.includes(account.accountId));
266
+ allNestedAccounts = filteredList.nestedAccountList.filter((account) => account.accountId[0] != null &&
267
+ scheduleListCurrentTabAccountIds.includes(account.accountId[0]));
268
+ }
269
+ const key = (0, scheduleListTypes_1.getScheduleListKey)(scheduleAccruedListState.selectedCategoryId, scheduleAccruedListState.selectedTimeframe);
270
+ const scheduleAccruedJE = (0, get_1.default)(scheduleAccruedListState.jeScheduleAccruedByListKey, key, undefined);
271
+ if (scheduleAccruedJE == null) {
272
+ return {
273
+ reportTitle: 'Accrued Schedule List',
274
+ version: 1,
275
+ status: undefined,
276
+ jeScheduleOrder: 'descending_schedule_date',
277
+ jeAccruedSchedules: [],
278
+ scheduleType,
279
+ selectedAccruedScheduleId: undefined,
280
+ downloadUIState: downloadState,
281
+ selectedCategoryId: scheduleAccruedListState.selectedCategoryId,
282
+ selectedTimeframe: scheduleAccruedListState.selectedTimeframe,
283
+ uiState: scheduleAccruedListState.uiState,
284
+ scheduleListAccounts: [(0, scheduleListHelper_1.getAllAccountBase)(), ...allAccounts],
285
+ scheduleListNestedAccountHierarchy: [
286
+ (0, scheduleListHelper_1.getAllAccountNested)(),
287
+ ...allNestedAccounts,
288
+ ],
289
+ fetchState: 'Not-Started',
290
+ error: undefined,
291
+ scheduleListLocalData: scheduleAccruedListState.scheduleListLocalData,
292
+ allTimeframeTicks: [],
293
+ totalBalanceTimeframeTicks: {
294
+ months: [],
295
+ },
296
+ totalAmount: (0, amount_1.toAmount)(0, 'USD', '$'),
297
+ totalRunningBalances: (0, amount_1.toAmount)(0, 'USD', '$'),
298
+ };
299
+ }
300
+ else {
301
+ const accruedJEScheduleIds = scheduleAccruedJE.jeScheduleAccruedKeys;
302
+ const { uiState, selectedAccruedScheduleId } = scheduleAccruedListState;
303
+ const { fetchState, error } = scheduleAccruedJE;
304
+ const { sortKey, sortOrder } = uiState;
305
+ const scheduleAccruedUnsorted = accruedJEScheduleIds
306
+ .map((jeScheduleId) => (0, jeSchedulesSelector_1.getJEAccruedScheduleByJEScheduleKey)(jeScheduleId, state))
307
+ .filter((value) => value != null);
308
+ let jeScheduleAccrued = [];
309
+ const currentTabJESchedules = (0, orderBy_1.default)(scheduleAccruedUnsorted, (value) => value.createTime.valueOf(), 'desc');
310
+ switch (uiState.currentSubTab) {
311
+ case 'completed':
312
+ jeScheduleAccrued = currentTabJESchedules.filter((schedule) => schedule.status.code === 'completed');
313
+ break;
314
+ case 'ongoing':
315
+ jeScheduleAccrued = currentTabJESchedules.filter((schedule) => schedule.status.code === 'ongoing');
316
+ break;
317
+ case 'new':
318
+ default:
319
+ jeScheduleAccrued = currentTabJESchedules;
320
+ }
321
+ const loweredSearchText = scheduleAccruedListState.uiState.searchText
322
+ .trim()
323
+ .toLocaleLowerCase();
324
+ const sortedJESchedules = sortedJEAccruedSchedules(jeScheduleAccrued.filter((jeSchedule) => {
325
+ return (jeSchedule.vendor.name.toLowerCase().includes(loweredSearchText) ===
326
+ true ||
327
+ jeSchedule.memo.toLowerCase().includes(loweredSearchText) === true);
328
+ }), sortKey, sortOrder);
329
+ const totalBalances = (0, scheduleListHelper_1.getCalculatedAccruedScheduleTotal)(sortedJESchedules);
330
+ const allTimeframeTicks = (0, scheduleListHelper_1.getAllTimeframeTicksForAccrued)(sortedJESchedules, 2);
331
+ const jeSchedulesWithBalance = [];
332
+ sortedJESchedules.forEach((jeSchedule) => {
333
+ jeSchedulesWithBalance.push(Object.assign(Object.assign({}, jeSchedule), { coaBalanceByPeriod: (0, scheduleListHelper_1.calculateCOABalanceGroupedByPeriodForAccrued)(jeSchedule), durationOfMonths: (0, scheduleListHelper_1.getDurationOfMonthOutTotalMonthForAccrued)(jeSchedule) }));
334
+ });
335
+ const totalBalanceTimeframeTicks = (0, scheduleListHelper_1.calculateTotalBalanceTimeframeTickForAccrued)(jeSchedulesWithBalance, allTimeframeTicks, 'months');
336
+ return {
337
+ reportTitle: 'Accrued Schedule List',
338
+ version: 1,
339
+ status: undefined,
340
+ jeAccruedSchedules: jeSchedulesWithBalance,
341
+ jeScheduleOrder: 'descending_schedule_date',
342
+ selectedAccruedScheduleId: selectedAccruedScheduleId,
343
+ downloadUIState: downloadState,
344
+ selectedCategoryId: scheduleAccruedListState.selectedCategoryId,
345
+ selectedTimeframe: scheduleAccruedListState.selectedTimeframe,
346
+ uiState,
347
+ scheduleType,
348
+ scheduleListAccounts: [(0, scheduleListHelper_1.getAllAccountBase)(), ...allAccounts],
349
+ scheduleListNestedAccountHierarchy: [
350
+ (0, scheduleListHelper_1.getAllAccountNested)(),
351
+ ...allNestedAccounts,
352
+ ],
353
+ fetchState,
354
+ error,
355
+ scheduleListLocalData: scheduleAccruedListState.scheduleListLocalData,
356
+ totalAmount: totalBalances.totalAmount,
357
+ totalRunningBalances: totalBalances.totalRunningBalances,
358
+ allTimeframeTicks,
359
+ totalBalanceTimeframeTicks,
360
+ };
361
+ }
362
+ };
363
+ exports.getAccruedScheduleListReport = getAccruedScheduleListReport;
199
364
  const getFetchStateForScheduleAccountList = (state) => {
200
365
  return (0, accountListSelector_1.getAccountListFetchState)(state.accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedules)());
201
366
  };
@@ -203,9 +368,15 @@ exports.getFetchStateForScheduleAccountList = getFetchStateForScheduleAccountLis
203
368
  const getFetchStateForScheduleListByType = (state, scheduleType) => {
204
369
  const scheduleState = state.scheduleListState.listByScheduleType[scheduleType];
205
370
  const key = (0, scheduleListTypes_1.getScheduleListKey)(scheduleState.selectedCategoryId, scheduleState.selectedTimeframe);
206
- const fetchState = scheduleState.jeScheduleKeysByListKey[key] != null
207
- ? scheduleState.jeScheduleKeysByListKey[key].fetchState
208
- : 'Not-Started';
371
+ let fetchState = 'Not-Started';
372
+ if ('jeScheduleKeysByListKey' in scheduleState &&
373
+ scheduleState.jeScheduleKeysByListKey[key] != null) {
374
+ fetchState = scheduleState.jeScheduleKeysByListKey[key].fetchState;
375
+ }
376
+ else if ('jeScheduleAccruedByListKey' in scheduleState &&
377
+ scheduleState.jeScheduleAccruedByListKey[key] != null) {
378
+ fetchState = scheduleState.jeScheduleAccruedByListKey[key].fetchState;
379
+ }
209
380
  return fetchState;
210
381
  };
211
382
  exports.getFetchStateForScheduleListByType = getFetchStateForScheduleListByType;
@@ -1,7 +1,7 @@
1
1
  import { FetchedState, FetchStateAndError, ID } from '../../../commonStateTypes/common';
2
2
  import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
3
3
  import { TimeframeTick } from '../../../commonStateTypes/timeframeTick';
4
- import { JEScheduleKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
4
+ import { JEScheduleKey, JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
5
5
  import { ScheduleListKey, ScheduleSubTabType, ScheduleListSortKey } from './scheduleListTypes';
6
6
  export interface ScheduleListUIState {
7
7
  sortKey: ScheduleListSortKey;
@@ -15,7 +15,10 @@ export interface ScheduleListLocalData {
15
15
  selectedTimeframe: TimeframeTick;
16
16
  }
17
17
  export interface JESchedulesForTypeState extends FetchedState {
18
- jeScheduleTransactionKeys: JEScheduleKey[];
18
+ jeScheduleTransactionKeys: JEScheduleTransactionKey[];
19
+ }
20
+ export interface JEAccruedSchedulesForTypeState extends FetchedState {
21
+ jeScheduleAccruedKeys: JEScheduleKey[];
19
22
  }
20
23
  export interface ScheduleListForTypeState {
21
24
  jeScheduleKeysByListKey: Record<ScheduleListKey, JESchedulesForTypeState>;
@@ -26,6 +29,15 @@ export interface ScheduleListForTypeState {
26
29
  selectedTimeframe: TimeframeTick;
27
30
  scheduleListLocalData: ScheduleListLocalData;
28
31
  }
32
+ export interface ScheduleAccruedListForTypeState {
33
+ jeScheduleAccruedByListKey: Record<ID, JEAccruedSchedulesForTypeState>;
34
+ selectedAccruedScheduleId?: ID;
35
+ downloadState: FetchStateAndError;
36
+ uiState: ScheduleListUIState;
37
+ selectedCategoryId: ID;
38
+ selectedTimeframe: TimeframeTick;
39
+ scheduleListLocalData: ScheduleListLocalData;
40
+ }
29
41
  export interface ScheduleListViewState {
30
- listByScheduleType: Record<ScheduleTypes, ScheduleListForTypeState>;
42
+ listByScheduleType: Record<ScheduleTypes, ScheduleListForTypeState | ScheduleAccruedListForTypeState>;
31
43
  }
@@ -7,7 +7,7 @@ export declare const getScheduleListKey: (selectedCategory: ID, selectedTimefram
7
7
  export declare type ScheduleListKey = ReturnType<typeof getScheduleListKey>;
8
8
  export declare const toScheduleSubTabType: (v: string) => "all" | "new" | "completed" | "ongoing";
9
9
  export declare type ScheduleSubTabType = ReturnType<typeof toScheduleSubTabType>;
10
- declare const toScheduleSortKeyType: (v: string) => "status" | "user" | "months" | "amount" | "vendor" | "class" | "memo" | "transactionDate" | "transactionType" | "balanceAsOfToday" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "startMonth" | "endMonth" | "assetId";
10
+ declare const toScheduleSortKeyType: (v: string) => "status" | "user" | "months" | "amount" | "vendor" | "class" | "balanceAsOfToday" | "createTime" | "memo" | "transactionDate" | "transactionType" | "accruedExpenseCategory" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "startMonth" | "endMonth" | "assetId";
11
11
  export declare type ScheduleListSortKey = ReturnType<typeof toScheduleSortKeyType>;
12
12
  export interface DownloadJEScheduleTabOptions {
13
13
  timezone: string;
@@ -16,6 +16,8 @@ const toScheduleSubTabType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_SC
16
16
  exports.toScheduleSubTabType = toScheduleSubTabType;
17
17
  const ALL_SCHEDULES_PAY_SORT_KEYS = [
18
18
  'transactionDate',
19
+ 'createTime',
20
+ 'accruedExpenseCategory',
19
21
  'vendor',
20
22
  'scheduleCategory',
21
23
  'expenseCategory',
@@ -18,7 +18,7 @@ export declare const saveNotificationSettingsEpic: (actions$: ActionsObservable<
18
18
  type: string;
19
19
  } | {
20
20
  payload: {
21
- messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated";
21
+ messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated";
22
22
  messageText: "failed" | "success" | "notification";
23
23
  type: import("../../..").SnackbarMessageType;
24
24
  showStatusIcon?: boolean | undefined;
@@ -8,7 +8,7 @@ import { updateCreatedTagToLocalStore } from '../../taskManager/taskDetailView/t
8
8
  export declare type ActionType = ReturnType<typeof createTag> | ReturnType<typeof updateTagCreateStatus> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateCreatedTagToLocalStore> | ReturnType<typeof updateTags>;
9
9
  export declare const createTagEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
10
10
  payload: {
11
- messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated";
11
+ messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated";
12
12
  messageText: "failed" | "success" | "notification";
13
13
  type: import("../../..").SnackbarMessageType;
14
14
  showStatusIcon?: boolean | undefined;
@@ -9,7 +9,7 @@ export declare const deleteTagEpic: (actions$: ActionsObservable<ActionType>, _s
9
9
  type: string;
10
10
  } | {
11
11
  payload: {
12
- messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated";
12
+ messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated";
13
13
  messageText: "failed" | "success" | "notification";
14
14
  type: import("../../..").SnackbarMessageType;
15
15
  showStatusIcon?: boolean | undefined;
@@ -8,7 +8,7 @@ import { Vendor } from '../../entity/vendor/vendorState';
8
8
  import { RootState } from '../../reducer';
9
9
  import { ZeniDate } from '../../zeniDayJS';
10
10
  import { VendorListViewSortKey, VendorListViewYTDSpendSortKey, VendorViewUIState } from './vendorListState';
11
- export declare const toVendorReportIDType: (v: string) => "operating_expenses_by_vendor" | "vendors_tab" | "prepaid_expenses" | "fixed_assets";
11
+ export declare const toVendorReportIDType: (v: string) => "operating_expenses_by_vendor" | "vendors_tab" | "prepaid_expenses" | "fixed_assets" | "accrued_expenses";
12
12
  export declare type VendorReportIDType = ReturnType<typeof toVendorReportIDType>;
13
13
  export interface VendorListSelectorView extends SelectorView {
14
14
  vendors: VendorListView[];
@@ -11,6 +11,7 @@ const ALL_VENDOR_REPORT_ID_TYPES = [
11
11
  'vendors_tab',
12
12
  'prepaid_expenses',
13
13
  'fixed_assets',
14
+ 'accrued_expenses',
14
15
  ];
15
16
  const toVendorReportIDType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_VENDOR_REPORT_ID_TYPES);
16
17
  exports.toVendorReportIDType = toVendorReportIDType;
@@ -2,8 +2,8 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
2
2
  import { Observable } from 'rxjs';
3
3
  import { RootState } from '../../reducer';
4
4
  import { fetchVendorTabView } from './vendorTabViewReducer';
5
- import { fetchScheduleList } from '../scheduleView/scheduleListView/scheduleListReducer';
5
+ import { fetchAccruedScheduleList, fetchScheduleList } from '../scheduleView/scheduleListView/scheduleListReducer';
6
6
  import { fetchOpExByVendor } from '../opExByVendor/opExByVendorReducer';
7
7
  import { fetchVendorsList } from '../vendorList/vendorListReducer';
8
- export declare type ActionType = ReturnType<typeof fetchVendorTabView> | ReturnType<typeof fetchOpExByVendor> | ReturnType<typeof fetchVendorsList> | ReturnType<typeof fetchScheduleList>;
8
+ export declare type ActionType = ReturnType<typeof fetchVendorTabView> | ReturnType<typeof fetchOpExByVendor> | ReturnType<typeof fetchVendorsList> | ReturnType<typeof fetchAccruedScheduleList> | ReturnType<typeof fetchScheduleList>;
9
9
  export declare const fetchVendorTabViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
@@ -12,14 +12,24 @@ const scheduleListHelper_1 = require("../scheduleView/scheduleListView/scheduleL
12
12
  const opExByVendorSelector_1 = require("../opExByVendor/opExByVendorSelector");
13
13
  const vendorListSelector_1 = require("../vendorList/vendorListSelector");
14
14
  const fetchVendorTabViewEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(vendorTabViewReducer_1.fetchVendorTabView.match), (0, operators_1.switchMap)((action) => {
15
- const { shouldFetchFixedAssets, shouldFetchOpexByVendor, shouldFetchPrepaidExpenses, shouldFetchVendorsList, } = action.payload;
15
+ const { shouldFetchAccruedExpenses, shouldFetchFixedAssets, shouldFetchOpexByVendor, shouldFetchPrepaidExpenses, shouldFetchVendorsList, } = action.payload;
16
16
  const state = state$.value;
17
17
  const fetchActions = [];
18
18
  const accountFetchState = (0, scheduleListSelector_1.getFetchStateForScheduleAccountList)(state);
19
19
  const fixedAssetsSchedulesListFetchState = (0, scheduleListSelector_1.getFetchStateForScheduleListByType)(state, 'fixed_assets');
20
20
  const prepaidExpensesSchedulesListFetchState = (0, scheduleListSelector_1.getFetchStateForScheduleListByType)(state, 'prepaid_expenses');
21
+ const accruedExpenseSchedulesListFetchState = (0, scheduleListSelector_1.getFetchStateForScheduleListByType)(state, 'accrued_expenses');
21
22
  const opExByVendorFetchState = (0, opExByVendorSelector_1.getOpExByVendorReport)(state).fetchState;
22
23
  const vendorsListFetchState = (0, vendorListSelector_1.getVendorList)(state, 'vendorsTab').fetchState;
24
+ if (shouldFetchAccruedExpenses === true &&
25
+ accountFetchState === 'Completed' &&
26
+ accruedExpenseSchedulesListFetchState !== 'In-Progress' &&
27
+ accruedExpenseSchedulesListFetchState !== 'Completed') {
28
+ fetchActions.push((0, scheduleListReducer_1.fetchAccruedScheduleList)('accrued_expenses', {
29
+ selectedTimeframe: (0, scheduleListHelper_1.getDefaultSelectedTimeframeForScheduleType)('accrued_expenses'),
30
+ selectedCategoryId: 'all',
31
+ }));
32
+ }
23
33
  if (shouldFetchFixedAssets === true &&
24
34
  accountFetchState === 'Completed' &&
25
35
  fixedAssetsSchedulesListFetchState !== 'In-Progress' &&
@@ -1,11 +1,13 @@
1
1
  import { VendorTabViewState } from './vendorTabViewState';
2
2
  export declare const initialState: VendorTabViewState;
3
3
  export declare const fetchVendorTabView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
4
+ shouldFetchAccruedExpenses: boolean;
4
5
  shouldFetchPrepaidExpenses: boolean;
5
6
  shouldFetchFixedAssets: boolean;
6
7
  shouldFetchVendorsList: boolean;
7
8
  shouldFetchOpexByVendor: boolean;
8
9
  }], {
10
+ shouldFetchAccruedExpenses: boolean;
9
11
  shouldFetchPrepaidExpenses: boolean;
10
12
  shouldFetchFixedAssets: boolean;
11
13
  shouldFetchVendorsList: boolean;
@@ -13,9 +13,10 @@ const vendorTabView = (0, toolkit_1.createSlice)({
13
13
  initialState: exports.initialState,
14
14
  reducers: {
15
15
  fetchVendorTabView: {
16
- prepare({ shouldFetchPrepaidExpenses, shouldFetchFixedAssets, shouldFetchVendorsList, shouldFetchOpexByVendor, }) {
16
+ prepare({ shouldFetchAccruedExpenses, shouldFetchPrepaidExpenses, shouldFetchFixedAssets, shouldFetchVendorsList, shouldFetchOpexByVendor, }) {
17
17
  return {
18
18
  payload: {
19
+ shouldFetchAccruedExpenses,
19
20
  shouldFetchPrepaidExpenses,
20
21
  shouldFetchFixedAssets,
21
22
  shouldFetchVendorsList,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.12.23",
3
+ "version": "4.12.25",
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
  "types": "lib/index.d.ts",