@zeniai/client-epic-state 5.0.72 → 5.0.73
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/commonStateTypes/cacheOverrideFetchReducer.d.ts +17 -0
- package/lib/commonStateTypes/cacheOverrideFetchReducer.js +20 -0
- package/lib/commonStateTypes/pusherActions.d.ts +11 -0
- package/lib/commonStateTypes/pusherActions.js +6 -0
- package/lib/coreEpics.js +1 -1
- package/lib/entity/account/accountSelector.d.ts +1 -1
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/account/subAccountSelector.d.ts +1 -1
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +1 -3
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +1 -2
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +1 -1
- package/lib/entity/chargeCard/chargeCardReducer.d.ts +19 -2
- package/lib/entity/chargeCard/chargeCardReducer.js +35 -2
- package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.d.ts +14 -1
- package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.js +36 -2
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +2 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +2 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +2 -0
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +1 -1
- package/lib/entity/tenant/SessionManager.js +6 -3
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -2
- package/lib/entity/tenant/clearAllEpic.js +2 -2
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.js +6 -2
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.js +6 -2
- package/lib/entity/tenant/tenantReducer.js +6 -1
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +3 -1
- package/lib/epic.d.ts +9 -9
- package/lib/epic.js +10 -10
- package/lib/esm/commonStateTypes/cacheOverrideFetchReducer.js +16 -0
- package/lib/esm/commonStateTypes/pusherActions.js +3 -0
- package/lib/esm/coreEpics.js +1 -1
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +1 -3
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +1 -2
- package/lib/esm/entity/chargeCard/chargeCardReducer.js +34 -1
- package/lib/esm/entity/chargeCardTransaction/chargeCardTransactionReducer.js +35 -1
- package/lib/esm/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +2 -0
- package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +1 -1
- package/lib/esm/entity/tenant/SessionManager.js +4 -1
- package/lib/esm/entity/tenant/clearAllEpic.js +2 -2
- package/lib/esm/entity/tenant/epic/saveAPIKeyConnectionEpic.js +6 -2
- package/lib/esm/entity/tenant/epic/saveOAuthConnectionEpic.js +6 -2
- package/lib/esm/entity/tenant/tenantReducer.js +6 -1
- package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +3 -1
- package/lib/esm/epic.js +10 -10
- package/lib/esm/index.js +17 -13
- package/lib/esm/reducer.js +2 -2
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +2 -5
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +2 -5
- package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +4 -1
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -1
- package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +1 -1
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +2 -1
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +8 -6
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -1
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +11 -1
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -1
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +127 -1
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -1
- package/lib/esm/view/expenseAutomationView/types/completedSubTab.js +17 -0
- package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -2
- package/lib/esm/view/financeStatement/financeStatementSelector.js +1 -1
- package/lib/esm/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +3 -2
- package/lib/esm/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +3 -2
- package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +55 -18
- package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +16 -2
- package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailPageEpic.js +5 -4
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +26 -9
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +9 -6
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +3 -2
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +1 -1
- package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.js +7 -3
- package/lib/esm/view/taskManager/cannedResponsesView/epics/fetchCannedResponsesEpic.js +1 -1
- package/lib/esm/view/taskManager/cannedResponsesView/epics/saveCannedResponseEpic.js +1 -1
- package/lib/esm/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.js +1 -1
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +7 -1
- package/lib/index.d.ts +19 -15
- package/lib/index.js +72 -58
- package/lib/reducer.d.ts +2 -2
- package/lib/reducer.js +2 -2
- package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +2 -2
- package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +1 -1
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +2 -5
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +2 -5
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +4 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +1 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +2 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +8 -6
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +10 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +21 -0
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +2 -1
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +9 -3
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +128 -2
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -1
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +14 -0
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -1
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +10 -0
- package/lib/view/expenseAutomationView/types/completedSubTab.js +21 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -2
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +1 -4
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +41 -2
- package/lib/view/financeStatement/financeStatementSelector.js +1 -1
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +3 -2
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +3 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +55 -18
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +16 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailPageEpic.js +5 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +18 -3
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +27 -10
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +9 -6
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +3 -2
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.js +7 -3
- package/lib/view/transactionDetail/transactionDetailSelector.js +7 -1
- package/lib/view/zeniOAuthView/zeniOAuthSelector.d.ts +1 -1
- package/package.json +9 -4
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
/**
|
|
3
|
+
* Factory for `fetchXxx` reducers that support Pusher-driven silent refresh.
|
|
4
|
+
* When `cacheOverride=true`, fetchState and error are left untouched so the
|
|
5
|
+
* UI doesn't flash a skeleton. When `false`, `applyTo` runs the normal
|
|
6
|
+
* 'In-Progress' transition.
|
|
7
|
+
*/
|
|
8
|
+
export declare const createCacheOverrideFetchReducer: <TState>(applyTo: (draft: Draft<TState>) => void) => {
|
|
9
|
+
prepare: (cacheOverride?: boolean) => {
|
|
10
|
+
payload: {
|
|
11
|
+
cacheOverride: boolean;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
reducer: (draft: Draft<TState>, action: PayloadAction<{
|
|
15
|
+
cacheOverride: boolean;
|
|
16
|
+
}>) => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createCacheOverrideFetchReducer = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Factory for `fetchXxx` reducers that support Pusher-driven silent refresh.
|
|
6
|
+
* When `cacheOverride=true`, fetchState and error are left untouched so the
|
|
7
|
+
* UI doesn't flash a skeleton. When `false`, `applyTo` runs the normal
|
|
8
|
+
* 'In-Progress' transition.
|
|
9
|
+
*/
|
|
10
|
+
const createCacheOverrideFetchReducer = (applyTo) => ({
|
|
11
|
+
reducer(draft, action) {
|
|
12
|
+
if (action.payload.cacheOverride !== true) {
|
|
13
|
+
applyTo(draft);
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
prepare(cacheOverride = false) {
|
|
17
|
+
return { payload: { cacheOverride } };
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
exports.createCacheOverrideFetchReducer = createCacheOverrideFetchReducer;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChargeCardTransactionPayload } from '../entity/chargeCardTransaction/chargeCardTransactionPayload';
|
|
2
|
+
import { ID } from './common';
|
|
3
|
+
export declare const addChargeCardTransactionFromPusher: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
4
|
+
cardId: ID;
|
|
5
|
+
transaction: ChargeCardTransactionPayload;
|
|
6
|
+
}, string>;
|
|
7
|
+
export declare const addDeclinedChargeCardTransactionFromPusher: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
8
|
+
cardId: ID;
|
|
9
|
+
transaction: ChargeCardTransactionPayload;
|
|
10
|
+
declineReason?: string;
|
|
11
|
+
}, string>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addDeclinedChargeCardTransactionFromPusher = exports.addChargeCardTransactionFromPusher = void 0;
|
|
4
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
+
exports.addChargeCardTransactionFromPusher = (0, toolkit_1.createAction)('chargeCardDetail/addChargeCardTransactionFromPusher');
|
|
6
|
+
exports.addDeclinedChargeCardTransactionFromPusher = (0, toolkit_1.createAction)('chargeCardDetail/addDeclinedChargeCardTransactionFromPusher');
|
package/lib/coreEpics.js
CHANGED
|
@@ -23,8 +23,8 @@ const fetchSubscriptionSummaryForTenantEpic_1 = require("./entity/tenant/epic/fe
|
|
|
23
23
|
const resendVerifyDeviceOTPEpic_1 = require("./entity/tenant/epic/resendVerifyDeviceOTPEpic");
|
|
24
24
|
const saveExternalConnectionEpic_1 = require("./entity/tenant/epic/saveExternalConnectionEpic");
|
|
25
25
|
const sendEmailMagicLinkToUserEpic_1 = require("./entity/tenant/epic/sendEmailMagicLinkToUserEpic");
|
|
26
|
-
const signInUserEpic_1 = require("./entity/tenant/epic/signInUserEpic");
|
|
27
26
|
const sessionHeartbeatEpic_1 = require("./entity/tenant/epic/sessionHeartbeatEpic");
|
|
27
|
+
const signInUserEpic_1 = require("./entity/tenant/epic/signInUserEpic");
|
|
28
28
|
const signOutUserEpic_1 = require("./entity/tenant/epic/signOutUserEpic");
|
|
29
29
|
const verifyDeviceWithTwoFAEpic_1 = require("./entity/tenant/epic/verifyDeviceWithTwoFAEpic");
|
|
30
30
|
// ── Toast Notification Epic ──────────────────────────────────────────
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AccountsViewParentID } from '../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { ClassesViewParentID } from '../../commonStateTypes/classesView/nestedClassID';
|
|
3
|
-
import { ProjectsViewParentID } from '../../commonStateTypes/projectView/projectViewParentID';
|
|
4
3
|
import { AdditionalBalancesOptions } from '../../commonStateTypes/coaBalance/additionalBalances/getAdditionalBalances';
|
|
5
4
|
import { COABalancesFilter } from '../../commonStateTypes/coaBalance/coaBalancesFilter';
|
|
6
5
|
import { ID } from '../../commonStateTypes/common';
|
|
6
|
+
import { ProjectsViewParentID } from '../../commonStateTypes/projectView/projectViewParentID';
|
|
7
7
|
import { EntityOrder } from '../../commonStateTypes/selectorTypes/selectorTypes';
|
|
8
8
|
import { ReportIDPlusForecastID } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
9
9
|
import { Account, AccountBase, AccountState, AccountType } from './accountState';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AccountsViewParentID } from '../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { Balance } from '../../commonStateTypes/balance';
|
|
3
3
|
import { ClassesViewParentID } from '../../commonStateTypes/classesView/nestedClassID';
|
|
4
|
-
import { ProjectsViewParentID } from '../../commonStateTypes/projectView/projectViewParentID';
|
|
5
4
|
import { COABalanceGrouped, COABalanceGroupedByPeriod } from '../../commonStateTypes/coaBalance/coaBalance';
|
|
6
5
|
import { ID } from '../../commonStateTypes/common';
|
|
6
|
+
import { ProjectsViewParentID } from '../../commonStateTypes/projectView/projectViewParentID';
|
|
7
7
|
import { RecommendationBase } from '../../commonStateTypes/recommendationBase';
|
|
8
8
|
import { Status } from '../../commonStateTypes/status';
|
|
9
9
|
import { ReportIDPlusForecastID } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AccountsViewParentID, NestedAccountID, NestedAccountIDHierarchy } from '../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { ClassesViewParentID } from '../../commonStateTypes/classesView/nestedClassID';
|
|
3
|
-
import { ProjectsViewParentID } from '../../commonStateTypes/projectView/projectViewParentID';
|
|
4
3
|
import { AdditionalBalancesOptions } from '../../commonStateTypes/coaBalance/additionalBalances/getAdditionalBalances';
|
|
5
4
|
import { COABalancesFilter } from '../../commonStateTypes/coaBalance/coaBalancesFilter';
|
|
5
|
+
import { ProjectsViewParentID } from '../../commonStateTypes/projectView/projectViewParentID';
|
|
6
6
|
import { EntityOrder } from '../../commonStateTypes/selectorTypes/selectorTypes';
|
|
7
7
|
import { ReportIDPlusForecastID } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
8
8
|
import { AccountReport } from './accountSelector';
|
|
@@ -22,9 +22,7 @@ const toAccuracyByModel = (accuracyPayload) => {
|
|
|
22
22
|
const toAiAccountantEnrollment = (payload) => ({
|
|
23
23
|
status: (0, aiAccountantCustomerState_1.toAiAccountantEnrollmentStatus)(payload.status),
|
|
24
24
|
accuracy: toAccuracyByModel(payload.accuracy),
|
|
25
|
-
latestTraining: payload.latest_training != null
|
|
26
|
-
? (0, zeniDayJS_1.date)(payload.latest_training)
|
|
27
|
-
: undefined,
|
|
25
|
+
latestTraining: payload.latest_training != null ? (0, zeniDayJS_1.date)(payload.latest_training) : undefined,
|
|
28
26
|
latestTransactionSync: payload.latest_transaction_sync != null
|
|
29
27
|
? (0, zeniDayJS_1.date)(payload.latest_transaction_sync)
|
|
30
28
|
: undefined,
|
|
@@ -31,8 +31,7 @@ const aiAccountantCustomer = (0, toolkit_1.createSlice)({
|
|
|
31
31
|
const existing = draft.jobsByTenantId[action.payload.tenantId] ?? [];
|
|
32
32
|
const jobMap = new Map(existing.map((job) => [job.jobId, job]));
|
|
33
33
|
mappedJobs.forEach((job) => jobMap.set(job.jobId, job));
|
|
34
|
-
draft.jobsByTenantId[action.payload.tenantId] =
|
|
35
|
-
Array.from(jobMap.values());
|
|
34
|
+
draft.jobsByTenantId[action.payload.tenantId] = Array.from(jobMap.values());
|
|
36
35
|
}
|
|
37
36
|
else {
|
|
38
37
|
draft.jobsByTenantId[action.payload.tenantId] = mappedJobs;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { ZeniDate } from '../../zeniDayJS';
|
|
2
3
|
import { User } from '../user/userState';
|
|
3
4
|
import { UserState } from '../user/userState';
|
|
4
|
-
import { ZeniDate } from '../../zeniDayJS';
|
|
5
5
|
import { AiAccountantCustomerState, AiAccountantEnrollmentStatus, AiAccountantJobStatus, AiAccountantOperationType } from './aiAccountantCustomerState';
|
|
6
6
|
export interface AiAccountantEnrollmentView {
|
|
7
7
|
status: AiAccountantEnrollmentStatus;
|
|
@@ -1,9 +1,26 @@
|
|
|
1
|
-
import { UpdateType } from '../../commonStateTypes/common';
|
|
1
|
+
import { ID, UpdateType } from '../../commonStateTypes/common';
|
|
2
2
|
import { ChargeCardState } from './chargeCard';
|
|
3
3
|
import { ChargeCardPayload } from './chargeCardPayload';
|
|
4
4
|
export declare const initialState: ChargeCardState;
|
|
5
5
|
export declare const updateChargeCards: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCards: ChargeCardPayload[], updateType?: UpdateType | undefined], ChargeCardPayload[], "chargeCard/updateChargeCards", never, {
|
|
6
6
|
updateType: UpdateType;
|
|
7
|
-
}>, updateChargeCard: import("@reduxjs/toolkit").ActionCreatorWithPayload<ChargeCardPayload, "chargeCard/updateChargeCard">,
|
|
7
|
+
}>, updateChargeCard: import("@reduxjs/toolkit").ActionCreatorWithPayload<ChargeCardPayload, "chargeCard/updateChargeCard">, updateChargeCardStatusFromPusher: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
8
|
+
cardId: ID;
|
|
9
|
+
cardStatus: {
|
|
10
|
+
code: string;
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
isLockedByAdmin: boolean | undefined;
|
|
14
|
+
}, "chargeCard/updateChargeCardStatusFromPusher">, updateChargeCardSpendingFromPusher: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
15
|
+
cardId: ID;
|
|
16
|
+
currencyCode: string;
|
|
17
|
+
currencySymbol: string;
|
|
18
|
+
balance?: number;
|
|
19
|
+
dailyPurchaseSpends?: number;
|
|
20
|
+
dailyWithdrawals?: number;
|
|
21
|
+
hold?: number;
|
|
22
|
+
monthlyPurchaseSpends?: number;
|
|
23
|
+
monthlyWithdrawals?: number;
|
|
24
|
+
}, "chargeCard/updateChargeCardSpendingFromPusher">, removeChargeCard: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "chargeCard/removeChargeCard">, clearAllChargeCards: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCard/clearAllChargeCards">;
|
|
8
25
|
declare const _default: import("redux").Reducer<ChargeCardState>;
|
|
9
26
|
export default _default;
|
|
@@ -4,9 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.clearAllChargeCards = exports.removeChargeCard = exports.updateChargeCard = exports.updateChargeCards = exports.initialState = void 0;
|
|
7
|
+
exports.clearAllChargeCards = exports.removeChargeCard = exports.updateChargeCardSpendingFromPusher = exports.updateChargeCardStatusFromPusher = exports.updateChargeCard = exports.updateChargeCards = exports.initialState = void 0;
|
|
8
8
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
9
|
const assignWith_1 = __importDefault(require("lodash/assignWith"));
|
|
10
|
+
const amount_1 = require("../../commonStateTypes/amount");
|
|
11
|
+
const chargeCard_1 = require("./chargeCard");
|
|
10
12
|
const chargeCardPayload_1 = require("./chargeCardPayload");
|
|
11
13
|
exports.initialState = {
|
|
12
14
|
chargeCardByID: {},
|
|
@@ -42,6 +44,37 @@ const chargeCard = (0, toolkit_1.createSlice)({
|
|
|
42
44
|
const latestChargeCard = (0, chargeCardPayload_1.mapChargeCardPayloadToChargeCard)(action.payload);
|
|
43
45
|
draft.chargeCardByID[latestChargeCard.id] = latestChargeCard;
|
|
44
46
|
},
|
|
47
|
+
updateChargeCardStatusFromPusher(draft, action) {
|
|
48
|
+
const { cardId, cardStatus, isLockedByAdmin } = action.payload;
|
|
49
|
+
const card = draft.chargeCardByID[cardId];
|
|
50
|
+
if (card != null) {
|
|
51
|
+
card.status = {
|
|
52
|
+
code: (0, chargeCard_1.toCardStatusCodeType)(cardStatus.code),
|
|
53
|
+
name: cardStatus.name,
|
|
54
|
+
};
|
|
55
|
+
if (isLockedByAdmin !== undefined) {
|
|
56
|
+
card.isLockedByAdmin = isLockedByAdmin;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
updateChargeCardSpendingFromPusher(draft, action) {
|
|
61
|
+
const { cardId, currencyCode, currencySymbol } = action.payload;
|
|
62
|
+
const card = draft.chargeCardByID[cardId];
|
|
63
|
+
if (card == null) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const amt = (v) => v !== undefined ? (0, amount_1.toAmount)(v, currencyCode, currencySymbol) : undefined;
|
|
67
|
+
card.balance = amt(action.payload.balance) ?? card.balance;
|
|
68
|
+
card.hold = amt(action.payload.hold) ?? card.hold;
|
|
69
|
+
card.dailyPurchaseSpends =
|
|
70
|
+
amt(action.payload.dailyPurchaseSpends) ?? card.dailyPurchaseSpends;
|
|
71
|
+
card.monthlyPurchaseSpends =
|
|
72
|
+
amt(action.payload.monthlyPurchaseSpends) ?? card.monthlyPurchaseSpends;
|
|
73
|
+
card.dailyWithdrawals =
|
|
74
|
+
amt(action.payload.dailyWithdrawals) ?? card.dailyWithdrawals;
|
|
75
|
+
card.monthlyWithdrawals =
|
|
76
|
+
amt(action.payload.monthlyWithdrawals) ?? card.monthlyWithdrawals;
|
|
77
|
+
},
|
|
45
78
|
removeChargeCard(draft, action) {
|
|
46
79
|
delete draft.chargeCardByID[action.payload];
|
|
47
80
|
},
|
|
@@ -50,5 +83,5 @@ const chargeCard = (0, toolkit_1.createSlice)({
|
|
|
50
83
|
},
|
|
51
84
|
},
|
|
52
85
|
});
|
|
53
|
-
_a = chargeCard.actions, exports.updateChargeCards = _a.updateChargeCards, exports.updateChargeCard = _a.updateChargeCard, exports.removeChargeCard = _a.removeChargeCard, exports.clearAllChargeCards = _a.clearAllChargeCards;
|
|
86
|
+
_a = chargeCard.actions, exports.updateChargeCards = _a.updateChargeCards, exports.updateChargeCard = _a.updateChargeCard, exports.updateChargeCardStatusFromPusher = _a.updateChargeCardStatusFromPusher, exports.updateChargeCardSpendingFromPusher = _a.updateChargeCardSpendingFromPusher, exports.removeChargeCard = _a.removeChargeCard, exports.clearAllChargeCards = _a.clearAllChargeCards;
|
|
54
87
|
exports.default = chargeCard.reducer;
|
|
@@ -5,7 +5,20 @@ export declare const initialState: ChargeCardTransactionState;
|
|
|
5
5
|
export declare const updateChargeCardTransactions: import("@reduxjs/toolkit").ActionCreatorWithPayload<ChargeCardTransactionPayload[], "chargeCardTransaction/updateChargeCardTransactions">, updateChargeCardTransaction: import("@reduxjs/toolkit").ActionCreatorWithPayload<ChargeCardTransactionPayload, "chargeCardTransaction/updateChargeCardTransaction">, updateChargeCardTransactionAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
6
6
|
data: TransactionReceiptsPayload;
|
|
7
7
|
transactionId: ID;
|
|
8
|
-
}, "chargeCardTransaction/updateChargeCardTransactionAttachments">,
|
|
8
|
+
}, "chargeCardTransaction/updateChargeCardTransactionAttachments">, updateChargeCardTransactionStatusFromPusher: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
9
|
+
transactionId: ID;
|
|
10
|
+
transactionStatus: {
|
|
11
|
+
code: string;
|
|
12
|
+
name: string;
|
|
13
|
+
};
|
|
14
|
+
}, "chargeCardTransaction/updateChargeCardTransactionStatusFromPusher">, updateChargeCardTransactionFromPusher: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
15
|
+
cardId: ID;
|
|
16
|
+
transaction: ChargeCardTransactionPayload;
|
|
17
|
+
}, "chargeCardTransaction/updateChargeCardTransactionFromPusher">, updateChargeCardTransactionReceiptFromPusher: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
18
|
+
attachmentFilePaths: string[];
|
|
19
|
+
cardId: ID;
|
|
20
|
+
transactionId: ID;
|
|
21
|
+
}, "chargeCardTransaction/updateChargeCardTransactionReceiptFromPusher">, removeChargeCardTransaction: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "chargeCardTransaction/removeChargeCardTransaction">, removeChargeCardTransactionAttachmentByThirdPartyTransactionId: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
9
22
|
attachmentFileName: string;
|
|
10
23
|
thirdPartyTransactionId: ID;
|
|
11
24
|
}, "chargeCardTransaction/removeChargeCardTransactionAttachmentByThirdPartyTransactionId">, clearAllChargeCardTransactions: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardTransaction/clearAllChargeCardTransactions">;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearAllChargeCardTransactions = exports.removeChargeCardTransactionAttachmentByThirdPartyTransactionId = exports.removeChargeCardTransaction = exports.updateChargeCardTransactionAttachments = exports.updateChargeCardTransaction = exports.updateChargeCardTransactions = exports.initialState = void 0;
|
|
4
|
+
exports.clearAllChargeCardTransactions = exports.removeChargeCardTransactionAttachmentByThirdPartyTransactionId = exports.removeChargeCardTransaction = exports.updateChargeCardTransactionReceiptFromPusher = exports.updateChargeCardTransactionFromPusher = exports.updateChargeCardTransactionStatusFromPusher = exports.updateChargeCardTransactionAttachments = exports.updateChargeCardTransaction = exports.updateChargeCardTransactions = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const pusherActions_1 = require("../../commonStateTypes/pusherActions");
|
|
7
|
+
const chargeCardTransaction_1 = require("./chargeCardTransaction");
|
|
6
8
|
const chargeCardTransactionPayload_1 = require("./chargeCardTransactionPayload");
|
|
7
9
|
exports.initialState = {
|
|
8
10
|
chargeCardTransactionById: {},
|
|
@@ -50,10 +52,42 @@ const chargeCardTransaction = (0, toolkit_1.createSlice)({
|
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
},
|
|
55
|
+
updateChargeCardTransactionStatusFromPusher(draft, action) {
|
|
56
|
+
const { transactionId, transactionStatus } = action.payload;
|
|
57
|
+
const transaction = draft.chargeCardTransactionById[transactionId];
|
|
58
|
+
if (transaction != null) {
|
|
59
|
+
transaction.transactionStatus = {
|
|
60
|
+
code: (0, chargeCardTransaction_1.toCardTransactionStatusCode)(transactionStatus.code),
|
|
61
|
+
name: transactionStatus.name,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
updateChargeCardTransactionFromPusher(draft, action) {
|
|
66
|
+
const entity = (0, chargeCardTransactionPayload_1.toChargeCardTransaction)(action.payload.transaction);
|
|
67
|
+
draft.chargeCardTransactionById[entity.id] = entity;
|
|
68
|
+
},
|
|
69
|
+
updateChargeCardTransactionReceiptFromPusher(draft, action) {
|
|
70
|
+
const { transactionId, attachmentFilePaths } = action.payload;
|
|
71
|
+
const transaction = draft.chargeCardTransactionById[transactionId];
|
|
72
|
+
if (transaction != null) {
|
|
73
|
+
transaction.attachmentFilePaths = attachmentFilePaths;
|
|
74
|
+
}
|
|
75
|
+
},
|
|
53
76
|
clearAllChargeCardTransactions(draft) {
|
|
54
77
|
draft.chargeCardTransactionById = {};
|
|
55
78
|
},
|
|
56
79
|
},
|
|
80
|
+
extraReducers: (builder) => {
|
|
81
|
+
builder
|
|
82
|
+
.addCase(pusherActions_1.addChargeCardTransactionFromPusher, (draft, action) => {
|
|
83
|
+
const entity = (0, chargeCardTransactionPayload_1.toChargeCardTransaction)(action.payload.transaction);
|
|
84
|
+
draft.chargeCardTransactionById[entity.id] = entity;
|
|
85
|
+
})
|
|
86
|
+
.addCase(pusherActions_1.addDeclinedChargeCardTransactionFromPusher, (draft, action) => {
|
|
87
|
+
const entity = (0, chargeCardTransactionPayload_1.toChargeCardTransaction)(action.payload.transaction);
|
|
88
|
+
draft.chargeCardTransactionById[entity.id] = entity;
|
|
89
|
+
});
|
|
90
|
+
},
|
|
57
91
|
});
|
|
58
|
-
_a = chargeCardTransaction.actions, exports.updateChargeCardTransactions = _a.updateChargeCardTransactions, exports.updateChargeCardTransaction = _a.updateChargeCardTransaction, exports.updateChargeCardTransactionAttachments = _a.updateChargeCardTransactionAttachments, exports.removeChargeCardTransaction = _a.removeChargeCardTransaction, exports.removeChargeCardTransactionAttachmentByThirdPartyTransactionId = _a.removeChargeCardTransactionAttachmentByThirdPartyTransactionId, exports.clearAllChargeCardTransactions = _a.clearAllChargeCardTransactions;
|
|
92
|
+
_a = chargeCardTransaction.actions, exports.updateChargeCardTransactions = _a.updateChargeCardTransactions, exports.updateChargeCardTransaction = _a.updateChargeCardTransaction, exports.updateChargeCardTransactionAttachments = _a.updateChargeCardTransactionAttachments, exports.updateChargeCardTransactionStatusFromPusher = _a.updateChargeCardTransactionStatusFromPusher, exports.updateChargeCardTransactionFromPusher = _a.updateChargeCardTransactionFromPusher, exports.updateChargeCardTransactionReceiptFromPusher = _a.updateChargeCardTransactionReceiptFromPusher, exports.removeChargeCardTransaction = _a.removeChargeCardTransaction, exports.removeChargeCardTransactionAttachmentByThirdPartyTransactionId = _a.removeChargeCardTransactionAttachmentByThirdPartyTransactionId, exports.clearAllChargeCardTransactions = _a.clearAllChargeCardTransactions;
|
|
59
93
|
exports.default = chargeCardTransaction.reducer;
|
|
@@ -14,6 +14,7 @@ interface MonthCloseChecksPayload {
|
|
|
14
14
|
progress_percentage: number;
|
|
15
15
|
sequence: number;
|
|
16
16
|
metrics?: MonthCloseCheckMetricsPayload[];
|
|
17
|
+
progress_percentage_ai?: number;
|
|
17
18
|
}
|
|
18
19
|
interface MonthEndInsightsPayload {
|
|
19
20
|
count_account_auto_reconciled: number;
|
|
@@ -27,6 +28,7 @@ interface MonthEndInsightsPayload {
|
|
|
27
28
|
interface MonthEndAuditSummaryPayload {
|
|
28
29
|
audit_report_last_generated_date: string;
|
|
29
30
|
audit_score_percentage: number;
|
|
31
|
+
audit_score_percentage_ai?: number;
|
|
30
32
|
}
|
|
31
33
|
export interface MonthEndCloseChecksPayload {
|
|
32
34
|
audit_summary: MonthEndAuditSummaryPayload;
|
|
@@ -21,6 +21,7 @@ const toMonthEndCloseCheck = (monthCloseCheck) => {
|
|
|
21
21
|
title: monthCloseCheck.month_close_check_title,
|
|
22
22
|
frequency: (0, monthEndCloseChecksState_1.toMonthEndCloseCheckFrequency)(monthCloseCheck.action_frequency),
|
|
23
23
|
progress: monthCloseCheck.progress_percentage,
|
|
24
|
+
progressAI: monthCloseCheck.progress_percentage_ai ?? 0,
|
|
24
25
|
sequence: monthCloseCheck.sequence,
|
|
25
26
|
isDisabled: (0, expenseAutomationViewState_1.toExpenseAutomationViewType)(monthCloseCheck.month_close_check_type) ===
|
|
26
27
|
'month_end_insights',
|
|
@@ -61,6 +62,7 @@ const toMonthEndCloseChecksInfo = (payload, period) => ({
|
|
|
61
62
|
monthEndCloseCheckList: payload.month_close_checks.map((monthCloseCheck) => toMonthEndCloseCheck(monthCloseCheck)),
|
|
62
63
|
auditSummary: {
|
|
63
64
|
auditScorePercentage: payload.audit_summary.audit_score_percentage,
|
|
65
|
+
auditScorePercentageAI: payload.audit_summary.audit_score_percentage_ai ?? 0,
|
|
64
66
|
auditReportLastGeneratedDate: payload.audit_summary.audit_report_last_generated_date != null
|
|
65
67
|
? (0, zeniDayJS_1.date)(payload.audit_summary.audit_report_last_generated_date)
|
|
66
68
|
: null,
|
|
@@ -18,6 +18,7 @@ export interface MonthEndCloseCheck {
|
|
|
18
18
|
isDisabled: boolean;
|
|
19
19
|
metrics: MonthCloseCheckMetrics[];
|
|
20
20
|
progress: number;
|
|
21
|
+
progressAI: number;
|
|
21
22
|
sequence: number;
|
|
22
23
|
title: string;
|
|
23
24
|
}
|
|
@@ -32,6 +33,7 @@ export interface MonthEndInsights {
|
|
|
32
33
|
export interface MonthEndAuditSummary {
|
|
33
34
|
auditReportLastGeneratedDate: ZeniDate | null;
|
|
34
35
|
auditScorePercentage: number;
|
|
36
|
+
auditScorePercentageAI: number;
|
|
35
37
|
}
|
|
36
38
|
export interface MonthEndCloseChecksInfo {
|
|
37
39
|
auditSummary: MonthEndAuditSummary;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
|
|
2
|
-
import { AccountMetadataPayload } from '../account/accountPayload';
|
|
3
2
|
import { SectionByProjectCOABalanceGroupedPayloadV2 } from '../../view/profitAndLossProjectView/profitAndLossProjectViewPayload';
|
|
3
|
+
import { AccountMetadataPayload } from '../account/accountPayload';
|
|
4
4
|
import { SectionProjectViewState } from './sectionProjectViewState';
|
|
5
5
|
export declare const initialState: SectionProjectViewState;
|
|
6
6
|
export declare const updateSectionProjectView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation", sectionPayload: SectionByProjectCOABalanceGroupedPayloadV2, accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
|
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getSectionProjectViewReport = void 0;
|
|
7
7
|
const get_1 = __importDefault(require("lodash/get"));
|
|
8
|
-
const coaBalance_1 = require("../../commonStateTypes/coaBalance/coaBalance");
|
|
9
8
|
const getSumOfBalancesGroupedByPeriod_1 = require("../../commonStateTypes/coaBalance/classBalances/getSumOfBalancesGroupedByPeriod");
|
|
9
|
+
const coaBalance_1 = require("../../commonStateTypes/coaBalance/coaBalance");
|
|
10
10
|
const subAccountSelector_1 = require("../account/subAccountSelector");
|
|
11
11
|
const projectSelector_1 = require("../project/projectSelector");
|
|
12
12
|
const sectionProjectView_1 = require("./sectionProjectView");
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SessionManager = void 0;
|
|
2
4
|
/**
|
|
3
5
|
* SessionManager — Central session lifecycle manager.
|
|
4
6
|
*
|
|
@@ -10,8 +12,6 @@
|
|
|
10
12
|
* 5. Sync activity across same-origin tabs via BroadcastChannel so one
|
|
11
13
|
* active tab keeps other tabs' sessions alive (no cascading logout).
|
|
12
14
|
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.SessionManager = void 0;
|
|
15
15
|
const sessionTypes_1 = require("./sessionTypes");
|
|
16
16
|
/** Events that indicate user activity. */
|
|
17
17
|
const ACTIVITY_EVENTS = [
|
|
@@ -263,7 +263,10 @@ class SessionManager {
|
|
|
263
263
|
this.callbacks?.onHeartbeat();
|
|
264
264
|
// Let other tabs know we just fired a heartbeat — they can skip theirs
|
|
265
265
|
// this cycle to avoid N tabs all firing heartbeats.
|
|
266
|
-
this.broadcast({
|
|
266
|
+
this.broadcast({
|
|
267
|
+
type: 'heartbeat-fired',
|
|
268
|
+
timestamp: this.lastHeartbeatTime,
|
|
269
|
+
});
|
|
267
270
|
}
|
|
268
271
|
// ─── BroadcastChannel (cross-tab activity sync) ───────────
|
|
269
272
|
setupBroadcastChannel() {
|
|
@@ -2,13 +2,13 @@ import { ActionsObservable } from 'redux-observable';
|
|
|
2
2
|
import { clearAllAiAccountantCustomers } from '../../entity/aiAccountantCustomer/aiAccountantCustomerReducer';
|
|
3
3
|
import { clearAiCfo } from '../../entity/aiCfo/aiCfoReducer';
|
|
4
4
|
import { clearAllApprovalRules } from '../../entity/approvalRule/approvalRuleReducer';
|
|
5
|
+
import { clearAllCreditAgent } from '../../entity/creditAgent/creditAgentReducer';
|
|
5
6
|
import { clearAllEntityApprovalStatus } from '../../entity/entityApprovalStatus/entityApprovalStatusReducer';
|
|
6
7
|
import { clearAllMonthEndCloseChecks } from '../../entity/monthEndCloseChecks/monthEndCloseChecksReducer';
|
|
7
8
|
import { clearAllNotifications } from '../../entity/notification/notificationReducer';
|
|
8
9
|
import { clearAllSectionsClassesViewV2 } from '../../entity/sectionClassesViewV2/sectionClassesViewReducer';
|
|
9
10
|
import { clearAllSectionsProjectView } from '../../entity/sectionProjectView/sectionProjectViewReducer';
|
|
10
11
|
import { clearAllTaskGroups } from '../../entity/taskGroup/taskGroupReducer';
|
|
11
|
-
import { clearCannedResponses } from '../../view/taskManager/cannedResponsesView/cannedResponsesReducer';
|
|
12
12
|
import { clearAllToastNotifications } from '../../entity/toastNotification/toastNotificationReducer';
|
|
13
13
|
import { clearAccountList } from '../../view/accountList/accountListReducer';
|
|
14
14
|
import { clearAccountMappingView } from '../../view/accountMappingView/accountMappingReducer';
|
|
@@ -39,7 +39,6 @@ import { clearCompanyHealthMetricView } from '../../view/companyHealthMetricView
|
|
|
39
39
|
import { clearCompanyMonthEndReportView } from '../../view/companyMonthEndReportView/companyMonthEndReportViewReducer';
|
|
40
40
|
import { clearCompanyTaskManagerView } from '../../view/companyTaskManagerView/companyTaskManagerViewReducer';
|
|
41
41
|
import { clearCompanyView } from '../../view/companyView/companyViewReducer';
|
|
42
|
-
import { clearAllCreditAgent } from '../../entity/creditAgent/creditAgentReducer';
|
|
43
42
|
import { clearCreditAgentView } from '../../view/creditAgentView/creditAgentViewReducer';
|
|
44
43
|
import { clearDashboard } from '../../view/dashboard/dashboardReducer';
|
|
45
44
|
import { clearDashboardLayout } from '../../view/dashboardLayout/dashboardLayoutReducer';
|
|
@@ -134,6 +133,7 @@ import { clearZeniAccountSetupView } from '../../view/spendManagement/zeniAccoun
|
|
|
134
133
|
import { clearZeniAccountsConfig } from '../../view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigReducer';
|
|
135
134
|
import { clearSubscriptionView } from '../../view/subscriptionView/subscriptionViewReducer';
|
|
136
135
|
import { clearTagView } from '../../view/tagView/tagViewReducer';
|
|
136
|
+
import { clearCannedResponses } from '../../view/taskManager/cannedResponsesView/cannedResponsesReducer';
|
|
137
137
|
import { clearTaskDetail } from '../../view/taskManager/taskDetailView/taskDetailReducer';
|
|
138
138
|
import { clearTaskGroupTemplatesView } from '../../view/taskManager/taskGroupTemplateView/taskGroupTemplateViewReducer';
|
|
139
139
|
import { clearTaskGroupView } from '../../view/taskManager/taskGroupView/taskGroupViewReducer';
|
|
@@ -6,13 +6,13 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const aiAccountantCustomerReducer_1 = require("../../entity/aiAccountantCustomer/aiAccountantCustomerReducer");
|
|
7
7
|
const aiCfoReducer_1 = require("../../entity/aiCfo/aiCfoReducer");
|
|
8
8
|
const approvalRuleReducer_1 = require("../../entity/approvalRule/approvalRuleReducer");
|
|
9
|
+
const creditAgentReducer_1 = require("../../entity/creditAgent/creditAgentReducer");
|
|
9
10
|
const entityApprovalStatusReducer_1 = require("../../entity/entityApprovalStatus/entityApprovalStatusReducer");
|
|
10
11
|
const monthEndCloseChecksReducer_1 = require("../../entity/monthEndCloseChecks/monthEndCloseChecksReducer");
|
|
11
12
|
const notificationReducer_1 = require("../../entity/notification/notificationReducer");
|
|
12
13
|
const sectionClassesViewReducer_1 = require("../../entity/sectionClassesViewV2/sectionClassesViewReducer");
|
|
13
14
|
const sectionProjectViewReducer_1 = require("../../entity/sectionProjectView/sectionProjectViewReducer");
|
|
14
15
|
const taskGroupReducer_1 = require("../../entity/taskGroup/taskGroupReducer");
|
|
15
|
-
const cannedResponsesReducer_1 = require("../../view/taskManager/cannedResponsesView/cannedResponsesReducer");
|
|
16
16
|
const toastNotificationReducer_1 = require("../../entity/toastNotification/toastNotificationReducer");
|
|
17
17
|
const accountListReducer_1 = require("../../view/accountList/accountListReducer");
|
|
18
18
|
const accountMappingReducer_1 = require("../../view/accountMappingView/accountMappingReducer");
|
|
@@ -43,7 +43,6 @@ const companyHealthMetricViewReducer_1 = require("../../view/companyHealthMetric
|
|
|
43
43
|
const companyMonthEndReportViewReducer_1 = require("../../view/companyMonthEndReportView/companyMonthEndReportViewReducer");
|
|
44
44
|
const companyTaskManagerViewReducer_1 = require("../../view/companyTaskManagerView/companyTaskManagerViewReducer");
|
|
45
45
|
const companyViewReducer_1 = require("../../view/companyView/companyViewReducer");
|
|
46
|
-
const creditAgentReducer_1 = require("../../entity/creditAgent/creditAgentReducer");
|
|
47
46
|
const creditAgentViewReducer_1 = require("../../view/creditAgentView/creditAgentViewReducer");
|
|
48
47
|
const dashboardReducer_1 = require("../../view/dashboard/dashboardReducer");
|
|
49
48
|
const dashboardLayoutReducer_1 = require("../../view/dashboardLayout/dashboardLayoutReducer");
|
|
@@ -138,6 +137,7 @@ const zeniAccountSetupViewReducer_1 = require("../../view/spendManagement/zeniAc
|
|
|
138
137
|
const zeniAccountsConfigReducer_1 = require("../../view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigReducer");
|
|
139
138
|
const subscriptionViewReducer_1 = require("../../view/subscriptionView/subscriptionViewReducer");
|
|
140
139
|
const tagViewReducer_1 = require("../../view/tagView/tagViewReducer");
|
|
140
|
+
const cannedResponsesReducer_1 = require("../../view/taskManager/cannedResponsesView/cannedResponsesReducer");
|
|
141
141
|
const taskDetailReducer_1 = require("../../view/taskManager/taskDetailView/taskDetailReducer");
|
|
142
142
|
const taskGroupTemplateViewReducer_1 = require("../../view/taskManager/taskGroupTemplateView/taskGroupTemplateViewReducer");
|
|
143
143
|
const taskGroupViewReducer_1 = require("../../view/taskManager/taskGroupView/taskGroupViewReducer");
|
|
@@ -21,9 +21,13 @@ const saveAPIKeyConnectionEpic = (actions$, _, zeniAPI) => actions$.pipe((0, ope
|
|
|
21
21
|
}
|
|
22
22
|
const status = response.status ??
|
|
23
23
|
(0, responsePayload_1.createZeniAPIStatus)('Failed to save connection. Please try again.');
|
|
24
|
-
return (0, rxjs_1.from)([
|
|
24
|
+
return (0, rxjs_1.from)([
|
|
25
|
+
(0, tenantReducer_1.saveAPIKeyConnectionFailure)(action.payload.tenantId, status),
|
|
26
|
+
]);
|
|
25
27
|
}), (0, operators_1.catchError)((error) => {
|
|
26
|
-
const message = error instanceof Error
|
|
28
|
+
const message = error instanceof Error
|
|
29
|
+
? error.message
|
|
30
|
+
: 'Unexpected error saving connection.';
|
|
27
31
|
return (0, rxjs_1.from)([
|
|
28
32
|
(0, tenantReducer_1.saveAPIKeyConnectionFailure)(action.payload.tenantId, (0, responsePayload_1.createZeniAPIStatus)(message)),
|
|
29
33
|
]);
|
|
@@ -23,9 +23,13 @@ const saveOAuthConnectionEpic = (actions$, _, zeniAPI) => actions$.pipe((0, oper
|
|
|
23
23
|
}
|
|
24
24
|
const status = response.status ??
|
|
25
25
|
(0, responsePayload_1.createZeniAPIStatus)('Failed to save connection. Please try again.');
|
|
26
|
-
return (0, rxjs_1.from)([
|
|
26
|
+
return (0, rxjs_1.from)([
|
|
27
|
+
(0, tenantReducer_1.saveOAuthConnectionFailure)(action.payload.tenantId, status),
|
|
28
|
+
]);
|
|
27
29
|
}), (0, operators_1.catchError)((error) => {
|
|
28
|
-
const message = error instanceof Error
|
|
30
|
+
const message = error instanceof Error
|
|
31
|
+
? error.message
|
|
32
|
+
: 'Unexpected error saving connection.';
|
|
29
33
|
return (0, rxjs_1.from)([
|
|
30
34
|
(0, tenantReducer_1.saveOAuthConnectionFailure)(action.payload.tenantId, (0, responsePayload_1.createZeniAPIStatus)(message)),
|
|
31
35
|
]);
|
|
@@ -574,7 +574,12 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
574
574
|
saveConnectorCredentialsSuccess: {
|
|
575
575
|
prepare(tenantId, connectionType, connectionName, connectionPayload) {
|
|
576
576
|
return {
|
|
577
|
-
payload: {
|
|
577
|
+
payload: {
|
|
578
|
+
tenantId,
|
|
579
|
+
connectionType,
|
|
580
|
+
connectionName,
|
|
581
|
+
connectionPayload,
|
|
582
|
+
},
|
|
578
583
|
};
|
|
579
584
|
},
|
|
580
585
|
reducer(draft, action) {
|
|
@@ -27,7 +27,9 @@ const toTransactionLineBase = (payload, lineType, currency) => ({
|
|
|
27
27
|
});
|
|
28
28
|
const toLinkedTransactionLine = (payload, currency) => ({
|
|
29
29
|
...toTransactionLineBase(payload, 'linked_transaction_line', currency),
|
|
30
|
-
linkedTransactions: payload.linked_transactions != null
|
|
30
|
+
linkedTransactions: payload.linked_transactions != null
|
|
31
|
+
? payload.linked_transactions.map((transactionIDPayload) => (0, transactionIDPayload_1.toTransactionID)(transactionIDPayload))
|
|
32
|
+
: [],
|
|
31
33
|
});
|
|
32
34
|
/**
|
|
33
35
|
* Transaction with account and class line payload with COT tracking
|
package/lib/epic.d.ts
CHANGED
|
@@ -182,6 +182,8 @@ import { ActionType as FetchExpenseAutomationSaveTransactionCategorizationAction
|
|
|
182
182
|
import { ActionType as TriggerReviewTabRefetchActionType } from './view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic';
|
|
183
183
|
import { ActionType as FetchExpenseAutomationUpdateTransactionCategorizationEpicActionType } from './view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic';
|
|
184
184
|
import { ActionType as UploadTransactionReceiptSuccessEpicActionType } from './view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic';
|
|
185
|
+
import { ActionType as FetchRegisteredInterestsActionType } from './view/featureNotificationView/epics/fetchRegisteredInterestsEpic';
|
|
186
|
+
import { ActionType as NotifyMeForFeatureActionType } from './view/featureNotificationView/epics/notifyMeForFeatureEpic';
|
|
185
187
|
import { ActionType as DeleteFileActionType } from './view/fileView/epic/deleteFileEpic';
|
|
186
188
|
import { ActionType as DeleteFileListActionType } from './view/fileView/epic/deleteFileListEpic';
|
|
187
189
|
import { ActionType as FetchFileActionType } from './view/fileView/epic/fetchFileEpic';
|
|
@@ -207,8 +209,6 @@ import { ActionType as FetchNotificationUnreadCountActionType } from './view/not
|
|
|
207
209
|
import { ActionType as FetchNotificationViewActionType } from './view/notificationView/epics/fetchNotificationViewEpic';
|
|
208
210
|
import { ActionType as UpdateNotificationViewAllNotificationsStatusActionType } from './view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic';
|
|
209
211
|
import { ActionType as UpdateNotificationViewNotificationStatusActionType } from './view/notificationView/epics/updateNotificationViewNotificationStatusEpic';
|
|
210
|
-
import { ActionType as FetchRegisteredInterestsActionType } from './view/featureNotificationView/epics/fetchRegisteredInterestsEpic';
|
|
211
|
-
import { ActionType as NotifyMeForFeatureActionType } from './view/featureNotificationView/epics/notifyMeForFeatureEpic';
|
|
212
212
|
import { ActionType as FetchCompanyOnboardingViewActionType } from './view/onboardingView/cockpitView/epic/fetchCompanyOnboardingViewEpic';
|
|
213
213
|
import { ActionType as FetchOnboardingCompletedCompaniesActionType } from './view/onboardingView/cockpitView/epic/fetchOnboardingCompletedCompaniesEpic';
|
|
214
214
|
import { ActionType as FetchQBOConnectionPoolActionType } from './view/onboardingView/cockpitView/epic/fetchQBOConnectionPoolEpic';
|
|
@@ -495,15 +495,18 @@ import { ActionType as SaveSubscriptionUpdatesActionType } from './view/subscrip
|
|
|
495
495
|
import { ActionType as CreateTagActionType } from './view/tagView/epics/createTagEpic';
|
|
496
496
|
import { ActionType as DeleteTagActionType } from './view/tagView/epics/deleteTagEpic';
|
|
497
497
|
import { ActionType as FetchAllTagsActionType } from './view/tagView/epics/fetchAllTagsEpic';
|
|
498
|
+
import { ActionType as DeleteCannedResponseActionType } from './view/taskManager/cannedResponsesView/epics/deleteCannedResponseEpic';
|
|
499
|
+
import { ActionType as FetchCannedResponsesActionType } from './view/taskManager/cannedResponsesView/epics/fetchCannedResponsesEpic';
|
|
500
|
+
import { ActionType as SaveCannedResponseActionType } from './view/taskManager/cannedResponsesView/epics/saveCannedResponseEpic';
|
|
498
501
|
import { ActionType as ArchiveTaskActionType } from './view/taskManager/taskDetailView/epics/archiveTaskEpic';
|
|
499
502
|
import { ActionType as DeleteTaskActionType } from './view/taskManager/taskDetailView/epics/deleteTaskEpic';
|
|
500
|
-
import { ActionType as SnoozeTaskActionType } from './view/taskManager/taskDetailView/epics/snoozeTaskEpic';
|
|
501
|
-
import { ActionType as UnsnoozeTaskActionType } from './view/taskManager/taskDetailView/epics/unsnoozeTaskEpic';
|
|
502
503
|
import { ActionType as FetchTaskDetailActionType } from './view/taskManager/taskDetailView/epics/fetchTaskDetailEpic';
|
|
503
504
|
import { ActionType as FetchTaskDetailPageActionType } from './view/taskManager/taskDetailView/epics/fetchTaskDetailPageEpic';
|
|
504
505
|
import { ActionType as FetchTaskHistoryActionType } from './view/taskManager/taskDetailView/epics/fetchTaskHistoryEpic';
|
|
505
506
|
import { ActionType as InitializeTaskToLocalStoreActionType } from './view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic';
|
|
506
507
|
import { ActionType as SaveTaskDetailActionType } from './view/taskManager/taskDetailView/epics/saveTaskDetailEpic';
|
|
508
|
+
import { ActionType as SnoozeTaskActionType } from './view/taskManager/taskDetailView/epics/snoozeTaskEpic';
|
|
509
|
+
import { ActionType as UnsnoozeTaskActionType } from './view/taskManager/taskDetailView/epics/unsnoozeTaskEpic';
|
|
507
510
|
import { ActionType as CreateTaskFromTaskGroupTemplateActionType } from './view/taskManager/taskGroupTemplateView/epics/createTaskFromTaskGroupTemplateEpic';
|
|
508
511
|
import { ActionType as FetchTaskGroupTemplatesActionType } from './view/taskManager/taskGroupTemplateView/epics/fetchTaskGroupTemplatesEpic';
|
|
509
512
|
import { ActionType as CreateNewTaskGroupActionType } from './view/taskManager/taskGroupView/epics/createNewTaskGroupEpic';
|
|
@@ -515,9 +518,6 @@ import { ActionType as DragNDropTasksActionType } from './view/taskManager/taskL
|
|
|
515
518
|
import { ActionType as FetchTaskListActionType } from './view/taskManager/taskListView/epics/fetchTaskListEpic';
|
|
516
519
|
import { ActionType as FetchTaskListPageActionType } from './view/taskManager/taskListView/epics/fetchTaskListPageEpic';
|
|
517
520
|
import { ActionType as UpdateTaskFromListViewActionType } from './view/taskManager/taskListView/epics/updateTaskFromListViewEpic';
|
|
518
|
-
import { ActionType as FetchCannedResponsesActionType } from './view/taskManager/cannedResponsesView/epics/fetchCannedResponsesEpic';
|
|
519
|
-
import { ActionType as SaveCannedResponseActionType } from './view/taskManager/cannedResponsesView/epics/saveCannedResponseEpic';
|
|
520
|
-
import { ActionType as DeleteCannedResponseActionType } from './view/taskManager/cannedResponsesView/epics/deleteCannedResponseEpic';
|
|
521
521
|
import { ActionType as FetchTasksCardActionType } from './view/tasksCard/fetchTasksCardEpic';
|
|
522
522
|
import { ActionType as TopExActionType } from './view/topEx/topExEpic';
|
|
523
523
|
import { ActionType as FetchTransactionActivityLogActionType } from './view/transactionActivityLogView/fetchTransactionActivityLogEpic';
|
|
@@ -531,13 +531,13 @@ import { ActionType as UpdateTransactionDetailActionType } from './view/transact
|
|
|
531
531
|
import { ActionType as UpdateTransactionOnUploadSuccessActionType } from './view/transactionDetail/epics/uploadMissingAttachmentSuccessEpic';
|
|
532
532
|
import { ActionType as FetchTransactionListByAccountActionType } from './view/transactionList/fetchTransactionListByAccountEpic';
|
|
533
533
|
import { ActionType as FetchTransactionListByClassActionType } from './view/transactionList/fetchTransactionListByClassEpic';
|
|
534
|
-
import { ActionType as FetchTransactionListByProjectActionType } from './view/transactionList/fetchTransactionListByProjectEpic';
|
|
535
534
|
import { ActionType as FetchTransactionListByEntityActionType } from './view/transactionList/fetchTransactionListByEntityEpic';
|
|
535
|
+
import { ActionType as FetchTransactionListByProjectActionType } from './view/transactionList/fetchTransactionListByProjectEpic';
|
|
536
536
|
import { ActionType as FetchTransactionsListByCategoryTypeActionType } from './view/transactionList/fetchTransactionsListByCategoryTypeEpic';
|
|
537
537
|
import { ActionType as ParallelFetchAccountTransactionListActionType } from './view/transactionList/parallelFetchAccountTransactionListEpic';
|
|
538
538
|
import { ActionType as ParallelFetchClassTransactionListActionType } from './view/transactionList/parallelFetchClassTransactionListEpic';
|
|
539
|
-
import { ActionType as ParallelFetchProjectTransactionListActionType } from './view/transactionList/parallelFetchProjectTransactionListEpic';
|
|
540
539
|
import { ActionType as ParallelFetchEntityTransactionListActionType } from './view/transactionList/parallelFetchEntityTransactionListEpic';
|
|
540
|
+
import { ActionType as ParallelFetchProjectTransactionListActionType } from './view/transactionList/parallelFetchProjectTransactionListEpic';
|
|
541
541
|
import { ActionType as ParallelFetchTransactionListByCategoryTypeActionType } from './view/transactionList/parallelFetchTransactionListByCategoryTypeEpic';
|
|
542
542
|
import { ActionType as FetchExpenseTrendActionType } from './view/trend/fetchExpenseTrendEpic';
|
|
543
543
|
import { ActionType as FetchIncomeTrendActionType } from './view/trend/fetchIncomeTrendEpic';
|