@zeniai/client-epic-state 4.19.88-betaJK1 → 4.19.88-betaSS1

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 (58) hide show
  1. package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
  2. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -1
  3. package/lib/entity/jeSchedules/jeSchedulesPayload.js +10 -5
  4. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
  5. package/lib/entity/jeSchedules/jeSchedulesReducer.js +2 -2
  6. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -2
  7. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +7 -3
  8. package/lib/entity/jeSchedules/jeSchedulesTypes.js +3 -1
  9. package/lib/entity/transaction/transactionReducer.js +3 -2
  10. package/lib/entity/transaction/transactionSelector.d.ts +2 -2
  11. package/lib/entity/transaction/transactionState.d.ts +3 -2
  12. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +10 -5
  13. package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +3 -3
  14. package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +1 -0
  15. package/lib/esm/entity/transaction/transactionReducer.js +3 -2
  16. package/lib/esm/index.js +2 -2
  17. package/lib/esm/reducer.js +0 -6
  18. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +4 -12
  19. package/lib/esm/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +2 -7
  20. package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +2 -7
  21. package/lib/esm/view/taskManager/taskListView/taskListSelector.js +1 -3
  22. package/lib/esm/view/userListView/fetchUserListByTypeEpic.js +0 -11
  23. package/lib/index.d.ts +2 -2
  24. package/lib/index.js +7 -6
  25. package/lib/reducer.d.ts +0 -6
  26. package/lib/reducer.js +0 -6
  27. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +11 -11
  28. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +3 -11
  29. package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +2 -7
  30. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +4 -4
  31. package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +1 -6
  32. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  33. package/lib/view/taskManager/taskListView/taskListSelector.js +1 -3
  34. package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +1 -3
  35. package/lib/view/userListView/fetchUserListByTypeEpic.js +0 -11
  36. package/lib/view/userListView/userListViewPayload.d.ts +0 -2
  37. package/package.json +1 -1
  38. package/lib/entity/userGroups/userGroupsPayload.d.ts +0 -7
  39. package/lib/entity/userGroups/userGroupsPayload.js +0 -10
  40. package/lib/entity/userGroups/userGroupsReducer.d.ts +0 -8
  41. package/lib/entity/userGroups/userGroupsReducer.js +0 -29
  42. package/lib/entity/userGroups/userGroupsSelector.d.ts +0 -4
  43. package/lib/entity/userGroups/userGroupsSelector.js +0 -12
  44. package/lib/entity/userGroups/userGroupsState.d.ts +0 -9
  45. package/lib/entity/userGroups/userGroupsState.js +0 -2
  46. package/lib/esm/entity/userGroups/userGroupsPayload.js +0 -7
  47. package/lib/esm/entity/userGroups/userGroupsReducer.js +0 -25
  48. package/lib/esm/entity/userGroups/userGroupsSelector.js +0 -8
  49. package/lib/esm/entity/userGroups/userGroupsState.js +0 -1
  50. package/lib/esm/view/userGroupListView/userGroupListViewReducer.js +0 -69
  51. package/lib/esm/view/userGroupListView/userGroupListViewSelector.js +0 -16
  52. package/lib/esm/view/userGroupListView/userGroupListViewState.js +0 -1
  53. package/lib/view/userGroupListView/userGroupListViewReducer.d.ts +0 -23
  54. package/lib/view/userGroupListView/userGroupListViewReducer.js +0 -73
  55. package/lib/view/userGroupListView/userGroupListViewSelector.d.ts +0 -7
  56. package/lib/view/userGroupListView/userGroupListViewSelector.js +0 -20
  57. package/lib/view/userGroupListView/userGroupListViewState.d.ts +0 -8
  58. package/lib/view/userGroupListView/userGroupListViewState.js +0 -2
@@ -36,6 +36,6 @@ export interface ChargeCardTransactionState {
36
36
  }
37
37
  export declare const toCardTransactionTypeCode: (v: string) => "expense" | "credit_card_credit" | "transfer" | "purchase";
38
38
  export type ChargeCardTransactionTypeCode = ReturnType<typeof toCardTransactionTypeCode>;
39
- export declare const toCardTransactionStatusCode: (v: string) => "paid" | "authorized" | "canceled" | "declined";
39
+ export declare const toCardTransactionStatusCode: (v: string) => "paid" | "canceled" | "authorized" | "declined";
40
40
  export type ChargeCardTransactionStatusCode = ReturnType<typeof toCardTransactionStatusCode>;
41
41
  export {};
@@ -71,7 +71,7 @@ export declare function toScheduledJournalEntryState(payload: ScheduledJournalEn
71
71
  export declare function toJEAccountPayload(payload: JEScheduledTransactionPayload | JEAccruedScheduledTransactionPayload, type: TransactionCategory): AccountPayload | undefined;
72
72
  export declare function toJEAccruedAccountPayload(payload: JEScheduledTransactionPayload | JEAccruedScheduledTransactionPayload, type: TransactionCategory): AccountPayload | undefined;
73
73
  export declare function toJEClassPayload(payload: JEScheduledTransactionPayload | JEAccruedScheduledTransactionPayload, type: TransactionCategory): ClassBasePayload | undefined;
74
- export declare function getTransactionDetailKeyPayload(payload: ScheduleTransactionPayload): JEScheduleTransactionKey;
74
+ export declare function getJEScheduleTransactionDetailKeyPayload(payload: ScheduleTransactionPayload): JEScheduleTransactionKey;
75
75
  export declare function getJEScheduleKey(payload: JEAccruedScheduledTransactionPayload): JEScheduleKey;
76
76
  export declare function toJEScheduledTransaction(payload: JEScheduledTransactionPayload): JEScheduledTransactionState;
77
77
  export declare function toJEAccruedScheduledTransaction(payload: JEAccruedScheduledTransactionPayload): JEAccruedScheduledTransactionState;
@@ -4,13 +4,12 @@ exports.toScheduledJournalEntryState = toScheduledJournalEntryState;
4
4
  exports.toJEAccountPayload = toJEAccountPayload;
5
5
  exports.toJEAccruedAccountPayload = toJEAccruedAccountPayload;
6
6
  exports.toJEClassPayload = toJEClassPayload;
7
- exports.getTransactionDetailKeyPayload = getTransactionDetailKeyPayload;
7
+ exports.getJEScheduleTransactionDetailKeyPayload = getJEScheduleTransactionDetailKeyPayload;
8
8
  exports.getJEScheduleKey = getJEScheduleKey;
9
9
  exports.toJEScheduledTransaction = toJEScheduledTransaction;
10
10
  exports.toJEAccruedScheduledTransaction = toJEAccruedScheduledTransaction;
11
11
  const amount_1 = require("../../commonStateTypes/amount");
12
12
  const timePeriod_1 = require("../../commonStateTypes/timePeriod");
13
- const transactionDetailState_1 = require("../../view/transactionDetail/transactionDetailState");
14
13
  const zeniDayJS_1 = require("../../zeniDayJS");
15
14
  const transactionIDPayload_1 = require("../transaction/payloadTypes/transactionIDPayload");
16
15
  const jeScheduleHelper_1 = require("./jeScheduleHelper");
@@ -132,9 +131,12 @@ function toJEClassPayload(payload, type) {
132
131
  : undefined;
133
132
  }
134
133
  }
135
- function getTransactionDetailKeyPayload(payload) {
134
+ function getJEScheduleTransactionDetailKeyPayload(payload) {
136
135
  const transactionId = (0, transactionIDPayload_1.toTransactionID)(payload);
137
- return (0, transactionDetailState_1.getZeniTransactionDetailKey)(transactionId);
136
+ return (0, jeSchedulesTypes_1.getJEScheduleTransactionKey)({
137
+ ...transactionId,
138
+ lineId: payload.line_id,
139
+ });
138
140
  }
139
141
  function getJEScheduleKey(payload) {
140
142
  return (0, jeScheduleHelper_1.generateJEScheduleKey)(payload);
@@ -155,7 +157,10 @@ function toJEScheduledTransaction(payload) {
155
157
  label: payload.status.label,
156
158
  },
157
159
  vendorId: payload.vendor.vendor_id,
158
- baseTransaction: getTransactionDetailKeyPayload(payload.base_transaction),
160
+ baseTransaction: (0, jeSchedulesTypes_1.getJEScheduleTransactionKey)({
161
+ ...(0, transactionIDPayload_1.toTransactionID)(payload.base_transaction),
162
+ lineId: payload.base_transaction.line_id,
163
+ }),
159
164
  startDate: payload.start_date != null ? (0, zeniDayJS_1.date)(payload.start_date) : undefined,
160
165
  endDate: payload.end_date != null ? (0, zeniDayJS_1.date)(payload.end_date) : undefined,
161
166
  period: payload.period != null ? Number(payload.period) : undefined,
@@ -18,8 +18,8 @@ export declare const updateJESchedules: import("@reduxjs/toolkit").ActionCreator
18
18
  jeSchedulesPayload: JEAccruedScheduledTransactionPayload[];
19
19
  scheduledJEntriesPayload: ScheduledJournalEntryPayload[] | undefined;
20
20
  updateType: UpdateType;
21
- }, "jeSchedules/updateAccruedJESchedulesDetails", never, never>, deleteJESchedulesDetails: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`], {
22
- jeScheduleTransactionKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
21
+ }, "jeSchedules/updateAccruedJESchedulesDetails", never, never>, deleteJESchedulesDetails: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[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}`], {
22
+ 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}`;
23
23
  }, "jeSchedules/deleteJESchedulesDetails", never, never>, deleteAccruedJESchedulesDetails: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[JEScheduleKey: `${string}_${string}`], {
24
24
  JEScheduleKey: `${string}_${string}`;
25
25
  }, "jeSchedules/deleteAccruedJESchedulesDetails", never, never>, clearAllAccruedJESchedules: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"jeSchedules/clearAllAccruedJESchedules">, clearAllJEScheduleTransactions: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"jeSchedules/clearAllJEScheduleTransactions">;
@@ -42,7 +42,7 @@ const jeSchedules = (0, toolkit_1.createSlice)({
42
42
  },
43
43
  updateJEScheduledTransaction: (draft, action) => {
44
44
  action.payload.jeSchedulesTransactionsPayload.forEach((schedule) => {
45
- doUpdateJEScheduledTransaction(draft.schedulesByTransactionKey, (0, jeSchedulesPayload_1.getTransactionDetailKeyPayload)(schedule.base_transaction), schedule, 'merge');
45
+ doUpdateJEScheduledTransaction(draft.schedulesByTransactionKey, (0, jeSchedulesPayload_1.getJEScheduleTransactionDetailKeyPayload)(schedule.base_transaction), schedule, 'merge');
46
46
  });
47
47
  },
48
48
  updateAccruedJEScheduledTransaction: (draft, action) => {
@@ -84,7 +84,7 @@ const jeSchedules = (0, toolkit_1.createSlice)({
84
84
  if (jeSchedulesPayload.length > 0) {
85
85
  jeSchedulesPayload.forEach((jeSchedulePayload) => {
86
86
  const transactionKey = jeSchedulePayload.base_transaction;
87
- doUpdateScheduledDetailTransaction(draft.schedulesByTransactionKey, (0, jeSchedulesPayload_1.getTransactionDetailKeyPayload)(transactionKey), jeSchedulePayload, action.payload.scheduledJEntriesPayload ?? [], updateType);
87
+ doUpdateScheduledDetailTransaction(draft.schedulesByTransactionKey, (0, jeSchedulesPayload_1.getJEScheduleTransactionDetailKeyPayload)(transactionKey), jeSchedulePayload, action.payload.scheduledJEntriesPayload ?? [], updateType);
88
88
  });
89
89
  }
90
90
  },
@@ -1,7 +1,6 @@
1
1
  import { Amount } from '../../commonStateTypes/amount';
2
2
  import { ID } from '../../commonStateTypes/common';
3
3
  import { ScheduleDaysOfMonth } from '../../commonStateTypes/timePeriod';
4
- import { TransactionDetailKey } from '../../view/transactionDetail/transactionDetailState';
5
4
  import { ZeniDate } from '../../zeniDayJS';
6
5
  import { TransactionID } from '../transaction/stateTypes/transaction';
7
6
  import { JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTypes } from './jeSchedulesTypes';
@@ -42,7 +41,7 @@ export interface ScheduledJournalEntryState {
42
41
  updateTime?: ZeniDate;
43
42
  }
44
43
  export interface JEScheduledTransactionState {
45
- baseTransaction: TransactionDetailKey;
44
+ baseTransaction: JEScheduleTransactionKey;
46
45
  currencyCode: string;
47
46
  currencySymbol: string;
48
47
  jeCredit: {
@@ -1,12 +1,16 @@
1
- import { getZeniTransactionDetailKey } from '../../view/transactionDetail/transactionDetailState';
1
+ import { TransactionID } from '../transaction/stateTypes/transaction';
2
2
  import { generateJEScheduleKey } from './jeScheduleHelper';
3
- export type JEScheduleTransactionKey = ReturnType<typeof getZeniTransactionDetailKey>;
3
+ export interface ScheduleTransactionID extends TransactionID {
4
+ lineId: string;
5
+ }
6
+ export declare const getJEScheduleTransactionKey: (scheduleTransactionId: ScheduleTransactionID) => `${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}`;
7
+ export type JEScheduleTransactionKey = ReturnType<typeof getJEScheduleTransactionKey>;
4
8
  export type JEScheduleKey = ReturnType<typeof generateJEScheduleKey>;
5
9
  export declare const ALL_SCHEDULES_TYPES: readonly ["prepaid_expenses", "fixed_assets", "accrued_expenses", "deferred_revenue"];
6
10
  export declare const toScheduleTypesType: (v: string) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
7
11
  export type ScheduleTypes = ReturnType<typeof toScheduleTypesType>;
8
12
  export declare const toScheduleTypesTypeStrict: (v?: string) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue" | undefined;
9
- export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "pending" | "posted" | "canceled" | "unknown" | "recorded";
13
+ export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "pending" | "posted" | "unknown" | "canceled" | "recorded";
10
14
  export type ScheduleJournalEntryStatusCodeType = ReturnType<typeof toScheduleJournalEntryStatusCodeType>;
11
15
  export declare const toScheduleStatusCodeType: (v: string) => "draft" | "completed" | "new" | "ongoing" | "marked_as_completed";
12
16
  export type ScheduleStatusCodeType = ReturnType<typeof toScheduleStatusCodeType>;
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toJournalEntryErrorCodeType = exports.toScheduleStatusCodeType = exports.toScheduleJournalEntryStatusCodeType = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.ALL_SCHEDULES_TYPES = void 0;
3
+ exports.toJournalEntryErrorCodeType = exports.toScheduleStatusCodeType = exports.toScheduleJournalEntryStatusCodeType = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.ALL_SCHEDULES_TYPES = exports.getJEScheduleTransactionKey = void 0;
4
4
  const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
5
+ const getJEScheduleTransactionKey = (scheduleTransactionId) => `${scheduleTransactionId.id}_${scheduleTransactionId.type}_${scheduleTransactionId.lineId}`;
6
+ exports.getJEScheduleTransactionKey = getJEScheduleTransactionKey;
5
7
  exports.ALL_SCHEDULES_TYPES = [
6
8
  'prepaid_expenses',
7
9
  'fixed_assets',
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.clearAllTransactions = exports.updateTransactionIsMiscategorized = exports.removeTransactionAttachment = exports.removeTransactionCategorization = exports.removeTransaction = exports.updateMultipleReconcileTransactions = exports.updateReconcileTransactions = exports.updateScheduleTransactions = exports.updateTransaction = exports.updateTransactions = exports.initialState = void 0;
8
8
  const toolkit_1 = require("@reduxjs/toolkit");
9
9
  const assignWith_1 = __importDefault(require("lodash/assignWith"));
10
- const transactionDetailState_1 = require("../../view/transactionDetail/transactionDetailState");
10
+ const jeSchedulesTypes_1 = require("../jeSchedules/jeSchedulesTypes");
11
11
  const reconciliationTransactionPayloads_1 = require("./payloadTypes/reconciliationTransactionPayloads");
12
12
  const scheduleTransactionPayload_1 = require("./payloadTypes/scheduleTransactionPayload");
13
13
  const transactionType_1 = require("./stateTypes/transactionType");
@@ -75,9 +75,10 @@ const transaction = (0, toolkit_1.createSlice)({
75
75
  updateScheduleTransactions: {
76
76
  reducer(draft, action) {
77
77
  action.payload.transactionsPayload.forEach((value) => {
78
- const id = (0, transactionDetailState_1.getZeniTransactionDetailKey)({
78
+ const id = (0, jeSchedulesTypes_1.getJEScheduleTransactionKey)({
79
79
  id: value.transaction_id,
80
80
  type: (0, transactionType_1.toTransactionType)(value.transaction_type),
81
+ lineId: value.line_id,
81
82
  });
82
83
  doUpdateScheduleTransaction(draft.scheduleTransactionById, id, value, action.payload.currencyCode, action.payload.currencySymbol, action.meta.updateType);
83
84
  });
@@ -1,9 +1,9 @@
1
1
  import { ID } from '../../commonStateTypes/common';
2
- import { TransactionDetailKey } from '../../view/transactionDetail/transactionDetailState';
2
+ import { JEScheduleTransactionKey } from '../jeSchedules/jeSchedulesTypes';
3
3
  import { MatchedTransaction } from './stateTypes/reconciliationTransaction';
4
4
  import { ScheduleTransaction } from './stateTypes/scheduleTransaction';
5
5
  import { SupportedTransaction, TransactionState } from './transactionState';
6
- export declare function getScheduleTransactionById(transactionState: TransactionState, transactionId: TransactionDetailKey): ScheduleTransaction | undefined;
6
+ export declare function getScheduleTransactionById(transactionState: TransactionState, transactionId: JEScheduleTransactionKey): ScheduleTransaction | undefined;
7
7
  export declare function getSupportedTransactionById(transactionState: TransactionState, transactionId: ID): SupportedTransaction | undefined;
8
8
  export declare function getSupportedTransactionsByIds(transactionState: TransactionState, transactionIds: ID[]): SupportedTransaction[];
9
9
  export declare function getMatchedTransactionById(transactionState: TransactionState, transactionId: ID): MatchedTransaction | undefined;
@@ -1,5 +1,6 @@
1
1
  import { ID } from '../../commonStateTypes/common';
2
- import { TransactionDetailKey, ZeniTransactionDetailKey } from '../../view/transactionDetail/transactionDetailState';
2
+ import { TransactionDetailKey } from '../../view/transactionDetail/transactionDetailState';
3
+ import { JEScheduleTransactionKey } from '../jeSchedules/jeSchedulesTypes';
3
4
  import { CustomerTransactionPayload } from './payloadTypes/customerTransactionPayload';
4
5
  import { TransactionPayload } from './payloadTypes/transactionPayload';
5
6
  import { VendorTransactionPayload, VendorTransactionWithCustomerPayload } from './payloadTypes/vendorTransactionPayload';
@@ -14,6 +15,6 @@ export type SupportedTransactionPayload = TransactionPayload | CustomerTransacti
14
15
  export type AllSupportedTransactions = SupportedTransaction | undefined;
15
16
  export interface TransactionState {
16
17
  reconcileTransactionById: Record<ID, MatchedTransaction>;
17
- scheduleTransactionById: Record<ZeniTransactionDetailKey, ScheduleTransaction>;
18
+ scheduleTransactionById: Record<JEScheduleTransactionKey, ScheduleTransaction>;
18
19
  transactionById: Record<ID | TransactionDetailKey, SupportedTransaction | undefined>;
19
20
  }
@@ -1,10 +1,9 @@
1
1
  import { toAmount } from '../../commonStateTypes/amount';
2
2
  import { LAST_SCHEDULE_DAY_OF_MONTH, MAX_SCHEDULE_DAY_OF_MONTH, MIN_SCHEDULE_DAY_OF_MONTH, toScheduleDaysOfMonth, } from '../../commonStateTypes/timePeriod';
3
- import { getZeniTransactionDetailKey } from '../../view/transactionDetail/transactionDetailState';
4
3
  import { date } from '../../zeniDayJS';
5
4
  import { toTransactionID, } from '../transaction/payloadTypes/transactionIDPayload';
6
5
  import { generateJEScheduleKey } from './jeScheduleHelper';
7
- import { toJournalEntryErrorCodeType, toScheduleJournalEntryStatusCodeType, toScheduleStatusCodeType, toScheduleTypesTypeStrict, } from './jeSchedulesTypes';
6
+ import { getJEScheduleTransactionKey, toJournalEntryErrorCodeType, toScheduleJournalEntryStatusCodeType, toScheduleStatusCodeType, toScheduleTypesTypeStrict, } from './jeSchedulesTypes';
8
7
  export function toScheduledJournalEntryState(payload, currency_code, currency_symbol) {
9
8
  return {
10
9
  status: {
@@ -122,9 +121,12 @@ export function toJEClassPayload(payload, type) {
122
121
  : undefined;
123
122
  }
124
123
  }
125
- export function getTransactionDetailKeyPayload(payload) {
124
+ export function getJEScheduleTransactionDetailKeyPayload(payload) {
126
125
  const transactionId = toTransactionID(payload);
127
- return getZeniTransactionDetailKey(transactionId);
126
+ return getJEScheduleTransactionKey({
127
+ ...transactionId,
128
+ lineId: payload.line_id,
129
+ });
128
130
  }
129
131
  export function getJEScheduleKey(payload) {
130
132
  return generateJEScheduleKey(payload);
@@ -145,7 +147,10 @@ export function toJEScheduledTransaction(payload) {
145
147
  label: payload.status.label,
146
148
  },
147
149
  vendorId: payload.vendor.vendor_id,
148
- baseTransaction: getTransactionDetailKeyPayload(payload.base_transaction),
150
+ baseTransaction: getJEScheduleTransactionKey({
151
+ ...toTransactionID(payload.base_transaction),
152
+ lineId: payload.base_transaction.line_id,
153
+ }),
149
154
  startDate: payload.start_date != null ? date(payload.start_date) : undefined,
150
155
  endDate: payload.end_date != null ? date(payload.end_date) : undefined,
151
156
  period: payload.period != null ? Number(payload.period) : undefined,
@@ -1,6 +1,6 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
2
  import assignWith from 'lodash/assignWith';
3
- import { getJEScheduleKey, getTransactionDetailKeyPayload, toJEAccruedScheduledTransaction, toJEScheduledTransaction, toScheduledJournalEntryState, } from './jeSchedulesPayload';
3
+ import { getJEScheduleKey, getJEScheduleTransactionDetailKeyPayload, toJEAccruedScheduledTransaction, toJEScheduledTransaction, toScheduledJournalEntryState, } from './jeSchedulesPayload';
4
4
  export const initialState = {
5
5
  schedulesByTransactionKey: {},
6
6
  schedulesByAccruedJEScheduleKey: {},
@@ -35,7 +35,7 @@ const jeSchedules = createSlice({
35
35
  },
36
36
  updateJEScheduledTransaction: (draft, action) => {
37
37
  action.payload.jeSchedulesTransactionsPayload.forEach((schedule) => {
38
- doUpdateJEScheduledTransaction(draft.schedulesByTransactionKey, getTransactionDetailKeyPayload(schedule.base_transaction), schedule, 'merge');
38
+ doUpdateJEScheduledTransaction(draft.schedulesByTransactionKey, getJEScheduleTransactionDetailKeyPayload(schedule.base_transaction), schedule, 'merge');
39
39
  });
40
40
  },
41
41
  updateAccruedJEScheduledTransaction: (draft, action) => {
@@ -77,7 +77,7 @@ const jeSchedules = createSlice({
77
77
  if (jeSchedulesPayload.length > 0) {
78
78
  jeSchedulesPayload.forEach((jeSchedulePayload) => {
79
79
  const transactionKey = jeSchedulePayload.base_transaction;
80
- doUpdateScheduledDetailTransaction(draft.schedulesByTransactionKey, getTransactionDetailKeyPayload(transactionKey), jeSchedulePayload, action.payload.scheduledJEntriesPayload ?? [], updateType);
80
+ doUpdateScheduledDetailTransaction(draft.schedulesByTransactionKey, getJEScheduleTransactionDetailKeyPayload(transactionKey), jeSchedulePayload, action.payload.scheduledJEntriesPayload ?? [], updateType);
81
81
  });
82
82
  }
83
83
  },
@@ -1,4 +1,5 @@
1
1
  import { stringToUnion, stringToUnionStrict, } from '../../commonStateTypes/stringToUnion';
2
+ export const getJEScheduleTransactionKey = (scheduleTransactionId) => `${scheduleTransactionId.id}_${scheduleTransactionId.type}_${scheduleTransactionId.lineId}`;
2
3
  export const ALL_SCHEDULES_TYPES = [
3
4
  'prepaid_expenses',
4
5
  'fixed_assets',
@@ -1,6 +1,6 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
2
  import assignWith from 'lodash/assignWith';
3
- import { getZeniTransactionDetailKey, } from '../../view/transactionDetail/transactionDetailState';
3
+ import { getJEScheduleTransactionKey, } from '../jeSchedules/jeSchedulesTypes';
4
4
  import { toMatchedTransaction, } from './payloadTypes/reconciliationTransactionPayloads';
5
5
  import { toScheduleTransaction, } from './payloadTypes/scheduleTransactionPayload';
6
6
  import { toTransactionType } from './stateTypes/transactionType';
@@ -68,9 +68,10 @@ const transaction = createSlice({
68
68
  updateScheduleTransactions: {
69
69
  reducer(draft, action) {
70
70
  action.payload.transactionsPayload.forEach((value) => {
71
- const id = getZeniTransactionDetailKey({
71
+ const id = getJEScheduleTransactionKey({
72
72
  id: value.transaction_id,
73
73
  type: toTransactionType(value.transaction_type),
74
+ lineId: value.line_id,
74
75
  });
75
76
  doUpdateScheduleTransaction(draft.scheduleTransactionById, id, value, action.payload.currencyCode, action.payload.currencySymbol, action.meta.updateType);
76
77
  });
package/lib/esm/index.js CHANGED
@@ -50,7 +50,7 @@ import { getForecast } from './entity/forecast/forecastSelector';
50
50
  import { toEntityType, } from './entity/genericEntity/entity';
51
51
  import { clearAllEntities, updateEntities, } from './entity/genericEntity/entityReducer';
52
52
  import { getEntityByEntityIDs } from './entity/genericEntity/entitySelector';
53
- import { ALL_SCHEDULES_TYPES, toScheduleTypesType, toScheduleTypesTypeStrict, } from './entity/jeSchedules/jeSchedulesTypes';
53
+ import { ALL_SCHEDULES_TYPES, getJEScheduleTransactionKey, toScheduleTypesType, toScheduleTypesTypeStrict, } from './entity/jeSchedules/jeSchedulesTypes';
54
54
  import { ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, } from './entity/monthEndCloseChecks/monthEndCloseChecksState';
55
55
  import { updateCommentsNotifications, updateCommentsNotificationsStatuses, } from './entity/notification/notificationReducer';
56
56
  import { toNotificationModeStrict, } from './entity/notification/types/notificationTypes';
@@ -578,7 +578,7 @@ export { fetchApAging, getApAgingReport, updateApAgingUIState, };
578
578
  export { fetchApAgingDetail, getApAgingDetailForVendor, updateApAgingDetailUIState, };
579
579
  export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryExpenseAutomationJESchedule, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
580
580
  export { createNewSchedulesAccrued, deleteScheduleAccruedDetail, cancelScheduleAccruedJournalEntry, fetchScheduleAccruedDetails, fetchScheduleAccruedDetailsPage, resetJEAccruedLinkInLocalData, saveScheduleAccruedDetails, updateAmountsInScheduleAccruedDetail, updatedJEAccruedLinkWithRecommendedLocalData, updatedJELinkInLocalDataAccruedExpenses, fetchRecommendedTransactionRowIndex, clearSelectedJELinkRowIndex, updateLinkBillExpenseLocalData, updateScheduleAccruedDetailsLocalData, updateSelectedJEAccruedScheduleKey, resetSelectedJEAccruedScheduleKey, resetAccruedDetailNewScheduleState, };
581
- export { ALL_SCHEDULES_TYPES, getScheduleListReport, getAccruedScheduleListReport, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, toScheduleSubTabType, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, updatedSelectedJELinkRowIndex, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, resetJELinkInLocalData, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, getVendorTabView, };
581
+ export { getJEScheduleTransactionKey, ALL_SCHEDULES_TYPES, getScheduleListReport, getAccruedScheduleListReport, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, toScheduleSubTabType, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, updatedSelectedJELinkRowIndex, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, resetJELinkInLocalData, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, getVendorTabView, };
582
582
  export { toVendorFirstReviewViewColumnKeyType, getGlobalMerchantAutoCompleteResults, getVendorFirstReviewView, getVendorFirstReviewAttachmentView, fetchVendorFirstReviewView, fetchVendorFirstReviewAttachments, updateVendorFirstReviewViewScrollYOffset, resetVendorFirstReviewLocalData, updateVendorFirstReviewViewPageToken, clearRecentlySavedErroredVendorData, saveVendorFirstReviewView, updateVendorFirstReviewViewLocalData, updateVendorFirstReviewSortUiState, fetchGlobalMerchantAutoCompleteView, clearGlobalMerchantAutoCompleteResults, updateReviewVendorDetailLocalData, saveVendorDetailsView, getVendorDetailSelectorView, };
583
583
  export { fetchGlobalMerchantRecommendation, createGlobalMerchant, updateCreateGlobalMerchantLocalData, clearGlobalMerchantView, getGlobalMerchantView, };
584
584
  export { approveVendorGlobalReview, rejectVendorGlobalReview, fetchVendorGlobalReviewView, updateSelectedGlobalMerchant, updateVendorGlobalReviewViewUIState, getVendorGlobalReviewView, getTenantMerchantByMerchantId, toVendorGlobalReviewColumnSortKeyType, updateVendorGlobalReviewViewLocalData, };
@@ -58,7 +58,6 @@ import toastNotification, { initialState as initialToastNotificationState, } fro
58
58
  import transaction, { initialState as initialTransactionState, } from './entity/transaction/transactionReducer';
59
59
  import transactionActivityLog, { initialState as initialTransactionActivityLogState, } from './entity/transactionActivityLog/transactionActivityLogReducer';
60
60
  import user, { initialState as initialUserState, } from './entity/user/userReducer';
61
- import userGroups, { initialState as initialUserGroupsState, } from './entity/userGroups/userGroupsReducer';
62
61
  import userRole, { initialState as initialUserRoleState, } from './entity/userRole/userRoleReducer';
63
62
  import vendor, { initialState as initialVendorState, } from './entity/vendor/vendorReducer';
64
63
  import vendorExpense, { initialState as initialVendorExpenseState, } from './entity/vendorExpense/vendorExpenseReducer';
@@ -199,7 +198,6 @@ import trend, { initialTrendState } from './view/trend/trendReducer';
199
198
  import trendWithTransactions, { initialTrendWithTransactionsState, } from './view/trendWithTransactions/trendWithTransactionsReducer';
200
199
  import twoFactorAuthentication, { initialState as initialTwoFactorAuthenticationState, } from './view/twoFactorAuthentication/twoFactorAuthenticationReducer';
201
200
  import userFinancialAccountState, { initialState as initialUserFinancialAccountState, } from './view/userFinancialAccount/userFinancialAccountReducer';
202
- import userGroupListView, { initialState as initialUserGroupListViewState, } from './view/userGroupListView/userGroupListViewReducer';
203
201
  import userListView, { initialState as initialUserListViewState, } from './view/userListView/userListViewReducer';
204
202
  import userRoleConfig, { initialState as initialUserRoleConfigState, } from './view/userRoleConfigView/userRoleConfigReducer';
205
203
  import vendor1099TypeList, { initialState as initialVendor1099TypeListState, } from './view/vendor1099TypeList/vendor1099TypeListReducer';
@@ -272,7 +270,6 @@ const initialEntitiesState = {
272
270
  toastNotificationState: initialToastNotificationState,
273
271
  transactionActivityLogState: initialTransactionActivityLogState,
274
272
  transactionState: initialTransactionState,
275
- userGroupsState: initialUserGroupsState,
276
273
  userRoleState: initialUserRoleState,
277
274
  userState: initialUserState,
278
275
  vendorExpenseState: initialVendorExpenseState,
@@ -411,7 +408,6 @@ const initialViewsState = {
411
408
  trendWithTransactionsState: initialTrendWithTransactionsState,
412
409
  twoFactorAuthenticationState: initialTwoFactorAuthenticationState,
413
410
  userFinancialAccountState: initialUserFinancialAccountState,
414
- userGroupListViewState: initialUserGroupListViewState,
415
411
  userListViewState: initialUserListViewState,
416
412
  userRoleConfigState: initialUserRoleConfigState,
417
413
  vendorFirstReviewViewState: initialVendorFirstReviewViewState,
@@ -496,7 +492,6 @@ const entityReducers = {
496
492
  toastNotificationState: toastNotification,
497
493
  transactionActivityLogState: transactionActivityLog,
498
494
  transactionState: transaction,
499
- userGroupsState: userGroups,
500
495
  userRoleState: userRole,
501
496
  userState: user,
502
497
  vendorExpenseState: vendorExpense,
@@ -635,7 +630,6 @@ const viewReducers = {
635
630
  trendWithTransactionsState: trendWithTransactions,
636
631
  twoFactorAuthenticationState: twoFactorAuthentication,
637
632
  userFinancialAccountState: userFinancialAccountState,
638
- userGroupListViewState: userGroupListView,
639
633
  userListViewState: userListView,
640
634
  userRoleConfigState: userRoleConfig,
641
635
  vendorFirstReviewViewState: vendorFirstReviewView,
@@ -2,10 +2,8 @@ import { createSlice } from '@reduxjs/toolkit';
2
2
  import { geNestedAccountIDHierarchyForReport } from '../../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport';
3
3
  import { toMonthYearPeriodId, } from '../../../commonStateTypes/timePeriod';
4
4
  import { mapAccountBasePayloadToAccountBase, mapAccountMetadataPayloadToAccountMetadata, } from '../../../entity/account/accountPayload';
5
- import { getTransactionDetailKeyPayload, } from '../../../entity/jeSchedules/jeSchedulesPayload';
6
- import { toTransactionID } from '../../../entity/transaction/payloadTypes/transactionIDPayload';
5
+ import { getJEScheduleTransactionDetailKeyPayload, } from '../../../entity/jeSchedules/jeSchedulesPayload';
7
6
  import { mapAccountTypeRecommendationPayloadToAccountRecommendationByType, } from '../../accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload';
8
- import { getZeniTransactionDetailKey } from '../../transactionDetail/transactionDetailState';
9
7
  export const accountSettingsInitialState = {
10
8
  localData: {
11
9
  selectedPrepaidExpensesAccountIds: [],
@@ -99,14 +97,8 @@ const expenseAutomationJESchedulesView = createSlice({
99
97
  },
100
98
  fetchJeSchedulesSuccess(draft, action) {
101
99
  const { jeSchedules, selectedPeriod, failedJeSchedules, refreshViewInBackground, } = action.payload;
102
- const jeScheduleTransactionKeys = jeSchedules.map((schedules) => {
103
- const transactionID = toTransactionID(schedules.base_transaction);
104
- return getZeniTransactionDetailKey(transactionID);
105
- });
106
- const failedJeScheduleTransactionKeys = failedJeSchedules.map((schedules) => {
107
- const transactionID = toTransactionID(schedules.base_transaction);
108
- return getZeniTransactionDetailKey(transactionID);
109
- });
100
+ const jeScheduleTransactionKeys = jeSchedules.map((schedules) => getJEScheduleTransactionDetailKeyPayload(schedules.base_transaction));
101
+ const failedJeScheduleTransactionKeys = failedJeSchedules.map((schedules) => getJEScheduleTransactionDetailKeyPayload(schedules.base_transaction));
110
102
  if (refreshViewInBackground === true &&
111
103
  draft.refreshStatus.fetchState === 'In-Progress') {
112
104
  draft.refreshStatus = { fetchState: 'Completed', error: undefined };
@@ -272,7 +264,7 @@ const expenseAutomationJESchedulesView = createSlice({
272
264
  return {
273
265
  payload: {
274
266
  jeScheduleTransactionKeys: [
275
- ...jeSchedules.map((jeSchedule) => getTransactionDetailKeyPayload(jeSchedule.base_transaction)),
267
+ ...jeSchedules.map((jeSchedule) => getJEScheduleTransactionDetailKeyPayload(jeSchedule.base_transaction)),
276
268
  ],
277
269
  },
278
270
  };
@@ -1,9 +1,8 @@
1
1
  import { from, of } from 'rxjs';
2
2
  import { catchError, filter, mergeMap } from 'rxjs/operators';
3
+ import { getJEScheduleTransactionDetailKeyPayload, } from '../../../../entity/jeSchedules/jeSchedulesPayload';
3
4
  import { updateJESchedules, updateJESchedulesDetails, } from '../../../../entity/jeSchedules/jeSchedulesReducer';
4
- import { toTransactionType } from '../../../../entity/transaction/stateTypes/transactionType';
5
5
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
6
- import { getZeniTransactionDetailKey } from '../../../transactionDetail/transactionDetailState';
7
6
  import { createNewSchedules, fetchScheduleDetails, initializeScheduleDetailLocalData, saveScheduleDetailsSuccessOrFailure, updateScheduleDetailsFailure, updateScheduleDetailsSuccess, updateSelectedJEScheduleKey, } from '../scheduleDetailReducer';
8
7
  export const fetchScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchScheduleDetails.match), mergeMap((action) => {
9
8
  const updateActions = [];
@@ -24,11 +23,7 @@ export const fetchScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.
24
23
  .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/schedules/${selectedJeScheduleDetailId}?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
25
24
  .pipe(mergeMap((response) => {
26
25
  if (isSuccessResponse(response) && response.data != null) {
27
- const transactionData = response.data.je_schedules[0].base_transaction;
28
- const selectedJEScheduleKey = getZeniTransactionDetailKey({
29
- id: transactionData.transaction_id,
30
- type: toTransactionType(transactionData.transaction_type),
31
- });
26
+ const selectedJEScheduleKey = getJEScheduleTransactionDetailKeyPayload(response.data.je_schedules[0].base_transaction);
32
27
  updateActions.push(updateJESchedules(response.data.je_schedules), updateSelectedJEScheduleKey({ selectedJEScheduleKey }), updateJESchedulesDetails(response.data.je_schedules, response.data.scheduled_journal_entries), saveScheduleDetailsSuccessOrFailure('Not-Started'), initializeScheduleDetailLocalData(scheduleType, selectedJEScheduleKey, selectedJeScheduleDetailId), updateScheduleDetailsSuccess());
33
28
  if (response.data.je_schedules[0].status.code === 'draft' &&
34
29
  isCompleteJEScheduleFormDataPresent(response.data.je_schedules[0])) {
@@ -1,7 +1,5 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
- import { getJEScheduleKey, } from '../../../entity/jeSchedules/jeSchedulesPayload';
3
- import { toTransactionID } from '../../../entity/transaction/payloadTypes/transactionIDPayload';
4
- import { getZeniTransactionDetailKey } from '../../transactionDetail/transactionDetailState';
2
+ import { getJEScheduleKey, getJEScheduleTransactionDetailKeyPayload, } from '../../../entity/jeSchedules/jeSchedulesPayload';
5
3
  import { getDefaultSelectedTimeframeForScheduleType } from './scheduleListHelper';
6
4
  import { getScheduleListKey, } from './scheduleListTypes';
7
5
  export const initialUIState = {
@@ -379,10 +377,7 @@ export default scheduleListView.reducer;
379
377
  function doUpdateScheduleList(draft, payload, scheduleType, selectedTimeframe, selectedCategoryId) {
380
378
  if (scheduleType !== 'accrued_expenses') {
381
379
  const state = getState(draft, scheduleType);
382
- const jeScheduleTransactionKeys = payload.map((schedules) => {
383
- const transactionID = toTransactionID(schedules.base_transaction);
384
- return getZeniTransactionDetailKey(transactionID);
385
- });
380
+ const jeScheduleTransactionKeys = payload.map((schedules) => getJEScheduleTransactionDetailKeyPayload(schedules.base_transaction));
386
381
  state.selectedCategoryId = selectedCategoryId;
387
382
  state.selectedTimeframe = selectedTimeframe;
388
383
  const key = getScheduleListKey(selectedCategoryId, selectedTimeframe);
@@ -11,7 +11,6 @@ import { getTaskGroupTemplateByIds } from '../../../entity/taskGroupTemplate/tas
11
11
  import { getUserName, getUsersByUserIds, } from '../../../entity/user/userSelector';
12
12
  import { getUserAndUserRole, } from '../../companyView/types/userAndRole';
13
13
  import { applyAdvancedFiltersOnList } from '../../spendManagement/spendManagementFilterHelpers';
14
- import { getUserGroupList } from '../../userGroupListView/userGroupListViewSelector';
15
14
  import { getUserList, } from '../../userListView/userListViewSelector';
16
15
  import { allTaskPriority, allTaskStatus, } from '../taskDetailView/taskDetailSelector';
17
16
  import { DUE_DATE_GROUP_KEYS, } from './taskList';
@@ -309,7 +308,7 @@ const getTaskGroupsWithTaskList = ({ taskListState, taskState, userState, userRo
309
308
  tagState,
310
309
  });
311
310
  };
312
- export const getAllTasks = createSelector((state) => state.taskListState, (state) => state.taskState, (state) => state.userState, (state) => state.userRoleState, (state) => state.userListViewState, (state) => state.addressState, (state) => state.taskGroupState, (state) => state.taskGroupViewState, (state) => state.tagViewState, (state) => state.tagState, (state) => state.taskGroupTemplateState, (state) => state.taskGroupTemplateViewState, (state) => state.userGroupsState, (state) => state.userGroupListViewState, (_state, isTaskTemplatesEnabled) => isTaskTemplatesEnabled, (taskListState, taskState, userState, userRoleState, userListViewState, addressState, taskGroupState, taskGroupViewState, tagViewState, tagState, taskGroupTemplateState, taskGroupTemplateViewState, userGroupsState, userGroupListViewState, isTaskTemplatesEnabled) => {
311
+ export const getAllTasks = createSelector((state) => state.taskListState, (state) => state.taskState, (state) => state.userState, (state) => state.userRoleState, (state) => state.userListViewState, (state) => state.addressState, (state) => state.taskGroupState, (state) => state.taskGroupViewState, (state) => state.tagViewState, (state) => state.tagState, (state) => state.taskGroupTemplateState, (state) => state.taskGroupTemplateViewState, (_state, isTaskTemplatesEnabled) => isTaskTemplatesEnabled, (taskListState, taskState, userState, userRoleState, userListViewState, addressState, taskGroupState, taskGroupViewState, tagViewState, tagState, taskGroupTemplateState, taskGroupTemplateViewState, isTaskTemplatesEnabled) => {
313
312
  const { localData } = taskListState;
314
313
  const taskGroupsWithTasksList = getTaskGroupsWithTaskList({
315
314
  taskListState,
@@ -337,7 +336,6 @@ export const getAllTasks = createSelector((state) => state.taskListState, (state
337
336
  taskGroupTemplates,
338
337
  fetchState: fetchState,
339
338
  userList: getUserList(userState, userRoleState, userListViewState, 'taskManagerCandidate'),
340
- userGroupList: getUserGroupList(userGroupsState, userGroupListViewState, 'taskManagerCandidate'),
341
339
  error: error,
342
340
  version: 0,
343
341
  taskGroupsWithTasksList,
@@ -3,11 +3,9 @@ import { catchError, filter, mergeMap } from 'rxjs/operators';
3
3
  import { updateAddresses } from '../../entity/address/addressReducer';
4
4
  import { getCurrentTenant, isZeniDomainTenant, } from '../../entity/tenant/tenantSelector';
5
5
  import { updateAllUsers } from '../../entity/user/userReducer';
6
- import { updateAllUserGroups } from '../../entity/userGroups/userGroupsReducer';
7
6
  import { updateUserRoles } from '../../entity/userRole/userRoleReducer';
8
7
  import { createZeniAPIStatus, isSuccessResponse } from '../../responsePayload';
9
8
  import { updateChargeCardCount, updateDebitCardCount, } from '../spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer';
10
- import { updateUserGroupIds } from '../userGroupListView/userGroupListViewReducer';
11
9
  import { fetchUserListByType, updateUserIds, updateUserListFetchFailure, } from './userListViewReducer';
12
10
  export const fetchUserListByTypeEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchUserListByType.match), mergeMap((action) => {
13
11
  const { userType, cacheOverride } = action.payload;
@@ -31,15 +29,6 @@ export const fetchUserListByTypeEpic = (actions$, state$, zeniAPI) => actions$.p
31
29
  usersPayload: response.data?.users ?? [],
32
30
  }),
33
31
  ];
34
- if (response.data?.user_groups != null) {
35
- userListAction.push(updateAllUserGroups({ userGroups: response.data.user_groups }));
36
- if (userType === 'taskManagerCandidate') {
37
- userListAction.push(updateUserGroupIds({
38
- userGroupType: userType,
39
- userGroupsPayload: response.data.user_groups,
40
- }));
41
- }
42
- }
43
32
  if (userType === 'cardHolderCandidate') {
44
33
  userListAction.push(updateChargeCardCount(response.data?.cards_count_by_user_id ?? []));
45
34
  userListAction.push(updateDebitCardCount(response.data?.debit_cards_count_by_deposit_account_id ?? {}));
package/lib/index.d.ts CHANGED
@@ -91,7 +91,7 @@ import { TrendChangeType } from './entity/insights/insightPayload';
91
91
  import { Insight } from './entity/insights/insightState';
92
92
  import { InsightSummary } from './entity/insights/insightSummary';
93
93
  import { JEAccruedSchedule, JEScheduledTransaction, ScheduledJournalEntry } from './entity/jeSchedules/jeSchedulesSelector';
94
- import { ALL_SCHEDULES_TYPES, JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTypes, toScheduleTypesType, toScheduleTypesTypeStrict } from './entity/jeSchedules/jeSchedulesTypes';
94
+ import { ALL_SCHEDULES_TYPES, JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTransactionID, ScheduleTypes, getJEScheduleTransactionKey, toScheduleTypesType, toScheduleTypesTypeStrict } from './entity/jeSchedules/jeSchedulesTypes';
95
95
  import { Merchant } from './entity/merchant/merchant';
96
96
  import { ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, MonthCloseCheckMetrics, MonthEndAuditSummary, MonthEndCloseCheck, MonthEndCloseCheckFrequency } from './entity/monthEndCloseChecks/monthEndCloseChecksState';
97
97
  import { updateCommentsNotifications, updateCommentsNotificationsStatuses } from './entity/notification/notificationReducer';
@@ -828,7 +828,7 @@ export { fetchApAgingDetail, AgingReportInvoice, ApAgingDetail, getApAgingDetail
828
828
  export { LinkBillExpenseKey };
829
829
  export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryExpenseAutomationJESchedule, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
830
830
  export { createNewSchedulesAccrued, deleteScheduleAccruedDetail, cancelScheduleAccruedJournalEntry, fetchScheduleAccruedDetails, fetchScheduleAccruedDetailsPage, resetJEAccruedLinkInLocalData, saveScheduleAccruedDetails, updateAmountsInScheduleAccruedDetail, updatedJEAccruedLinkWithRecommendedLocalData, updatedJELinkInLocalDataAccruedExpenses, fetchRecommendedTransactionRowIndex, clearSelectedJELinkRowIndex, updateLinkBillExpenseLocalData, updateScheduleAccruedDetailsLocalData, updateSelectedJEAccruedScheduleKey, resetSelectedJEAccruedScheduleKey, resetAccruedDetailNewScheduleState, };
831
- export { JEScheduleKey, JEScheduleTransactionKey, ALL_SCHEDULES_TYPES, JEScheduledTransaction, JEAccruedSchedule, ScheduleTypes, ScheduleJournalEntryStatusCodeType, ScheduleListReport, ScheduleAccruedListReport, getScheduleListReport, getAccruedScheduleListReport, ScheduleSubTabType, ScheduleListSortKey, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, ScheduleListLocalData, ScheduleDetailsLocalDataFixedAssets, ScheduleDetailsLocalDataAccruedExpenses, ScheduleDetailsView, ScheduleAccruedDetailsView, LinkBillExpenseView, LinkBillExpenseLocalData, JEScheduleDetailsLocalData, ScheduleDetailsLocalData, toScheduleSubTabType, ScheduleStatusCodeType, JournalEntryErrorCodeType, ScheduleTransaction, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, ScheduleDetailSortKey, ScheduledJournalEntry, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, JETransactionLink, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, DownloadJEScheduleTabOptions, updatedSelectedJELinkRowIndex, ScheduleListTabsFileType, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, ScheduleDetailUIState, resetJELinkInLocalData, JEScheduledTransactionWithBalance, JEScheduleWithBalance, JELinkType, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, VendorTabViewTabType, getVendorTabView, VendorTabViewSelectorView, };
831
+ export { JEScheduleKey, JEScheduleTransactionKey, ScheduleTransactionID, getJEScheduleTransactionKey, ALL_SCHEDULES_TYPES, JEScheduledTransaction, JEAccruedSchedule, ScheduleTypes, ScheduleJournalEntryStatusCodeType, ScheduleListReport, ScheduleAccruedListReport, getScheduleListReport, getAccruedScheduleListReport, ScheduleSubTabType, ScheduleListSortKey, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, ScheduleListLocalData, ScheduleDetailsLocalDataFixedAssets, ScheduleDetailsLocalDataAccruedExpenses, ScheduleDetailsView, ScheduleAccruedDetailsView, LinkBillExpenseView, LinkBillExpenseLocalData, JEScheduleDetailsLocalData, ScheduleDetailsLocalData, toScheduleSubTabType, ScheduleStatusCodeType, JournalEntryErrorCodeType, ScheduleTransaction, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, ScheduleDetailSortKey, ScheduledJournalEntry, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, JETransactionLink, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, DownloadJEScheduleTabOptions, updatedSelectedJELinkRowIndex, ScheduleListTabsFileType, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, ScheduleDetailUIState, resetJELinkInLocalData, JEScheduledTransactionWithBalance, JEScheduleWithBalance, JELinkType, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, VendorTabViewTabType, getVendorTabView, VendorTabViewSelectorView, };
832
832
  export { GlobalMerchant, GlobalMerchantBase, TenantMerchant };
833
833
  export { ReviewStatus, VendorTransactionAttachment, VendorTransactionAttachmentPayload, VendorFirstReviewViewSelectorView, VendorFirstReviewViewLocalData, VendorFirstReviewSelectorView, VendorFirstReviewSelectorAttachmentView, VendorFirstReviewViewUIState, VendorFirstReviewViewColumnKey, GlobalMerchantAutoCompleteView, VendorReviewRowCurrentSelection, toVendorFirstReviewViewColumnKeyType, RecommendedNonExistingGlobalMerchant, getGlobalMerchantAutoCompleteResults, VendorReviewRecommendationViewState, GlobalMerchantType, getVendorFirstReviewView, getVendorFirstReviewAttachmentView, fetchVendorFirstReviewView, fetchVendorFirstReviewAttachments, updateVendorFirstReviewViewScrollYOffset, resetVendorFirstReviewLocalData, updateVendorFirstReviewViewPageToken, clearRecentlySavedErroredVendorData, saveVendorFirstReviewView, updateVendorFirstReviewViewLocalData, updateVendorFirstReviewSortUiState, fetchGlobalMerchantAutoCompleteView, clearGlobalMerchantAutoCompleteResults, GlobalVendorReviewRowCurrentSelection, FirstReviewPageCurrentSelectionByColumn, updateReviewVendorDetailLocalData, saveVendorDetailsView, getVendorDetailSelectorView, FirstReviewVendorDetailSelectorView, VendorViewLocalData, };
834
834
  export { fetchGlobalMerchantRecommendation, createGlobalMerchant, updateCreateGlobalMerchantLocalData, clearGlobalMerchantView, getGlobalMerchantView, GlobalMerchantViewSelectorView, GlobalMerchantViewState, NewGlobalMerchantData, NewGlobalMerchantCurrentSelection, };