@zeniai/client-epic-state 5.2.28 → 5.2.29
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/aiCfo/aiCfoPayload.d.ts +0 -21
- package/lib/entity/aiCfo/aiCfoReducer.js +1 -73
- package/lib/entity/aiCfo/aiCfoState.d.ts +0 -24
- package/lib/entity/file/fileState.d.ts +3 -3
- package/lib/entity/file/fileState.js +0 -2
- package/lib/entity/invoicing/creditNote/creditNotePayload.d.ts +1 -0
- package/lib/entity/invoicing/creditNote/creditNotePayload.js +1 -0
- package/lib/entity/invoicing/creditNote/creditNoteState.d.ts +1 -0
- package/lib/entity/invoicing/invoice/invoicePayload.d.ts +1 -0
- package/lib/entity/invoicing/invoice/invoicePayload.js +1 -0
- package/lib/entity/invoicing/invoice/invoiceState.d.ts +1 -0
- package/lib/entity/invoicing/invoicingCommonPayload.d.ts +0 -2
- package/lib/entity/invoicing/invoicingCustomer/invoicingCustomerPayload.d.ts +1 -0
- package/lib/entity/invoicing/invoicingCustomer/invoicingCustomerPayload.js +1 -0
- package/lib/entity/invoicing/invoicingCustomer/invoicingCustomerState.d.ts +1 -0
- package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.d.ts +2 -1
- package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.js +2 -1
- package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionState.d.ts +2 -1
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +7 -0
- package/lib/epic.d.ts +1 -2
- package/lib/epic.js +0 -2
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +1 -73
- package/lib/esm/entity/file/fileState.js +0 -2
- package/lib/esm/entity/invoicing/creditNote/creditNotePayload.js +1 -0
- package/lib/esm/entity/invoicing/invoice/invoicePayload.js +1 -0
- package/lib/esm/entity/invoicing/invoicingCustomer/invoicingCustomerPayload.js +1 -0
- package/lib/esm/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.js +2 -1
- package/lib/esm/epic.js +0 -2
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +0 -5
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +0 -1
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +22 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +2 -4
- package/lib/esm/view/invoicing/couponView/couponViewState.js +4 -4
- package/lib/esm/view/invoicing/dataImportView/dataImportViewSelector.js +0 -2
- package/lib/esm/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +0 -1
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +0 -2
- package/lib/esm/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.js +3 -3
- package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +4 -4
- package/lib/esm/view/invoicing/invoicingOverview/invoicingOverviewPayload.js +1 -0
- package/lib/esm/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +1 -2
- package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +0 -1
- package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +2 -0
- package/lib/esm/view/invoicing/settingsView/invoicingBrandingFormConfig.js +0 -5
- package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +1 -5
- package/lib/esm/view/recommendation/recommendationReducer.js +1 -13
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +2 -18
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +1 -0
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +3 -0
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +2 -18
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +1 -0
- package/lib/index.d.ts +5 -7
- package/lib/index.js +23 -24
- package/lib/view/aiCfoView/aiCfoViewReducer.js +0 -5
- package/lib/view/aiCfoView/aiCfoViewSelector.js +0 -1
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +0 -7
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +22 -0
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +3 -5
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +5 -2
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +2 -4
- package/lib/view/invoicing/couponView/couponViewState.d.ts +2 -2
- package/lib/view/invoicing/couponView/couponViewState.js +4 -4
- package/lib/view/invoicing/dataImportView/dataImportViewSelector.d.ts +0 -2
- package/lib/view/invoicing/dataImportView/dataImportViewSelector.js +0 -2
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.d.ts +0 -1
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +0 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +0 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +0 -2
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +0 -1
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.d.ts +2 -2
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.js +3 -3
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts +2 -2
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +4 -4
- package/lib/view/invoicing/invoicingOverview/invoicingOverviewPayload.d.ts +1 -0
- package/lib/view/invoicing/invoicingOverview/invoicingOverviewPayload.js +1 -0
- package/lib/view/invoicing/invoicingOverview/invoicingOverviewState.d.ts +1 -0
- package/lib/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.d.ts +1 -3
- package/lib/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +0 -1
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.d.ts +0 -2
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +0 -1
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts +2 -2
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +2 -0
- package/lib/view/invoicing/issueCreditNote/issueCreditNotePayload.d.ts +1 -0
- package/lib/view/invoicing/settingsView/invoicingBrandingFormConfig.d.ts +0 -1
- package/lib/view/invoicing/settingsView/invoicingBrandingFormConfig.js +0 -5
- package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +1 -5
- package/lib/view/invoicing/settingsView/settingsViewSelector.js +0 -4
- package/lib/view/invoicing/subscriptionAction/subscriptionActionRequestPayload.d.ts +0 -8
- package/lib/view/recommendation/recommendationPayload.d.ts +0 -34
- package/lib/view/recommendation/recommendationReducer.d.ts +1 -2
- package/lib/view/recommendation/recommendationReducer.js +2 -14
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.d.ts +1 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +2 -18
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +1 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +1 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +3 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonState.d.ts +1 -0
- package/lib/view/spendManagement/commonHistoryView/commonHistory.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.d.ts +1 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +2 -18
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +1 -0
- package/package.json +1 -1
- package/lib/esm/view/recommendation/submitRecommendationFeedbackEpic.js +0 -52
- package/lib/view/recommendation/submitRecommendationFeedbackEpic.d.ts +0 -7
- package/lib/view/recommendation/submitRecommendationFeedbackEpic.js +0 -56
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.toInvoicingCouponTabId = exports.ALL_INVOICING_COUPON_TAB_IDS = exports.INVOICING_COUPON_COLUMNS = exports.toInvoicingCouponSortKey = exports.ALL_INVOICING_COUPON_SORT_KEYS = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
exports.ALL_INVOICING_COUPON_SORT_KEYS = [
|
|
6
|
-
'
|
|
7
|
-
'
|
|
6
|
+
'coupon_id',
|
|
7
|
+
'name',
|
|
8
8
|
'discount',
|
|
9
9
|
'duration',
|
|
10
10
|
'created',
|
|
@@ -16,8 +16,8 @@ exports.ALL_INVOICING_COUPON_SORT_KEYS = [
|
|
|
16
16
|
const toInvoicingCouponSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INVOICING_COUPON_SORT_KEYS);
|
|
17
17
|
exports.toInvoicingCouponSortKey = toInvoicingCouponSortKey;
|
|
18
18
|
exports.INVOICING_COUPON_COLUMNS = [
|
|
19
|
-
{ key: '
|
|
20
|
-
{ key: '
|
|
19
|
+
{ key: 'coupon_id', sortable: true },
|
|
20
|
+
{ key: 'name', sortable: true },
|
|
21
21
|
{ key: 'discount', sortable: false },
|
|
22
22
|
{ key: 'duration', sortable: true },
|
|
23
23
|
{ key: 'created', sortable: true },
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
|
-
import { InvoicingFieldHelpByCode } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
2
|
import { RootState } from '../../../rootStateTypes';
|
|
4
3
|
import { InvoicingDataImportStatusRow, InvoicingMigrationSession } from './dataImportViewPayload';
|
|
5
4
|
import { InvoicingMigrationDiagnosticsState } from './dataImportViewState';
|
|
6
5
|
export interface InvoicingDataImportView {
|
|
7
6
|
activeMigrationSessionId: ID | null;
|
|
8
7
|
diagnosticsBySession: Record<ID, InvoicingMigrationDiagnosticsState>;
|
|
9
|
-
fieldHelp: InvoicingFieldHelpByCode;
|
|
10
8
|
sessionDetail: Record<ID, InvoicingMigrationSession>;
|
|
11
9
|
sessionDetailFetch: FetchStateAndError;
|
|
12
10
|
sessions: InvoicingMigrationSession[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getInvoicingDataImportView = void 0;
|
|
4
|
-
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
5
4
|
/**
|
|
6
5
|
* Single bundled view for the invoicing data-import surfaces — consumers read
|
|
7
6
|
* only this. Carries the migration `sessions` list + `sessionsFetch`, the
|
|
@@ -11,7 +10,6 @@ const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingC
|
|
|
11
10
|
const getInvoicingDataImportView = (state) => {
|
|
12
11
|
const dataImportState = state.invoicingDataImportViewState;
|
|
13
12
|
return {
|
|
14
|
-
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'data_import'),
|
|
15
13
|
activeMigrationSessionId: dataImportState.activeDetailId,
|
|
16
14
|
sessionDetail: dataImportState.sessionDetail,
|
|
17
15
|
sessionDetailFetch: dataImportState.sessionDetailFetch,
|
|
@@ -19,7 +19,6 @@ export interface InvoicingCatalogListView extends SelectorView {
|
|
|
19
19
|
productFilters: InvoicingCatalogProductFilters;
|
|
20
20
|
productNextCursor: string | null;
|
|
21
21
|
products: InvoicingPlan[];
|
|
22
|
-
planSort?: InvoicingListSort;
|
|
23
22
|
productSort?: InvoicingListSort;
|
|
24
23
|
}
|
|
25
24
|
export declare const getInvoicingCatalogPrices: (items: InvoicingPlan[]) => InvoicingProduct[];
|
|
@@ -22,7 +22,6 @@ exports.getInvoicingCatalogPrices = getInvoicingCatalogPrices;
|
|
|
22
22
|
exports.getInvoicingCatalogListView = (0, toolkit_1.createSelector)((state) => state.invoicingPlanState, (state) => state.invoicingCatalogListViewState, (state) => state.invoicingConfigViewState.catalogItemLifecycleActionOptions, (planState, listViewState, catalogItemLifecycleActionOptions) => ({
|
|
23
23
|
catalogItemLifecycleActionOptions,
|
|
24
24
|
plans: (0, planSelector_1.getInvoicingPlansByIds)(planState, listViewState.planIds),
|
|
25
|
-
planSort: listViewState.planSort,
|
|
26
25
|
productColumns: invoicingCatalogListViewState_1.INVOICING_PRODUCT_COLUMNS,
|
|
27
26
|
products: (0, planSelector_1.getInvoicingPlansByIds)(planState, listViewState.productIds),
|
|
28
27
|
productSort: listViewState.productSort,
|
|
@@ -54,7 +54,6 @@ export interface InvoicingConfigPayload {
|
|
|
54
54
|
qbo_account_mapping_kind_options?: InvoicingQboAccountMappingKindOptionWire[];
|
|
55
55
|
qbo_customer_matching_options?: InvoicingNamedOptionWire[];
|
|
56
56
|
qbo_sync_status_options?: InvoicingNamedOptionWire[];
|
|
57
|
-
subscription_cancel_reason_code_options?: InvoicingNamedOptionWire[];
|
|
58
57
|
subscription_status_options?: InvoicingNamedOptionWire[];
|
|
59
58
|
taxability_options?: InvoicingNamedOptionWire[];
|
|
60
59
|
transaction_status_options?: InvoicingNamedOptionWire[];
|
|
@@ -2,7 +2,7 @@ import { ZeniAPIStatus } from '../../../responsePayload';
|
|
|
2
2
|
import { InvoicingConfigPayload } from './invoicingConfigViewPayload';
|
|
3
3
|
import { InvoicingConfigViewState } from './invoicingConfigViewState';
|
|
4
4
|
export declare const initialState: InvoicingConfigViewState;
|
|
5
|
-
export declare function mapInvoicingConfigPayloadToState(payload: InvoicingConfigPayload): Pick<InvoicingConfigViewState, 'auditLogEntityRouteOptions' | 'auditLogListSortFieldOptions' | 'auditLogSourceLabels' | 'autoCollectionOptions' | 'billingPeriodUnitOptions' | 'catalogTierTypeOptionsByPricingModel' | 'catalogTrialEndActionOptions' | 'catalogTrialUnitOptions' | 'customerTypeOptions' | 'dateFormatOptions' | 'fieldHelp' | 'discountApplyOnOptions' | 'discountDurationTypeOptions' | 'discountTypeOptions' | 'manualPaymentMethodOptions' | 'netTermDayOptions' | 'paymentGatewayOptions' | 'taxabilityOptions' | 'cardStatusOptions' | 'catalogItemStatusOptions' | 'catalogItemTypeOptions' | 'creditNoteReasonCodeOptions' | 'creditNoteStatusOptions' | 'creditNoteTypeOptions' | 'customerStatusOptions' | 'discountStatusOptions' | 'dunningCaseStatusOptions' | 'invoiceStatusOptions' | '
|
|
5
|
+
export declare function mapInvoicingConfigPayloadToState(payload: InvoicingConfigPayload): Pick<InvoicingConfigViewState, 'auditLogEntityRouteOptions' | 'auditLogListSortFieldOptions' | 'auditLogSourceLabels' | 'autoCollectionOptions' | 'billingPeriodUnitOptions' | 'catalogTierTypeOptionsByPricingModel' | 'catalogTrialEndActionOptions' | 'catalogTrialUnitOptions' | 'customerTypeOptions' | 'dateFormatOptions' | 'fieldHelp' | 'discountApplyOnOptions' | 'discountDurationTypeOptions' | 'discountTypeOptions' | 'manualPaymentMethodOptions' | 'netTermDayOptions' | 'paymentGatewayOptions' | 'taxabilityOptions' | 'cardStatusOptions' | 'catalogItemStatusOptions' | 'catalogItemTypeOptions' | 'creditNoteReasonCodeOptions' | 'creditNoteStatusOptions' | 'creditNoteTypeOptions' | 'customerStatusOptions' | 'discountStatusOptions' | 'dunningCaseStatusOptions' | 'invoiceStatusOptions' | 'subscriptionStatusOptions' | 'transactionStatusOptions' | 'transactionTypeOptions' | 'createdAt' | 'updatedAt' | 'dunningScheduleActionOptions' | 'subscriptionLifecycleActionOptions' | 'subscriptionCommercialEditAllowedFromStatuses' | 'subscriptionMetadataEditAllowedFromStatuses' | 'subscriptionEditFieldOptions' | 'subscriptionCancelTimingOptions' | 'subscriptionChangeOptionOptions' | 'catalogItemLifecycleActionOptions' | 'catalogProductLifecycleActionOptions' | 'discountLifecycleActionOptions' | 'qboAccountMappingKindOptions' | 'qboCustomerMatchingOptions' | 'qboSyncStatusOptions' | 'isInvoicingEnabled' | 'isInvoicingTosAccepted' | 'invoicingTosAcceptanceIp' | 'invoicingTosAcceptanceTime' | 'invoicingTosAcceptanceUserAgent' | 'invoicingTosAcceptanceUserId' | 'isInvoicingSettingsSeeded'>;
|
|
6
6
|
export declare const fetchInvoicingConfig: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload?: {
|
|
7
7
|
cacheOverride?: boolean;
|
|
8
8
|
} | undefined], {
|
|
@@ -39,7 +39,6 @@ exports.initialState = {
|
|
|
39
39
|
discountStatusOptions: [],
|
|
40
40
|
dunningCaseStatusOptions: [],
|
|
41
41
|
invoiceStatusOptions: [],
|
|
42
|
-
subscriptionCancelReasonCodeOptions: [],
|
|
43
42
|
subscriptionStatusOptions: [],
|
|
44
43
|
transactionStatusOptions: [],
|
|
45
44
|
transactionTypeOptions: [],
|
|
@@ -109,7 +108,6 @@ function mapInvoicingConfigPayloadToState(payload) {
|
|
|
109
108
|
discountStatusOptions: (payload.discount_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
110
109
|
dunningCaseStatusOptions: (payload.dunning_case_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
111
110
|
invoiceStatusOptions: (payload.invoice_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
112
|
-
subscriptionCancelReasonCodeOptions: (payload.subscription_cancel_reason_code_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
113
111
|
subscriptionStatusOptions: (payload.subscription_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
114
112
|
transactionStatusOptions: (payload.transaction_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
115
113
|
transactionTypeOptions: (payload.transaction_type_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
@@ -38,7 +38,6 @@ export interface InvoicingConfigViewState extends FetchedState {
|
|
|
38
38
|
qboAccountMappingKindOptions: InvoicingQboAccountMappingKindOption[];
|
|
39
39
|
qboCustomerMatchingOptions: InvoicingNamedOption[];
|
|
40
40
|
qboSyncStatusOptions: InvoicingNamedOption[];
|
|
41
|
-
subscriptionCancelReasonCodeOptions: InvoicingNamedOption[];
|
|
42
41
|
subscriptionCancelTimingOptions: InvoicingNamedOption[];
|
|
43
42
|
subscriptionChangeOptionOptions: InvoicingNamedOption[];
|
|
44
43
|
subscriptionCommercialEditAllowedFromStatuses: string[];
|
|
@@ -4,8 +4,8 @@ import { InvoicingListSort } from '../invoicingApiHelper';
|
|
|
4
4
|
export interface InvoicingCustomerFilters {
|
|
5
5
|
search?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const ALL_INVOICING_CUSTOMER_SORT_KEYS: readonly ["name", "email", "billingAddress", "
|
|
8
|
-
export declare const toInvoicingCustomerSortKey: (v: string) => "status" | "name" | "
|
|
7
|
+
export declare const ALL_INVOICING_CUSTOMER_SORT_KEYS: readonly ["name", "email", "billingAddress", "cardStatus", "autoCollect", "status"];
|
|
8
|
+
export declare const toInvoicingCustomerSortKey: (v: string) => "status" | "name" | "email" | "billingAddress" | "cardStatus" | "autoCollect";
|
|
9
9
|
export type InvoicingCustomerSortKey = ReturnType<typeof toInvoicingCustomerSortKey>;
|
|
10
10
|
/**
|
|
11
11
|
* Structural column descriptor owned by CES so the customer-list column set,
|
|
@@ -6,17 +6,17 @@ exports.ALL_INVOICING_CUSTOMER_SORT_KEYS = [
|
|
|
6
6
|
'name',
|
|
7
7
|
'email',
|
|
8
8
|
'billingAddress',
|
|
9
|
-
'
|
|
9
|
+
'cardStatus',
|
|
10
10
|
'autoCollect',
|
|
11
11
|
'status',
|
|
12
12
|
];
|
|
13
13
|
const toInvoicingCustomerSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INVOICING_CUSTOMER_SORT_KEYS);
|
|
14
14
|
exports.toInvoicingCustomerSortKey = toInvoicingCustomerSortKey;
|
|
15
15
|
exports.INVOICING_CUSTOMER_COLUMNS = [
|
|
16
|
-
{ key: 'name', sortable:
|
|
16
|
+
{ key: 'name', sortable: true },
|
|
17
17
|
{ key: 'email', sortable: true },
|
|
18
18
|
{ key: 'billingAddress', sortable: false },
|
|
19
|
-
{ key: '
|
|
19
|
+
{ key: 'cardStatus', sortable: true },
|
|
20
20
|
{ key: 'autoCollect', sortable: true },
|
|
21
21
|
{ key: 'status', sortable: true },
|
|
22
22
|
];
|
package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { InvoicingListSort } from '../invoicingApiHelper';
|
|
|
4
4
|
export interface InvoicingDunningCaseFilters {
|
|
5
5
|
search?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const ALL_INVOICING_DUNNING_CASE_SORT_KEYS: readonly ["customer", "invoice", "attempts", "
|
|
8
|
-
export declare const toInvoicingDunningCaseSortKey: (v: string) => "status" | "invoice" | "amount" | "customer" | "
|
|
7
|
+
export declare const ALL_INVOICING_DUNNING_CASE_SORT_KEYS: readonly ["customer", "invoice", "attempts", "nextRetry", "daysPastDue", "failureReason", "status", "amount"];
|
|
8
|
+
export declare const toInvoicingDunningCaseSortKey: (v: string) => "status" | "invoice" | "amount" | "customer" | "daysPastDue" | "attempts" | "nextRetry" | "failureReason";
|
|
9
9
|
export type InvoicingDunningCaseSortKey = ReturnType<typeof toInvoicingDunningCaseSortKey>;
|
|
10
10
|
/**
|
|
11
11
|
* Structural column descriptor owned by CES so the dunning-list column set,
|
package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js
CHANGED
|
@@ -6,8 +6,8 @@ exports.ALL_INVOICING_DUNNING_CASE_SORT_KEYS = [
|
|
|
6
6
|
'customer',
|
|
7
7
|
'invoice',
|
|
8
8
|
'attempts',
|
|
9
|
-
'
|
|
10
|
-
'
|
|
9
|
+
'nextRetry',
|
|
10
|
+
'daysPastDue',
|
|
11
11
|
'failureReason',
|
|
12
12
|
'status',
|
|
13
13
|
'amount',
|
|
@@ -18,8 +18,8 @@ exports.INVOICING_DUNNING_CASE_COLUMNS = [
|
|
|
18
18
|
{ key: 'customer', sortable: true },
|
|
19
19
|
{ key: 'invoice', sortable: true },
|
|
20
20
|
{ key: 'attempts', sortable: true },
|
|
21
|
-
{ key: '
|
|
22
|
-
{ key: '
|
|
21
|
+
{ key: 'nextRetry', sortable: true },
|
|
22
|
+
{ key: 'daysPastDue', sortable: true },
|
|
23
23
|
{ key: 'failureReason', sortable: false },
|
|
24
24
|
{ key: 'status', sortable: true },
|
|
25
25
|
{ key: 'amount', sortable: true },
|
|
@@ -44,6 +44,7 @@ const mapInvoicingPlanRevenuePointPayloadToState = (payload) => ({
|
|
|
44
44
|
mrr: (0, amount_1.toAmount)(payload.mrr, 'USD', '$'),
|
|
45
45
|
pct: payload.pct,
|
|
46
46
|
planID: payload.plan,
|
|
47
|
+
productCode: payload.product_code,
|
|
47
48
|
});
|
|
48
49
|
exports.mapInvoicingPlanRevenuePointPayloadToState = mapInvoicingPlanRevenuePointPayloadToState;
|
|
49
50
|
const mapInvoicingDashboardSummaryPayloadToState = (payload) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
-
import type { InvoicingFieldHelpByCode
|
|
3
|
+
import type { InvoicingFieldHelpByCode } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
4
|
import { InvoicingSubscription } from '../../../entity/invoicing/invoicingSubscription/invoicingSubscriptionState';
|
|
5
5
|
import { RootState } from '../../../rootStateTypes';
|
|
6
6
|
/**
|
|
@@ -10,8 +10,6 @@ import { RootState } from '../../../rootStateTypes';
|
|
|
10
10
|
*/
|
|
11
11
|
export interface InvoicingSubscriptionDetailView extends SelectorView {
|
|
12
12
|
actionState: FetchStateAndError;
|
|
13
|
-
/** Cancel reasons from `/1.0/config`, so the dialog hardcodes nothing. */
|
|
14
|
-
cancelReasonCodeOptions: InvoicingNamedOption[];
|
|
15
13
|
/**
|
|
16
14
|
* Backend help copy for this screen's field group, keyed by field code.
|
|
17
15
|
* Folded in here so the screen never reaches for the config view itself.
|
|
@@ -10,7 +10,6 @@ const getInvoicingSubscriptionDetail = (state, invoicingSubscriptionID) => {
|
|
|
10
10
|
const { error, fetchState } = state.invoicingSubscriptionDetailViewState;
|
|
11
11
|
return {
|
|
12
12
|
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'subscription'),
|
|
13
|
-
cancelReasonCodeOptions: (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state).subscriptionCancelReasonCodeOptions,
|
|
14
13
|
actionState: (0, subscriptionActionSelector_1.getInvoicingSubscriptionActionState)(invoicingSubscriptionID)(state),
|
|
15
14
|
subscription: (0, exports.getInvoicingSubscriptionById)(state, invoicingSubscriptionID),
|
|
16
15
|
fetchState,
|
package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.d.ts
CHANGED
|
@@ -7,8 +7,6 @@ import { InvoicingListSort } from '../invoicingApiHelper';
|
|
|
7
7
|
import { InvoicingSubscriptionColumnConfig, InvoicingSubscriptionFilters, InvoicingSubscriptionTabId } from './invoicingSubscriptionListViewState';
|
|
8
8
|
export interface InvoicingSubscriptionListView extends SelectorView {
|
|
9
9
|
activeTab: InvoicingSubscriptionTabId;
|
|
10
|
-
/** Cancel reasons from `/1.0/config`, so the dialog hardcodes nothing. */
|
|
11
|
-
cancelReasonCodeOptions: InvoicingNamedOption[];
|
|
12
10
|
columns: InvoicingSubscriptionColumnConfig[];
|
|
13
11
|
count: InvoicingListCounts;
|
|
14
12
|
countsFetchState: FetchStateAndError;
|
package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js
CHANGED
|
@@ -31,7 +31,6 @@ exports.getInvoicingSubscriptionListView = (0, toolkit_1.createSelector)((state)
|
|
|
31
31
|
count: listViewState.counts,
|
|
32
32
|
countsFetchState: listViewState.countsFetchState,
|
|
33
33
|
subscriptionCommercialEditAllowedFromStatuses: configState.subscriptionCommercialEditAllowedFromStatuses,
|
|
34
|
-
cancelReasonCodeOptions: configState.subscriptionCancelReasonCodeOptions,
|
|
35
34
|
subscriptionLifecycleActionOptions: configState.subscriptionLifecycleActionOptions,
|
|
36
35
|
subscriptionMetadataEditAllowedFromStatuses: configState.subscriptionMetadataEditAllowedFromStatuses,
|
|
37
36
|
statusOptions,
|
package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ export interface InvoicingSubscriptionFilters {
|
|
|
7
7
|
startedFrom?: string;
|
|
8
8
|
startedTo?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const ALL_INVOICING_SUBSCRIPTION_SORT_KEYS: readonly ["subscription", "customer", "plan", "term_end", "next_billing", "auto_collect", "status", "mrr"];
|
|
11
|
-
export declare const toInvoicingSubscriptionSortKey: (v: string) => "status" | "customer" | "subscription" | "plan" | "term_end" | "next_billing" | "auto_collect" | "mrr";
|
|
10
|
+
export declare const ALL_INVOICING_SUBSCRIPTION_SORT_KEYS: readonly ["subscription", "customer", "plan", "product_code", "term_end", "next_billing", "auto_collect", "status", "mrr"];
|
|
11
|
+
export declare const toInvoicingSubscriptionSortKey: (v: string) => "status" | "customer" | "subscription" | "plan" | "product_code" | "term_end" | "next_billing" | "auto_collect" | "mrr";
|
|
12
12
|
export type InvoicingSubscriptionSortKey = ReturnType<typeof toInvoicingSubscriptionSortKey>;
|
|
13
13
|
/**
|
|
14
14
|
* Structural column descriptor owned by CES so the subscription-list column set,
|
package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js
CHANGED
|
@@ -6,6 +6,7 @@ exports.ALL_INVOICING_SUBSCRIPTION_SORT_KEYS = [
|
|
|
6
6
|
'subscription',
|
|
7
7
|
'customer',
|
|
8
8
|
'plan',
|
|
9
|
+
'product_code',
|
|
9
10
|
'term_end',
|
|
10
11
|
'next_billing',
|
|
11
12
|
'auto_collect',
|
|
@@ -18,6 +19,7 @@ exports.INVOICING_SUBSCRIPTION_COLUMNS = [
|
|
|
18
19
|
{ key: 'subscription', sortable: true },
|
|
19
20
|
{ key: 'customer', sortable: false },
|
|
20
21
|
{ key: 'plan', sortable: true },
|
|
22
|
+
{ key: 'product_code', sortable: true },
|
|
21
23
|
{ key: 'term_end', sortable: true },
|
|
22
24
|
{ key: 'next_billing', sortable: true },
|
|
23
25
|
{ key: 'auto_collect', sortable: true },
|
|
@@ -10,7 +10,6 @@ exports.initialInvoicingBrandingFormLocalData = {
|
|
|
10
10
|
dateFormat: '',
|
|
11
11
|
defaultMemo: '',
|
|
12
12
|
email: '',
|
|
13
|
-
invoiceFooterText: '',
|
|
14
13
|
invoicePrefix: '',
|
|
15
14
|
logoFileId: '',
|
|
16
15
|
phone: '',
|
|
@@ -23,7 +22,6 @@ const entityToInvoicingBrandingFormLocalData = (settings) => ({
|
|
|
23
22
|
dateFormat: settings?.date_format ?? '',
|
|
24
23
|
defaultMemo: settings?.default_memo ?? '',
|
|
25
24
|
email: settings?.email ?? '',
|
|
26
|
-
invoiceFooterText: settings?.invoice_footer_text ?? '',
|
|
27
25
|
invoicePrefix: settings?.invoice_prefix ?? '',
|
|
28
26
|
logoFileId: settings?.logo_file_id ?? '',
|
|
29
27
|
phone: settings?.phone ?? '',
|
|
@@ -45,9 +43,6 @@ const brandingLocalDataToSettingsPayload = (localData, address) => ({
|
|
|
45
43
|
date_format: trimOrUndefined(localData.dateFormat),
|
|
46
44
|
default_memo: trimOrUndefined(localData.defaultMemo),
|
|
47
45
|
email: trimOrUndefined(localData.email),
|
|
48
|
-
// Sent even when blank: "" is how the API is told to hide the footer line,
|
|
49
|
-
// so this one must not collapse to `undefined` like the fields above.
|
|
50
|
-
invoice_footer_text: localData.invoiceFooterText.trim(),
|
|
51
46
|
invoice_prefix: trimOrUndefined(localData.invoicePrefix),
|
|
52
47
|
logo_file_id: localData.logoFileId,
|
|
53
48
|
phone: trimOrUndefined(localData.phone),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { FetchState, FetchStateAndError } from '../../../commonStateTypes/common';
|
|
3
|
-
import { InvoicingDunningActionOption,
|
|
3
|
+
import { InvoicingDunningActionOption, InvoicingNamedOption, InvoicingQboAccountMappingKindOption, InvoicingSettingsPayload } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
4
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
5
5
|
import { RootState } from '../../../rootStateTypes';
|
|
6
6
|
import { InvoicingQboConnection, InvoicingQboSyncHealth } from '../invoicingQboView/invoicingQboViewPayload';
|
|
@@ -20,7 +20,6 @@ export declare const getInvoicingSettings: (state: RootState) => InvoicingSettin
|
|
|
20
20
|
export declare const getInvoicingSettingsFetchState: (state: RootState) => FetchStateAndError;
|
|
21
21
|
export interface InvoicingSettingsView {
|
|
22
22
|
fetchState: FetchState;
|
|
23
|
-
fieldHelp: InvoicingFieldHelpByCode;
|
|
24
23
|
saveState: FetchStateAndError;
|
|
25
24
|
stripeConnectState: FetchStateAndError;
|
|
26
25
|
error?: ZeniAPIStatus;
|
|
@@ -57,7 +56,6 @@ export interface InvoicingSettingsHubView {
|
|
|
57
56
|
*/
|
|
58
57
|
configFetchState: FetchState;
|
|
59
58
|
dunningScheduleActionOptions: InvoicingDunningActionOption[];
|
|
60
|
-
fieldHelp: InvoicingFieldHelpByCode;
|
|
61
59
|
isEnablingInvoicing: boolean;
|
|
62
60
|
/**
|
|
63
61
|
* Whether the tenant has already enabled invoicing. The enable footer is for
|
|
@@ -97,7 +95,6 @@ export interface InvoicingQboSettingsFormView {
|
|
|
97
95
|
/** So the screen can fetch only what is missing, without reading the slices. */
|
|
98
96
|
configFetchState: FetchState;
|
|
99
97
|
customerMatchingOptions: InvoicingNamedOption[];
|
|
100
|
-
fieldHelp: InvoicingFieldHelpByCode;
|
|
101
98
|
isLoading: boolean;
|
|
102
99
|
/** The persisted sync toggle — the backfill guard checks that, not the draft. */
|
|
103
100
|
isSyncEnabledSaved: boolean;
|
|
@@ -123,7 +120,6 @@ export interface InvoicingQboSettingsFormView {
|
|
|
123
120
|
export declare const getInvoicingQboSettingsFormView: (state: RootState) => InvoicingQboSettingsFormView;
|
|
124
121
|
export interface InvoicingBrandingFormView {
|
|
125
122
|
dateFormatOptions: InvoicingNamedOption[];
|
|
126
|
-
fieldHelp: InvoicingFieldHelpByCode;
|
|
127
123
|
localData: InvoicingBrandingFormLocalData;
|
|
128
124
|
saveState: FetchStateAndError;
|
|
129
125
|
addressLabel?: string;
|
|
@@ -32,7 +32,6 @@ exports.getInvoicingSettingsFetchState = getInvoicingSettingsFetchState;
|
|
|
32
32
|
const getInvoicingSettingsView = (state) => {
|
|
33
33
|
const { error, fetchState, saveFetchState, settings, stripeFetchState } = state.invoicingSettingsViewState;
|
|
34
34
|
return {
|
|
35
|
-
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'settings'),
|
|
36
35
|
error,
|
|
37
36
|
fetchState,
|
|
38
37
|
saveState: saveFetchState,
|
|
@@ -86,7 +85,6 @@ const getInvoicingSettingsHubView = (state) => {
|
|
|
86
85
|
const { dunningScheduleActionOptions, enableState, error: configError, fetchState: configFetchState, qboAccountMappingKindOptions, qboCustomerMatchingOptions, qboSyncStatusOptions, status, } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
87
86
|
const { canEnable, isQboConfigured, isStripeConnected } = deriveInvoicingEnablePrerequisites(state.invoicingSettingsViewState.settings, state.invoicingQboViewState.connection?.connected === true, qboAccountMappingKindOptions);
|
|
88
87
|
return {
|
|
89
|
-
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'settings'),
|
|
90
88
|
// Keeps the onboarding step in the gate: a tenant that has not accepted the
|
|
91
89
|
// terms cannot enable invoicing, whatever the integrations say.
|
|
92
90
|
canEnableInvoicing: status === 'settings' && canEnable,
|
|
@@ -118,7 +116,6 @@ const getInvoicingQboSettingsFormView = (state) => {
|
|
|
118
116
|
const { fetchState: configFetchState, qboAccountMappingKindOptions, qboCustomerMatchingOptions, qboSyncStatusOptions, } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
119
117
|
const qboView = (0, invoicingQboViewSelector_1.getInvoicingQboView)(state);
|
|
120
118
|
return {
|
|
121
|
-
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'settings'),
|
|
122
119
|
accountMappingKindOptions: qboAccountMappingKindOptions,
|
|
123
120
|
accounts: qboView.accounts,
|
|
124
121
|
backfillState: qboView.backfillState,
|
|
@@ -159,7 +156,6 @@ const getInvoicingBrandingFormView = (state) => {
|
|
|
159
156
|
? (0, addressViewSelector_1.getFormattedAddress)(newAddress.addressToCreate)
|
|
160
157
|
: undefined;
|
|
161
158
|
return {
|
|
162
|
-
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'settings'),
|
|
163
159
|
addressLabel,
|
|
164
160
|
dateFormatOptions: (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state).dateFormatOptions,
|
|
165
161
|
localData: brandingDraft ?? (0, invoicingBrandingFormConfig_1.entityToInvoicingBrandingFormLocalData)(settings),
|
|
@@ -18,14 +18,6 @@ export type PauseSubscriptionBody = {
|
|
|
18
18
|
pause_reason?: string;
|
|
19
19
|
resume_date?: string;
|
|
20
20
|
};
|
|
21
|
-
/**
|
|
22
|
-
* What the cancel dialog collects. Form values, not the request body: the screen
|
|
23
|
-
* turns these into {@link CancelSubscriptionBody}.
|
|
24
|
-
*/
|
|
25
|
-
export type InvoicingCancelSubscriptionValues = {
|
|
26
|
-
cancelReasonCode: string;
|
|
27
|
-
cancelReason?: string;
|
|
28
|
-
};
|
|
29
21
|
export type CancelSubscriptionBody = {
|
|
30
22
|
cancel_reason?: string;
|
|
31
23
|
cancel_reason_code?: string;
|
|
@@ -12,38 +12,4 @@ interface FetchRecommendationPayloadWithCOT {
|
|
|
12
12
|
recommendations: RecommendationPayloadWithCOT[];
|
|
13
13
|
}
|
|
14
14
|
export type FetchRecommendationResponseWithCOT = ZeniAPIResponse<FetchRecommendationPayloadWithCOT>;
|
|
15
|
-
export type RecommendationFeedbackDimension = 'vendor' | 'category' | 'class';
|
|
16
|
-
export type RecommendationFeedbackSource = 'primary' | 'alternate' | 'shadow' | 'qbo';
|
|
17
|
-
export type RecommendationFeedbackOutcome = 'accepted' | 'override_ranked' | 'override_outside' | 'retracted';
|
|
18
|
-
export interface RecommendationFeedbackValue {
|
|
19
|
-
name: string;
|
|
20
|
-
id?: string | null;
|
|
21
|
-
integrationId?: string | null;
|
|
22
|
-
}
|
|
23
|
-
export interface ShownRecommendationForFeedback {
|
|
24
|
-
rank: number;
|
|
25
|
-
source: RecommendationFeedbackSource;
|
|
26
|
-
value: RecommendationFeedbackValue;
|
|
27
|
-
confidence?: number | null;
|
|
28
|
-
cot?: string[];
|
|
29
|
-
reasoning?: string | null;
|
|
30
|
-
}
|
|
31
|
-
export interface SubmitRecommendationFeedbackPayload {
|
|
32
|
-
dimension: RecommendationFeedbackDimension;
|
|
33
|
-
outcome: RecommendationFeedbackOutcome;
|
|
34
|
-
selected: RecommendationFeedbackValue & {
|
|
35
|
-
isNewEntity?: boolean;
|
|
36
|
-
};
|
|
37
|
-
transactionId: string;
|
|
38
|
-
features?: Record<string, unknown> | null;
|
|
39
|
-
lineId?: string | null;
|
|
40
|
-
matchedRank?: number | null;
|
|
41
|
-
matchedSource?: RecommendationFeedbackSource | null;
|
|
42
|
-
reasonText?: string | null;
|
|
43
|
-
recommendationSetId?: string | null;
|
|
44
|
-
retractsFeedbackId?: string | null;
|
|
45
|
-
shownRecommendations?: ShownRecommendationForFeedback[];
|
|
46
|
-
skipped?: boolean;
|
|
47
|
-
topPickSource?: RecommendationFeedbackSource | null;
|
|
48
|
-
}
|
|
49
15
|
export {};
|
|
@@ -5,7 +5,6 @@ import { TransactionID } from '../../entity/transaction/stateTypes/transactionID
|
|
|
5
5
|
import { SupportedTransaction } from '../../entity/transaction/transactionState';
|
|
6
6
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
7
7
|
import { TransactionsTab } from '../expenseAutomationView/types/transactionsViewState';
|
|
8
|
-
import { SubmitRecommendationFeedbackPayload } from './recommendationPayload';
|
|
9
8
|
import { EntityRecommendationState } from './recommendationState';
|
|
10
9
|
export type RecommendationLineUpdateFlowType = 'categorization' | 'detail';
|
|
11
10
|
type FetchEntityRecommendationsForLineUpdateCommonPayload = {
|
|
@@ -58,6 +57,6 @@ export declare const fetchEntityRecommendationsByTransactionId: import("@reduxjs
|
|
|
58
57
|
}, "recommendation/updateRecommendationForEntityFailure">, indicateReadyToInitializeRecommendation: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[entityIdOrName: string, entityType: EntityType], {
|
|
59
58
|
entityIdOrName: string;
|
|
60
59
|
entityType: EntityType;
|
|
61
|
-
}, "recommendation/indicateReadyToInitializeRecommendation", never, never
|
|
60
|
+
}, "recommendation/indicateReadyToInitializeRecommendation", never, never>;
|
|
62
61
|
declare const _default: import("redux").Reducer<EntityRecommendationState>;
|
|
63
62
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.indicateReadyToInitializeRecommendation = exports.updateRecommendationForEntityFailure = exports.updateRecommendationForEntity = exports.fetchRecommendationByEntityId = exports.fetchRecommendationByEntityName = exports.fetchEntityRecommendationsForLineUpdate = exports.fetchEntityRecommendationsByTransactionId = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const rootActions_1 = require("../../rootActions");
|
|
7
7
|
const recommendationState_1 = require("./recommendationState");
|
|
@@ -135,18 +135,6 @@ const recommendation = (0, toolkit_1.createSlice)({
|
|
|
135
135
|
};
|
|
136
136
|
},
|
|
137
137
|
},
|
|
138
|
-
// Fire-and-forget human feedback on a recommendation (accept, ranked
|
|
139
|
-
// override or outside override). Handled by submitRecommendationFeedbackEpic
|
|
140
|
-
// which POSTs to the accounting recommendation-feedback endpoint. No state
|
|
141
|
-
// mutation: the categorization UX must not depend on the feedback round-trip.
|
|
142
|
-
submitRecommendationFeedback: {
|
|
143
|
-
reducer() {
|
|
144
|
-
// Fire-and-forget: no state mutation; the epic performs the POST.
|
|
145
|
-
},
|
|
146
|
-
prepare(args) {
|
|
147
|
-
return { payload: args };
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
138
|
},
|
|
151
139
|
extraReducers: (builder) => {
|
|
152
140
|
builder.addCase(rootActions_1.clearAll, (draft) => {
|
|
@@ -154,7 +142,7 @@ const recommendation = (0, toolkit_1.createSlice)({
|
|
|
154
142
|
});
|
|
155
143
|
},
|
|
156
144
|
});
|
|
157
|
-
_a = recommendation.actions, exports.fetchEntityRecommendationsByTransactionId = _a.fetchEntityRecommendationsByTransactionId, exports.fetchEntityRecommendationsForLineUpdate = _a.fetchEntityRecommendationsForLineUpdate, exports.fetchRecommendationByEntityName = _a.fetchRecommendationByEntityName, exports.fetchRecommendationByEntityId = _a.fetchRecommendationByEntityId, exports.updateRecommendationForEntity = _a.updateRecommendationForEntity, exports.updateRecommendationForEntityFailure = _a.updateRecommendationForEntityFailure, exports.indicateReadyToInitializeRecommendation = _a.indicateReadyToInitializeRecommendation
|
|
145
|
+
_a = recommendation.actions, exports.fetchEntityRecommendationsByTransactionId = _a.fetchEntityRecommendationsByTransactionId, exports.fetchEntityRecommendationsForLineUpdate = _a.fetchEntityRecommendationsForLineUpdate, exports.fetchRecommendationByEntityName = _a.fetchRecommendationByEntityName, exports.fetchRecommendationByEntityId = _a.fetchRecommendationByEntityId, exports.updateRecommendationForEntity = _a.updateRecommendationForEntity, exports.updateRecommendationForEntityFailure = _a.updateRecommendationForEntityFailure, exports.indicateReadyToInitializeRecommendation = _a.indicateReadyToInitializeRecommendation;
|
|
158
146
|
exports.default = recommendation.reducer;
|
|
159
147
|
const doUpdateRecommendationForEntity = (draft, entityId, entityType, payload) => {
|
|
160
148
|
const key = (0, recommendationState_1.getEntityRecommendationKey)(entityType, entityId);
|
|
@@ -4,7 +4,6 @@ import { updateApprovalRules } from '../../../../../entity/approvalRule/approval
|
|
|
4
4
|
import { updateAllUsers } from '../../../../../entity/user/userReducer';
|
|
5
5
|
import { RootState } from '../../../../../rootStateTypes';
|
|
6
6
|
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
7
|
-
import { fetchClassList } from '../../../../classList/classListReducer';
|
|
8
7
|
import { fetchBillPaySetupApproverView, fetchBillPaySetupApproverViewFailure, fetchBillPaySetupApproverViewSuccess } from '../billPaySetupApproverViewReducer';
|
|
9
|
-
export type ActionType = ReturnType<typeof fetchBillPaySetupApproverView> | ReturnType<typeof
|
|
8
|
+
export type ActionType = ReturnType<typeof fetchBillPaySetupApproverView> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateApprovalRules> | ReturnType<typeof fetchBillPaySetupApproverViewSuccess> | ReturnType<typeof fetchBillPaySetupApproverViewFailure>;
|
|
10
9
|
export declare const fetchBillPaySetupApproverViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -5,20 +5,13 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const approvalRuleReducer_1 = require("../../../../../entity/approvalRule/approvalRuleReducer");
|
|
7
7
|
const approvalRuleSelector_1 = require("../../../../../entity/approvalRule/approvalRuleSelector");
|
|
8
|
-
const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
|
|
9
8
|
const userReducer_1 = require("../../../../../entity/user/userReducer");
|
|
10
9
|
const responsePayload_1 = require("../../../../../responsePayload");
|
|
11
|
-
const classListReducer_1 = require("../../../../classList/classListReducer");
|
|
12
10
|
const billPaySetupApproverViewReducer_1 = require("../billPaySetupApproverViewReducer");
|
|
13
11
|
const fetchBillPaySetupApproverViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(billPaySetupApproverViewReducer_1.fetchBillPaySetupApproverView.match), (0, operators_1.switchMap)((action) => {
|
|
14
12
|
const { cacheOverride, useV3 } = action.payload;
|
|
15
|
-
const { billPaySetupApproverViewState, approvalRuleState
|
|
16
|
-
const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state$.value);
|
|
13
|
+
const { billPaySetupApproverViewState, approvalRuleState } = state$.value;
|
|
17
14
|
const approvalRules = (0, approvalRuleSelector_1.getApprovalRulesByIds)(approvalRuleState, billPaySetupApproverViewState.approvalRuleIds);
|
|
18
|
-
const shouldFetchClassList = isAccountingClassesEnabled &&
|
|
19
|
-
(cacheOverride === true ||
|
|
20
|
-
(classListState.hasValidState() === false &&
|
|
21
|
-
classListState.fetchState !== 'In-Progress'));
|
|
22
15
|
if (cacheOverride === true ||
|
|
23
16
|
approvalRules.length !==
|
|
24
17
|
billPaySetupApproverViewState.approvalRuleIds.length ||
|
|
@@ -38,9 +31,6 @@ const fetchBillPaySetupApproverViewEpic = (actions$, state$, zeniAPI) => actions
|
|
|
38
31
|
(0, approvalRuleReducer_1.updateApprovalRules)(response.data.approval_rules),
|
|
39
32
|
(0, billPaySetupApproverViewReducer_1.fetchBillPaySetupApproverViewSuccess)(approvalRuleIds),
|
|
40
33
|
];
|
|
41
|
-
if (shouldFetchClassList) {
|
|
42
|
-
actions.push((0, classListReducer_1.fetchClassList)());
|
|
43
|
-
}
|
|
44
34
|
return (0, rxjs_1.from)(actions);
|
|
45
35
|
}
|
|
46
36
|
else {
|
|
@@ -50,13 +40,7 @@ const fetchBillPaySetupApproverViewEpic = (actions$, state$, zeniAPI) => actions
|
|
|
50
40
|
}
|
|
51
41
|
else {
|
|
52
42
|
const { approvalRuleIds } = billPaySetupApproverViewState;
|
|
53
|
-
|
|
54
|
-
(0, billPaySetupApproverViewReducer_1.fetchBillPaySetupApproverViewSuccess)(approvalRuleIds),
|
|
55
|
-
];
|
|
56
|
-
if (shouldFetchClassList) {
|
|
57
|
-
actions.push((0, classListReducer_1.fetchClassList)());
|
|
58
|
-
}
|
|
59
|
-
return (0, rxjs_1.from)(actions);
|
|
43
|
+
return (0, rxjs_1.of)((0, billPaySetupApproverViewReducer_1.fetchBillPaySetupApproverViewSuccess)(approvalRuleIds));
|
|
60
44
|
}
|
|
61
45
|
}));
|
|
62
46
|
exports.fetchBillPaySetupApproverViewEpic = fetchBillPaySetupApproverViewEpic;
|
|
@@ -24,6 +24,7 @@ const initializeBillPaySetupApproverViewUpdateDataEpic = (actions$, state$) => a
|
|
|
24
24
|
name: approvalRule.name,
|
|
25
25
|
description: approvalRule.description,
|
|
26
26
|
separationOfDuties: approvalRule.separationOfDuties,
|
|
27
|
+
isFallback: approvalRule.isFallback,
|
|
27
28
|
};
|
|
28
29
|
fetchActions.push((0, billPaySetupApproverViewReducer_1.clearBillPaySetupApproverViewUpdateData)(), (0, billPaySetupApproverViewReducer_1.saveBillPaySetupApproverViewUpdateData)(billPaySetupApproverViewUpdateData));
|
|
29
30
|
}
|
|
@@ -18,6 +18,7 @@ interface ApprovalUpdatableInfoPayload {
|
|
|
18
18
|
is_applicable_on_pending_approval_entity: boolean;
|
|
19
19
|
steps: ApproverViewStepPayload[];
|
|
20
20
|
description?: string;
|
|
21
|
+
is_fallback?: boolean;
|
|
21
22
|
is_separation_of_duty_enabled?: boolean;
|
|
22
23
|
/**
|
|
23
24
|
* Approval Rules 3.0 — rule-level wire fields. The backend accepts these
|
|
@@ -89,6 +89,9 @@ const toApprovalChangableInfoPayload = (approverViewUpdateData) => {
|
|
|
89
89
|
payload.is_separation_of_duty_enabled =
|
|
90
90
|
approverViewUpdateData.separationOfDuties;
|
|
91
91
|
}
|
|
92
|
+
if (approverViewUpdateData.isFallback != null) {
|
|
93
|
+
payload.is_fallback = approverViewUpdateData.isFallback;
|
|
94
|
+
}
|
|
92
95
|
if (isUpdate) {
|
|
93
96
|
payload.approval_rule_id = approverViewUpdateData.approvalRuleId;
|
|
94
97
|
}
|