@zeniai/client-epic-state 5.1.72-betaRD1 → 5.1.73

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 (53) hide show
  1. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -2
  2. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -2
  3. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +0 -4
  4. package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -11
  5. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -2
  6. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +0 -2
  7. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
  8. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -2
  9. package/lib/epic.d.ts +1 -5
  10. package/lib/epic.js +1 -5
  11. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -2
  12. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -11
  13. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
  14. package/lib/esm/epic.js +1 -5
  15. package/lib/esm/index.js +4 -10
  16. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +3 -23
  17. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +8 -133
  18. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +15 -110
  19. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +6 -3
  20. package/lib/index.d.ts +7 -11
  21. package/lib/index.js +48 -70
  22. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +2 -2
  23. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +1 -21
  24. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -7
  25. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +9 -40
  26. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +8 -134
  27. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +7 -31
  28. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +1 -4
  29. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +14 -112
  30. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +6 -53
  31. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -5
  32. package/package.json +1 -1
  33. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -21
  34. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -110
  35. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -73
  36. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -22
  37. package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -140
  38. package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +0 -1
  39. package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -70
  40. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +0 -8
  41. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -25
  42. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +0 -45
  43. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -114
  44. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +0 -8
  45. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -77
  46. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +0 -6
  47. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -26
  48. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +0 -36
  49. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -145
  50. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +0 -25
  51. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +0 -2
  52. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +0 -10
  53. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -75
@@ -1,8 +1,8 @@
1
1
  import { ActionsObservable, StateObservable } from 'redux-observable';
2
2
  import { Observable } from 'rxjs';
3
- import { updateAccruedJESchedules, updateAccruedJESchedulesDetails, updateJESchedules, updateJESchedulesDetails } from '../../../../entity/jeSchedules/jeSchedulesReducer';
3
+ import { updateJESchedules, updateJESchedulesDetails } from '../../../../entity/jeSchedules/jeSchedulesReducer';
4
4
  import { RootState } from '../../../../reducer';
5
5
  import { ZeniAPI } from '../../../../zeniAPI';
6
6
  import { fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesSuccess, initializeJeScheduleLocalData } from '../../reducers/jeSchedulesViewReducer';
7
- export type ActionType = ReturnType<typeof fetchJeSchedules> | ReturnType<typeof fetchJeSchedulesFailure> | ReturnType<typeof fetchJeSchedulesSuccess> | ReturnType<typeof initializeJeScheduleLocalData> | ReturnType<typeof updateAccruedJESchedules> | ReturnType<typeof updateAccruedJESchedulesDetails> | ReturnType<typeof updateJESchedules> | ReturnType<typeof updateJESchedulesDetails>;
7
+ export type ActionType = ReturnType<typeof fetchJeSchedules> | ReturnType<typeof fetchJeSchedulesFailure> | ReturnType<typeof fetchJeSchedulesSuccess> | ReturnType<typeof initializeJeScheduleLocalData> | ReturnType<typeof updateJESchedules> | ReturnType<typeof updateJESchedulesDetails>;
8
8
  export declare const fetchJeSchedulesEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -3,12 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fetchJeSchedulesEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
- const formatZeniDateFY_1 = require("../../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
7
6
  const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
8
7
  const jeSchedulesReducer_1 = require("../../../../entity/jeSchedules/jeSchedulesReducer");
9
8
  const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
10
9
  const responsePayload_1 = require("../../../../responsePayload");
11
- const zeniDayJS_1 = require("../../../../zeniDayJS");
12
10
  const jeSchedulesViewReducer_1 = require("../../reducers/jeSchedulesViewReducer");
13
11
  const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(jeSchedulesViewReducer_1.fetchJeSchedules.match), (0, operators_1.mergeMap)((action) => {
14
12
  const state = state$.value;
@@ -16,44 +14,26 @@ const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, op
16
14
  const { period, refreshViewInBackground } = action.payload;
17
15
  const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
18
16
  const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
19
- const isClosePeriodTab = state.expenseAutomationJESchedulesViewState.uiState.selectedPageTab ===
20
- 'schedules';
21
- const existingEndDate = (0, timePeriod_1.toAbsoluteDay)((0, zeniDayJS_1.date)((0, timePeriod_1.toString)(period.start))
22
- .subtract(1, 'month')
23
- .endOf('month')
24
- .format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT));
25
17
  const queryParam = {
26
18
  start_date: (0, timePeriod_1.toString)(period.start),
27
- end_date: isClosePeriodTab || existingEndDate == null
28
- ? (0, timePeriod_1.toString)(period.end)
29
- : (0, timePeriod_1.toString)(existingEndDate),
30
- include_accrued: true,
31
- ...(isClosePeriodTab
32
- ? { close_period_start_date: (0, timePeriod_1.toString)(period.start) }
33
- : {}),
19
+ end_date: (0, timePeriod_1.toString)(period.end),
34
20
  };
35
21
  return zeniAPI
36
22
  .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expenses_automation/je_schedules?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
37
23
  .pipe((0, operators_1.mergeMap)((response) => {
38
24
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
39
25
  const updateActions = [];
40
- const accruedJeSchedules = response.data.accrued_je_schedules?.je_schedules ?? [];
41
26
  updateActions.push((0, jeSchedulesReducer_1.updateJESchedules)([
42
27
  ...response.data.je_schedules,
43
28
  ...response.data.failed_je_postings.je_schedules,
44
29
  ]), (0, jeSchedulesReducer_1.updateJESchedulesDetails)([...response.data.failed_je_postings.je_schedules], response.data.failed_je_postings.scheduled_journal_entries), (0, jeSchedulesViewReducer_1.initializeJeScheduleLocalData)([
45
30
  ...response.data.failed_je_postings.je_schedules,
46
31
  ]));
47
- if (accruedJeSchedules.length > 0) {
48
- updateActions.push((0, jeSchedulesReducer_1.updateAccruedJESchedules)(accruedJeSchedules), (0, jeSchedulesReducer_1.updateAccruedJESchedulesDetails)(accruedJeSchedules, response.data.accrued_je_schedules
49
- ?.scheduled_journal_entries));
50
- }
51
32
  updateActions.push((0, jeSchedulesViewReducer_1.fetchJeSchedulesSuccess)({
52
33
  jeSchedules: [...response.data.je_schedules],
53
34
  failedJeSchedules: [
54
35
  ...response.data.failed_je_postings.je_schedules,
55
36
  ],
56
- accruedJeSchedules: accruedJeSchedules,
57
37
  selectedPeriod: selectedPeriod,
58
38
  refreshViewInBackground: refreshViewInBackground,
59
39
  }));
@@ -1,4 +1,4 @@
1
- import { JEAccruedScheduledTransactionPayload, JEScheduledTransactionPayload, ScheduledJournalEntryPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
1
+ import { JEScheduledTransactionPayload, ScheduledJournalEntryPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
2
2
  import { JEScheduledTransaction } from '../../../entity/jeSchedules/jeSchedulesSelector';
3
3
  import { ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
4
4
  import { RootState } from '../../../reducer';
@@ -7,9 +7,7 @@ import { JESchedulePayload, SaveJESchedulePayload } from '../../scheduleView/sch
7
7
  import { JEScheduleLocalData } from '../types/jeSchedulesViewState';
8
8
  export interface ExpenseAutomationJESchedulesQueryPayload {
9
9
  end_date: string;
10
- include_accrued: boolean;
11
10
  start_date: string;
12
- close_period_start_date?: string;
13
11
  }
14
12
  interface ExpenseAutomationJESchedulesPayload {
15
13
  failed_je_postings: {
@@ -17,10 +15,6 @@ interface ExpenseAutomationJESchedulesPayload {
17
15
  scheduled_journal_entries: ScheduledJournalEntryPayload[];
18
16
  };
19
17
  je_schedules: JEScheduledTransactionPayload[];
20
- accrued_je_schedules?: {
21
- je_schedules: JEAccruedScheduledTransactionPayload[];
22
- scheduled_journal_entries?: ScheduledJournalEntryPayload[];
23
- };
24
18
  }
25
19
  export type ExpenseAutomationJESchedulesResponse = ZeniAPIResponse<ExpenseAutomationJESchedulesPayload>;
26
20
  export interface IgnoreDraftJESchedulePayload {
@@ -1,17 +1,14 @@
1
1
  import { ID } from '../../../commonStateTypes/common';
2
2
  import { MonthYearPeriod, TimePeriod } from '../../../commonStateTypes/timePeriod';
3
3
  import { AccountMetadataPayload } from '../../../entity/account/accountPayload';
4
- import { JEAccruedScheduledTransactionPayload, JEScheduledTransactionPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
5
- import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
4
+ import { JEScheduledTransactionPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
5
+ import { JEScheduleTransactionKey } from '../../../entity/jeSchedules/jeSchedulesTypes';
6
6
  import { ZeniAPIStatus } from '../../../responsePayload';
7
7
  import { AccountTypeRecommendationPayload } from '../../accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload';
8
- import { AccountSettingsLocalData, AccountSettingsState, JEScheduleLocalData, JESchedulesViewState, JESchedulesViewUIState, NewScheduleLocalData, NewScheduleLocalDataFixedAssets, SearchTransactionsState } from '../types/jeSchedulesViewState';
8
+ import { AccountSettingsLocalData, AccountSettingsState, JEScheduleLocalData, JESchedulesViewState, JESchedulesViewUIState } from '../types/jeSchedulesViewState';
9
9
  export declare const accountSettingsInitialState: AccountSettingsState;
10
- export declare const getBaseNewScheduleLocalData: (scheduleType: ScheduleTypes) => NewScheduleLocalData;
11
- export declare const newScheduleInitialState: JESchedulesViewState['newSchedule']['newScheduleState'];
12
- export declare const searchTransactionsInitialState: SearchTransactionsState;
13
10
  export declare const initialState: JESchedulesViewState;
14
- export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearExpenseAutomationJESchedulesView">, clearJeAccountSettingsLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearJeAccountSettingsLocalData">, clearJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearJeScheduleLocalData">, clearSearchTransactionsForNewSchedule: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearSearchTransactionsForNewSchedule">, fetchAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchAccountSettingsListForAccountTypes">, fetchJeSchedules: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
11
+ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearExpenseAutomationJESchedulesView">, clearJeAccountSettingsLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearJeAccountSettingsLocalData">, clearJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearJeScheduleLocalData">, fetchAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchAccountSettingsListForAccountTypes">, fetchJeSchedules: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
15
12
  period: TimePeriod;
16
13
  refreshViewInBackground: any;
17
14
  }, "expenseAutomationJESchedulesView/fetchJeSchedules", never, never>, fetchJeSchedulesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -21,7 +18,6 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
21
18
  period: TimePeriod;
22
19
  refreshViewInBackground: any;
23
20
  }, "expenseAutomationJESchedulesView/fetchJeSchedulesPage", never, never>, fetchJeSchedulesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
24
- accruedJeSchedules: JEAccruedScheduledTransactionPayload[];
25
21
  failedJeSchedules: JEScheduledTransactionPayload[];
26
22
  jeSchedules: JEScheduledTransactionPayload[];
27
23
  refreshViewInBackground: boolean;
@@ -36,11 +32,7 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
36
32
  jeScheduleTransactionKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`;
37
33
  }, "expenseAutomationJESchedulesView/ignoreRecommendedJeScheduleSuccess", never, never>, initializeAccountSettingsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/initializeAccountSettingsView">, initializeJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeSchedules: JEScheduledTransactionPayload[]], {
38
34
  jeScheduleTransactionKeys: (`${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`)[];
39
- }, "expenseAutomationJESchedulesView/initializeJeScheduleLocalData", never, never>, initializeNewSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
40
- scheduleType: "fixed_assets" | "prepaid_expenses";
41
- }], {
42
- scheduleType: "prepaid_expenses" | "fixed_assets";
43
- }, "expenseAutomationJESchedulesView/initializeNewSchedule", never, never>, removeFailedJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[failedJeScheduleKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`, selectedPeriod: MonthYearPeriod], {
35
+ }, "expenseAutomationJESchedulesView/initializeJeScheduleLocalData", never, never>, removeFailedJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[failedJeScheduleKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`, selectedPeriod: MonthYearPeriod], {
44
36
  failedJeScheduleKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`;
45
37
  selectedPeriod: MonthYearPeriod;
46
38
  }, "expenseAutomationJESchedulesView/removeFailedJeScheduleTransactionKey", never, never>, removeJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -48,11 +40,7 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
48
40
  }, "expenseAutomationJESchedulesView/removeJeScheduleLocalDataById">, removeJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`, selectedPeriod: MonthYearPeriod], {
49
41
  jeScheduleKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`;
50
42
  selectedPeriod: MonthYearPeriod;
51
- }, "expenseAutomationJESchedulesView/removeJeScheduleTransactionKey", never, never>, resetNewScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
52
- scheduleType: "fixed_assets" | "prepaid_expenses";
53
- }], {
54
- scheduleType: "prepaid_expenses" | "fixed_assets";
55
- }, "expenseAutomationJESchedulesView/resetNewScheduleLocalData", never, never>, retryJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
43
+ }, "expenseAutomationJESchedulesView/removeJeScheduleTransactionKey", never, never>, retryJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
56
44
  jeScheduleTransactionKey: JEScheduleTransactionKey;
57
45
  scheduledJournalEntryID: ID;
58
46
  }, "expenseAutomationJESchedulesView/retryJeSchedule">, retryJeScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -64,36 +52,17 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
64
52
  status: ZeniAPIStatus;
65
53
  }, "expenseAutomationJESchedulesView/saveAccountSettingsFailure">, saveAccountSettingsLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
66
54
  data: Partial<AccountSettingsLocalData>;
67
- }, "expenseAutomationJESchedulesView/saveAccountSettingsLocalData">, saveAccountSettingsSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/saveAccountSettingsSuccess">, saveNewSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
68
- scheduleType: "fixed_assets" | "prepaid_expenses";
69
- }], {
70
- scheduleType: "prepaid_expenses" | "fixed_assets";
71
- }, "expenseAutomationJESchedulesView/saveNewSchedule", never, never>, saveNewScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
72
- status: ZeniAPIStatus;
73
- }, "expenseAutomationJESchedulesView/saveNewScheduleFailure">, saveNewScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/saveNewScheduleSuccess">, searchTransactionsForNewSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
74
- query: string;
75
- scheduleType: "fixed_assets" | "prepaid_expenses";
76
- }], {
77
- query: string;
78
- scheduleType: "prepaid_expenses" | "fixed_assets";
79
- }, "expenseAutomationJESchedulesView/searchTransactionsForNewSchedule", never, never>, searchTransactionsForNewScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
80
- status: ZeniAPIStatus;
81
- }, "expenseAutomationJESchedulesView/searchTransactionsForNewScheduleFailure">, searchTransactionsForNewScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
82
- searchResults: JEScheduleTransactionKey[];
83
- }, "expenseAutomationJESchedulesView/searchTransactionsForNewScheduleSuccess">, toggleJECreatedGroupCollapsed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/toggleJECreatedGroupCollapsed">, toggleJEPendingGroupCollapsed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/toggleJEPendingGroupCollapsed">, updateAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
55
+ }, "expenseAutomationJESchedulesView/saveAccountSettingsLocalData">, saveAccountSettingsSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/saveAccountSettingsSuccess">, updateAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
84
56
  accountPayload: AccountMetadataPayload[];
85
57
  }, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypes">, updateAccountSettingsListForAccountTypesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
86
58
  status: ZeniAPIStatus;
87
- }, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypesFailure">, updateJESchedulesUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<JESchedulesViewUIState>, "expenseAutomationJESchedulesView/updateJESchedulesUIState">, updateJEScheduleTypeFilter: import("@reduxjs/toolkit").ActionCreatorWithPayload<"prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue" | null, "expenseAutomationJESchedulesView/updateJEScheduleTypeFilter">, updateJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
59
+ }, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypesFailure">, updateJESchedulesUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<JESchedulesViewUIState>, "expenseAutomationJESchedulesView/updateJESchedulesUIState">, updateJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
88
60
  localData: Partial<JEScheduleLocalData>;
89
61
  scheduledJournalEntryID: ID;
90
62
  }, "expenseAutomationJESchedulesView/updateJeScheduleLocalDataById">, updateJeScheduleTransactionKeys: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKeys: (`${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`)[], selectedPeriod: MonthYearPeriod], {
91
63
  jeScheduleKeys: (`${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`)[];
92
64
  selectedPeriod: MonthYearPeriod;
93
- }, "expenseAutomationJESchedulesView/updateJeScheduleTransactionKeys", never, never>, updateNewScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
94
- localData: Partial<NewScheduleLocalDataFixedAssets>;
95
- scheduleType: "fixed_assets" | "prepaid_expenses";
96
- }, "expenseAutomationJESchedulesView/updateNewScheduleLocalData">, updateRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<AccountTypeRecommendationPayload, "expenseAutomationJESchedulesView/updateRecommendationForAccountSettings">, updateRecommendationForAccountSettingsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
65
+ }, "expenseAutomationJESchedulesView/updateJeScheduleTransactionKeys", never, never>, updateRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<AccountTypeRecommendationPayload, "expenseAutomationJESchedulesView/updateRecommendationForAccountSettings">, updateRecommendationForAccountSettingsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
97
66
  status: ZeniAPIStatus;
98
67
  }, "expenseAutomationJESchedulesView/updateRecommendationForAccountSettingsFailure">;
99
68
  declare const _default: import("redux").Reducer<JESchedulesViewState>;
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.updateRecommendationForAccountSettingsFailure = exports.updateRecommendationForAccountSettings = exports.updateNewScheduleLocalData = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.updateJEScheduleTypeFilter = exports.updateJESchedulesUIState = exports.updateAccountSettingsListForAccountTypesFailure = exports.updateAccountSettingsListForAccountTypes = exports.toggleJEPendingGroupCollapsed = exports.toggleJECreatedGroupCollapsed = exports.searchTransactionsForNewScheduleSuccess = exports.searchTransactionsForNewScheduleFailure = exports.searchTransactionsForNewSchedule = exports.saveNewScheduleSuccess = exports.saveNewScheduleFailure = exports.saveNewSchedule = exports.saveAccountSettingsSuccess = exports.saveAccountSettingsLocalData = exports.saveAccountSettingsFailure = exports.saveAccountSettings = exports.retryJeScheduleSuccess = exports.retryJeScheduleFailure = exports.retryJeSchedule = exports.resetNewScheduleLocalData = exports.removeJeScheduleTransactionKey = exports.removeJeScheduleLocalDataById = exports.removeFailedJeScheduleTransactionKey = exports.initializeNewSchedule = exports.initializeJeScheduleLocalData = exports.initializeAccountSettingsView = exports.ignoreRecommendedJeScheduleSuccess = exports.ignoreRecommendedJeScheduleFailure = exports.ignoreRecommendedJeSchedule = exports.fetchRecommendationForAccountSettings = exports.fetchJeSchedulesSuccess = exports.fetchJeSchedulesPage = exports.fetchJeSchedulesFailure = exports.fetchJeSchedules = exports.fetchAccountSettingsListForAccountTypes = exports.clearSearchTransactionsForNewSchedule = exports.clearJeScheduleLocalData = exports.clearJeAccountSettingsLocalData = exports.clearExpenseAutomationJESchedulesView = exports.initialState = exports.searchTransactionsInitialState = exports.newScheduleInitialState = exports.getBaseNewScheduleLocalData = exports.accountSettingsInitialState = void 0;
4
+ exports.updateRecommendationForAccountSettingsFailure = exports.updateRecommendationForAccountSettings = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.updateJESchedulesUIState = exports.updateAccountSettingsListForAccountTypesFailure = exports.updateAccountSettingsListForAccountTypes = exports.saveAccountSettingsSuccess = exports.saveAccountSettingsLocalData = exports.saveAccountSettingsFailure = exports.saveAccountSettings = exports.retryJeScheduleSuccess = exports.retryJeScheduleFailure = exports.retryJeSchedule = exports.removeJeScheduleTransactionKey = exports.removeJeScheduleLocalDataById = exports.removeFailedJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.initializeAccountSettingsView = exports.ignoreRecommendedJeScheduleSuccess = exports.ignoreRecommendedJeScheduleFailure = exports.ignoreRecommendedJeSchedule = exports.fetchRecommendationForAccountSettings = exports.fetchJeSchedulesSuccess = exports.fetchJeSchedulesPage = exports.fetchJeSchedulesFailure = exports.fetchJeSchedules = exports.fetchAccountSettingsListForAccountTypes = exports.clearJeScheduleLocalData = exports.clearJeAccountSettingsLocalData = exports.clearExpenseAutomationJESchedulesView = exports.initialState = exports.accountSettingsInitialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const getNestedAccountIDHierarchyForReport_1 = require("../../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
7
7
  const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
8
8
  const accountPayload_1 = require("../../../entity/account/accountPayload");
9
9
  const jeSchedulesPayload_1 = require("../../../entity/jeSchedules/jeSchedulesPayload");
10
10
  const accountTypeRecommendationPayload_1 = require("../../accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload");
11
- const jeSchedulesViewState_1 = require("../types/jeSchedulesViewState");
12
11
  exports.accountSettingsInitialState = {
13
12
  localData: {
14
13
  selectedPrepaidExpensesAccountIds: [],
@@ -40,34 +39,16 @@ exports.accountSettingsInitialState = {
40
39
  accruedExpensesNestedAccountListHierarchy: [],
41
40
  accruedExpensesRecommendations: [],
42
41
  };
43
- const getBaseNewScheduleLocalData = (scheduleType) => ({
44
- scheduleType,
45
- jeScheduleDetails: [],
46
- });
47
- exports.getBaseNewScheduleLocalData = getBaseNewScheduleLocalData;
48
- exports.newScheduleInitialState = {
49
- fixed_assets: (0, exports.getBaseNewScheduleLocalData)('fixed_assets'),
50
- prepaid_expenses: (0, exports.getBaseNewScheduleLocalData)('prepaid_expenses'),
51
- };
52
- exports.searchTransactionsInitialState = {
53
- searchResults: [],
54
- fetchState: 'Not-Started',
55
- error: undefined,
56
- };
57
42
  exports.initialState = {
58
43
  jeScheduleTransactionKeysByPeriod: {},
59
- jeScheduleAccruedKeysByPeriod: {},
60
44
  failedJeScheduleTransactionKeysByPeriod: {},
61
45
  postStatusById: {},
62
46
  ignoreStatusById: {},
63
47
  jeScheduleLocalDataById: {},
64
48
  uiState: {
65
- createdGroupCollapsed: false,
66
- pendingGroupCollapsed: false,
67
- scrollPosition: { scrollTop: 0, scrollLeft: undefined },
68
49
  searchString: '',
69
- selectedJETypeFilter: null,
70
- selectedPageTab: 'schedules',
50
+ scrollPosition: { scrollTop: 0, scrollLeft: undefined },
51
+ selectedMainTab: 'pending_review',
71
52
  sortKey: 'transactionDate',
72
53
  sortOrder: 'descending',
73
54
  totalCount: 0,
@@ -78,13 +59,6 @@ exports.initialState = {
78
59
  error: undefined,
79
60
  },
80
61
  accountSettings: exports.accountSettingsInitialState,
81
- newSchedule: {
82
- newScheduleState: exports.newScheduleInitialState,
83
- saveStatus: { fetchState: 'Not-Started', error: undefined },
84
- searchTransactions: exports.searchTransactionsInitialState,
85
- fetchState: 'Not-Started',
86
- error: undefined,
87
- },
88
62
  fetchState: 'Not-Started',
89
63
  error: undefined,
90
64
  hasValidState() {
@@ -129,10 +103,9 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
129
103
  },
130
104
  },
131
105
  fetchJeSchedulesSuccess(draft, action) {
132
- const { jeSchedules, selectedPeriod, failedJeSchedules, accruedJeSchedules, refreshViewInBackground, } = action.payload;
106
+ const { jeSchedules, selectedPeriod, failedJeSchedules, refreshViewInBackground, } = action.payload;
133
107
  const jeScheduleTransactionKeys = jeSchedules.map((schedules) => (0, jeSchedulesPayload_1.getJEScheduleTransactionDetailKeyPayload)(schedules.base_transaction));
134
108
  const failedJeScheduleTransactionKeys = failedJeSchedules.map((schedules) => (0, jeSchedulesPayload_1.getJEScheduleTransactionDetailKeyPayload)(schedules.base_transaction));
135
- const jeScheduleAccruedKeys = accruedJeSchedules.map((schedule) => (0, jeSchedulesPayload_1.getJEScheduleKey)(schedule));
136
109
  if (refreshViewInBackground === true &&
137
110
  draft.refreshStatus.fetchState === 'In-Progress') {
138
111
  draft.refreshStatus = { fetchState: 'Completed', error: undefined };
@@ -142,8 +115,6 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
142
115
  draft.error = undefined;
143
116
  }
144
117
  draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = jeScheduleTransactionKeys;
145
- draft.jeScheduleAccruedKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] =
146
- jeScheduleAccruedKeys;
147
118
  draft.failedJeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = failedJeScheduleTransactionKeys;
148
119
  },
149
120
  fetchJeSchedulesFailure(draft, action) {
@@ -154,9 +125,8 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
154
125
  else {
155
126
  draft.fetchState = 'Error';
156
127
  draft.error = status;
157
- draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = [];
158
- draft.jeScheduleAccruedKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = [];
159
128
  }
129
+ draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = [];
160
130
  },
161
131
  retryJeSchedule(draft, action) {
162
132
  const { scheduledJournalEntryID } = action.payload;
@@ -402,91 +372,6 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
402
372
  clearJeAccountSettingsLocalData(draft) {
403
373
  draft.accountSettings.localData = exports.accountSettingsInitialState.localData;
404
374
  },
405
- initializeNewSchedule: {
406
- prepare({ scheduleType, }) {
407
- return { payload: { scheduleType } };
408
- },
409
- reducer() {
410
- // Purely an epic-trigger action — the epic fans out the account/class
411
- // list fetches plus resetNewScheduleLocalData.
412
- },
413
- },
414
- resetNewScheduleLocalData: {
415
- prepare({ scheduleType, }) {
416
- return { payload: { scheduleType } };
417
- },
418
- reducer(draft, action) {
419
- const { scheduleType } = action.payload;
420
- draft.newSchedule.newScheduleState[scheduleType] =
421
- (0, exports.getBaseNewScheduleLocalData)(scheduleType);
422
- },
423
- },
424
- updateNewScheduleLocalData(draft, action) {
425
- const { scheduleType, localData } = action.payload;
426
- draft.newSchedule.newScheduleState[scheduleType] = {
427
- ...draft.newSchedule.newScheduleState[scheduleType],
428
- ...localData,
429
- };
430
- },
431
- searchTransactionsForNewSchedule: {
432
- prepare({ query, scheduleType, }) {
433
- return { payload: { query, scheduleType } };
434
- },
435
- reducer(draft, action) {
436
- const trimmed = action.payload.query.trim();
437
- // Cleared or too-short query: no API (see epic) — reset immediately.
438
- if (trimmed.length < jeSchedulesViewState_1.MIN_NEW_SCHEDULE_SEARCH_LENGTH) {
439
- draft.newSchedule.searchTransactions = exports.searchTransactionsInitialState;
440
- return;
441
- }
442
- draft.newSchedule.searchTransactions = {
443
- ...draft.newSchedule.searchTransactions,
444
- searchString: action.payload.query,
445
- fetchState: 'In-Progress',
446
- };
447
- },
448
- },
449
- searchTransactionsForNewScheduleSuccess(draft, action) {
450
- draft.newSchedule.searchTransactions = {
451
- ...draft.newSchedule.searchTransactions,
452
- searchResults: action.payload.searchResults,
453
- fetchState: 'Completed',
454
- error: undefined,
455
- };
456
- },
457
- searchTransactionsForNewScheduleFailure(draft, action) {
458
- draft.newSchedule.searchTransactions = {
459
- ...draft.newSchedule.searchTransactions,
460
- fetchState: 'Error',
461
- error: action.payload.status,
462
- };
463
- },
464
- clearSearchTransactionsForNewSchedule(draft) {
465
- draft.newSchedule.searchTransactions = exports.searchTransactionsInitialState;
466
- },
467
- saveNewSchedule: {
468
- prepare({ scheduleType, }) {
469
- return { payload: { scheduleType } };
470
- },
471
- reducer(draft) {
472
- draft.newSchedule.saveStatus = {
473
- fetchState: 'In-Progress',
474
- error: undefined,
475
- };
476
- },
477
- },
478
- saveNewScheduleSuccess(draft) {
479
- draft.newSchedule.saveStatus = {
480
- fetchState: 'Completed',
481
- error: undefined,
482
- };
483
- },
484
- saveNewScheduleFailure(draft, action) {
485
- draft.newSchedule.saveStatus = {
486
- fetchState: 'Error',
487
- error: action.payload.status,
488
- };
489
- },
490
375
  updateJESchedulesUIState(draft, action) {
491
376
  if (action.payload.sortKey != null) {
492
377
  draft.uiState.sortKey = action.payload.sortKey;
@@ -500,27 +385,16 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
500
385
  if (action.payload.scrollPosition != null) {
501
386
  draft.uiState.scrollPosition = action.payload.scrollPosition;
502
387
  }
503
- if (action.payload.selectedPageTab != null) {
504
- draft.uiState.selectedPageTab = action.payload.selectedPageTab;
388
+ if (action.payload.selectedMainTab != null) {
389
+ draft.uiState.selectedMainTab = action.payload.selectedMainTab;
505
390
  }
506
391
  },
507
- updateJEScheduleTypeFilter(draft, action) {
508
- draft.uiState.selectedJETypeFilter = action.payload;
509
- },
510
- toggleJEPendingGroupCollapsed(draft) {
511
- draft.uiState.pendingGroupCollapsed =
512
- !draft.uiState.pendingGroupCollapsed;
513
- },
514
- toggleJECreatedGroupCollapsed(draft) {
515
- draft.uiState.createdGroupCollapsed =
516
- !draft.uiState.createdGroupCollapsed;
517
- },
518
392
  clearExpenseAutomationJESchedulesView(draft) {
519
393
  Object.assign(draft, exports.initialState);
520
394
  },
521
395
  },
522
396
  });
523
- _a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.clearSearchTransactionsForNewSchedule = _a.clearSearchTransactionsForNewSchedule, exports.fetchAccountSettingsListForAccountTypes = _a.fetchAccountSettingsListForAccountTypes, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchRecommendationForAccountSettings = _a.fetchRecommendationForAccountSettings, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeAccountSettingsView = _a.initializeAccountSettingsView, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.initializeNewSchedule = _a.initializeNewSchedule, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.removeJeScheduleLocalDataById = _a.removeJeScheduleLocalDataById, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.resetNewScheduleLocalData = _a.resetNewScheduleLocalData, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.saveAccountSettings = _a.saveAccountSettings, exports.saveAccountSettingsFailure = _a.saveAccountSettingsFailure, exports.saveAccountSettingsLocalData = _a.saveAccountSettingsLocalData, exports.saveAccountSettingsSuccess = _a.saveAccountSettingsSuccess, exports.saveNewSchedule = _a.saveNewSchedule, exports.saveNewScheduleFailure = _a.saveNewScheduleFailure, exports.saveNewScheduleSuccess = _a.saveNewScheduleSuccess, exports.searchTransactionsForNewSchedule = _a.searchTransactionsForNewSchedule, exports.searchTransactionsForNewScheduleFailure = _a.searchTransactionsForNewScheduleFailure, exports.searchTransactionsForNewScheduleSuccess = _a.searchTransactionsForNewScheduleSuccess, exports.toggleJECreatedGroupCollapsed = _a.toggleJECreatedGroupCollapsed, exports.toggleJEPendingGroupCollapsed = _a.toggleJEPendingGroupCollapsed, exports.updateAccountSettingsListForAccountTypes = _a.updateAccountSettingsListForAccountTypes, exports.updateAccountSettingsListForAccountTypesFailure = _a.updateAccountSettingsListForAccountTypesFailure, exports.updateJESchedulesUIState = _a.updateJESchedulesUIState, exports.updateJEScheduleTypeFilter = _a.updateJEScheduleTypeFilter, exports.updateJeScheduleLocalDataById = _a.updateJeScheduleLocalDataById, exports.updateJeScheduleTransactionKeys = _a.updateJeScheduleTransactionKeys, exports.updateNewScheduleLocalData = _a.updateNewScheduleLocalData, exports.updateRecommendationForAccountSettings = _a.updateRecommendationForAccountSettings, exports.updateRecommendationForAccountSettingsFailure = _a.updateRecommendationForAccountSettingsFailure;
397
+ _a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.fetchAccountSettingsListForAccountTypes = _a.fetchAccountSettingsListForAccountTypes, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchRecommendationForAccountSettings = _a.fetchRecommendationForAccountSettings, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeAccountSettingsView = _a.initializeAccountSettingsView, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.removeJeScheduleLocalDataById = _a.removeJeScheduleLocalDataById, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.saveAccountSettings = _a.saveAccountSettings, exports.saveAccountSettingsFailure = _a.saveAccountSettingsFailure, exports.saveAccountSettingsLocalData = _a.saveAccountSettingsLocalData, exports.saveAccountSettingsSuccess = _a.saveAccountSettingsSuccess, exports.updateAccountSettingsListForAccountTypes = _a.updateAccountSettingsListForAccountTypes, exports.updateAccountSettingsListForAccountTypesFailure = _a.updateAccountSettingsListForAccountTypesFailure, exports.updateJESchedulesUIState = _a.updateJESchedulesUIState, exports.updateJeScheduleLocalDataById = _a.updateJeScheduleLocalDataById, exports.updateJeScheduleTransactionKeys = _a.updateJeScheduleTransactionKeys, exports.updateRecommendationForAccountSettings = _a.updateRecommendationForAccountSettings, exports.updateRecommendationForAccountSettingsFailure = _a.updateRecommendationForAccountSettingsFailure;
524
398
  exports.default = expenseAutomationJESchedulesView.reducer;
525
399
  const doUpdateRecommendationForAccountSettings = (draft, payload) => {
526
400
  const { prepaidExpensesRecommendations, fixedAssetsRecommendations, accruedExpensesRecommendations, } = (0, accountTypeRecommendationPayload_1.mapAccountTypeRecommendationPayloadToAccountRecommendationByType)(payload);
@@ -4,30 +4,12 @@ import { CompletionStatusType, FetchStateAndError, ID } from '../../../commonSta
4
4
  import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
5
5
  import { AccountBase } from '../../../entity/account/accountState';
6
6
  import { ClassBase } from '../../../entity/class/classState';
7
- import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
7
+ import { JEScheduledTransaction } from '../../../entity/jeSchedules/jeSchedulesSelector';
8
+ import { JEScheduleTransactionKey } from '../../../entity/jeSchedules/jeSchedulesTypes';
8
9
  import { UncategorizedAccounts } from '../../accountList/accountListSelector';
9
10
  import { JEAccountSettingsView } from '../selectorTypes/jeAccountSettingsViewSelectorTypes';
10
- import { NewScheduleView } from '../selectorTypes/jeNewScheduleViewSelectorTypes';
11
- import { JEScheduleRow, JEScheduledTransactionWithFailedEntries } from '../selectors/jeSchedulesViewSelector';
11
+ import { JEScheduledTransactionWithFailedEntries } from '../selectors/jeSchedulesViewSelector';
12
12
  import { JEScheduleLocalData, JESchedulesViewUIState } from '../types/jeSchedulesViewState';
13
- export interface JEKpiSummary {
14
- aiAccountant: {
15
- amount: number;
16
- count: number;
17
- };
18
- manual: {
19
- amount: number;
20
- count: number;
21
- };
22
- needsReview: {
23
- amount: number;
24
- count: number;
25
- };
26
- total: {
27
- amount: number;
28
- count: number;
29
- };
30
- }
31
13
  export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
32
14
  accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
33
15
  accountSettingsView: JEAccountSettingsView;
@@ -36,19 +18,13 @@ export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
36
18
  allDepreciationAccountList: AccountBase[];
37
19
  allDepreciationAccountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
38
20
  classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
21
+ completedSchedules: JEScheduledTransaction[];
39
22
  completionStatus: CompletionStatusType;
40
- createdSchedules: JEScheduleRow[];
41
- createdTotal: number;
23
+ draftSchedules: JEScheduledTransaction[];
42
24
  ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
43
25
  jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
44
- jeScheduleTypeCounts: {
45
- active: Record<ScheduleTypes, number>;
46
- ongoing: Record<ScheduleTypes, number>;
47
- };
48
- kpiSummary: JEKpiSummary;
49
- newScheduleView: NewScheduleView | undefined;
50
- pendingReviewSchedules: JEScheduleRow[];
51
- pendingReviewTotal: number;
26
+ ongoingSchedules: JEScheduledTransaction[];
27
+ pendingReviewSchedules: (JEScheduledTransaction | JEScheduledTransactionWithFailedEntries)[];
52
28
  postStatusById: Record<ID, FetchStateAndError>;
53
29
  refreshStatus: FetchStateAndError;
54
30
  resolveSchedules: JEScheduledTransactionWithFailedEntries[];
@@ -1,10 +1,7 @@
1
- import { JEAccruedSchedule, JEScheduledTransaction, ScheduledJournalEntry } from '../../../entity/jeSchedules/jeSchedulesSelector';
1
+ import { JEScheduledTransaction, ScheduledJournalEntry } from '../../../entity/jeSchedules/jeSchedulesSelector';
2
2
  import { RootState } from '../../../reducer';
3
3
  import { ExpenseAutomationJESchedulesViewSelector } from '../selectorTypes/jeSchedulesSelectorTypes';
4
- export declare const isAiAccountantSchedule: (schedule: JEScheduleRow) => boolean;
5
- export declare function isAccruedScheduleRow(schedule: JEScheduleRow): schedule is JEAccruedSchedule;
6
4
  export declare function getExpenseAutomationJESchedulesView(state: RootState): ExpenseAutomationJESchedulesViewSelector;
7
5
  export interface JEScheduledTransactionWithFailedEntries extends Omit<JEScheduledTransaction, 'scheduledJournalEntry'> {
8
6
  scheduledJournalEntry: ScheduledJournalEntry;
9
7
  }
10
- export type JEScheduleRow = JEAccruedSchedule | JEScheduledTransaction | JEScheduledTransactionWithFailedEntries;