@zeniai/client-epic-state 4.8.54 → 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.
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -2
- package/lib/entity/tenant/tenantPayload.d.ts +0 -5
- package/lib/entity/userRole/userRolePayload.d.ts +0 -5
- package/lib/entity/userRole/userRolePayload.js +0 -15
- package/lib/entity/userRole/userRoleType.d.ts +3 -16
- package/lib/entity/userRole/userRoleType.js +6 -198
- package/lib/epic.d.ts +1 -3
- package/lib/epic.js +1 -3
- package/lib/index.d.ts +12 -14
- package/lib/index.js +18 -50
- package/lib/view/commonVendorView/vendorView/epics/saveVendorEpic.js +4 -31
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +1 -5
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.js +2 -18
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -14
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +4 -36
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewState.d.ts +0 -7
- package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
- package/lib/view/people/deletePersonEpic.d.ts +1 -1
- package/lib/view/people/invitePeopleEpic.d.ts +1 -1
- package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
- package/lib/view/people/resendInviteEpic.d.ts +1 -1
- package/lib/view/settingsView/settingsViewPayload.d.ts +0 -7
- package/lib/view/settingsView/settingsViewReducer.d.ts +2 -7
- package/lib/view/settingsView/settingsViewReducer.js +2 -115
- package/lib/view/settingsView/settingsViewSelector.d.ts +0 -2
- package/lib/view/settingsView/settingsViewSelector.js +1 -4
- package/lib/view/settingsView/settingsViewState.d.ts +0 -18
- package/lib/view/settingsView/settingsViewState.js +0 -15
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.d.ts +0 -1
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +1 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +0 -3
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +24 -49
- package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +0 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewState.js +0 -2
- package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.js +9 -16
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.d.ts +1 -1
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +9 -21
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListPayload.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +1 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +3 -6
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +6 -9
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +3 -6
- package/lib/view/spendManagement/helpers.js +4 -11
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +1 -5
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +0 -1
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +6 -8
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +0 -2
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +1 -7
- package/lib/view/taskManager/taskListView/taskListSelector.js +1 -1
- package/lib/view/transactionList/fetchTransactionListByEntityEpic.js +0 -3
- package/lib/view/transactionList/transactionListByEntitySelector.d.ts +0 -4
- package/lib/view/transactionList/transactionListByEntitySelector.js +1 -62
- package/lib/view/transactionList/transactionListReducer.d.ts +1 -2
- package/lib/view/transactionList/transactionListReducer.js +2 -2
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/saveVendorFirstReviewViewEpic.js +6 -9
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewPayload.d.ts +0 -1
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.d.ts +2 -2
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
- package/lib/zeniAPI.d.ts +0 -1
- package/package.json +1 -1
- package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.d.ts +0 -17
- package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.js +0 -23
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +0 -31
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.js +0 -70
- package/lib/view/settingsView/settingsViewHelpers.d.ts +0 -2
- 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.
|
|
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
|
|
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
|
-
(
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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;
|
|
@@ -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 {
|
|
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>,
|
|
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.
|
|
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.
|
|
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.
|
|
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);
|
|
@@ -22,7 +22,6 @@ export interface BillPayReviewSelectorView extends SelectorView {
|
|
|
22
22
|
isCollectToAccountInfoFromVendorContact: boolean;
|
|
23
23
|
billPayConfigList: BillPayConfig[];
|
|
24
24
|
isRecurring: boolean;
|
|
25
|
-
isInvoiceDateAutoUpdated: boolean;
|
|
26
25
|
recurringBillInstance?: number;
|
|
27
26
|
recurringConfig?: RecurringBillConfigLocalData;
|
|
28
27
|
}
|
|
@@ -36,7 +36,7 @@ const getDuplicateBills = (state, billId) => {
|
|
|
36
36
|
};
|
|
37
37
|
exports.getDuplicateBills = getDuplicateBills;
|
|
38
38
|
const getReviewPageBillDetail = (state, billId) => {
|
|
39
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r
|
|
39
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
40
40
|
const { accountListState, accountState, setupViewState, billTransactionState, classListState, editBillDetailViewState, paymentAccountState, vendorState, contactState, billPayConfigState, recurringBillState, depositAccountState, depositAccountListState, } = state;
|
|
41
41
|
const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId !== null && billId !== void 0 ? billId : '');
|
|
42
42
|
const sourceBillDetail = billId != null
|
|
@@ -163,7 +163,6 @@ const getReviewPageBillDetail = (state, billId) => {
|
|
|
163
163
|
isRecurring,
|
|
164
164
|
recurringBillInstance,
|
|
165
165
|
recurringConfig,
|
|
166
|
-
isInvoiceDateAutoUpdated: (_s = whatForSection.isInvoiceDateAutoUpdated) !== null && _s !== void 0 ? _s : false,
|
|
167
166
|
};
|
|
168
167
|
};
|
|
169
168
|
exports.getReviewPageBillDetail = getReviewPageBillDetail;
|
|
@@ -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;
|
|
@@ -136,6 +135,4 @@ export declare const getRecurringBillLocalData: (recurringBillState: RecurringBi
|
|
|
136
135
|
recurringBillInstancesLocalData: RecurringBillInstance[];
|
|
137
136
|
recurringConfigLocalData?: RecurringBillConfigLocalData | undefined;
|
|
138
137
|
};
|
|
139
|
-
export declare const getInvoiceDate: (invoiceDate: ZeniDate, bookCloseDate?: import("dayjs").Dayjs | undefined) => import("dayjs").Dayjs;
|
|
140
|
-
export declare const getDueDate: (dueDate: ZeniDate, invoiceDate?: import("dayjs").Dayjs | undefined, bookCloseDate?: import("dayjs").Dayjs | undefined) => import("dayjs").Dayjs;
|
|
141
138
|
export declare const getWithdrawFrom: (paymentAccountState: PaymentAccountState, depositAccountState: DepositAccountState, fromAccountId: ID, fromAccountType: string) => TransferMoneyParty | undefined;
|