@zeniai/client-epic-state 5.1.89 → 5.1.90
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 -7
- package/lib/entity/aiCfo/aiCfoReducer.d.ts +2 -3
- package/lib/entity/aiCfo/aiCfoReducer.js +2 -25
- package/lib/entity/aiCfo/aiCfoState.d.ts +0 -7
- package/lib/entity/company/companyPayload.d.ts +0 -4
- package/lib/entity/company/companyPayload.js +8 -18
- package/lib/entity/company/companyStateTypes.d.ts +0 -4
- package/lib/entity/customerSatisfaction/customerSatisfactionReducer.d.ts +1 -1
- package/lib/entity/customerSatisfaction/customerSatisfactionReducer.js +2 -6
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -31
- package/lib/entity/tenant/tenantReducer.d.ts +1 -5
- package/lib/entity/tenant/tenantReducer.js +2 -21
- package/lib/epic.d.ts +1 -3
- package/lib/epic.js +1 -5
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +1 -23
- package/lib/esm/entity/company/companyPayload.js +8 -18
- package/lib/esm/entity/customerSatisfaction/customerSatisfactionReducer.js +1 -4
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -31
- package/lib/esm/entity/tenant/tenantReducer.js +1 -20
- package/lib/esm/epic.js +1 -5
- package/lib/esm/index.js +7 -8
- package/lib/esm/view/companyHealthMetricView/companyHealthMetricConfigReducer.js +1 -4
- package/lib/esm/view/companyView/companyViewReducer.js +1 -58
- package/lib/esm/view/companyView/selector/companyManagementViewSelector.js +0 -52
- package/lib/esm/view/companyView/types/cockpitTypes.js +1 -13
- package/lib/esm/view/companyView/types/companyManagementViewState.js +0 -2
- package/lib/esm/view/invoicing/createCreditNote/createCreditNoteEpic.js +4 -24
- package/lib/esm/view/invoicing/createInvoice/createInvoiceEpic.js +4 -24
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +10 -37
- package/lib/esm/view/invoicing/discountAction/discountActionEpic.js +9 -33
- package/lib/esm/view/invoicing/dunningAction/dunningActionEpic.js +9 -35
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +1 -5
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +5 -32
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.js +3 -23
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.js +4 -24
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +4 -24
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/syncInvoicingSubscriptionCouponsEpic.js +3 -20
- package/lib/esm/view/invoicing/invoiceAction/invoiceActionEpic.js +17 -60
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +0 -30
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +29 -4
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewPayload.js +1 -9
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewReducer.js +1 -50
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +1 -14
- package/lib/esm/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.js +10 -29
- package/lib/esm/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.js +5 -28
- package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteEpic.js +4 -24
- package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +14 -22
- package/lib/esm/view/invoicing/recordPayment/recordPaymentEpic.js +7 -46
- package/lib/esm/view/invoicing/settingsView/settingsViewEpics.js +8 -26
- package/lib/esm/view/invoicing/settingsView/settingsViewReducer.js +1 -1
- package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +1 -4
- package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionEpic.js +9 -41
- package/lib/esm/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.js +1 -4
- package/lib/esm/view/vendorTabView/vendorTabViewReducer.js +1 -4
- package/lib/index.d.ts +10 -14
- package/lib/index.js +50 -61
- package/lib/view/companyHealthMetricView/companyHealthMetricConfigReducer.d.ts +1 -1
- package/lib/view/companyHealthMetricView/companyHealthMetricConfigReducer.js +2 -5
- package/lib/view/companyView/companyViewReducer.d.ts +1 -22
- package/lib/view/companyView/companyViewReducer.js +3 -60
- package/lib/view/companyView/selector/companyManagementViewSelector.d.ts +0 -3
- package/lib/view/companyView/selector/companyManagementViewSelector.js +0 -55
- package/lib/view/companyView/types/cockpitTypes.d.ts +3 -7
- package/lib/view/companyView/types/cockpitTypes.js +1 -15
- package/lib/view/companyView/types/companyManagementViewState.d.ts +0 -2
- package/lib/view/companyView/types/companyManagementViewState.js +0 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/invoicing/createCreditNote/createCreditNoteEpic.d.ts +1 -2
- package/lib/view/invoicing/createCreditNote/createCreditNoteEpic.js +3 -23
- package/lib/view/invoicing/createInvoice/createInvoiceEpic.d.ts +1 -2
- package/lib/view/invoicing/createInvoice/createInvoiceEpic.js +3 -23
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +8 -22
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +10 -37
- package/lib/view/invoicing/discountAction/discountActionEpic.d.ts +1 -2
- package/lib/view/invoicing/discountAction/discountActionEpic.js +8 -32
- package/lib/view/invoicing/dunningAction/dunningActionEpic.d.ts +1 -2
- package/lib/view/invoicing/dunningAction/dunningActionEpic.js +8 -34
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.d.ts +1 -3
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +1 -5
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.d.ts +1 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +4 -31
- package/lib/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.d.ts +1 -2
- package/lib/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.js +2 -22
- package/lib/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.d.ts +1 -2
- package/lib/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.js +3 -23
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.d.ts +1 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +3 -23
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/syncInvoicingSubscriptionCouponsEpic.d.ts +1 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/syncInvoicingSubscriptionCouponsEpic.js +2 -19
- package/lib/view/invoicing/invoiceAction/invoiceActionEpic.d.ts +1 -2
- package/lib/view/invoicing/invoiceAction/invoiceActionEpic.js +16 -59
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +0 -13
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +0 -30
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +31 -11
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +29 -4
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +0 -15
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewEpics.d.ts +2 -2
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewPayload.d.ts +0 -12
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewPayload.js +0 -11
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewReducer.d.ts +4 -21
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewReducer.js +2 -51
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.d.ts +0 -3
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +2 -16
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewState.d.ts +0 -13
- package/lib/view/invoicing/invoicingQboView/epics/invoicingQboViewActionType.d.ts +1 -2
- package/lib/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.js +9 -28
- package/lib/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.js +4 -27
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteEpic.d.ts +1 -2
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteEpic.js +3 -23
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.d.ts +7 -24
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +16 -23
- package/lib/view/invoicing/recordPayment/recordPaymentEpic.d.ts +1 -2
- package/lib/view/invoicing/recordPayment/recordPaymentEpic.js +6 -45
- package/lib/view/invoicing/settingsView/settingsViewEpics.d.ts +1 -2
- package/lib/view/invoicing/settingsView/settingsViewEpics.js +7 -25
- package/lib/view/invoicing/settingsView/settingsViewReducer.d.ts +1 -10
- package/lib/view/invoicing/settingsView/settingsViewReducer.js +1 -1
- package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +2 -4
- package/lib/view/invoicing/settingsView/settingsViewSelector.js +1 -4
- package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.d.ts +1 -2
- package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.js +8 -40
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.d.ts +1 -1
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.js +2 -5
- package/lib/view/vendorTabView/vendorTabViewReducer.d.ts +1 -1
- package/lib/view/vendorTabView/vendorTabViewReducer.js +2 -5
- package/package.json +1 -1
- package/lib/esm/view/companyView/epic/updateCompanyProductServicesEpic.js +0 -91
- package/lib/esm/view/companyView/epic/updateCompanyQboRealmIdEpic.js +0 -58
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewEpic.js +0 -26
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewPageEpic.js +0 -16
- package/lib/view/companyView/epic/updateCompanyProductServicesEpic.d.ts +0 -10
- package/lib/view/companyView/epic/updateCompanyProductServicesEpic.js +0 -95
- package/lib/view/companyView/epic/updateCompanyQboRealmIdEpic.d.ts +0 -8
- package/lib/view/companyView/epic/updateCompanyQboRealmIdEpic.js +0 -62
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewEpic.d.ts +0 -7
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewEpic.js +0 -30
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewPageEpic.d.ts +0 -6
- package/lib/view/invoicing/invoicingDunningCaseDetailView/fetchInvoicingDunningEmailPreviewPageEpic.js +0 -20
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateCompanyHealthMetricConfigFailure = exports.updateCompanyHealthMetricConfig = exports.fetchCompanyHealthMetricConfig = exports.
|
|
4
|
+
exports.updateCompanyHealthMetricConfigFailure = exports.updateCompanyHealthMetricConfig = exports.fetchCompanyHealthMetricConfig = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const rootActions_1 = require("../../rootActions");
|
|
7
7
|
exports.initialState = {
|
|
@@ -35,13 +35,10 @@ const companyHealthMetricConfigView = (0, toolkit_1.createSlice)({
|
|
|
35
35
|
draft.fetchState = 'Error';
|
|
36
36
|
draft.error = action.payload;
|
|
37
37
|
},
|
|
38
|
-
clearCompanyHealthMetricConfigView() {
|
|
39
|
-
return exports.initialState;
|
|
40
|
-
},
|
|
41
38
|
},
|
|
42
39
|
extraReducers: (builder) => {
|
|
43
40
|
builder.addCase(rootActions_1.clearAll, () => exports.initialState);
|
|
44
41
|
},
|
|
45
42
|
});
|
|
46
|
-
_a = companyHealthMetricConfigView.actions, exports.
|
|
43
|
+
_a = companyHealthMetricConfigView.actions, exports.fetchCompanyHealthMetricConfig = _a.fetchCompanyHealthMetricConfig, exports.updateCompanyHealthMetricConfig = _a.updateCompanyHealthMetricConfig, exports.updateCompanyHealthMetricConfigFailure = _a.updateCompanyHealthMetricConfigFailure;
|
|
47
44
|
exports.default = companyHealthMetricConfigView.reducer;
|
|
@@ -10,11 +10,6 @@ import { CompanyDetailsLocalData } from './types/companyPassport/companyDetailsL
|
|
|
10
10
|
import { CompanyPassportLocalData } from './types/companyPassport/companyPassportLocalData';
|
|
11
11
|
import { CompanyOfficerLocalData, CompanyOfficerType, PrimaryContactLocalData } from './types/companyPassport/companyUsersLocalData';
|
|
12
12
|
import { PortfolioUIState } from './types/companyPortfolioViewState';
|
|
13
|
-
export interface CompanyProductServicesInput {
|
|
14
|
-
isBillPayEnabled?: boolean;
|
|
15
|
-
isBookkeepingEnabled?: boolean;
|
|
16
|
-
isReimbursementEnabled?: boolean;
|
|
17
|
-
}
|
|
18
13
|
export declare const initialState: CompanyViewState;
|
|
19
14
|
export declare const fetchCompanyPassportView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
|
|
20
15
|
companyId: string;
|
|
@@ -73,23 +68,7 @@ export declare const fetchCompanyPassportView: import("@reduxjs/toolkit").Action
|
|
|
73
68
|
enabled: boolean;
|
|
74
69
|
}, "companyView/updateAccountingClassesEnabled", never, never>, updateAccountingClassesEnabledSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"companyView/updateAccountingClassesEnabledSuccess">, updateAccountingClassesEnabledFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
75
70
|
status: ZeniAPIStatus;
|
|
76
|
-
}, "companyView/updateAccountingClassesEnabledFailure">,
|
|
77
|
-
companyId: string;
|
|
78
|
-
services: CompanyProductServicesInput;
|
|
79
|
-
}, "companyView/updateCompanyProductServices", never, never>, updateCompanyProductServicesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
80
|
-
companyId: ID;
|
|
81
|
-
}, "companyView/updateCompanyProductServicesSuccess">, updateCompanyProductServicesFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
82
|
-
companyId: string;
|
|
83
|
-
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
84
|
-
}, "companyView/updateCompanyProductServicesFailure", never, never>, updateCompanyQboRealmId: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, qboRealmId?: string | undefined], {
|
|
85
|
-
companyId: string;
|
|
86
|
-
qboRealmId: string | undefined;
|
|
87
|
-
}, "companyView/updateCompanyQboRealmId", never, never>, updateCompanyQboRealmIdSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
88
|
-
companyId: ID;
|
|
89
|
-
}, "companyView/updateCompanyQboRealmIdSuccess">, updateCompanyQboRealmIdFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
90
|
-
companyId: string;
|
|
91
|
-
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
92
|
-
}, "companyView/updateCompanyQboRealmIdFailure", never, never>, enableAccountingProjects: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
|
|
71
|
+
}, "companyView/updateAccountingClassesEnabledFailure">, enableAccountingProjects: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
|
|
93
72
|
companyId: string;
|
|
94
73
|
}, "companyView/enableAccountingProjects", never, never>, resumeEnableAccountingProjects: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
|
|
95
74
|
companyId: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.updateMetaDataOnSendMonthEndReport = exports.updateCompanyMetaDataOnFailure = exports.updateCompanyMetaDataOnSuccess = exports.fetchCompanyMetaData = exports.updateCompanyDownloadState = exports.updateParentSubsidiaryViewOnFailure = exports.updateParentSubsidiaryView = exports.fetchParentSubsidiaryManagementView = exports.saveCompanyPassportDetails = exports.saveIndustryAndIncDateInCompanyPassportLocalStore = exports.updateCompanyPassportLocalStoreData = exports.companyPassportCreateCompanyOfficersFailure =
|
|
4
|
+
exports.companyPassportCreateCompanyOfficersSuccess = exports.companyPassportCreateCompanyOfficers = exports.companyPassportUpdateCompanyOfficerFailure = exports.companyPassportUpdateCompanyOfficerSuccess = exports.companyPassportUpdateCompanyOfficer = exports.companyPassportUpdatePrimaryContactFailure = exports.companyPassportUpdatePrimaryContactSuccess = exports.companyPassportUpdatePrimaryContact = exports.dismissCapitalizationOnboarding = exports.updateCapitalizationAccountThresholdFailure = exports.updateCapitalizationAccountThresholdSuccess = exports.updateCapitalizationAccountThreshold = exports.clearQboProjectsReconnectRequest = exports.requestQboProjectsReconnect = exports.updateAccountingProjectsEnabledFailure = exports.updateAccountingProjectsEnabledSuccess = exports.disableAccountingProjects = exports.resumeEnableAccountingProjects = exports.enableAccountingProjects = exports.updateAccountingClassesEnabledFailure = exports.updateAccountingClassesEnabledSuccess = exports.updateAccountingClassesEnabled = exports.companyPassportUpdateCompanyDetailsFailure = exports.companyPassportUpdateCompanyDetailsSuccess = exports.companyPassportUpdateCompanyDetails = exports.companyPassportClearDataInLocalStore = exports.deleteCompanyOfficerInLocalStore = exports.companyPassportSaveDataInLocalStore = exports.updateCompanyManagementUIState = exports.updateCompanyPortfolioUIState = exports.clearCompanyView = exports.updateZeniUsersOnFailure = exports.updateZeniUsersOnSuccess = exports.fetchZeniUsers = exports.fetchCompanyPortfolioView = exports.updateCompanyViewOnFailure = exports.updateCompanyViewOnSuccess = exports.companyManagementSaveUpdatesFailure = exports.companyManagementSaveUpdatesSuccess = exports.companyManagementDiscardUpdates = exports.companyManagementSavePendingUpdates = exports.companyManagementSaveUpdates = exports.fetchCompanyManagementView = exports.fetchPortfolioView = exports.fetchSubscriptionView = exports.fetchManagementView = exports.fetchOnboardingView = exports.fetchAllCockpitViews = exports.fetchCompanyPassportView = exports.initialState = void 0;
|
|
5
|
+
exports.updateMetaDataOnSendMonthEndReport = exports.updateCompanyMetaDataOnFailure = exports.updateCompanyMetaDataOnSuccess = exports.fetchCompanyMetaData = exports.updateCompanyDownloadState = exports.updateParentSubsidiaryViewOnFailure = exports.updateParentSubsidiaryView = exports.fetchParentSubsidiaryManagementView = exports.saveCompanyPassportDetails = exports.saveIndustryAndIncDateInCompanyPassportLocalStore = exports.updateCompanyPassportLocalStoreData = exports.companyPassportCreateCompanyOfficersFailure = void 0;
|
|
6
6
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
7
|
const rootActions_1 = require("../../rootActions");
|
|
8
8
|
const parentSubsidiaryViewState_1 = require("./parentSubsidiaryView/parentSubsidiaryViewState");
|
|
@@ -382,63 +382,6 @@ const companyView = (0, toolkit_1.createSlice)({
|
|
|
382
382
|
clearQboProjectsReconnectRequest(draft) {
|
|
383
383
|
draft.passportView.needsQboProjectsReconnect = false;
|
|
384
384
|
},
|
|
385
|
-
updateCompanyProductServices: {
|
|
386
|
-
reducer(draft, action) {
|
|
387
|
-
draft.managementView.productServicesUpdateStatusByCompanyId[action.payload.companyId] = {
|
|
388
|
-
fetchState: 'In-Progress',
|
|
389
|
-
error: undefined,
|
|
390
|
-
};
|
|
391
|
-
},
|
|
392
|
-
prepare(companyId, services) {
|
|
393
|
-
return { payload: { companyId, services } };
|
|
394
|
-
},
|
|
395
|
-
},
|
|
396
|
-
updateCompanyProductServicesSuccess(draft, action) {
|
|
397
|
-
draft.managementView.productServicesUpdateStatusByCompanyId[action.payload.companyId] = {
|
|
398
|
-
fetchState: 'Completed',
|
|
399
|
-
error: undefined,
|
|
400
|
-
};
|
|
401
|
-
},
|
|
402
|
-
updateCompanyProductServicesFailure: {
|
|
403
|
-
reducer(draft, action) {
|
|
404
|
-
draft.managementView.productServicesUpdateStatusByCompanyId[action.payload.companyId] = {
|
|
405
|
-
fetchState: 'Error',
|
|
406
|
-
error: action.payload.status,
|
|
407
|
-
};
|
|
408
|
-
},
|
|
409
|
-
prepare(companyId, status) {
|
|
410
|
-
return { payload: { companyId, status } };
|
|
411
|
-
},
|
|
412
|
-
},
|
|
413
|
-
updateCompanyQboRealmId: {
|
|
414
|
-
reducer(draft, action) {
|
|
415
|
-
draft.managementView.qboRealmIdUpdateStatusByCompanyId[action.payload.companyId] = {
|
|
416
|
-
fetchState: 'In-Progress',
|
|
417
|
-
error: undefined,
|
|
418
|
-
};
|
|
419
|
-
},
|
|
420
|
-
// qboRealmId omitted -> reset (the epic sends null); a value -> update.
|
|
421
|
-
prepare(companyId, qboRealmId) {
|
|
422
|
-
return { payload: { companyId, qboRealmId } };
|
|
423
|
-
},
|
|
424
|
-
},
|
|
425
|
-
updateCompanyQboRealmIdSuccess(draft, action) {
|
|
426
|
-
draft.managementView.qboRealmIdUpdateStatusByCompanyId[action.payload.companyId] = {
|
|
427
|
-
fetchState: 'Completed',
|
|
428
|
-
error: undefined,
|
|
429
|
-
};
|
|
430
|
-
},
|
|
431
|
-
updateCompanyQboRealmIdFailure: {
|
|
432
|
-
reducer(draft, action) {
|
|
433
|
-
draft.managementView.qboRealmIdUpdateStatusByCompanyId[action.payload.companyId] = {
|
|
434
|
-
fetchState: 'Error',
|
|
435
|
-
error: action.payload.status,
|
|
436
|
-
};
|
|
437
|
-
},
|
|
438
|
-
prepare(companyId, status) {
|
|
439
|
-
return { payload: { companyId, status } };
|
|
440
|
-
},
|
|
441
|
-
},
|
|
442
385
|
updateCapitalizationAccountThreshold: {
|
|
443
386
|
prepare(companyId, accountId, threshold, dismissOnboardingForAccount, allOverrides) {
|
|
444
387
|
return {
|
|
@@ -762,5 +705,5 @@ const companyView = (0, toolkit_1.createSlice)({
|
|
|
762
705
|
});
|
|
763
706
|
},
|
|
764
707
|
});
|
|
765
|
-
_a = companyView.actions, exports.fetchCompanyPassportView = _a.fetchCompanyPassportView, exports.fetchAllCockpitViews = _a.fetchAllCockpitViews, exports.fetchOnboardingView = _a.fetchOnboardingView, exports.fetchManagementView = _a.fetchManagementView, exports.fetchSubscriptionView = _a.fetchSubscriptionView, exports.fetchPortfolioView = _a.fetchPortfolioView, exports.fetchCompanyManagementView = _a.fetchCompanyManagementView, exports.companyManagementSaveUpdates = _a.companyManagementSaveUpdates, exports.companyManagementSavePendingUpdates = _a.companyManagementSavePendingUpdates, exports.companyManagementDiscardUpdates = _a.companyManagementDiscardUpdates, exports.companyManagementSaveUpdatesSuccess = _a.companyManagementSaveUpdatesSuccess, exports.companyManagementSaveUpdatesFailure = _a.companyManagementSaveUpdatesFailure, exports.updateCompanyViewOnSuccess = _a.updateCompanyViewOnSuccess, exports.updateCompanyViewOnFailure = _a.updateCompanyViewOnFailure, exports.fetchCompanyPortfolioView = _a.fetchCompanyPortfolioView, exports.fetchZeniUsers = _a.fetchZeniUsers, exports.updateZeniUsersOnSuccess = _a.updateZeniUsersOnSuccess, exports.updateZeniUsersOnFailure = _a.updateZeniUsersOnFailure, exports.clearCompanyView = _a.clearCompanyView, exports.updateCompanyPortfolioUIState = _a.updateCompanyPortfolioUIState, exports.updateCompanyManagementUIState = _a.updateCompanyManagementUIState, exports.companyPassportSaveDataInLocalStore = _a.companyPassportSaveDataInLocalStore, exports.deleteCompanyOfficerInLocalStore = _a.deleteCompanyOfficerInLocalStore, exports.companyPassportClearDataInLocalStore = _a.companyPassportClearDataInLocalStore, exports.companyPassportUpdateCompanyDetails = _a.companyPassportUpdateCompanyDetails, exports.companyPassportUpdateCompanyDetailsSuccess = _a.companyPassportUpdateCompanyDetailsSuccess, exports.companyPassportUpdateCompanyDetailsFailure = _a.companyPassportUpdateCompanyDetailsFailure, exports.updateAccountingClassesEnabled = _a.updateAccountingClassesEnabled, exports.updateAccountingClassesEnabledSuccess = _a.updateAccountingClassesEnabledSuccess, exports.updateAccountingClassesEnabledFailure = _a.updateAccountingClassesEnabledFailure, exports.
|
|
708
|
+
_a = companyView.actions, exports.fetchCompanyPassportView = _a.fetchCompanyPassportView, exports.fetchAllCockpitViews = _a.fetchAllCockpitViews, exports.fetchOnboardingView = _a.fetchOnboardingView, exports.fetchManagementView = _a.fetchManagementView, exports.fetchSubscriptionView = _a.fetchSubscriptionView, exports.fetchPortfolioView = _a.fetchPortfolioView, exports.fetchCompanyManagementView = _a.fetchCompanyManagementView, exports.companyManagementSaveUpdates = _a.companyManagementSaveUpdates, exports.companyManagementSavePendingUpdates = _a.companyManagementSavePendingUpdates, exports.companyManagementDiscardUpdates = _a.companyManagementDiscardUpdates, exports.companyManagementSaveUpdatesSuccess = _a.companyManagementSaveUpdatesSuccess, exports.companyManagementSaveUpdatesFailure = _a.companyManagementSaveUpdatesFailure, exports.updateCompanyViewOnSuccess = _a.updateCompanyViewOnSuccess, exports.updateCompanyViewOnFailure = _a.updateCompanyViewOnFailure, exports.fetchCompanyPortfolioView = _a.fetchCompanyPortfolioView, exports.fetchZeniUsers = _a.fetchZeniUsers, exports.updateZeniUsersOnSuccess = _a.updateZeniUsersOnSuccess, exports.updateZeniUsersOnFailure = _a.updateZeniUsersOnFailure, exports.clearCompanyView = _a.clearCompanyView, exports.updateCompanyPortfolioUIState = _a.updateCompanyPortfolioUIState, exports.updateCompanyManagementUIState = _a.updateCompanyManagementUIState, exports.companyPassportSaveDataInLocalStore = _a.companyPassportSaveDataInLocalStore, exports.deleteCompanyOfficerInLocalStore = _a.deleteCompanyOfficerInLocalStore, exports.companyPassportClearDataInLocalStore = _a.companyPassportClearDataInLocalStore, exports.companyPassportUpdateCompanyDetails = _a.companyPassportUpdateCompanyDetails, exports.companyPassportUpdateCompanyDetailsSuccess = _a.companyPassportUpdateCompanyDetailsSuccess, exports.companyPassportUpdateCompanyDetailsFailure = _a.companyPassportUpdateCompanyDetailsFailure, exports.updateAccountingClassesEnabled = _a.updateAccountingClassesEnabled, exports.updateAccountingClassesEnabledSuccess = _a.updateAccountingClassesEnabledSuccess, exports.updateAccountingClassesEnabledFailure = _a.updateAccountingClassesEnabledFailure, exports.enableAccountingProjects = _a.enableAccountingProjects, exports.resumeEnableAccountingProjects = _a.resumeEnableAccountingProjects, exports.disableAccountingProjects = _a.disableAccountingProjects, exports.updateAccountingProjectsEnabledSuccess = _a.updateAccountingProjectsEnabledSuccess, exports.updateAccountingProjectsEnabledFailure = _a.updateAccountingProjectsEnabledFailure, exports.requestQboProjectsReconnect = _a.requestQboProjectsReconnect, exports.clearQboProjectsReconnectRequest = _a.clearQboProjectsReconnectRequest, exports.updateCapitalizationAccountThreshold = _a.updateCapitalizationAccountThreshold, exports.updateCapitalizationAccountThresholdSuccess = _a.updateCapitalizationAccountThresholdSuccess, exports.updateCapitalizationAccountThresholdFailure = _a.updateCapitalizationAccountThresholdFailure, exports.dismissCapitalizationOnboarding = _a.dismissCapitalizationOnboarding, exports.companyPassportUpdatePrimaryContact = _a.companyPassportUpdatePrimaryContact, exports.companyPassportUpdatePrimaryContactSuccess = _a.companyPassportUpdatePrimaryContactSuccess, exports.companyPassportUpdatePrimaryContactFailure = _a.companyPassportUpdatePrimaryContactFailure, exports.companyPassportUpdateCompanyOfficer = _a.companyPassportUpdateCompanyOfficer, exports.companyPassportUpdateCompanyOfficerSuccess = _a.companyPassportUpdateCompanyOfficerSuccess, exports.companyPassportUpdateCompanyOfficerFailure = _a.companyPassportUpdateCompanyOfficerFailure, exports.companyPassportCreateCompanyOfficers = _a.companyPassportCreateCompanyOfficers, exports.companyPassportCreateCompanyOfficersSuccess = _a.companyPassportCreateCompanyOfficersSuccess, exports.companyPassportCreateCompanyOfficersFailure = _a.companyPassportCreateCompanyOfficersFailure, exports.updateCompanyPassportLocalStoreData = _a.updateCompanyPassportLocalStoreData, exports.saveIndustryAndIncDateInCompanyPassportLocalStore = _a.saveIndustryAndIncDateInCompanyPassportLocalStore, exports.saveCompanyPassportDetails = _a.saveCompanyPassportDetails, exports.fetchParentSubsidiaryManagementView = _a.fetchParentSubsidiaryManagementView, exports.updateParentSubsidiaryView = _a.updateParentSubsidiaryView, exports.updateParentSubsidiaryViewOnFailure = _a.updateParentSubsidiaryViewOnFailure, exports.updateCompanyDownloadState = _a.updateCompanyDownloadState, exports.fetchCompanyMetaData = _a.fetchCompanyMetaData, exports.updateCompanyMetaDataOnSuccess = _a.updateCompanyMetaDataOnSuccess, exports.updateCompanyMetaDataOnFailure = _a.updateCompanyMetaDataOnFailure, exports.updateMetaDataOnSendMonthEndReport = _a.updateMetaDataOnSendMonthEndReport;
|
|
766
709
|
exports.default = companyView.reducer;
|
|
@@ -38,6 +38,3 @@ export declare const getTotalRecurringRevenue: (companies: CompanyView[]) => {
|
|
|
38
38
|
currencySymbol: string;
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
|
-
export declare function getCompanyProductServicesUpdateStatus(state: RootState, companyId: ID): FetchStateAndError;
|
|
42
|
-
export declare function getCompanyQboRealmIdUpdateStatus(state: RootState, companyId: ID): FetchStateAndError;
|
|
43
|
-
export declare function resolveTenantIdByCompanyId(state: RootState, companyId: ID): ID | undefined;
|
|
@@ -4,14 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getTotalRecurringRevenue = exports.getAddonListZeniSku = exports.getPlanListZeniSku = exports.getCompanyManagementView = exports.getManagementViewFromCompanyIds = void 0;
|
|
7
|
-
exports.getCompanyProductServicesUpdateStatus = getCompanyProductServicesUpdateStatus;
|
|
8
|
-
exports.getCompanyQboRealmIdUpdateStatus = getCompanyQboRealmIdUpdateStatus;
|
|
9
|
-
exports.resolveTenantIdByCompanyId = resolveTenantIdByCompanyId;
|
|
10
7
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
11
8
|
const get_1 = __importDefault(require("lodash/get"));
|
|
12
9
|
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
13
10
|
const sortOrderPayload_1 = require("../../../commonPayloadTypes/sortOrderPayload");
|
|
14
|
-
const companySelector_1 = require("../../../entity/company/companySelector");
|
|
15
11
|
const customerSatisfactionState_1 = require("../../../entity/customerSatisfaction/customerSatisfactionState");
|
|
16
12
|
const userSelector_1 = require("../../../entity/user/userSelector");
|
|
17
13
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
@@ -135,29 +131,6 @@ const getCategoryValueForCompany = (key, company) => {
|
|
|
135
131
|
if (key === 'annualRecurringRevenue' || key === 'monthlyRecurringRevenue') {
|
|
136
132
|
return company.primarySubscription?.summary.summary[key].amount.toString();
|
|
137
133
|
}
|
|
138
|
-
if (key === 'productVerticals') {
|
|
139
|
-
const featuresActivationInfo = company.company.company.featuresActivationInfo;
|
|
140
|
-
const enabledVerticals = [];
|
|
141
|
-
if (featuresActivationInfo?.isBookkeepingEnabled === true) {
|
|
142
|
-
enabledVerticals.push('bookkeeping');
|
|
143
|
-
}
|
|
144
|
-
if (featuresActivationInfo?.isBillPayFeatureEnabled === true) {
|
|
145
|
-
enabledVerticals.push('billPay');
|
|
146
|
-
}
|
|
147
|
-
if (featuresActivationInfo?.isReimbursementFeatureEnabled === true) {
|
|
148
|
-
enabledVerticals.push('reimbursement');
|
|
149
|
-
}
|
|
150
|
-
if (featuresActivationInfo?.isTaxEnabled === true) {
|
|
151
|
-
enabledVerticals.push('tax');
|
|
152
|
-
}
|
|
153
|
-
if (featuresActivationInfo?.isPayrollEnabled === true) {
|
|
154
|
-
enabledVerticals.push('payroll');
|
|
155
|
-
}
|
|
156
|
-
if (featuresActivationInfo?.isCfoEnabled === true) {
|
|
157
|
-
enabledVerticals.push('cfo');
|
|
158
|
-
}
|
|
159
|
-
return enabledVerticals;
|
|
160
|
-
}
|
|
161
134
|
return company.company.company.managementInfo[key];
|
|
162
135
|
};
|
|
163
136
|
const applyAdvancedFiltersOnCompaniesList = (allCompanies, filters, filteredCompanies = [], index = 0) => {
|
|
@@ -228,8 +201,6 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, companies, userS
|
|
|
228
201
|
updatedCompanies.forEach((company) => {
|
|
229
202
|
switch (sortKey) {
|
|
230
203
|
case 'companyName':
|
|
231
|
-
case 'productVerticals':
|
|
232
|
-
case 'realmId':
|
|
233
204
|
companiesWithSortKeyValue.push(company);
|
|
234
205
|
break;
|
|
235
206
|
case 'status':
|
|
@@ -465,12 +436,6 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, companies, userS
|
|
|
465
436
|
primarySortValue = (company.company.company.companyInfo.bookCloseDate ??
|
|
466
437
|
(0, zeniDayJS_1.date)('1970-01-01T00:00:00.000Z')).valueOf();
|
|
467
438
|
break;
|
|
468
|
-
case 'productVerticals':
|
|
469
|
-
case 'realmId':
|
|
470
|
-
// Not a meaningful sort axis (both are cockpit action columns);
|
|
471
|
-
// keep stable order rather than falling through to the status/group
|
|
472
|
-
// default sort.
|
|
473
|
-
break;
|
|
474
439
|
case 'status':
|
|
475
440
|
default: {
|
|
476
441
|
isMultiSortApplicable = true;
|
|
@@ -525,23 +490,3 @@ const getTotalRecurringRevenue = (companies) => companies.reduce((prev, curr) =>
|
|
|
525
490
|
},
|
|
526
491
|
});
|
|
527
492
|
exports.getTotalRecurringRevenue = getTotalRecurringRevenue;
|
|
528
|
-
function getCompanyProductServicesUpdateStatus(state, companyId) {
|
|
529
|
-
return (state.companyViewState.managementView
|
|
530
|
-
.productServicesUpdateStatusByCompanyId[companyId] ?? {
|
|
531
|
-
fetchState: 'Not-Started',
|
|
532
|
-
error: undefined,
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
function getCompanyQboRealmIdUpdateStatus(state, companyId) {
|
|
536
|
-
return (state.companyViewState.managementView.qboRealmIdUpdateStatusByCompanyId[companyId] ?? {
|
|
537
|
-
fetchState: 'Not-Started',
|
|
538
|
-
error: undefined,
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
// Cockpit populates companyState (with a companyId->tenantId mapping) but not
|
|
542
|
-
// tenantState, so resolve from company first and fall back to tenant.
|
|
543
|
-
function resolveTenantIdByCompanyId(state, companyId) {
|
|
544
|
-
return ((0, companySelector_1.getCompanyByCompanyId)(state.companyState, companyId)?.company.companyInfo
|
|
545
|
-
.tenantId ??
|
|
546
|
-
Object.values(state.tenantState.tenantsById).find((tenant) => tenant?.companyId === companyId)?.tenantId);
|
|
547
|
-
}
|
|
@@ -4,9 +4,9 @@ import { SubscriptionViewSortKey } from '../../subscriptionView/types/subscripti
|
|
|
4
4
|
import { FilterCategoryValueType } from '../helpers/cockpitHelpers';
|
|
5
5
|
import { CockpitDownloadTabsID, CockpitTabsFileType } from './cockpitTabsID';
|
|
6
6
|
export declare const toPortfolioSortKeyType: (v: string) => "expenses" | "companyName" | "runway" | "cashBalance" | "revenues" | "netIncome";
|
|
7
|
-
export declare const toManagementSortKeyType: (v: string) => "status" | "bookCloseDate" | "companyName" | "group" | "taxStatus" | "controller" | "preparer" | "reviewer" | "annualRecurringRevenue" | "monthlyRecurringRevenue" | "
|
|
7
|
+
export declare const toManagementSortKeyType: (v: string) => "status" | "bookCloseDate" | "companyName" | "group" | "taxStatus" | "controller" | "preparer" | "reviewer" | "annualRecurringRevenue" | "monthlyRecurringRevenue" | "notes" | "task" | "plans" | "customerSuccessManager" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
|
|
8
8
|
export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "businessVerified" | "identityVerified" | "bankAccountLinked" | "customerCreated" | "groupCreated" | "qboLinked" | "notes" | "enroller" | "invite" | "latestCreated";
|
|
9
|
-
export declare const toHealthSortKeyType: (v: string) => "companyName" | "group" | "runway" | "controller" | "monthlyRecurringRevenue" | "companyEngagementMetricsUpdatedAt" | "customerSatisfactionScore" | "externalProductServiceExposure" | "netPromoterScore" | "
|
|
9
|
+
export declare const toHealthSortKeyType: (v: string) => "companyName" | "group" | "runway" | "controller" | "monthlyRecurringRevenue" | "companyEngagementMetricsUpdatedAt" | "customerSatisfactionScore" | "externalProductServiceExposure" | "netPromoterScore" | "customerSuccessManager" | "lastReportSent" | "issues" | "productVerticals" | "churnProbability" | "subscriptionDate" | "renewalDate" | "dashboardLastSeen" | "lastEngagement";
|
|
10
10
|
export declare const toTaskManagerSortKeyType: (v: string) => "status" | "dueDate" | "name" | "priority" | "createdBy" | "tags" | "taskName" | "assignee";
|
|
11
11
|
export type PortfolioViewSortKey = ReturnType<typeof toPortfolioSortKeyType>;
|
|
12
12
|
export type ManagementViewSortKey = ReturnType<typeof toManagementSortKeyType>;
|
|
@@ -14,7 +14,7 @@ export type OnboardingViewSortKey = ReturnType<typeof toOnboardingSortKeyType>;
|
|
|
14
14
|
export type HealthViewSortKey = ReturnType<typeof toHealthSortKeyType>;
|
|
15
15
|
export type TaskManagerViewSortKey = ReturnType<typeof toTaskManagerSortKeyType>;
|
|
16
16
|
export type AiAccountantFilterCategoryField = 'enrollmentStatus';
|
|
17
|
-
export type ManagementViewFilterCategoryField = 'controllerUserIds' | 'customerSuccessManagerUserIds' | 'preparerUserIds' | 'reviewerUserIds' | 'apAnalystUserIds' | 'taxLeadUserIds' | 'companyGroupId' | 'taxStatusCode' | 'statusCode' | 'plans' | '
|
|
17
|
+
export type ManagementViewFilterCategoryField = 'controllerUserIds' | 'customerSuccessManagerUserIds' | 'preparerUserIds' | 'reviewerUserIds' | 'apAnalystUserIds' | 'taxLeadUserIds' | 'companyGroupId' | 'taxStatusCode' | 'statusCode' | 'plans' | 'annualRecurringRevenue' | 'monthlyRecurringRevenue' | 'customerSatisfaction' | 'zeniSatisfaction';
|
|
18
18
|
export type SubscriptionViewFilterCategoryField = 'controllerUserIds' | 'statusCode' | 'recommendedActionCode' | 'subscriptionPlans' | 'subscriptionAddOns' | 'avg2MonthExpenses' | 'slabLowerLimit' | 'slabUpperLimit' | 'monthlyRecurringRevenue';
|
|
19
19
|
export type PortfolioViewFilterCategoryField = 'netBurnOrIncome' | 'cashPosition' | 'income' | 'expenses' | 'runway';
|
|
20
20
|
export type HealthMonitorViewFilterCategoryField = 'verticalProductServices' | 'runway' | 'netPromoterScore' | 'customerSatisfactionScore' | 'churnProbabilityPercentage' | 'controller' | 'customerSuccessManager' | 'lastReportSent' | 'subscriptionStartDate' | 'subscriptionRenewalDate' | 'externalProductServiceExposure' | 'companyEngagementMetricsUpdatedAt' | 'companyGroupId' | 'monthlyRecurringRevenue';
|
|
@@ -35,10 +35,6 @@ export interface CockpitFilters {
|
|
|
35
35
|
export declare const MANAGEMENT_STATUS_CODES: string[];
|
|
36
36
|
export declare const toManagementStatusCodeType: (v: string) => string;
|
|
37
37
|
export type ManagementStatusCodeType = ReturnType<typeof toManagementStatusCodeType>;
|
|
38
|
-
export declare const ALL_PRODUCT_VERTICALS: readonly ["bookkeeping", "billPay", "reimbursement", "tax", "payroll", "cfo"];
|
|
39
|
-
export declare const toProductVertical: (v: string) => "reimbursement" | "billPay" | "bookkeeping" | "tax" | "payroll" | "cfo";
|
|
40
|
-
export type ProductVertical = ReturnType<typeof toProductVertical>;
|
|
41
|
-
export declare const toProductVerticalStrict: (v: string | null | undefined) => ProductVertical | undefined;
|
|
42
38
|
export interface FilterCombinationsByTabs {
|
|
43
39
|
filters: CockpitFilters;
|
|
44
40
|
filterText: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.toManagementStatusCodeType = exports.MANAGEMENT_STATUS_CODES = exports.toTaskManagerSortKeyType = exports.toHealthSortKeyType = exports.toOnboardingSortKeyType = exports.toManagementSortKeyType = exports.toPortfolioSortKeyType = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
const ALL_PORTFOLIO_SORT_KEYS = [
|
|
6
6
|
'companyName',
|
|
@@ -16,8 +16,6 @@ const ALL_MANAGEMENT_SORT_KEYS = [
|
|
|
16
16
|
'status',
|
|
17
17
|
'group',
|
|
18
18
|
'plans',
|
|
19
|
-
'productVerticals',
|
|
20
|
-
'realmId',
|
|
21
19
|
'controller',
|
|
22
20
|
'customerSuccessManager',
|
|
23
21
|
'reviewer',
|
|
@@ -94,15 +92,3 @@ exports.MANAGEMENT_STATUS_CODES = [
|
|
|
94
92
|
];
|
|
95
93
|
const toManagementStatusCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.MANAGEMENT_STATUS_CODES);
|
|
96
94
|
exports.toManagementStatusCodeType = toManagementStatusCodeType;
|
|
97
|
-
exports.ALL_PRODUCT_VERTICALS = [
|
|
98
|
-
'bookkeeping',
|
|
99
|
-
'billPay',
|
|
100
|
-
'reimbursement',
|
|
101
|
-
'tax',
|
|
102
|
-
'payroll',
|
|
103
|
-
'cfo',
|
|
104
|
-
];
|
|
105
|
-
const toProductVertical = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_PRODUCT_VERTICALS);
|
|
106
|
-
exports.toProductVertical = toProductVertical;
|
|
107
|
-
const toProductVerticalStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v ?? '', exports.ALL_PRODUCT_VERTICALS);
|
|
108
|
-
exports.toProductVerticalStrict = toProductVerticalStrict;
|
|
@@ -4,8 +4,6 @@ import { CompanyManagementInfo } from '../../../entity/company/companyStateTypes
|
|
|
4
4
|
import { CockpitFilters, ManagementViewSortKey } from './cockpitTypes';
|
|
5
5
|
import { CommonState } from './commonState';
|
|
6
6
|
export interface CompanyManagementViewState extends CommonState {
|
|
7
|
-
productServicesUpdateStatusByCompanyId: Record<ID, FetchStateAndError>;
|
|
8
|
-
qboRealmIdUpdateStatusByCompanyId: Record<ID, FetchStateAndError>;
|
|
9
7
|
uiState: ManagementUIState;
|
|
10
8
|
updatesByCompanyId: Record<ID, CompanyManagementUpdateState>;
|
|
11
9
|
}
|
|
@@ -24,8 +24,6 @@ function getCompanyManagementPendingUpdates(companyId, state) {
|
|
|
24
24
|
exports.initialCompanyManagementView = {
|
|
25
25
|
...commonState_1.initialCommonState,
|
|
26
26
|
updatesByCompanyId: {},
|
|
27
|
-
productServicesUpdateStatusByCompanyId: {},
|
|
28
|
-
qboRealmIdUpdateStatusByCompanyId: {},
|
|
29
27
|
uiState: {
|
|
30
28
|
sortKey: 'status',
|
|
31
29
|
sortOrder: 'ascending',
|
package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
|
|
|
39
39
|
export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
|
|
40
40
|
export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
|
|
41
41
|
export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
|
|
42
|
-
messageSection: "reconcile" | "save_reconcile_for_later" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "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_approval_reorder" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "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_approval_reorder" | "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" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed" | "accounting_projects_qbo_reconnect_failed"
|
|
42
|
+
messageSection: "reconcile" | "save_reconcile_for_later" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "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_approval_reorder" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "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_approval_reorder" | "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" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed" | "accounting_projects_qbo_reconnect_failed";
|
|
43
43
|
messageText: "notification" | "failed" | "success";
|
|
44
44
|
type: "error" | "success" | "info";
|
|
45
45
|
variables: {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { updateInvoicingCreditNotes } from '../../../entity/invoicing/creditNote/creditNoteReducer';
|
|
4
|
-
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
5
4
|
import { RootState } from '../../../reducer';
|
|
6
5
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
7
6
|
import { createCreditNoteFailure, createCreditNoteSuccess, submitCreateCreditNote } from './createCreditNoteReducer';
|
|
8
|
-
export type ActionType = ReturnType<typeof submitCreateCreditNote> | ReturnType<typeof createCreditNoteSuccess> | ReturnType<typeof createCreditNoteFailure> | ReturnType<typeof updateInvoicingCreditNotes
|
|
7
|
+
export type ActionType = ReturnType<typeof submitCreateCreditNote> | ReturnType<typeof createCreditNoteSuccess> | ReturnType<typeof createCreditNoteFailure> | ReturnType<typeof updateInvoicingCreditNotes>;
|
|
9
8
|
export declare const createCreditNoteEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -4,7 +4,6 @@ exports.createCreditNoteEpic = void 0;
|
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const creditNoteReducer_1 = require("../../../entity/invoicing/creditNote/creditNoteReducer");
|
|
7
|
-
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
8
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
9
8
|
const createCreditNotePayload_1 = require("./createCreditNotePayload");
|
|
10
9
|
const createCreditNoteReducer_1 = require("./createCreditNoteReducer");
|
|
@@ -19,29 +18,10 @@ const createCreditNoteEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, op
|
|
|
19
18
|
return [
|
|
20
19
|
(0, creditNoteReducer_1.updateInvoicingCreditNotes)([response.data], 'merge'),
|
|
21
20
|
(0, createCreditNoteReducer_1.createCreditNoteSuccess)({ creditNoteId: response.data.id }),
|
|
22
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
23
|
-
messageSection: 'invoicing_credit_note_saved',
|
|
24
|
-
messageText: 'success',
|
|
25
|
-
type: 'success',
|
|
26
|
-
}),
|
|
27
21
|
];
|
|
28
22
|
}
|
|
29
|
-
return (0, rxjs_1.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
messageSection: 'invoicing_credit_note_saved',
|
|
33
|
-
messageText: 'failed',
|
|
34
|
-
type: 'error',
|
|
35
|
-
}),
|
|
36
|
-
]);
|
|
37
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
|
|
38
|
-
(0, createCreditNoteReducer_1.createCreditNoteFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Create credit note REST API call errored out ' +
|
|
39
|
-
JSON.stringify(error))),
|
|
40
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
41
|
-
messageSection: 'invoicing_credit_note_saved',
|
|
42
|
-
messageText: 'failed',
|
|
43
|
-
type: 'error',
|
|
44
|
-
}),
|
|
45
|
-
])));
|
|
23
|
+
return (0, rxjs_1.of)((0, createCreditNoteReducer_1.createCreditNoteFailure)(response.status));
|
|
24
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, createCreditNoteReducer_1.createCreditNoteFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Create credit note REST API call errored out ' +
|
|
25
|
+
JSON.stringify(error))))));
|
|
46
26
|
}));
|
|
47
27
|
exports.createCreditNoteEpic = createCreditNoteEpic;
|
|
@@ -2,10 +2,9 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { updateAddresses } from '../../../entity/address/addressReducer';
|
|
4
4
|
import { updateInvoices } from '../../../entity/invoicing/invoice/invoiceReducer';
|
|
5
|
-
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
6
5
|
import { RootState } from '../../../reducer';
|
|
7
6
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
8
7
|
import { addInvoiceToList } from '../invoiceList/invoiceListReducer';
|
|
9
8
|
import { createInvoice, createInvoiceFailure, createInvoiceSuccess } from './createInvoiceReducer';
|
|
10
|
-
export type ActionType = ReturnType<typeof createInvoice> | ReturnType<typeof createInvoiceSuccess> | ReturnType<typeof createInvoiceFailure> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateInvoices> | ReturnType<typeof addInvoiceToList
|
|
9
|
+
export type ActionType = ReturnType<typeof createInvoice> | ReturnType<typeof createInvoiceSuccess> | ReturnType<typeof createInvoiceFailure> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateInvoices> | ReturnType<typeof addInvoiceToList>;
|
|
11
10
|
export declare const createInvoiceEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -6,7 +6,6 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const addressReducer_1 = require("../../../entity/address/addressReducer");
|
|
7
7
|
const invoicePayload_1 = require("../../../entity/invoicing/invoice/invoicePayload");
|
|
8
8
|
const invoiceReducer_1 = require("../../../entity/invoicing/invoice/invoiceReducer");
|
|
9
|
-
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
10
9
|
const responsePayload_1 = require("../../../responsePayload");
|
|
11
10
|
const invoiceListReducer_1 = require("../invoiceList/invoiceListReducer");
|
|
12
11
|
const createInvoiceReducer_1 = require("./createInvoiceReducer");
|
|
@@ -26,29 +25,10 @@ const createInvoiceEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, oper
|
|
|
26
25
|
status: response.data.status,
|
|
27
26
|
}),
|
|
28
27
|
(0, createInvoiceReducer_1.createInvoiceSuccess)({ invoiceId: response.data.id }),
|
|
29
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
30
|
-
messageSection: 'invoicing_invoice_saved',
|
|
31
|
-
messageText: 'success',
|
|
32
|
-
type: 'success',
|
|
33
|
-
}),
|
|
34
28
|
];
|
|
35
29
|
}
|
|
36
|
-
return (0, rxjs_1.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
messageSection: 'invoicing_invoice_saved',
|
|
40
|
-
messageText: 'failed',
|
|
41
|
-
type: 'error',
|
|
42
|
-
}),
|
|
43
|
-
]);
|
|
44
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
|
|
45
|
-
(0, createInvoiceReducer_1.createInvoiceFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Create invoice REST API call errored out ' +
|
|
46
|
-
JSON.stringify(error))),
|
|
47
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
48
|
-
messageSection: 'invoicing_invoice_saved',
|
|
49
|
-
messageText: 'failed',
|
|
50
|
-
type: 'error',
|
|
51
|
-
}),
|
|
52
|
-
])));
|
|
30
|
+
return (0, rxjs_1.of)((0, createInvoiceReducer_1.createInvoiceFailure)(response.status));
|
|
31
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, createInvoiceReducer_1.createInvoiceFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Create invoice REST API call errored out ' +
|
|
32
|
+
JSON.stringify(error))))));
|
|
53
33
|
}));
|
|
54
34
|
exports.createInvoiceEpic = createInvoiceEpic;
|
|
@@ -1,30 +1,15 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
-
import { Address } from '../../../entity/address/addressState';
|
|
4
3
|
import { InvoicingSettingsPayload } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
|
+
import { InvoicingCustomer } from '../../../entity/invoicing/invoicingCustomer/invoicingCustomerState';
|
|
5
5
|
import { InvoicingProduct } from '../../../entity/invoicing/product/productState';
|
|
6
6
|
import { RootState } from '../../../reducer';
|
|
7
7
|
import { InvoicingCreateInvoiceFormLocalData } from './createInvoiceState';
|
|
8
|
-
/**
|
|
9
|
-
* One catalog plan price, split into its two naming parts so consumers can
|
|
10
|
-
* compose the label themselves (the plan family name and the sub-family/price
|
|
11
|
-
* name are separate columns in the catalog).
|
|
12
|
-
*/
|
|
13
|
-
export interface InvoicingPlanNameOption {
|
|
14
|
-
planName: string;
|
|
15
|
-
subFamilyName: string;
|
|
16
|
-
}
|
|
17
|
-
/** One customer row of the create-invoice customer picker. */
|
|
18
|
-
export interface InvoicingCreateInvoiceCustomerOption {
|
|
19
|
-
id: ID;
|
|
20
|
-
name: string;
|
|
21
|
-
billingAddress?: Address;
|
|
22
|
-
email?: string;
|
|
23
|
-
}
|
|
24
8
|
export interface CreateInvoiceFormView extends SelectorView {
|
|
25
|
-
customers:
|
|
9
|
+
customers: InvoicingCustomer[];
|
|
26
10
|
localData: InvoicingCreateInvoiceFormLocalData;
|
|
27
|
-
planNames:
|
|
11
|
+
planNames: string[];
|
|
12
|
+
plans: InvoicingProduct[];
|
|
28
13
|
products: InvoicingProduct[];
|
|
29
14
|
savedInvoiceId?: ID;
|
|
30
15
|
settings?: InvoicingSettingsPayload;
|
|
@@ -32,8 +17,9 @@ export interface CreateInvoiceFormView extends SelectorView {
|
|
|
32
17
|
/**
|
|
33
18
|
* Single bundled view for the create-invoice screen — web-ui consumes only this.
|
|
34
19
|
* Carries the form draft (`localData`), the option sources the form needs
|
|
35
|
-
* (
|
|
36
|
-
*
|
|
37
|
-
*
|
|
20
|
+
* (customers, catalog plans/products, settings), the create-invoice fetch
|
|
21
|
+
* state/error, and the id of the invoice last created (`savedInvoiceId`, to
|
|
22
|
+
* navigate on success). Returns raw entity lists; the screen maps them to its
|
|
23
|
+
* option shapes.
|
|
38
24
|
*/
|
|
39
25
|
export declare const getCreateInvoiceFormView: (state: RootState) => CreateInvoiceFormView;
|