@zeniai/client-epic-state 4.8.42 → 4.8.43

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 (36) hide show
  1. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  2. package/lib/entity/snackbar/snackbarTypes.js +0 -1
  3. package/lib/epic.d.ts +1 -3
  4. package/lib/epic.js +1 -3
  5. package/lib/index.d.ts +4 -5
  6. package/lib/index.js +15 -22
  7. package/lib/view/commonVendorView/vendorView/epics/saveVendorEpic.js +4 -31
  8. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  9. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  10. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  11. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  12. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  13. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +4 -2
  14. package/lib/view/settingsView/settingsViewPayload.d.ts +0 -7
  15. package/lib/view/settingsView/settingsViewReducer.d.ts +2 -7
  16. package/lib/view/settingsView/settingsViewReducer.js +2 -115
  17. package/lib/view/settingsView/settingsViewSelector.d.ts +0 -2
  18. package/lib/view/settingsView/settingsViewSelector.js +1 -4
  19. package/lib/view/settingsView/settingsViewState.d.ts +0 -18
  20. package/lib/view/settingsView/settingsViewState.js +0 -15
  21. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +0 -1
  22. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +22 -24
  23. package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +0 -1
  24. package/lib/view/spendManagement/billPay/editBillView/editBillViewState.js +0 -1
  25. package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.js +0 -1
  26. package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.d.ts +1 -1
  27. package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +2 -7
  28. package/lib/view/spendManagement/helpers.js +4 -11
  29. package/lib/zeniAPI.d.ts +0 -1
  30. package/package.json +1 -1
  31. package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.d.ts +0 -17
  32. package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.js +0 -23
  33. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +0 -31
  34. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.js +0 -70
  35. package/lib/view/settingsView/settingsViewHelpers.d.ts +0 -2
  36. package/lib/view/settingsView/settingsViewHelpers.js +0 -11
@@ -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" | "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;
@@ -67,7 +67,7 @@ const mapJEScheduleLocalDataToScheduleDetailPayload = (jeScheduleDetails, jeSche
67
67
  exports.mapJEScheduleLocalDataToScheduleDetailPayload = mapJEScheduleLocalDataToScheduleDetailPayload;
68
68
  const mapJEScheduleTransactionToPayload = (jeScheduleTransactionState, vendorState, scheduleDetailsLocalData, jeScheduleType) => {
69
69
  var _a, _b;
70
- const { vendor, currencyCode, currencySymbol, baseTransaction, status, startDate, endDate, } = jeScheduleTransactionState;
70
+ const { vendor, currencyCode, currencySymbol, baseTransaction, status, startDate, endDate, balanceAsOfToday, } = jeScheduleTransactionState;
71
71
  const { selectedMonths, selectedAccount, selectedClass, selectedDayOfMonth, lastDayOfMonth, } = scheduleDetailsLocalData;
72
72
  const postingDate = selectedDayOfMonth !== null && selectedDayOfMonth !== void 0 ? selectedDayOfMonth : (lastDayOfMonth != null ? timePeriod_1.LAST_SCHEDULE_DAY_OF_MONTH : null);
73
73
  const scheduleLength = scheduleDetailsLocalData.jeScheduleDetails.length;
@@ -87,7 +87,9 @@ const mapJEScheduleTransactionToPayload = (jeScheduleTransactionState, vendorSta
87
87
  period: selectedMonths !== null && selectedMonths !== void 0 ? selectedMonths : null,
88
88
  je_schedule_type: jeScheduleType,
89
89
  posting_date: postingDate,
90
- balance: baseTransaction.amount.amount,
90
+ balance: balanceAsOfToday != null
91
+ ? balanceAsOfToday.amount
92
+ : baseTransaction.amount.amount,
91
93
  start_date: (_a = startDate === null || startDate === void 0 ? void 0 : startDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) !== null && _a !== void 0 ? _a : firstJEScheduleDate,
92
94
  end_date: (_b = endDate === null || endDate === void 0 ? void 0 : endDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) !== null && _b !== void 0 ? _b : lastJEScheduleDate,
93
95
  je_credit_accounting_class_id: baseTransaction.classBase
@@ -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);
@@ -74,7 +74,6 @@ export interface EditBillDetailSelectorView extends SelectorView {
74
74
  billPayConfigList: BillPayConfig[];
75
75
  file: Attachment | undefined;
76
76
  previousBills: PreviousBillsSelectorView;
77
- showVendorGptRecommendationText: boolean;
78
77
  isCancelled: boolean;
79
78
  isDeleted: boolean;
80
79
  showAutofill: boolean;
@@ -30,7 +30,7 @@ const transferDetailSelector_1 = require("../../zeniAccounts/transferDetail/tran
30
30
  const depositAccountListSelector_1 = require("../../zeniAccounts/depositAccountList/depositAccountListSelector");
31
31
  const depositAccountSelector_1 = require("../../../../entity/depositAccount/depositAccountSelector");
32
32
  const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAccountsEnabled, billId) => {
33
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
33
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
34
34
  const { accountListState, accountState, bankAccountState, billDetailViewState, setupViewState, billTransactionState, billPayConfigState, classListState, classState, editBillDetailViewState, paymentAccountState, vendorState, tenantState, companyState, userState, commonHistoryState, contactState, paymentInstrumentState, recurringBillState, depositAccountListState, depositAccountState, } = state;
35
35
  const transaction = (0, get_1.default)(billTransactionState.transactionById, billId !== null && billId !== void 0 ? billId : '', undefined);
36
36
  let recommendations = {};
@@ -41,7 +41,6 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
41
41
  const sourceBillDetail = billId != null
42
42
  ? (_a = editBillDetailViewState.editBillStateById) === null || _a === void 0 ? void 0 : _a[key]
43
43
  : editBillDetailViewState.newBillState;
44
- const showVendorGptRecommendationText = (_b = sourceBillDetail === null || sourceBillDetail === void 0 ? void 0 : sourceBillDetail.billDetailLocalData.showVendorGptRecommendationText) !== null && _b !== void 0 ? _b : false;
45
44
  let vendorDetails;
46
45
  let recommendedVendor;
47
46
  let lastRecommendedVendorName;
@@ -92,10 +91,10 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
92
91
  let qboId;
93
92
  const { currentTenantId } = tenantState;
94
93
  const bookCloseDate = currentTenantId != null
95
- ? (_d = (_c = tenantState.tenantsById) === null || _c === void 0 ? void 0 : _c[currentTenantId]) === null || _d === void 0 ? void 0 : _d.bookCloseDate
94
+ ? (_c = (_b = tenantState.tenantsById) === null || _b === void 0 ? void 0 : _b[currentTenantId]) === null || _c === void 0 ? void 0 : _c.bookCloseDate
96
95
  : undefined;
97
96
  const companyId = currentTenantId != null
98
- ? (_f = (_e = tenantState.tenantsById) === null || _e === void 0 ? void 0 : _e[currentTenantId]) === null || _f === void 0 ? void 0 : _f.companyId
97
+ ? (_e = (_d = tenantState.tenantsById) === null || _d === void 0 ? void 0 : _d[currentTenantId]) === null || _e === void 0 ? void 0 : _e.companyId
99
98
  : undefined;
100
99
  const currentCompany = (0, companySelector_1.getCompanyByCompanyId)(companyState, companyId !== null && companyId !== void 0 ? companyId : '');
101
100
  const payNowCutOffTime = currentCompany === null || currentCompany === void 0 ? void 0 : currentCompany.company.companyBillPayInfo.payNowCutOffTimeByMethod.ach;
@@ -117,15 +116,15 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
117
116
  let recurringConfig;
118
117
  let recurringBillInstances;
119
118
  if (billId != null) {
120
- isDeleted = (_g = transaction === null || transaction === void 0 ? void 0 : transaction.isDeleted) !== null && _g !== void 0 ? _g : false;
121
- createdBy = (0, userSelector_1.getUserByUserId)(userState, (_h = transaction === null || transaction === void 0 ? void 0 : transaction.createdBy) !== null && _h !== void 0 ? _h : '');
119
+ isDeleted = (_f = transaction === null || transaction === void 0 ? void 0 : transaction.isDeleted) !== null && _f !== void 0 ? _f : false;
120
+ createdBy = (0, userSelector_1.getUserByUserId)(userState, (_g = transaction === null || transaction === void 0 ? void 0 : transaction.createdBy) !== null && _g !== void 0 ? _g : '');
122
121
  createTime = transaction === null || transaction === void 0 ? void 0 : transaction.createTime;
123
- qboId = (_j = transaction === null || transaction === void 0 ? void 0 : transaction.account) === null || _j === void 0 ? void 0 : _j.qboId;
122
+ qboId = (_h = transaction === null || transaction === void 0 ? void 0 : transaction.account) === null || _h === void 0 ? void 0 : _h.qboId;
124
123
  billPayInfo = transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo;
125
124
  toAccountVendorEmail = transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.toAccountVendorEmail;
126
125
  isCollectToAccountInfoFromVendorContact =
127
- (_k = transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.isCollectToAccountInfoFromVendorContact) !== null && _k !== void 0 ? _k : false;
128
- const initialVendor = (0, vendorSelector_1.getVendorByQboId)(vendorState, (_m = (_l = transaction === null || transaction === void 0 ? void 0 : transaction.vendor) === null || _l === void 0 ? void 0 : _l.id) !== null && _m !== void 0 ? _m : '');
126
+ (_j = transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.isCollectToAccountInfoFromVendorContact) !== null && _j !== void 0 ? _j : false;
127
+ const initialVendor = (0, vendorSelector_1.getVendorByQboId)(vendorState, (_l = (_k = transaction === null || transaction === void 0 ? void 0 : transaction.vendor) === null || _k === void 0 ? void 0 : _k.id) !== null && _l !== void 0 ? _l : '');
129
128
  const initialWhatForSection = {
130
129
  invoiceNumber: transaction === null || transaction === void 0 ? void 0 : transaction.documentId,
131
130
  invoiceDate: transaction === null || transaction === void 0 ? void 0 : transaction.date,
@@ -134,7 +133,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
134
133
  };
135
134
  const updatesByLineId = {};
136
135
  if (accountList.fetchState === 'Completed') {
137
- (_o = transaction === null || transaction === void 0 ? void 0 : transaction.lines) === null || _o === void 0 ? void 0 : _o.forEach((line) => {
136
+ (_m = transaction === null || transaction === void 0 ? void 0 : transaction.lines) === null || _m === void 0 ? void 0 : _m.forEach((line) => {
138
137
  var _a;
139
138
  updatesByLineId[line.id] = Object.assign(Object.assign({}, line), { account: (_a = accountList.accounts.find((account) => {
140
139
  var _a;
@@ -144,10 +143,10 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
144
143
  });
145
144
  }
146
145
  const initialPaymentDetailsSection = {
147
- paymentType: (0, exports.getPaymentMethodType)(billPayConfigState, (_p = billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.fromAccount.billAccountType) !== null && _p !== void 0 ? _p : 'depositAccount', billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.billPaymentMethodType, billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.internationalTransferFeeBearerPaymentMethod),
146
+ paymentType: (0, exports.getPaymentMethodType)(billPayConfigState, (_o = billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.fromAccount.billAccountType) !== null && _o !== void 0 ? _o : 'depositAccount', billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.billPaymentMethodType, billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.internationalTransferFeeBearerPaymentMethod),
148
147
  paymentDate: billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.paymentDate,
149
- withdrawFrom: (0, exports.getWithdrawFrom)(paymentAccountState, depositAccountState, (_q = billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.fromAccount.billAccountId) !== null && _q !== void 0 ? _q : '', (_r = billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.fromAccount.billAccountType) !== null && _r !== void 0 ? _r : ''),
150
- paymentTo: ((_s = billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.toAccount.billAccountId) === null || _s === void 0 ? void 0 : _s.length) != null &&
148
+ withdrawFrom: (0, exports.getWithdrawFrom)(paymentAccountState, depositAccountState, (_p = billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.fromAccount.billAccountId) !== null && _p !== void 0 ? _p : '', (_q = billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.fromAccount.billAccountType) !== null && _q !== void 0 ? _q : ''),
149
+ paymentTo: ((_r = billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.toAccount.billAccountId) === null || _r === void 0 ? void 0 : _r.length) != null &&
151
150
  (billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.toAccount.billAccountId.length) > 0
152
151
  ? billPayInfo.toAccount.billAccountId
153
152
  : undefined,
@@ -164,7 +163,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
164
163
  if (sourceBillDetail != null) {
165
164
  const billViewState = billDetailViewState.billDetailById[key];
166
165
  isCancelled = sourceBillDetail.billDetailLocalData.isCancelled;
167
- billStage = (_t = billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.stage.code) !== null && _t !== void 0 ? _t : 'draft';
166
+ billStage = (_s = billPayInfo === null || billPayInfo === void 0 ? void 0 : billPayInfo.stage.code) !== null && _s !== void 0 ? _s : 'draft';
168
167
  if (billViewState != null) {
169
168
  fetchState = (0, reduceFetchState_1.reduceFetchState)([
170
169
  sourceBillDetail.fetchStatus,
@@ -176,7 +175,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
176
175
  }
177
176
  }
178
177
  //recurringBill Details
179
- isRecurring = (_u = transaction === null || transaction === void 0 ? void 0 : transaction.isRecurring) !== null && _u !== void 0 ? _u : false;
178
+ isRecurring = (_t = transaction === null || transaction === void 0 ? void 0 : transaction.isRecurring) !== null && _t !== void 0 ? _t : false;
180
179
  if (isRecurring && transaction != null) {
181
180
  const { recurringConfigLocalData, recurringBillInstancesLocalData } = (0, exports.getRecurringBillLocalData)(recurringBillState, transaction);
182
181
  recurringConfig = recurringConfigLocalData;
@@ -206,9 +205,9 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
206
205
  ? (0, vendorSelector_1.getVendorByVendorId)(vendorState, updatedRecord.vendor.id)
207
206
  : undefined;
208
207
  file = updatedRecord.file;
209
- const bankAccInBill = (0, bankAccountSelector_1.getBankAccountByBankAccountId)(bankAccountState, (_w = (_v = updatedRecord.paymentDetailsSection) === null || _v === void 0 ? void 0 : _v.paymentTo) !== null && _w !== void 0 ? _w : '');
210
- const vendorBankAccounts = (0, bankAccountSelector_1.getBankAccountsByBankAccountIds)(bankAccountState, (_x = vendorDetails === null || vendorDetails === void 0 ? void 0 : vendorDetails.bankAccountIds) !== null && _x !== void 0 ? _x : []);
211
- const vendorPaymentInstruments = (0, paymentInstrumentSelector_1.getPaymentInstrumentsByIds)(paymentInstrumentState, (_y = vendorDetails === null || vendorDetails === void 0 ? void 0 : vendorDetails.paymentInstrumentIds) !== null && _y !== void 0 ? _y : []);
208
+ const bankAccInBill = (0, bankAccountSelector_1.getBankAccountByBankAccountId)(bankAccountState, (_v = (_u = updatedRecord.paymentDetailsSection) === null || _u === void 0 ? void 0 : _u.paymentTo) !== null && _v !== void 0 ? _v : '');
209
+ const vendorBankAccounts = (0, bankAccountSelector_1.getBankAccountsByBankAccountIds)(bankAccountState, (_w = vendorDetails === null || vendorDetails === void 0 ? void 0 : vendorDetails.bankAccountIds) !== null && _w !== void 0 ? _w : []);
210
+ const vendorPaymentInstruments = (0, paymentInstrumentSelector_1.getPaymentInstrumentsByIds)(paymentInstrumentState, (_x = vendorDetails === null || vendorDetails === void 0 ? void 0 : vendorDetails.paymentInstrumentIds) !== null && _x !== void 0 ? _x : []);
212
211
  const isBankAccInBillExistInVendor = bankAccInBill != null
213
212
  ? vendorBankAccounts
214
213
  .map((bankAc) => bankAc.bankAccountId)
@@ -258,7 +257,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
258
257
  (recommendedVendor === null || recommendedVendor === void 0 ? void 0 : recommendedVendor.vendorCurrencyCode) != null) {
259
258
  whatForSection.currencyCode = recommendedVendor.vendorCurrencyCode;
260
259
  }
261
- isRecurring = (_z = sourceBillDetail.billDetailLocalData.isRecurring) !== null && _z !== void 0 ? _z : false;
260
+ isRecurring = (_y = sourceBillDetail.billDetailLocalData.isRecurring) !== null && _y !== void 0 ? _y : false;
262
261
  recurringConfig = sourceBillDetail.billDetailLocalData.recurringConfig;
263
262
  recurringBillInstances =
264
263
  sourceBillDetail.billDetailLocalData.recurringBillInstances;
@@ -278,7 +277,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
278
277
  }
279
278
  const vendorContactSaveStatus = editBillDetailViewState.updateVendorContactState;
280
279
  const lineDetailSection = {};
281
- const lineDetailSectionUpdatesByLineId = (_1 = (_0 = sourceBillDetail === null || sourceBillDetail === void 0 ? void 0 : sourceBillDetail.billDetailLocalData) === null || _0 === void 0 ? void 0 : _0.updatesByLineId) !== null && _1 !== void 0 ? _1 : {};
280
+ const lineDetailSectionUpdatesByLineId = (_0 = (_z = sourceBillDetail === null || sourceBillDetail === void 0 ? void 0 : sourceBillDetail.billDetailLocalData) === null || _z === void 0 ? void 0 : _z.updatesByLineId) !== null && _0 !== void 0 ? _0 : {};
282
281
  const classList = (0, classListSelector_1.getClassList)(classState, classListState);
283
282
  if (accountList.fetchState === 'Completed') {
284
283
  Object.keys(lineDetailSectionUpdatesByLineId).forEach((lineId) => {
@@ -300,14 +299,13 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
300
299
  const classHeirarchyList = (0, classListSelector_1.getNestedClassListHeirarchy)(classListState);
301
300
  const duplicateBills = (0, billPayReviewSelector_1.getDuplicateBills)(state, billId);
302
301
  return {
303
- showVendorGptRecommendationText,
304
302
  recommendedVendor,
305
303
  lastRecommendedVendorName,
306
304
  duplicateBills,
307
305
  fetchState: fetchState,
308
- saveStatus: (_2 = sourceBillDetail === null || sourceBillDetail === void 0 ? void 0 : sourceBillDetail.saveStatus) !== null && _2 !== void 0 ? _2 : undefined,
309
- error: (_4 = (_3 = sourceBillDetail === null || sourceBillDetail === void 0 ? void 0 : sourceBillDetail.fetchStatus) === null || _3 === void 0 ? void 0 : _3.error) !== null && _4 !== void 0 ? _4 : undefined,
310
- uploadStatus: (_5 = sourceBillDetail === null || sourceBillDetail === void 0 ? void 0 : sourceBillDetail.uploadFetchState) !== null && _5 !== void 0 ? _5 : undefined,
306
+ saveStatus: (_1 = sourceBillDetail === null || sourceBillDetail === void 0 ? void 0 : sourceBillDetail.saveStatus) !== null && _1 !== void 0 ? _1 : undefined,
307
+ error: (_3 = (_2 = sourceBillDetail === null || sourceBillDetail === void 0 ? void 0 : sourceBillDetail.fetchStatus) === null || _2 === void 0 ? void 0 : _2.error) !== null && _3 !== void 0 ? _3 : undefined,
308
+ uploadStatus: (_4 = sourceBillDetail === null || sourceBillDetail === void 0 ? void 0 : sourceBillDetail.uploadFetchState) !== null && _4 !== void 0 ? _4 : undefined,
311
309
  version: 0,
312
310
  createdBy,
313
311
  createTime,
@@ -45,7 +45,6 @@ export interface RecurringBillInstance {
45
45
  billPaymentStatus?: RecurringBillPaymentStatus;
46
46
  }
47
47
  export interface BillDetailLocalData {
48
- showVendorGptRecommendationText: boolean;
49
48
  vendor?: Vendor;
50
49
  candidateVendorname?: string;
51
50
  whatForSection?: WhatForSection;
@@ -16,7 +16,6 @@ exports.initialBillDetail = {
16
16
  error: undefined,
17
17
  },
18
18
  billDetailLocalData: {
19
- showVendorGptRecommendationText: false,
20
19
  vendor: undefined,
21
20
  whatForSection: {
22
21
  invoiceNumber: '',
@@ -174,7 +174,6 @@ const initializeBillToLocalStoreEpic = (actions$, state$) => actions$.pipe((0, o
174
174
  recurringBillInstances = recurringBillInstancesLocalData;
175
175
  }
176
176
  const billDetailLocalData = {
177
- showVendorGptRecommendationText: false,
178
177
  vendor,
179
178
  whatForSection,
180
179
  updatesByLineId,
@@ -10,5 +10,5 @@ import { fetchPreviousBills } from '../../previousBills/previousBillsReducer';
10
10
  import { fetchDuplicateBill } from '../../billPayReview/billPayReviewReducer';
11
11
  export declare type ActionType = ReturnType<typeof parseInvoiceToBill> | ReturnType<typeof saveBillUpdatesToLocalStore> | ReturnType<typeof fetchClassList> | ReturnType<typeof fetchPreviousBills> | ReturnType<typeof fetchDuplicateBill> | ReturnType<typeof updateShowAutofill> | ReturnType<typeof updateAddBillAutoFields> | ReturnType<typeof updateBillUploadFetchState>;
12
12
  export declare const parseInvoiceToBillEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
13
- export declare const toBillDetailLocalData: (state: RootState, showVendorGptRecommendationText: boolean, billPayload: Partial<BillTransactionPayload>, vendor: Vendor | undefined, recommendedVendorId?: string | undefined) => BillDetailLocalData;
13
+ export declare const toBillDetailLocalData: (state: RootState, billPayload: Partial<BillTransactionPayload>, vendor: Vendor | undefined, recommendedVendorId?: string | undefined) => BillDetailLocalData;
14
14
  export declare const getAutoFieldsData: (finalBill: BillDetailLocalData, isVendorWithNewCurrency: boolean, tentativeVendorName?: string | undefined, currencyInInvoice?: string | undefined, vendorCurrency?: string | undefined) => AddBillAutoFields;
@@ -54,7 +54,6 @@ const parseInvoiceToBillEpic = (actions$, state$) => actions$.pipe((0, operators
54
54
  let vendorCurrency = '';
55
55
  const vendors = (0, vendorListSelector_1.getVendorList)(state).vendors;
56
56
  let recommendedVendorId;
57
- let showVendorGptRecommendationText = false;
58
57
  let suggestedVendor;
59
58
  if (vendorNameFromInvoice != null && vendorNameFromInvoice.length > 0) {
60
59
  finalVendor = vendors.filter((vendor) => vendor.name.toLowerCase() === vendorNameFromInvoice.toLowerCase())[0];
@@ -72,7 +71,6 @@ const parseInvoiceToBillEpic = (actions$, state$) => actions$.pipe((0, operators
72
71
  if (matchScore > 85) {
73
72
  if (vendorCurrency === currencyInInvoice) {
74
73
  finalVendor = suggestedVendor;
75
- showVendorGptRecommendationText = true;
76
74
  }
77
75
  else {
78
76
  isVendorWithNewCurrency = true;
@@ -83,7 +81,6 @@ const parseInvoiceToBillEpic = (actions$, state$) => actions$.pipe((0, operators
83
81
  vendorNameFromInvoice.toLowerCase()) {
84
82
  if (vendorCurrency === currencyInInvoice) {
85
83
  finalVendor = suggestedVendor;
86
- showVendorGptRecommendationText = true;
87
84
  }
88
85
  else {
89
86
  isVendorWithNewCurrency = true;
@@ -92,13 +89,12 @@ const parseInvoiceToBillEpic = (actions$, state$) => actions$.pipe((0, operators
92
89
  else {
93
90
  recommendedVendorId = suggestedVendor === null || suggestedVendor === void 0 ? void 0 : suggestedVendor.id;
94
91
  finalVendor = suggestedVendor;
95
- showVendorGptRecommendationText = true;
96
92
  }
97
93
  }
98
94
  }
99
95
  }
100
96
  const file = (0, attachmentPayload_1.mapFiletoAttachment)(invoiceProcessingPayload.files[0]);
101
- const finalBill = Object.assign(Object.assign({}, (0, exports.toBillDetailLocalData)(state, showVendorGptRecommendationText, invoiceProcessingPayload.bills[0], finalVendor, recommendedVendorId)), { file: file });
97
+ const finalBill = Object.assign(Object.assign({}, (0, exports.toBillDetailLocalData)(state, invoiceProcessingPayload.bills[0], finalVendor, recommendedVendorId)), { file: file });
102
98
  const addBillAutoFields = (0, exports.getAutoFieldsData)(finalBill, isVendorWithNewCurrency, vendorNameFromInvoice, currencyInInvoice, vendorCurrency);
103
99
  if (finalVendor != null) {
104
100
  return (0, rxjs_1.of)((0, editBillViewReducer_1.saveBillUpdatesToLocalStore)({ billDetailLocalData: finalBill }), (0, previousBillsReducer_1.fetchPreviousBills)(finalVendor.qboId, false), (0, billPayReviewReducer_1.fetchDuplicateBill)(finalVendor.name, finalVendor.id, (_e = (_d = finalBill.totalAmount) === null || _d === void 0 ? void 0 : _d.amount) !== null && _e !== void 0 ? _e : 0, (_f = finalBill.whatForSection) === null || _f === void 0 ? void 0 : _f.invoiceNumber), (0, editBillViewReducer_1.updateShowAutofill)(false), (0, editBillViewReducer_1.updateAddBillAutoFields)(addBillAutoFields), (0, editBillViewReducer_1.updateBillUploadFetchState)({
@@ -124,7 +120,7 @@ const parseInvoiceToBillEpic = (actions$, state$) => actions$.pipe((0, operators
124
120
  }
125
121
  }));
126
122
  exports.parseInvoiceToBillEpic = parseInvoiceToBillEpic;
127
- const toBillDetailLocalData = (state, showVendorGptRecommendationText, billPayload, vendor, recommendedVendorId) => {
123
+ const toBillDetailLocalData = (state, billPayload, vendor, recommendedVendorId) => {
128
124
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
129
125
  const currency = {
130
126
  currencyCode: (_a = billPayload.currency_code) !== null && _a !== void 0 ? _a : '',
@@ -190,7 +186,6 @@ const toBillDetailLocalData = (state, showVendorGptRecommendationText, billPaylo
190
186
  const fromAccountType = (0, billPayConfigPayload_1.getAccountTypeSubConfigCodeKey)((0, billPayConfigState_1.toAccType)((_m = (_l = billPayload.bill_pay_info) === null || _l === void 0 ? void 0 : _l.from_account.account_type) !== null && _m !== void 0 ? _m : ''));
191
187
  return {
192
188
  recommendedVendorId,
193
- showVendorGptRecommendationText,
194
189
  lastRecommendedVendorName: recommendedVendorId != null ? vendor === null || vendor === void 0 ? void 0 : vendor.name : undefined,
195
190
  vendor: vendor,
196
191
  whatForSection: {
@@ -128,9 +128,7 @@ const getTotalPayments = (startDate, endDate, frequency, currentInstance) => {
128
128
  switch (frequency) {
129
129
  case 'weekly':
130
130
  case 'biweekly':
131
- totalPayments =
132
- endDate.diff(currentStartDate, 'day') /
133
- getRecurringFrequencyInDays(frequency);
131
+ totalPayments = endDate.diff(currentStartDate, 'day') / getRecurringFrequencyInDays(frequency);
134
132
  break;
135
133
  case 'monthly':
136
134
  totalPayments = endDate.diff(currentStartDate, 'month');
@@ -170,15 +168,9 @@ function getRecurringBillInstances(startDate, frequency, totalPayments, currentI
170
168
  const getRecurringFrequencyWithOffset = (frequency) => {
171
169
  switch (frequency) {
172
170
  case 'weekly':
173
- return {
174
- offSetValue: getRecurringFrequencyInDays(frequency),
175
- offSetUnit: 'day',
176
- };
171
+ return { offSetValue: getRecurringFrequencyInDays(frequency), offSetUnit: 'day' };
177
172
  case 'biweekly':
178
- return {
179
- offSetValue: getRecurringFrequencyInDays(frequency),
180
- offSetUnit: 'day',
181
- };
173
+ return { offSetValue: getRecurringFrequencyInDays(frequency), offSetUnit: 'day' };
182
174
  case 'monthly':
183
175
  return { offSetValue: 1, offSetUnit: 'month' };
184
176
  case 'quarterly':
@@ -189,6 +181,7 @@ function getRecurringBillInstances(startDate, frequency, totalPayments, currentI
189
181
  for (let i = 0; i < totalPayments; i++) {
190
182
  updatedInstances.push(Object.assign({ instance: currentInstance + i, isDeleted: false, amount: billAmount }, checkIfHolidayAndGetNextDate(startDate.add(i * offSetValue, offSetUnit))));
191
183
  }
184
+ ;
192
185
  return updatedInstances;
193
186
  }
194
187
  function getRecurringFrequencyInDays(frequency) {
package/lib/zeniAPI.d.ts CHANGED
@@ -15,7 +15,6 @@ export interface RESTAPIEndpoints {
15
15
  readonly approvalMicroServiceBaseUrl: string;
16
16
  readonly cardMicroServiceBaseUrl: string;
17
17
  readonly taskMicroServiceBaseUrl: string;
18
- readonly notificationMicroServiceBaseUrl: string;
19
18
  }
20
19
  export interface ZeniAPI<ResponseType = FetchResponse> {
21
20
  readonly apiEndPoints: RESTAPIEndpoints;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.8.42",
3
+ "version": "4.8.43",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",