@zeniai/client-epic-state 5.1.61 → 5.1.62
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/coreEpics.js +3 -2
- package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
- package/lib/entity/notificationRegistry/notificationRegistryPayload.d.ts +18 -0
- package/lib/entity/notificationRegistry/notificationRegistryPayload.js +28 -0
- package/lib/entity/notificationRegistry/notificationRegistryReducer.d.ts +10 -0
- package/lib/entity/notificationRegistry/notificationRegistryReducer.js +50 -0
- package/lib/entity/notificationRegistry/notificationRegistrySelector.d.ts +2 -0
- package/lib/entity/notificationRegistry/notificationRegistrySelector.js +10 -0
- package/lib/entity/notificationRegistry/notificationRegistryState.d.ts +32 -0
- package/lib/entity/notificationRegistry/notificationRegistryState.js +10 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +3 -1
- package/lib/entity/tenant/clearAllEpic.js +4 -0
- package/lib/entity/tenant/tenantReducer.d.ts +4 -1
- package/lib/entity/tenant/tenantReducer.js +8 -2
- package/lib/entity/tenant/tenantSelector.d.ts +1 -0
- package/lib/entity/tenant/tenantSelector.js +4 -0
- package/lib/epic.d.ts +5 -1
- package/lib/epic.js +5 -1
- package/lib/esm/coreEpics.js +3 -2
- package/lib/esm/entity/notificationRegistry/notificationRegistryPayload.js +24 -0
- package/lib/esm/entity/notificationRegistry/notificationRegistryReducer.js +46 -0
- package/lib/esm/entity/notificationRegistry/notificationRegistrySelector.js +6 -0
- package/lib/esm/entity/notificationRegistry/notificationRegistryState.js +5 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +4 -0
- package/lib/esm/entity/tenant/tenantReducer.js +7 -1
- package/lib/esm/entity/tenant/tenantSelector.js +3 -0
- package/lib/esm/epic.js +5 -1
- package/lib/esm/index.js +7 -2
- package/lib/esm/reducer.js +6 -0
- package/lib/esm/view/companyView/companyViewReducer.js +68 -1
- package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +2 -1
- package/lib/esm/view/companyView/epic/companyPassport/projects/disableAccountingProjectsEpic.js +56 -0
- package/lib/esm/view/companyView/epic/companyPassport/projects/enableAccountingProjectsEpic.js +37 -0
- package/lib/esm/view/companyView/epic/companyPassport/projects/resumeEnableAccountingProjectsEpic.js +73 -0
- package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +2 -1
- package/lib/esm/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.js +2 -1
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +5 -0
- package/lib/esm/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +116 -0
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesEndpoint.js +5 -0
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewPayload.js +36 -0
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewReducer.js +222 -0
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewSelector.js +25 -0
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewState.js +4 -0
- package/lib/esm/view/settingsView/epic/fetchNotificationSettingsEpic.js +34 -2
- package/lib/esm/view/settingsView/epic/saveNotificationSettingsEpic.js +2 -1
- package/lib/esm/view/settingsView/settingsViewHelpers.js +3 -2
- package/lib/index.d.ts +8 -2
- package/lib/index.js +52 -32
- package/lib/reducer.d.ts +6 -0
- package/lib/reducer.js +6 -0
- package/lib/view/common/recurringViewHelper.d.ts +2 -2
- package/lib/view/companyView/companyViewReducer.d.ts +9 -1
- package/lib/view/companyView/companyViewReducer.js +70 -3
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +2 -1
- package/lib/view/companyView/epic/companyPassport/projects/disableAccountingProjectsEpic.d.ts +10 -0
- package/lib/view/companyView/epic/companyPassport/projects/disableAccountingProjectsEpic.js +60 -0
- package/lib/view/companyView/epic/companyPassport/projects/enableAccountingProjectsEpic.d.ts +11 -0
- package/lib/view/companyView/epic/companyPassport/projects/enableAccountingProjectsEpic.js +41 -0
- package/lib/view/companyView/epic/companyPassport/projects/resumeEnableAccountingProjectsEpic.d.ts +13 -0
- package/lib/view/companyView/epic/companyPassport/projects/resumeEnableAccountingProjectsEpic.js +77 -0
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +2 -1
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.js +2 -1
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +2 -0
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +5 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.d.ts +40 -0
- package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +120 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesEndpoint.d.ts +2 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesEndpoint.js +9 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewPayload.d.ts +7 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewPayload.js +41 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.d.ts +30 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.js +226 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.d.ts +7 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.js +32 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewState.d.ts +14 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewState.js +8 -0
- package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.d.ts +9 -1
- package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.js +34 -2
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.js +2 -1
- package/lib/view/settingsView/settingsViewHelpers.d.ts +1 -1
- package/lib/view/settingsView/settingsViewHelpers.js +3 -2
- package/lib/view/settingsView/settingsViewPayload.d.ts +4 -0
- package/lib/view/settingsView/settingsViewState.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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 = void 0;
|
|
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 parentSubsidiaryViewState_1 = require("./parentSubsidiaryView/parentSubsidiaryViewState");
|
|
8
8
|
const companyManagementViewState_1 = require("./types/companyManagementViewState");
|
|
@@ -314,6 +314,73 @@ const companyView = (0, toolkit_1.createSlice)({
|
|
|
314
314
|
error: action.payload.status,
|
|
315
315
|
};
|
|
316
316
|
},
|
|
317
|
+
enableAccountingProjects: {
|
|
318
|
+
reducer(draft,
|
|
319
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
320
|
+
_action) {
|
|
321
|
+
draft.passportView.accountingProjectsUpdateStatus = {
|
|
322
|
+
fetchState: 'In-Progress',
|
|
323
|
+
error: undefined,
|
|
324
|
+
};
|
|
325
|
+
draft.passportView.needsQboProjectsReconnect = false;
|
|
326
|
+
},
|
|
327
|
+
prepare(companyId) {
|
|
328
|
+
return { payload: { companyId } };
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
resumeEnableAccountingProjects: {
|
|
332
|
+
reducer(draft,
|
|
333
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
334
|
+
_action) {
|
|
335
|
+
draft.passportView.accountingProjectsUpdateStatus = {
|
|
336
|
+
fetchState: 'In-Progress',
|
|
337
|
+
error: undefined,
|
|
338
|
+
};
|
|
339
|
+
draft.passportView.needsQboProjectsReconnect = false;
|
|
340
|
+
},
|
|
341
|
+
prepare(companyId) {
|
|
342
|
+
return { payload: { companyId } };
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
disableAccountingProjects: {
|
|
346
|
+
reducer(draft,
|
|
347
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
348
|
+
_action) {
|
|
349
|
+
draft.passportView.accountingProjectsUpdateStatus = {
|
|
350
|
+
fetchState: 'In-Progress',
|
|
351
|
+
error: undefined,
|
|
352
|
+
};
|
|
353
|
+
draft.passportView.needsQboProjectsReconnect = false;
|
|
354
|
+
},
|
|
355
|
+
prepare(companyId) {
|
|
356
|
+
return { payload: { companyId } };
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
updateAccountingProjectsEnabledSuccess(draft) {
|
|
360
|
+
draft.passportView.accountingProjectsUpdateStatus = {
|
|
361
|
+
fetchState: 'Completed',
|
|
362
|
+
error: undefined,
|
|
363
|
+
};
|
|
364
|
+
draft.passportView.needsQboProjectsReconnect = false;
|
|
365
|
+
},
|
|
366
|
+
updateAccountingProjectsEnabledFailure(draft, action) {
|
|
367
|
+
draft.passportView.accountingProjectsUpdateStatus = {
|
|
368
|
+
fetchState: 'Error',
|
|
369
|
+
error: action.payload.status,
|
|
370
|
+
};
|
|
371
|
+
draft.passportView.needsQboProjectsReconnect = false;
|
|
372
|
+
},
|
|
373
|
+
requestQboProjectsReconnect(draft) {
|
|
374
|
+
draft.passportView.needsQboProjectsReconnect = true;
|
|
375
|
+
// Keep In-Progress so the Projects toggle stays locked through OAuth.
|
|
376
|
+
draft.passportView.accountingProjectsUpdateStatus = {
|
|
377
|
+
fetchState: 'In-Progress',
|
|
378
|
+
error: undefined,
|
|
379
|
+
};
|
|
380
|
+
},
|
|
381
|
+
clearQboProjectsReconnectRequest(draft) {
|
|
382
|
+
draft.passportView.needsQboProjectsReconnect = false;
|
|
383
|
+
},
|
|
317
384
|
updateCapitalizationAccountThreshold: {
|
|
318
385
|
prepare(companyId, accountId, threshold, dismissOnboardingForAccount, allOverrides) {
|
|
319
386
|
return {
|
|
@@ -632,5 +699,5 @@ const companyView = (0, toolkit_1.createSlice)({
|
|
|
632
699
|
},
|
|
633
700
|
},
|
|
634
701
|
});
|
|
635
|
-
_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.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;
|
|
702
|
+
_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;
|
|
636
703
|
exports.default = companyView.reducer;
|
|
@@ -4,11 +4,12 @@ exports.dismissCapitalizationOnboardingEpic = void 0;
|
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const tenantReducer_1 = require("../../../../entity/tenant/tenantReducer");
|
|
7
|
+
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
7
8
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
8
9
|
const companyViewReducer_1 = require("../../companyViewReducer");
|
|
9
10
|
const dismissCapitalizationOnboardingEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyViewReducer_1.dismissCapitalizationOnboarding.match), (0, operators_1.switchMap)((action) => {
|
|
10
11
|
const { companyId, accountId } = action.payload;
|
|
11
|
-
const tenantId =
|
|
12
|
+
const tenantId = (0, tenantSelector_1.getTenantIdByCompanyId)(state$.value.tenantState, companyId);
|
|
12
13
|
const body = {
|
|
13
14
|
capitalization_onboarding_dismissed_accounts: { [accountId]: true },
|
|
14
15
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { updateCompanies } from '../../../../../entity/company/companyReducer';
|
|
4
|
+
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
5
|
+
import { updateTenantAccountingProjectsEnabled } from '../../../../../entity/tenant/tenantReducer';
|
|
6
|
+
import { RootState } from '../../../../../reducer';
|
|
7
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
8
|
+
import { disableAccountingProjects, updateAccountingProjectsEnabledFailure, updateAccountingProjectsEnabledSuccess } from '../../../companyViewReducer';
|
|
9
|
+
export type ActionType = ReturnType<typeof disableAccountingProjects> | ReturnType<typeof updateCompanies> | ReturnType<typeof updateTenantAccountingProjectsEnabled> | ReturnType<typeof updateAccountingProjectsEnabledSuccess> | ReturnType<typeof updateAccountingProjectsEnabledFailure> | ReturnType<typeof openSnackbar>;
|
|
10
|
+
export declare const disableAccountingProjectsEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.disableAccountingProjectsEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const companyReducer_1 = require("../../../../../entity/company/companyReducer");
|
|
7
|
+
const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
|
|
8
|
+
const tenantReducer_1 = require("../../../../../entity/tenant/tenantReducer");
|
|
9
|
+
const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
|
|
10
|
+
const responsePayload_1 = require("../../../../../responsePayload");
|
|
11
|
+
const companyViewReducer_1 = require("../../../companyViewReducer");
|
|
12
|
+
const disableAccountingProjectsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyViewReducer_1.disableAccountingProjects.match), (0, operators_1.switchMap)((action) => {
|
|
13
|
+
const { companyId } = action.payload;
|
|
14
|
+
const tenantId = (0, tenantSelector_1.getTenantIdByCompanyId)(state$.value.tenantState, companyId);
|
|
15
|
+
return zeniAPI
|
|
16
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, { is_accounting_projects_enabled: false })
|
|
17
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
18
|
+
const companies = response.data?.companies ?? [];
|
|
19
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && companies.length > 0) {
|
|
20
|
+
const actions = [
|
|
21
|
+
(0, companyReducer_1.updateCompanies)({
|
|
22
|
+
payload: companies,
|
|
23
|
+
schema: {},
|
|
24
|
+
}),
|
|
25
|
+
];
|
|
26
|
+
if (tenantId != null) {
|
|
27
|
+
actions.push((0, tenantReducer_1.updateTenantAccountingProjectsEnabled)({
|
|
28
|
+
enabled: false,
|
|
29
|
+
tenantId,
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
actions.push((0, companyViewReducer_1.updateAccountingProjectsEnabledSuccess)());
|
|
33
|
+
actions.push((0, snackbarReducer_1.openSnackbar)({
|
|
34
|
+
messageSection: 'accounting_projects_enabled_update',
|
|
35
|
+
messageText: 'success',
|
|
36
|
+
type: 'success',
|
|
37
|
+
}));
|
|
38
|
+
return (0, rxjs_1.from)(actions);
|
|
39
|
+
}
|
|
40
|
+
return (0, rxjs_1.from)([
|
|
41
|
+
(0, companyViewReducer_1.updateAccountingProjectsEnabledFailure)({
|
|
42
|
+
status: response.status,
|
|
43
|
+
}),
|
|
44
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
45
|
+
messageSection: 'accounting_projects_enabled_update',
|
|
46
|
+
messageText: 'failed',
|
|
47
|
+
type: 'error',
|
|
48
|
+
}),
|
|
49
|
+
]);
|
|
50
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, companyViewReducer_1.updateAccountingProjectsEnabledFailure)({
|
|
51
|
+
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', `Update Accounting Projects Enabled errored out - ${error instanceof Error
|
|
52
|
+
? error.message
|
|
53
|
+
: JSON.stringify(error)}`),
|
|
54
|
+
}), (0, snackbarReducer_1.openSnackbar)({
|
|
55
|
+
messageSection: 'accounting_projects_enabled_update',
|
|
56
|
+
messageText: 'failed',
|
|
57
|
+
type: 'error',
|
|
58
|
+
}))));
|
|
59
|
+
}));
|
|
60
|
+
exports.disableAccountingProjectsEpic = disableAccountingProjectsEpic;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
4
|
+
import { RootState } from '../../../../../reducer';
|
|
5
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
6
|
+
import { enableAccountingProjects, requestQboProjectsReconnect, resumeEnableAccountingProjects, updateAccountingProjectsEnabledFailure } from '../../../companyViewReducer';
|
|
7
|
+
export interface AccountingProviderProjectAuthorizationStatusResponse {
|
|
8
|
+
is_accounting_provider_project_apis_authorized: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type ActionType = ReturnType<typeof enableAccountingProjects> | ReturnType<typeof requestQboProjectsReconnect> | ReturnType<typeof resumeEnableAccountingProjects> | ReturnType<typeof updateAccountingProjectsEnabledFailure> | ReturnType<typeof openSnackbar>;
|
|
11
|
+
export declare const enableAccountingProjectsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enableAccountingProjectsEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
|
|
7
|
+
const responsePayload_1 = require("../../../../../responsePayload");
|
|
8
|
+
const companyViewReducer_1 = require("../../../companyViewReducer");
|
|
9
|
+
const enableAccountingProjectsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyViewReducer_1.enableAccountingProjects.match), (0, operators_1.switchMap)((action) => {
|
|
10
|
+
const { companyId } = action.payload;
|
|
11
|
+
return zeniAPI
|
|
12
|
+
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accounting_provider_project_authorization_status`)
|
|
13
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
14
|
+
if (!(0, responsePayload_1.isSuccessResponse)(response) || response.data == null) {
|
|
15
|
+
return (0, rxjs_1.from)([
|
|
16
|
+
(0, companyViewReducer_1.updateAccountingProjectsEnabledFailure)({
|
|
17
|
+
status: response.status,
|
|
18
|
+
}),
|
|
19
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
20
|
+
messageSection: 'accounting_projects_enabled_update',
|
|
21
|
+
messageText: 'failed',
|
|
22
|
+
type: 'error',
|
|
23
|
+
}),
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
if (response.data.is_accounting_provider_project_apis_authorized !==
|
|
27
|
+
true) {
|
|
28
|
+
return (0, rxjs_1.from)([(0, companyViewReducer_1.requestQboProjectsReconnect)()]);
|
|
29
|
+
}
|
|
30
|
+
return (0, rxjs_1.from)([(0, companyViewReducer_1.resumeEnableAccountingProjects)(companyId)]);
|
|
31
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, companyViewReducer_1.updateAccountingProjectsEnabledFailure)({
|
|
32
|
+
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', `Accounting provider project authorization status errored out - ${error instanceof Error
|
|
33
|
+
? error.message
|
|
34
|
+
: JSON.stringify(error)}`),
|
|
35
|
+
}), (0, snackbarReducer_1.openSnackbar)({
|
|
36
|
+
messageSection: 'accounting_projects_enabled_update',
|
|
37
|
+
messageText: 'failed',
|
|
38
|
+
type: 'error',
|
|
39
|
+
}))));
|
|
40
|
+
}));
|
|
41
|
+
exports.enableAccountingProjectsEpic = enableAccountingProjectsEpic;
|
package/lib/view/companyView/epic/companyPassport/projects/resumeEnableAccountingProjectsEpic.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
4
|
+
import { updateTenantAccountingProjectsEnabled } from '../../../../../entity/tenant/tenantReducer';
|
|
5
|
+
import { RootState } from '../../../../../reducer';
|
|
6
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
7
|
+
import { resumeEnableAccountingProjects, updateAccountingProjectsEnabledFailure, updateAccountingProjectsEnabledSuccess } from '../../../companyViewReducer';
|
|
8
|
+
export interface AccountingProviderProjectEnablementStatusResponse {
|
|
9
|
+
is_accounting_projects_enabled: boolean;
|
|
10
|
+
is_accounting_provider_project_apis_enabled: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type ActionType = ReturnType<typeof resumeEnableAccountingProjects> | ReturnType<typeof updateTenantAccountingProjectsEnabled> | ReturnType<typeof updateAccountingProjectsEnabledSuccess> | ReturnType<typeof updateAccountingProjectsEnabledFailure> | ReturnType<typeof openSnackbar>;
|
|
13
|
+
export declare const resumeEnableAccountingProjectsEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/companyView/epic/companyPassport/projects/resumeEnableAccountingProjectsEpic.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resumeEnableAccountingProjectsEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
|
|
7
|
+
const tenantReducer_1 = require("../../../../../entity/tenant/tenantReducer");
|
|
8
|
+
const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
|
|
9
|
+
const responsePayload_1 = require("../../../../../responsePayload");
|
|
10
|
+
const companyViewReducer_1 = require("../../../companyViewReducer");
|
|
11
|
+
const resumeEnableAccountingProjectsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyViewReducer_1.resumeEnableAccountingProjects.match), (0, operators_1.switchMap)((action) => {
|
|
12
|
+
const { companyId } = action.payload;
|
|
13
|
+
const tenantId = (0, tenantSelector_1.getTenantIdByCompanyId)(state$.value.tenantState, companyId);
|
|
14
|
+
if (tenantId == null) {
|
|
15
|
+
return (0, rxjs_1.from)([
|
|
16
|
+
(0, companyViewReducer_1.updateAccountingProjectsEnabledFailure)({
|
|
17
|
+
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Tenant not found for company'),
|
|
18
|
+
}),
|
|
19
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
20
|
+
messageSection: 'accounting_projects_enabled_update',
|
|
21
|
+
messageText: 'failed',
|
|
22
|
+
type: 'error',
|
|
23
|
+
}),
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
return zeniAPI
|
|
27
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accounting_provider_project_enablement_status`)
|
|
28
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
29
|
+
if (!(0, responsePayload_1.isSuccessResponse)(response) || response.data == null) {
|
|
30
|
+
return (0, rxjs_1.from)([
|
|
31
|
+
(0, companyViewReducer_1.updateAccountingProjectsEnabledFailure)({
|
|
32
|
+
status: response.status,
|
|
33
|
+
}),
|
|
34
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
35
|
+
messageSection: 'accounting_projects_enabled_update',
|
|
36
|
+
messageText: 'failed',
|
|
37
|
+
type: 'error',
|
|
38
|
+
}),
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
if (response.data.is_accounting_provider_project_apis_enabled !==
|
|
42
|
+
true ||
|
|
43
|
+
response.data.is_accounting_projects_enabled !== true) {
|
|
44
|
+
return (0, rxjs_1.from)([
|
|
45
|
+
(0, companyViewReducer_1.updateAccountingProjectsEnabledFailure)({
|
|
46
|
+
status: (0, responsePayload_1.createZeniAPIStatus)('Projects not enabled in QBO', 'Please enable projects in QBO before enabling in the Zeni dashboard!'),
|
|
47
|
+
}),
|
|
48
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
49
|
+
messageSection: 'accounting_projects_qbo_not_enabled',
|
|
50
|
+
messageText: 'failed',
|
|
51
|
+
type: 'error',
|
|
52
|
+
}),
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
return (0, rxjs_1.from)([
|
|
56
|
+
(0, tenantReducer_1.updateTenantAccountingProjectsEnabled)({
|
|
57
|
+
enabled: true,
|
|
58
|
+
tenantId,
|
|
59
|
+
}),
|
|
60
|
+
(0, companyViewReducer_1.updateAccountingProjectsEnabledSuccess)(),
|
|
61
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
62
|
+
messageSection: 'accounting_projects_enabled_update',
|
|
63
|
+
messageText: 'success',
|
|
64
|
+
type: 'success',
|
|
65
|
+
}),
|
|
66
|
+
]);
|
|
67
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, companyViewReducer_1.updateAccountingProjectsEnabledFailure)({
|
|
68
|
+
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', `Accounting provider project enablement status errored out - ${error instanceof Error
|
|
69
|
+
? error.message
|
|
70
|
+
: JSON.stringify(error)}`),
|
|
71
|
+
}), (0, snackbarReducer_1.openSnackbar)({
|
|
72
|
+
messageSection: 'accounting_projects_enabled_update',
|
|
73
|
+
messageText: 'failed',
|
|
74
|
+
type: 'error',
|
|
75
|
+
}))));
|
|
76
|
+
}));
|
|
77
|
+
exports.resumeEnableAccountingProjectsEpic = resumeEnableAccountingProjectsEpic;
|
|
@@ -6,11 +6,12 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const companyReducer_1 = require("../../../../entity/company/companyReducer");
|
|
7
7
|
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
8
8
|
const tenantReducer_1 = require("../../../../entity/tenant/tenantReducer");
|
|
9
|
+
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
9
10
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
10
11
|
const companyViewReducer_1 = require("../../companyViewReducer");
|
|
11
12
|
const updateAccountingClassesEnabledEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyViewReducer_1.updateAccountingClassesEnabled.match), (0, operators_1.switchMap)((action) => {
|
|
12
13
|
const { companyId, enabled } = action.payload;
|
|
13
|
-
const tenantId =
|
|
14
|
+
const tenantId = (0, tenantSelector_1.getTenantIdByCompanyId)(state$.value.tenantState, companyId);
|
|
14
15
|
return zeniAPI
|
|
15
16
|
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, { is_accounting_classes_enabled: enabled })
|
|
16
17
|
.pipe((0, operators_1.mergeMap)((response) => {
|
package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.js
CHANGED
|
@@ -6,11 +6,12 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const companyReducer_1 = require("../../../../entity/company/companyReducer");
|
|
7
7
|
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
8
8
|
const tenantReducer_1 = require("../../../../entity/tenant/tenantReducer");
|
|
9
|
+
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
9
10
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
10
11
|
const companyViewReducer_1 = require("../../companyViewReducer");
|
|
11
12
|
const updateCapitalizationAccountThresholdEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyViewReducer_1.updateCapitalizationAccountThreshold.match), (0, operators_1.switchMap)((action) => {
|
|
12
13
|
const { companyId, accountId, threshold, dismissOnboardingForAccount, allOverrides, } = action.payload;
|
|
13
|
-
const tenantId =
|
|
14
|
+
const tenantId = (0, tenantSelector_1.getTenantIdByCompanyId)(state$.value.tenantState, companyId);
|
|
14
15
|
let finalOverrides;
|
|
15
16
|
if (allOverrides !== undefined) {
|
|
16
17
|
finalOverrides = allOverrides ?? {};
|
|
@@ -5,6 +5,7 @@ import { CompanyOfficerLocalData, CompanyOfficerType, PrimaryContactLocalData }
|
|
|
5
5
|
export type UpdateActionType = 'company_update' | 'user_create' | 'user_update';
|
|
6
6
|
export interface CompanyPassportViewState extends CommonState, FetchedState {
|
|
7
7
|
accountingClassesUpdateStatus: FetchStateAndError;
|
|
8
|
+
accountingProjectsUpdateStatus: FetchStateAndError;
|
|
8
9
|
capitalizationThresholdUpdateStatus: FetchStateAndError;
|
|
9
10
|
companyDetails: {
|
|
10
11
|
updateStatus: FetchStateAndError;
|
|
@@ -14,6 +15,7 @@ export interface CompanyPassportViewState extends CommonState, FetchedState {
|
|
|
14
15
|
updateStatus: FetchStateAndError;
|
|
15
16
|
localData?: CompanyOfficerLocalData;
|
|
16
17
|
}>;
|
|
18
|
+
needsQboProjectsReconnect: boolean;
|
|
17
19
|
primaryContact: {
|
|
18
20
|
updateStatus: FetchStateAndError;
|
|
19
21
|
localData?: PrimaryContactLocalData;
|
|
@@ -8,10 +8,15 @@ exports.initialCompanyPassportView = {
|
|
|
8
8
|
fetchState: 'Not-Started',
|
|
9
9
|
error: undefined,
|
|
10
10
|
},
|
|
11
|
+
accountingProjectsUpdateStatus: {
|
|
12
|
+
fetchState: 'Not-Started',
|
|
13
|
+
error: undefined,
|
|
14
|
+
},
|
|
11
15
|
capitalizationThresholdUpdateStatus: {
|
|
12
16
|
fetchState: 'Not-Started',
|
|
13
17
|
error: undefined,
|
|
14
18
|
},
|
|
19
|
+
needsQboProjectsReconnect: false,
|
|
15
20
|
companyDetails: {
|
|
16
21
|
localData: undefined,
|
|
17
22
|
updateStatus: {
|
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: "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" | "reconcile" | "save_reconcile_for_later" | "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" | "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";
|
|
42
|
+
messageSection: "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" | "reconcile" | "save_reconcile_for_later" | "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: {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
3
|
+
import { RootState } from '../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
+
import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, saveNotificationPreferences, saveNotificationPreferencesFailure, saveNotificationPreferencesSuccess, setGroupFrequency, toggleEventChannel } from '../notificationPreferencesViewReducer';
|
|
6
|
+
export type ActionType = ReturnType<typeof clearAllNotificationPreferencesView> | ReturnType<typeof clearNotificationPreferencesLocalOverrides> | ReturnType<typeof saveNotificationPreferences> | ReturnType<typeof saveNotificationPreferencesFailure> | ReturnType<typeof saveNotificationPreferencesSuccess> | ReturnType<typeof setGroupFrequency> | ReturnType<typeof toggleEventChannel> | ReturnType<typeof openSnackbar>;
|
|
7
|
+
export declare const saveNotificationPreferencesEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
8
|
+
payload: undefined;
|
|
9
|
+
type: "notificationPreferencesView/clearAllNotificationPreferencesView";
|
|
10
|
+
} | {
|
|
11
|
+
payload: {
|
|
12
|
+
messageSection: import("../../..").SnackbarMessageSections;
|
|
13
|
+
messageText: import("../../..").SnackbarMessageSectionTexts;
|
|
14
|
+
type: import("../../..").SnackbarMessageType;
|
|
15
|
+
showStatusIcon?: boolean;
|
|
16
|
+
variables?: {
|
|
17
|
+
variableName: string;
|
|
18
|
+
variableValue: string;
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
type: "snackbar/openSnackbar";
|
|
22
|
+
} | {
|
|
23
|
+
payload: undefined;
|
|
24
|
+
type: "notificationPreferencesView/clearNotificationPreferencesLocalOverrides";
|
|
25
|
+
} | {
|
|
26
|
+
payload: undefined;
|
|
27
|
+
type: "notificationPreferencesView/saveNotificationPreferences";
|
|
28
|
+
} | {
|
|
29
|
+
payload: import("../notificationPreferencesViewReducer").SaveNotificationPreferencesFailurePayload;
|
|
30
|
+
type: "notificationPreferencesView/saveNotificationPreferencesFailure";
|
|
31
|
+
} | {
|
|
32
|
+
payload: import("../notificationPreferencesViewReducer").SaveNotificationPreferencesSuccessPayload;
|
|
33
|
+
type: "notificationPreferencesView/saveNotificationPreferencesSuccess";
|
|
34
|
+
} | {
|
|
35
|
+
payload: import("../notificationPreferencesViewReducer").SetFrequencyPayload;
|
|
36
|
+
type: "notificationPreferencesView/setGroupFrequency";
|
|
37
|
+
} | {
|
|
38
|
+
payload: import("../notificationPreferencesViewReducer").TogglePreferencePayload;
|
|
39
|
+
type: "notificationPreferencesView/toggleEventChannel";
|
|
40
|
+
}>;
|