@zeniai/client-epic-state 4.8.53 → 4.8.55

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 (76) hide show
  1. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  2. package/lib/entity/snackbar/snackbarTypes.js +0 -2
  3. package/lib/entity/tenant/tenantPayload.d.ts +0 -5
  4. package/lib/entity/userRole/userRolePayload.d.ts +0 -5
  5. package/lib/entity/userRole/userRolePayload.js +0 -15
  6. package/lib/entity/userRole/userRoleType.d.ts +3 -16
  7. package/lib/entity/userRole/userRoleType.js +6 -198
  8. package/lib/epic.d.ts +1 -3
  9. package/lib/epic.js +1 -3
  10. package/lib/index.d.ts +12 -14
  11. package/lib/index.js +18 -50
  12. package/lib/view/accountList/accountListSelector.d.ts +2 -1
  13. package/lib/view/accountList/accountListSelector.js +8 -1
  14. package/lib/view/commonVendorView/vendorView/epics/saveVendorEpic.js +4 -31
  15. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +1 -5
  16. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.js +2 -18
  17. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -14
  18. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +4 -36
  19. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewState.d.ts +0 -7
  20. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  21. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  22. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  23. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  24. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  25. package/lib/view/scheduleView/scheduleDetailView/epics/updateAmountsInScheduleDetailEpic.js +10 -5
  26. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +2 -2
  27. package/lib/view/scheduleView/scheduleListView/epics/fetchScheduleListEpic.js +7 -4
  28. package/lib/view/scheduleView/scheduleListView/scheduleListHelper.d.ts +2 -1
  29. package/lib/view/scheduleView/scheduleListView/scheduleListHelper.js +10 -1
  30. package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +7 -5
  31. package/lib/view/settingsView/settingsViewPayload.d.ts +0 -7
  32. package/lib/view/settingsView/settingsViewReducer.d.ts +2 -7
  33. package/lib/view/settingsView/settingsViewReducer.js +2 -115
  34. package/lib/view/settingsView/settingsViewSelector.d.ts +0 -2
  35. package/lib/view/settingsView/settingsViewSelector.js +1 -4
  36. package/lib/view/settingsView/settingsViewState.d.ts +0 -18
  37. package/lib/view/settingsView/settingsViewState.js +0 -15
  38. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.d.ts +0 -1
  39. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +1 -2
  40. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +0 -3
  41. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +24 -49
  42. package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +0 -2
  43. package/lib/view/spendManagement/billPay/editBillView/editBillViewState.js +0 -2
  44. package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.js +9 -16
  45. package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.d.ts +1 -1
  46. package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +9 -21
  47. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListPayload.d.ts +1 -1
  48. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +1 -2
  49. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +3 -6
  50. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +1 -1
  51. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +6 -9
  52. package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +3 -6
  53. package/lib/view/spendManagement/helpers.js +4 -11
  54. package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +1 -5
  55. package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +0 -1
  56. package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +6 -8
  57. package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +0 -2
  58. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +1 -7
  59. package/lib/view/taskManager/taskListView/taskListSelector.js +1 -1
  60. package/lib/view/transactionList/fetchTransactionListByEntityEpic.js +0 -3
  61. package/lib/view/transactionList/transactionListByEntitySelector.d.ts +0 -4
  62. package/lib/view/transactionList/transactionListByEntitySelector.js +1 -62
  63. package/lib/view/transactionList/transactionListReducer.d.ts +1 -2
  64. package/lib/view/transactionList/transactionListReducer.js +2 -2
  65. package/lib/view/vendorReviewView/vendorFirstReviewView/epics/saveVendorFirstReviewViewEpic.js +6 -9
  66. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewPayload.d.ts +0 -1
  67. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.d.ts +2 -2
  68. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
  69. package/lib/zeniAPI.d.ts +0 -1
  70. package/package.json +1 -1
  71. package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.d.ts +0 -17
  72. package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.js +0 -23
  73. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +0 -31
  74. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.js +0 -70
  75. package/lib/view/settingsView/settingsViewHelpers.d.ts +0 -2
  76. package/lib/view/settingsView/settingsViewHelpers.js +0 -11
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getVendorAllTransactionsDefaultTimePeriod = exports.getVendorsTabDetailPageView = exports.getVendorsTabVendorView = exports.toVendorDetailTabsTypeStrict = exports.toVendorDetailTabsType = void 0;
3
+ exports.getVendorsTabDetailPageView = exports.getVendorsTabVendorView = void 0;
4
4
  const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
5
5
  const accountListSelector_1 = require("../../accountList/accountListSelector");
6
6
  const classListSelector_1 = require("../../classList/classListSelector");
@@ -9,19 +9,6 @@ const classSelector_1 = require("../../../entity/class/classSelector");
9
9
  const trendWithTransactionsSelector_1 = require("../../trendWithTransactions/trendWithTransactionsSelector");
10
10
  const userSelector_1 = require("../../../entity/user/userSelector");
11
11
  const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
12
- const transactionListByEntitySelector_1 = require("../../transactionList/transactionListByEntitySelector");
13
- const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
14
- const addSubtractPeriod_1 = require("../../../commonStateTypes/fiscalYearHelpers/addSubtractPeriod");
15
- const getStartOfAndEndOfTimeframeFY_1 = require("../../../commonStateTypes/fiscalYearHelpers/getStartOfAndEndOfTimeframeFY");
16
- const zeniDayJS_1 = require("../../../zeniDayJS");
17
- const ALL_VENDOR_DETAIL_TABS_TYPES = [
18
- 'spend_transactions',
19
- 'all_transactions',
20
- ];
21
- const toVendorDetailTabsType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_VENDOR_DETAIL_TABS_TYPES);
22
- exports.toVendorDetailTabsType = toVendorDetailTabsType;
23
- const toVendorDetailTabsTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v !== null && v !== void 0 ? v : '', ALL_VENDOR_DETAIL_TABS_TYPES);
24
- exports.toVendorDetailTabsTypeStrict = toVendorDetailTabsTypeStrict;
25
12
  const getVendorsTabVendorView = (state, vendorIdFromUrl) => {
26
13
  var _a, _b, _c, _d, _e;
27
14
  const { accountListState, accountState, classListState, classState, vendorState, userState, vendorsTabVendorViewState, } = state;
@@ -86,42 +73,23 @@ const getBasicVendorDetails = (accountState, classState, userState, selectedVend
86
73
  id: selectedVendor.id,
87
74
  });
88
75
  const getVendorsTabDetailPageView = (state, vendorId, entity) => {
89
- var _a, _b, _c;
76
+ var _a, _b;
90
77
  const trendWithTransactions = (0, trendWithTransactionsSelector_1.getTrendWithTransactions)(state, entity, 'EntityDetail');
91
- const vendorViewDetails = (0, exports.getVendorsTabVendorView)(state, vendorId);
92
- const allVendorTransactions = ((_a = state.vendorsTabVendorViewState.allTransactionsTabData) === null || _a === void 0 ? void 0 : _a.timePeriod) != null
93
- ? (0, transactionListByEntitySelector_1.getTransactionListByEntityForSinglePeriod)(state, entity, state.vendorsTabVendorViewState.allTransactionsTabData
94
- .numberOfQuartersFetched)
95
- : undefined;
96
78
  const reducedFetchState = (0, reduceFetchState_1.reduceAnyFetchState)([
97
79
  state.accountListState.byReportId.accountList,
98
80
  state.classListState,
99
81
  state.ownerListState,
100
- (_c = (_b = state.vendorsTabVendorViewState.vendorStateById[vendorId]) === null || _b === void 0 ? void 0 : _b.fetchStatus) !== null && _c !== void 0 ? _c : {
82
+ (_b = (_a = state.vendorsTabVendorViewState.vendorStateById[vendorId]) === null || _a === void 0 ? void 0 : _a.fetchStatus) !== null && _b !== void 0 ? _b : {
101
83
  fetchState: 'Not-Started',
102
84
  },
103
85
  trendWithTransactions,
104
86
  ]);
105
87
  return {
106
- vendorViewDetails,
88
+ vendorViewDetails: (0, exports.getVendorsTabVendorView)(state, vendorId),
107
89
  trendWithTransactions,
108
- allVendorTransactionsView: allVendorTransactions,
109
- allTransactionsTabData: state.vendorsTabVendorViewState.allTransactionsTabData,
110
- selectedTabType: state.vendorsTabVendorViewState.selectedTabType,
111
90
  vendorSpend: state.vendorExpenseState.spend,
112
91
  fetchState: reducedFetchState.fetchState,
113
92
  error: reducedFetchState.error,
114
93
  };
115
94
  };
116
95
  exports.getVendorsTabDetailPageView = getVendorsTabDetailPageView;
117
- const getVendorAllTransactionsDefaultTimePeriod = (firstMonthOfFY, numberOfQuartersToGoBack) => {
118
- const currentEndDate = (0, zeniDayJS_1.dateNow)().startOf('M');
119
- const periodToLoadStartDate = (0, addSubtractPeriod_1.subtractPeriod)(currentEndDate, firstMonthOfFY, numberOfQuartersToGoBack, 'quarter');
120
- const { startOfTimeframeFY: startDate, endOfTimeframeFY: endDate } = (0, getStartOfAndEndOfTimeframeFY_1.getStartOfAndEndOfTimeframeForFY)(periodToLoadStartDate, firstMonthOfFY, 'quarter');
121
- const periodToLoad = {
122
- startDate,
123
- endDate,
124
- };
125
- return periodToLoad;
126
- };
127
- exports.getVendorAllTransactionsDefaultTimePeriod = getVendorAllTransactionsDefaultTimePeriod;
@@ -1,16 +1,9 @@
1
1
  import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
2
2
  import { Recommendation } from '../../../commonStateTypes/recommendationBase';
3
- import { TimePeriod } from '../../../commonStateTypes/timePeriod';
4
3
  import { RecommendedAccountBase } from '../../../entity/account/accountState';
5
4
  import { RecommendedClassBase } from '../../../entity/class/classState';
6
- import { VendorDetailTabsType } from './vendorsTabVendorViewSelector';
7
5
  export interface VendorsTabVendorViewState {
8
6
  vendorStateById: Record<ID, VendorsTabVendorDetailState>;
9
- selectedTabType: VendorDetailTabsType;
10
- allTransactionsTabData?: {
11
- timePeriod: TimePeriod;
12
- numberOfQuartersFetched: number;
13
- };
14
7
  }
15
8
  export interface VendorsTabVendorDetailLocalData {
16
9
  vendorName?: string;
@@ -26,7 +26,7 @@ export declare const changeZeniPersonRolesEpic: (actions$: ActionsObservable<Act
26
26
  type: string;
27
27
  } | {
28
28
  payload: {
29
- messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card" | "notification_settings_saved";
29
+ messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
30
30
  messageText: "failed" | "success";
31
31
  type: import("../..").SnackbarMessageType;
32
32
  showStatusIcon?: boolean | undefined;
@@ -18,7 +18,7 @@ export declare const deletePersonEpic: (actions$: ActionsObservable<ActionType>,
18
18
  type: string;
19
19
  } | {
20
20
  payload: {
21
- messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card" | "notification_settings_saved";
21
+ messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
22
22
  messageText: "failed" | "success";
23
23
  type: import("../..").SnackbarMessageType;
24
24
  showStatusIcon?: boolean | undefined;
@@ -35,7 +35,7 @@ export declare const invitePeopleEpic: (actions$: ActionsObservable<ActionType>,
35
35
  type: string;
36
36
  } | {
37
37
  payload: {
38
- messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card" | "notification_settings_saved";
38
+ messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
39
39
  messageText: "failed" | "success";
40
40
  type: import("../..").SnackbarMessageType;
41
41
  showStatusIcon?: boolean | undefined;
@@ -32,7 +32,7 @@ export declare const inviteZeniPeopleEpic: (actions$: ActionsObservable<ActionTy
32
32
  type: string;
33
33
  } | {
34
34
  payload: {
35
- messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card" | "notification_settings_saved";
35
+ messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
36
36
  messageText: "failed" | "success";
37
37
  type: import("../..").SnackbarMessageType;
38
38
  showStatusIcon?: boolean | undefined;
@@ -13,7 +13,7 @@ export declare const resendInviteEpic: (actions$: ActionsObservable<ActionType>,
13
13
  type: string;
14
14
  } | {
15
15
  payload: {
16
- messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card" | "notification_settings_saved";
16
+ messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
17
17
  messageText: "failed" | "success";
18
18
  type: import("../..").SnackbarMessageType;
19
19
  showStatusIcon?: boolean | undefined;
@@ -7,7 +7,7 @@ const scheduleDetailReducer_1 = require("../scheduleDetailReducer");
7
7
  const jeSchedulesSelector_1 = require("../../../../entity/jeSchedules/jeSchedulesSelector");
8
8
  const scheduleDetailLocalDataHelper_1 = require("../scheduleDetailLocalDataHelper");
9
9
  const updateAmountsInScheduleDetailEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(scheduleDetailReducer_1.updateAmountsInScheduleDetail.match), (0, operators_1.mergeMap)((action) => {
10
- var _a;
10
+ var _a, _b;
11
11
  const actions = [];
12
12
  const state = state$.value;
13
13
  const { scheduleDetailState } = state;
@@ -16,12 +16,17 @@ const updateAmountsInScheduleDetailEpic = (actions$, state$) => actions$.pipe((0
16
16
  const jeScheduleTransactionState = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleKey)(selectedJEScheduleKey, state);
17
17
  const jeScheduleDetailId = action.payload.jeScheduleDetailId;
18
18
  const totalAmount = jeScheduleTransactionState.baseTransaction.amount.amount;
19
- const jeScheduleLocalDataUpdated = (0, scheduleDetailLocalDataHelper_1.updateAmountsInScheduleDetails)(scheduleDetailState.editScheduleStateById[jeScheduleDetailId]
20
- .jeScheduleDetails, (_a = scheduleDetailState.editScheduleStateById[jeScheduleDetailId]
21
- .selectedMonths) !== null && _a !== void 0 ? _a : 0, action.payload.rowId, totalAmount);
19
+ const jeScheduleLocalDataUpdated = jeScheduleDetailId != null
20
+ ? (0, scheduleDetailLocalDataHelper_1.updateAmountsInScheduleDetails)(scheduleDetailState.editScheduleStateById[jeScheduleDetailId]
21
+ .jeScheduleDetails, (_a = scheduleDetailState.editScheduleStateById[jeScheduleDetailId]
22
+ .selectedMonths) !== null && _a !== void 0 ? _a : 0, action.payload.rowId, totalAmount)
23
+ : (0, scheduleDetailLocalDataHelper_1.updateAmountsInScheduleDetails)(scheduleDetailState.newScheduleState.jeScheduleDetails, (_b = scheduleDetailState.newScheduleState.selectedMonths) !== null && _b !== void 0 ? _b : 0, action.payload.rowId, totalAmount);
24
+ const originalLocalData = jeScheduleDetailId != null
25
+ ? scheduleDetailState.editScheduleStateById[jeScheduleDetailId]
26
+ : scheduleDetailState.newScheduleState;
22
27
  actions.push((0, scheduleDetailReducer_1.updateScheduleDetailsLocalData)({
23
28
  selectedJeScheduleDetailId: jeScheduleDetailId,
24
- localData: Object.assign(Object.assign({}, scheduleDetailState.editScheduleStateById[jeScheduleDetailId]), { jeScheduleDetails: jeScheduleLocalDataUpdated }),
29
+ localData: Object.assign(Object.assign({}, originalLocalData), { jeScheduleDetails: jeScheduleLocalDataUpdated }),
25
30
  }));
26
31
  }
27
32
  return (0, rxjs_1.from)(actions);
@@ -29,9 +29,9 @@ export declare const createNewSchedules: import("@reduxjs/toolkit").ActionCreato
29
29
  jeScheduleDetailId: ID;
30
30
  rowId: number;
31
31
  jeLink: ZeniUrl;
32
- }, string>, updateAmountsInScheduleDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[rowId: number, jeScheduleDetailId: string], {
32
+ }, string>, updateAmountsInScheduleDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[rowId: number, jeScheduleDetailId?: string | undefined], {
33
33
  rowId: number;
34
- jeScheduleDetailId: string;
34
+ jeScheduleDetailId: string | undefined;
35
35
  }, string, never, never>, updateScheduleDetailNewStateLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedJeScheduleDetailId: string], {
36
36
  selectedJeScheduleDetailId: string;
37
37
  }, string, never, never>, updateSelectedJEScheduleKey: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -10,10 +10,10 @@ const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
10
10
  const timeframeTick_1 = require("../../../../commonStateTypes/timeframeTick");
11
11
  const scheduleListHelper_1 = require("../scheduleListHelper");
12
12
  const scheduleListTypes_1 = require("../scheduleListTypes");
13
- const accountSelector_1 = require("../../../../entity/account/accountSelector");
13
+ const accountListSelector_1 = require("../../../accountList/accountListSelector");
14
14
  const fetchScheduleListEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(scheduleListReducer_1.fetchScheduleList.match), (0, operators_1.mergeMap)((action) => {
15
15
  const { tab } = action.payload;
16
- const { scheduleListState, accountState, accountListState } = state$.value;
16
+ const { scheduleListState, accountListState } = state$.value;
17
17
  // if parameters are provided, use those. else go to localdata
18
18
  const timeframe = action.payload.timeframeAndCategory != null
19
19
  ? action.payload.timeframeAndCategory.selectedTimeframe
@@ -29,8 +29,11 @@ const fetchScheduleListEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, o
29
29
  action.payload.cacheOverride === false) {
30
30
  return (0, rxjs_1.from)([]);
31
31
  }
32
- const scheduleListCurrentTabAccountTypes = (0, scheduleListHelper_1.getAccountsTypesForScheduleList)(scheduleListState.currentTab).allowedAccountList;
33
- const scheduleListCurrentTabAccountIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, scheduleListCurrentTabAccountTypes);
32
+ const accountTypes = (0, scheduleListHelper_1.getAccountsTypesForScheduleList)(scheduleListState.currentTab);
33
+ const accountLabel = (0, scheduleListHelper_1.getAccountLabelForScheduleType)(scheduleListState.currentTab);
34
+ const scheduleListCurrentTabAccountIds = accountLabel != null
35
+ ? (0, accountListSelector_1.getAccountIdsForLabel)(accountListState, accountTypes.accountListKey, accountLabel)
36
+ : [];
34
37
  let categoryIds = [categoryId];
35
38
  if (categoryId === 'all') {
36
39
  categoryIds = (0, exports.getAllAccountIdsForTab)(scheduleListState.currentTab, accountListState, scheduleListCurrentTabAccountIds);
@@ -2,7 +2,7 @@ import { NestedAccountHeirarchyForReport } from '../../../commonStateTypes/accou
2
2
  import { Amount } from '../../../commonStateTypes/amount';
3
3
  import { COABalance, COABalanceGroupedByPeriod } from '../../../commonStateTypes/coaBalance/coaBalance';
4
4
  import { TimeframeTickWithMetaData } from '../../../commonStateTypes/timeframeTick';
5
- import { AccountBase, AccountType } from '../../../entity/account/accountState';
5
+ import { AccountBase, AccountLabel, AccountType } from '../../../entity/account/accountState';
6
6
  import { JEScheduledTransaction, ScheduledJournalEntry } from '../../../entity/jeSchedules/jeSchedulesSelector';
7
7
  import { SchedulesTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
8
8
  import { AccountListKeyType } from '../../accountList/accountListState';
@@ -85,6 +85,7 @@ declare type AccountListTypesPayload = {
85
85
  * @returns
86
86
  */
87
87
  export declare const getAccountsTypesForScheduleList: (scheduleType: SchedulesTypes) => AccountListTypesPayload;
88
+ export declare const getAccountLabelForScheduleType: (scheduleType: SchedulesTypes) => AccountLabel | undefined;
88
89
  /**
89
90
  * Function to get accountListKey and allowedAccountList for a given tab
90
91
  * @param scheduleType
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAccountsTypesForScheduleEpics = exports.getAccountsTypesForScheduleList = exports.getDurationOfMonthOutTotalMonth = exports.calculateCOABalanceGroupedByPeriod = exports.mapScheduleJournalToCOABalance = exports.calculateTotalBalanceTimeframeTick = exports.setDefaultTotalBalanceTimeframeTicks = exports.mapTotalBalanceTimeframeTickToCOAGroupedBalance = exports.getAllTimeframeTicks = exports.getAllAccountNested = exports.getAllAccountBase = exports.getAccountListKeyForSchedulesTab = exports.getCalculatedScheduleTotals = void 0;
3
+ exports.getAccountsTypesForScheduleEpics = exports.getAccountLabelForScheduleType = exports.getAccountsTypesForScheduleList = exports.getDurationOfMonthOutTotalMonth = exports.calculateCOABalanceGroupedByPeriod = exports.mapScheduleJournalToCOABalance = exports.calculateTotalBalanceTimeframeTick = exports.setDefaultTotalBalanceTimeframeTicks = exports.mapTotalBalanceTimeframeTickToCOAGroupedBalance = exports.getAllTimeframeTicks = exports.getAllAccountNested = exports.getAllAccountBase = exports.getAccountListKeyForSchedulesTab = exports.getCalculatedScheduleTotals = void 0;
4
4
  const amount_1 = require("../../../commonStateTypes/amount");
5
5
  const formatZeniDateFY_1 = require("../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
6
6
  const getFYMonths_1 = require("../../../commonStateTypes/fiscalYearHelpers/getFYMonths");
@@ -225,6 +225,15 @@ const getAccountsTypesForScheduleList = (scheduleType) => {
225
225
  }
226
226
  };
227
227
  exports.getAccountsTypesForScheduleList = getAccountsTypesForScheduleList;
228
+ const getAccountLabelForScheduleType = (scheduleType) => {
229
+ switch (scheduleType) {
230
+ case 'prepaid_expenses':
231
+ return 'prepaid_expenses';
232
+ default:
233
+ return undefined;
234
+ }
235
+ };
236
+ exports.getAccountLabelForScheduleType = getAccountLabelForScheduleType;
228
237
  /**
229
238
  * Function to get accountListKey and allowedAccountList for a given tab
230
239
  * @param scheduleType
@@ -12,7 +12,6 @@ const scheduleListReducer_1 = require("./scheduleListReducer");
12
12
  const scheduleListTypes_1 = require("./scheduleListTypes");
13
13
  const amount_1 = require("../../../commonStateTypes/amount");
14
14
  const scheduleListHelper_1 = require("./scheduleListHelper");
15
- const accountSelector_1 = require("../../../entity/account/accountSelector");
16
15
  const sortedJETransactionsView = (jeTransactions, sortKey, sortOrder) => {
17
16
  return (0, orderBy_1.default)(jeTransactions, (jeTransaction) => {
18
17
  var _a;
@@ -70,10 +69,13 @@ const getScheduleListReport = (state) => {
70
69
  const allScheduleAccounts = (0, accountListSelector_1.getAccountList)(accountState, accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedulesTab)(scheduleListState.currentTab));
71
70
  let allNestedAccounts = (0, accountListSelector_1.getNestedAccountListHeirarchy)(accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedulesTab)(scheduleListState.currentTab));
72
71
  let allAccounts = allScheduleAccounts.accounts;
73
- const scheduleListCurrentTabAccountTypes = (0, scheduleListHelper_1.getAccountsTypesForScheduleList)(scheduleListState.currentTab).allowedAccountList;
74
- const scheduleListCurrentTabAccountIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, scheduleListCurrentTabAccountTypes);
75
- if (scheduleListState.currentTab === 'prepaid_expenses') {
76
- const filteredList = (0, accountListSelector_1.getFilteredNestedAndAccountListsForLabel)(accountState, accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedulesTab)(scheduleListState.currentTab), 'prepaid_expenses');
72
+ const accountTypes = (0, scheduleListHelper_1.getAccountsTypesForScheduleList)(scheduleListState.currentTab);
73
+ const accountLabel = (0, scheduleListHelper_1.getAccountLabelForScheduleType)(scheduleListState.currentTab);
74
+ const scheduleListCurrentTabAccountIds = accountLabel != null
75
+ ? (0, accountListSelector_1.getAccountIdsForLabel)(accountListState, accountTypes.accountListKey, accountLabel)
76
+ : [];
77
+ if (accountLabel != null) {
78
+ const filteredList = (0, accountListSelector_1.getFilteredNestedAndAccountListsForLabel)(accountState, accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedulesTab)(scheduleListState.currentTab), accountLabel);
77
79
  // Use this list only if there is some account in it.
78
80
  if (filteredList.accountList.length > 0) {
79
81
  allAccounts = filteredList.accountList.filter((account) => scheduleListCurrentTabAccountIds.includes(account.accountId));
@@ -6,10 +6,3 @@ export interface MyProfilePeoplePayload {
6
6
  users: UserPayload[];
7
7
  }
8
8
  export declare type MyProfilePeopleResponse = ZeniAPIResponse<MyProfilePeoplePayload>;
9
- export interface NotificationSettingsPayload {
10
- is_missing_receipt_notification_active: boolean | null;
11
- is_pending_bill_approval_notification_active: boolean | null;
12
- is_pending_reimbursement_approval_notification_active: boolean | null;
13
- is_uncategorized_transaction_notification_active: boolean | null;
14
- }
15
- export declare type NotificationSettingsResponse = ZeniAPIResponse<NotificationSettingsPayload>;
@@ -1,6 +1,5 @@
1
- import { SettingsViewState, NotificationSettingsLocalData } from './settingsViewState';
2
1
  import { ZeniAPIStatus } from '../../responsePayload';
3
- import { NotificationSettingsPayload } from './settingsViewPayload';
2
+ import { SettingsViewState } from './settingsViewState';
4
3
  import { ID } from '../../commonStateTypes/common';
5
4
  export declare const initialState: SettingsViewState;
6
5
  export declare const fetchMyProfileView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
@@ -9,10 +8,6 @@ export declare const fetchMyProfileView: import("@reduxjs/toolkit").ActionCreato
9
8
  userId: string;
10
9
  }, string, never, never>, updateMyProfileOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, fetchBankConnectionsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateBankConnectionOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
11
10
  bankAccountIds: ID[];
12
- }, string>, updateBankConnectionOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, fetchBankAccountsList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, fetchNotificationSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateNotificationSettingsOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[data: NotificationSettingsPayload], {
13
- data: NotificationSettingsPayload;
14
- }, string, never, never>, updateNotificationSettingsOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, updateNotificationSettingsLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<NotificationSettingsLocalData, string>, resetNotificationSettingsLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, saveNotificationSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateNotificationSettingsOnSaveSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
15
- data: NotificationSettingsPayload;
16
- }, string>, updateNotificationSettingsOnSaveFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, clearSettingsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
11
+ }, string>, updateBankConnectionOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, fetchBankAccountsList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, clearSettingsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
17
12
  declare const _default: import("@reduxjs/toolkit").Reducer<SettingsViewState, import("@reduxjs/toolkit").AnyAction>;
18
13
  export default _default;
@@ -1,22 +1,8 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearSettingsView = exports.updateNotificationSettingsOnSaveFailure = exports.updateNotificationSettingsOnSaveSuccess = exports.saveNotificationSettings = exports.resetNotificationSettingsLocalData = exports.updateNotificationSettingsLocalData = exports.updateNotificationSettingsOnFailure = exports.updateNotificationSettingsOnSuccess = exports.fetchNotificationSettings = exports.fetchBankAccountsList = exports.updateBankConnectionOnFailure = exports.updateBankConnectionOnSuccess = exports.fetchBankConnectionsView = exports.updateMyProfileOnFailure = exports.updateMyProfileOnSuccess = exports.fetchMyProfile = exports.fetchMyProfileView = exports.initialState = void 0;
4
+ exports.clearSettingsView = exports.fetchBankAccountsList = exports.updateBankConnectionOnFailure = exports.updateBankConnectionOnSuccess = exports.fetchBankConnectionsView = exports.updateMyProfileOnFailure = exports.updateMyProfileOnSuccess = exports.fetchMyProfile = exports.fetchMyProfileView = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
- const initialNotificationSettingsData = {
7
- missingReceiptNotification: null,
8
- uncategorizedTransactionNotification: null,
9
- pendingBillApprovalNotification: null,
10
- pendingReimbursementApprovalNotification: null,
11
- };
12
- const initialNotificationSettingsLocalData = {
13
- reminders: {
14
- isMissingReceiptNotificationActive: null,
15
- isUncategorizedTransactionNotificationActive: null,
16
- isPendingReimbursementApprovalNotificationActive: null,
17
- isPendingBillApprovalNotificationActive: null,
18
- },
19
- };
20
6
  exports.initialState = {
21
7
  profile: {
22
8
  fetchState: 'Not-Started',
@@ -28,16 +14,6 @@ exports.initialState = {
28
14
  error: undefined,
29
15
  bankAccountIds: [],
30
16
  },
31
- notification: {
32
- fetchState: 'Not-Started',
33
- error: undefined,
34
- updateStatus: {
35
- fetchState: 'Not-Started',
36
- error: undefined,
37
- },
38
- notificationSettings: Object.assign({}, initialNotificationSettingsData),
39
- notificationSettingsLocalData: Object.assign({}, initialNotificationSettingsLocalData),
40
- },
41
17
  };
42
18
  const settings = (0, toolkit_1.createSlice)({
43
19
  name: 'settings',
@@ -86,99 +62,10 @@ const settings = (0, toolkit_1.createSlice)({
86
62
  draft.bankConnection.fetchState = 'Error';
87
63
  draft.bankConnection.error = action.payload;
88
64
  },
89
- fetchNotificationSettings(draft) {
90
- draft.notification.fetchState = 'In-Progress';
91
- draft.notification.error = undefined;
92
- },
93
- updateNotificationSettingsOnSuccess: {
94
- prepare(data) {
95
- return {
96
- payload: {
97
- data,
98
- },
99
- };
100
- },
101
- reducer(draft, action) {
102
- const { data } = action.payload;
103
- const notificationSettings = toNotificationSettings(data);
104
- draft.notification.fetchState = 'Completed';
105
- draft.notification.error = undefined;
106
- draft.notification.notificationSettings = notificationSettings;
107
- draft.notification.notificationSettingsLocalData =
108
- toNotificationSettingsLocalData(notificationSettings);
109
- },
110
- },
111
- updateNotificationSettingsOnFailure(draft, action) {
112
- draft.notification.fetchState = 'Error';
113
- draft.notification.error = action.payload;
114
- },
115
- updateNotificationSettingsLocalData(draft, action) {
116
- draft.notification.notificationSettingsLocalData = action.payload;
117
- },
118
- resetNotificationSettingsLocalData(draft) {
119
- draft.notification.notificationSettingsLocalData =
120
- toNotificationSettingsLocalData(draft.notification.notificationSettings);
121
- },
122
- saveNotificationSettings(draft) {
123
- draft.notification.updateStatus.fetchState = 'In-Progress';
124
- draft.notification.error = undefined;
125
- },
126
- updateNotificationSettingsOnSaveSuccess(draft, action) {
127
- const { data } = action.payload;
128
- draft.notification.updateStatus.fetchState = 'Completed';
129
- draft.notification.updateStatus.error = undefined;
130
- draft.notification.notificationSettings = toNotificationSettings(data);
131
- },
132
- updateNotificationSettingsOnSaveFailure(draft, action) {
133
- draft.notification.updateStatus.fetchState = 'Error';
134
- draft.notification.updateStatus.error = action.payload;
135
- },
136
65
  clearSettingsView(draft) {
137
66
  Object.assign(draft, exports.initialState);
138
67
  },
139
68
  },
140
69
  });
141
- _a = settings.actions, exports.fetchMyProfileView = _a.fetchMyProfileView, exports.fetchMyProfile = _a.fetchMyProfile, exports.updateMyProfileOnSuccess = _a.updateMyProfileOnSuccess, exports.updateMyProfileOnFailure = _a.updateMyProfileOnFailure, exports.fetchBankConnectionsView = _a.fetchBankConnectionsView, exports.updateBankConnectionOnSuccess = _a.updateBankConnectionOnSuccess, exports.updateBankConnectionOnFailure = _a.updateBankConnectionOnFailure, exports.fetchBankAccountsList = _a.fetchBankAccountsList, exports.fetchNotificationSettings = _a.fetchNotificationSettings, exports.updateNotificationSettingsOnSuccess = _a.updateNotificationSettingsOnSuccess, exports.updateNotificationSettingsOnFailure = _a.updateNotificationSettingsOnFailure, exports.updateNotificationSettingsLocalData = _a.updateNotificationSettingsLocalData, exports.resetNotificationSettingsLocalData = _a.resetNotificationSettingsLocalData, exports.saveNotificationSettings = _a.saveNotificationSettings, exports.updateNotificationSettingsOnSaveSuccess = _a.updateNotificationSettingsOnSaveSuccess, exports.updateNotificationSettingsOnSaveFailure = _a.updateNotificationSettingsOnSaveFailure, exports.clearSettingsView = _a.clearSettingsView;
70
+ _a = settings.actions, exports.fetchMyProfileView = _a.fetchMyProfileView, exports.fetchMyProfile = _a.fetchMyProfile, exports.updateMyProfileOnSuccess = _a.updateMyProfileOnSuccess, exports.updateMyProfileOnFailure = _a.updateMyProfileOnFailure, exports.fetchBankConnectionsView = _a.fetchBankConnectionsView, exports.updateBankConnectionOnSuccess = _a.updateBankConnectionOnSuccess, exports.updateBankConnectionOnFailure = _a.updateBankConnectionOnFailure, exports.fetchBankAccountsList = _a.fetchBankAccountsList, exports.clearSettingsView = _a.clearSettingsView;
142
71
  exports.default = settings.reducer;
143
- const toNotificationSettings = (data) => {
144
- const notificationSettingsData = Object.assign({}, initialNotificationSettingsData);
145
- if (data.is_missing_receipt_notification_active != null) {
146
- notificationSettingsData.missingReceiptNotification = {
147
- active: data.is_missing_receipt_notification_active,
148
- };
149
- }
150
- if (data.is_pending_bill_approval_notification_active != null) {
151
- notificationSettingsData.pendingBillApprovalNotification = {
152
- active: data.is_pending_bill_approval_notification_active,
153
- };
154
- }
155
- if (data.is_pending_reimbursement_approval_notification_active != null) {
156
- notificationSettingsData.pendingReimbursementApprovalNotification = {
157
- active: data.is_pending_reimbursement_approval_notification_active,
158
- };
159
- }
160
- if (data.is_uncategorized_transaction_notification_active != null) {
161
- notificationSettingsData.uncategorizedTransactionNotification = {
162
- active: data.is_uncategorized_transaction_notification_active,
163
- };
164
- }
165
- return notificationSettingsData;
166
- };
167
- const toNotificationSettingsLocalData = (data) => {
168
- return {
169
- reminders: {
170
- isMissingReceiptNotificationActive: data.missingReceiptNotification != null
171
- ? data.missingReceiptNotification.active
172
- : null,
173
- isPendingBillApprovalNotificationActive: data.pendingBillApprovalNotification != null
174
- ? data.pendingBillApprovalNotification.active
175
- : null,
176
- isPendingReimbursementApprovalNotificationActive: data.pendingReimbursementApprovalNotification != null
177
- ? data.pendingReimbursementApprovalNotification.active
178
- : null,
179
- isUncategorizedTransactionNotificationActive: data.uncategorizedTransactionNotification != null
180
- ? data.uncategorizedTransactionNotification.active
181
- : null,
182
- },
183
- };
184
- };
@@ -3,7 +3,6 @@ import { FetchStateAndError, ID } from '../../commonStateTypes/common';
3
3
  import { TenantExternalConnections } from '../../entity/tenant/tenantState';
4
4
  import { Company } from '../../entity/company/companyStateTypes';
5
5
  import { MyBankConnectionsView, BankConnectionsSetupView, MyProfileSelectorView } from './types/settingsViewSelectorTypes';
6
- import { NotificationSettings } from './settingsViewState';
7
6
  export declare function getApprovalRuleViewDetails(state: RootState): FetchStateAndError;
8
7
  export declare function getBankConnectionsSetupViewDetails(state: RootState, companyId: ID): BankConnectionsSetupView;
9
8
  export declare function getMyBankConnectionsDetails(state: RootState, userId: ID): MyBankConnectionsView;
@@ -13,4 +12,3 @@ export interface IntegrationsView {
13
12
  }
14
13
  export declare function getIntegrationsView(state: RootState, companyId: ID): IntegrationsView;
15
14
  export declare const getMyProfileView: (state: RootState) => MyProfileSelectorView;
16
- export declare const getNotificationSettingsView: (state: RootState) => NotificationSettings;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getNotificationSettingsView = exports.getMyProfileView = exports.getIntegrationsView = exports.getMyBankConnectionsDetails = exports.getBankConnectionsSetupViewDetails = exports.getApprovalRuleViewDetails = void 0;
3
+ exports.getMyProfileView = exports.getIntegrationsView = exports.getMyBankConnectionsDetails = exports.getBankConnectionsSetupViewDetails = exports.getApprovalRuleViewDetails = void 0;
4
4
  const toolkit_1 = require("@reduxjs/toolkit");
5
5
  const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
6
6
  const companySelector_1 = require("../../entity/company/companySelector");
@@ -117,6 +117,3 @@ exports.getMyProfileView = (0, toolkit_1.createSelector)((state) => state.tenant
117
117
  }
118
118
  return myProfilePeopleView;
119
119
  });
120
- exports.getNotificationSettingsView = (0, toolkit_1.createSelector)((state) => state.settingsViewState, (settingsViewState) => {
121
- return settingsViewState.notification;
122
- });
@@ -5,26 +5,8 @@ interface MyProfile extends FetchStateAndError {
5
5
  interface BankConnection extends FetchStateAndError {
6
6
  bankAccountIds: ID[];
7
7
  }
8
- declare const toReminderTypeKey: (v: string) => "missingReceiptNotification" | "uncategorizedTransactionNotification" | "pendingBillApprovalNotification" | "pendingReimbursementApprovalNotification";
9
- declare type ReminderTypeKey = ReturnType<typeof toReminderTypeKey>;
10
- declare const toReminderFlagTypeKey: (v: string) => "isMissingReceiptNotificationActive" | "isUncategorizedTransactionNotificationActive" | "isPendingBillApprovalNotificationActive" | "isPendingReimbursementApprovalNotificationActive";
11
- declare type ReminderFlagTypeKey = ReturnType<typeof toReminderFlagTypeKey>;
12
- export declare type ReminderNotificationSettingsLocalData = Record<ReminderFlagTypeKey, boolean | null>;
13
- export interface NotificationSettingsLocalData {
14
- reminders: ReminderNotificationSettingsLocalData;
15
- }
16
- interface ReminderNotificationSettingDetails {
17
- active: boolean;
18
- }
19
- export declare type ReminderNotificationSettingsData = Record<ReminderTypeKey, ReminderNotificationSettingDetails | null>;
20
- export interface NotificationSettings extends FetchStateAndError {
21
- notificationSettings: ReminderNotificationSettingsData;
22
- notificationSettingsLocalData: NotificationSettingsLocalData;
23
- updateStatus: FetchStateAndError;
24
- }
25
8
  export interface SettingsViewState {
26
9
  profile: MyProfile;
27
10
  bankConnection: BankConnection;
28
- notification: NotificationSettings;
29
11
  }
30
12
  export {};
@@ -1,17 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
4
- const REMINDER_NOTIFICATION_TYPES = [
5
- 'missingReceiptNotification',
6
- 'uncategorizedTransactionNotification',
7
- 'pendingBillApprovalNotification',
8
- 'pendingReimbursementApprovalNotification',
9
- ];
10
- const REMINDER_NOTIFICATION_FLAG_TYPES = [
11
- 'isMissingReceiptNotificationActive',
12
- 'isUncategorizedTransactionNotificationActive',
13
- 'isPendingBillApprovalNotificationActive',
14
- 'isPendingReimbursementApprovalNotificationActive',
15
- ];
16
- const toReminderTypeKey = (v) => (0, stringToUnion_1.stringToUnion)(v, REMINDER_NOTIFICATION_TYPES);
17
- const toReminderFlagTypeKey = (v) => (0, stringToUnion_1.stringToUnion)(v, REMINDER_NOTIFICATION_FLAG_TYPES);