@zeniai/client-epic-state 5.0.71-betaVR3 → 5.0.72
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 +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 +3 -1
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +2 -1
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +1 -1
- package/lib/entity/chargeCard/chargeCardReducer.d.ts +2 -19
- package/lib/entity/chargeCard/chargeCardReducer.js +2 -35
- package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.d.ts +1 -14
- package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.js +2 -36
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +1 -1
- package/lib/entity/tenant/SessionManager.js +3 -6
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -2
- package/lib/entity/tenant/clearAllEpic.js +2 -2
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.js +2 -6
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.js +2 -6
- package/lib/entity/tenant/tenantReducer.js +1 -6
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +1 -3
- package/lib/epic.d.ts +10 -12
- package/lib/epic.js +11 -13
- package/lib/esm/coreEpics.js +1 -1
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +3 -1
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +2 -1
- package/lib/esm/entity/chargeCard/chargeCardReducer.js +1 -34
- package/lib/esm/entity/chargeCardTransaction/chargeCardTransactionReducer.js +1 -35
- package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +1 -1
- package/lib/esm/entity/tenant/SessionManager.js +1 -4
- package/lib/esm/entity/tenant/clearAllEpic.js +2 -2
- package/lib/esm/entity/tenant/epic/saveAPIKeyConnectionEpic.js +2 -6
- package/lib/esm/entity/tenant/epic/saveOAuthConnectionEpic.js +2 -6
- package/lib/esm/entity/tenant/tenantReducer.js +1 -6
- package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +1 -3
- package/lib/esm/epic.js +11 -13
- package/lib/esm/index.js +15 -19
- package/lib/esm/reducer.js +2 -2
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +5 -2
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +5 -2
- package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +1 -4
- 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 +1 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +5 -21
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +6 -8
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +1 -7
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +9 -13
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +1 -11
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -81
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +1 -127
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +0 -2
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -20
- package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +2 -0
- package/lib/esm/view/financeStatement/financeStatementSelector.js +1 -1
- package/lib/esm/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +2 -3
- package/lib/esm/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +2 -3
- package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +18 -55
- package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +2 -16
- package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailPageEpic.js +4 -5
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +9 -26
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +6 -9
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +2 -3
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +1 -1
- package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.js +3 -7
- 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 +1 -7
- package/lib/index.d.ts +16 -20
- package/lib/index.js +58 -75
- package/lib/reducer.d.ts +2 -2
- package/lib/reducer.js +2 -2
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- 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 +5 -2
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +5 -2
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +1 -4
- 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 +1 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +5 -21
- package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +6 -8
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +1 -7
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +5 -11
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +8 -12
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +0 -10
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +0 -21
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +2 -15
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +3 -83
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +3 -9
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +2 -128
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +1 -14
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +0 -14
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +0 -2
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -20
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +2 -20
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +4 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +2 -41
- 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 +1 -3
- package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +2 -3
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.d.ts +1 -3
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +2 -3
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +18 -55
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +2 -16
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailPageEpic.js +4 -5
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +3 -18
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +10 -27
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +6 -9
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.d.ts +1 -3
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +2 -3
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.d.ts +1 -3
- package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.js +3 -7
- package/lib/view/transactionDetail/transactionDetailSelector.js +1 -7
- package/lib/view/zeniOAuthView/zeniOAuthSelector.d.ts +1 -1
- package/package.json +4 -9
- package/lib/commonStateTypes/cacheOverrideFetchReducer.d.ts +0 -17
- package/lib/commonStateTypes/cacheOverrideFetchReducer.js +0 -20
- package/lib/commonStateTypes/pusherActions.d.ts +0 -11
- package/lib/commonStateTypes/pusherActions.js +0 -6
- package/lib/esm/commonStateTypes/cacheOverrideFetchReducer.js +0 -16
- package/lib/esm/commonStateTypes/pusherActions.js +0 -3
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/refreshBatchDetailsForBatchIdEpic.js +0 -52
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/syncTabsAfterAutomatchEpic.js +0 -53
- package/lib/esm/view/expenseAutomationView/types/completedSubTab.js +0 -17
- package/lib/view/expenseAutomationView/epics/missingReceipts/refreshBatchDetailsForBatchIdEpic.d.ts +0 -18
- package/lib/view/expenseAutomationView/epics/missingReceipts/refreshBatchDetailsForBatchIdEpic.js +0 -56
- package/lib/view/expenseAutomationView/epics/missingReceipts/syncTabsAfterAutomatchEpic.d.ts +0 -28
- package/lib/view/expenseAutomationView/epics/missingReceipts/syncTabsAfterAutomatchEpic.js +0 -57
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +0 -10
- package/lib/view/expenseAutomationView/types/completedSubTab.js +0 -21
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 sessionHeartbeatEpic_1 = require("./entity/tenant/epic/sessionHeartbeatEpic");
|
|
27
26
|
const signInUserEpic_1 = require("./entity/tenant/epic/signInUserEpic");
|
|
27
|
+
const sessionHeartbeatEpic_1 = require("./entity/tenant/epic/sessionHeartbeatEpic");
|
|
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';
|
|
3
4
|
import { AdditionalBalancesOptions } from '../../commonStateTypes/coaBalance/additionalBalances/getAdditionalBalances';
|
|
4
5
|
import { COABalancesFilter } from '../../commonStateTypes/coaBalance/coaBalancesFilter';
|
|
5
6
|
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';
|
|
4
5
|
import { COABalanceGrouped, COABalanceGroupedByPeriod } from '../../commonStateTypes/coaBalance/coaBalance';
|
|
5
6
|
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';
|
|
3
4
|
import { AdditionalBalancesOptions } from '../../commonStateTypes/coaBalance/additionalBalances/getAdditionalBalances';
|
|
4
5
|
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,7 +22,9 @@ 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
|
|
25
|
+
latestTraining: payload.latest_training != null
|
|
26
|
+
? (0, zeniDayJS_1.date)(payload.latest_training)
|
|
27
|
+
: undefined,
|
|
26
28
|
latestTransactionSync: payload.latest_transaction_sync != null
|
|
27
29
|
? (0, zeniDayJS_1.date)(payload.latest_transaction_sync)
|
|
28
30
|
: undefined,
|
|
@@ -31,7 +31,8 @@ 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] =
|
|
34
|
+
draft.jobsByTenantId[action.payload.tenantId] =
|
|
35
|
+
Array.from(jobMap.values());
|
|
35
36
|
}
|
|
36
37
|
else {
|
|
37
38
|
draft.jobsByTenantId[action.payload.tenantId] = mappedJobs;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ID } from '../../commonStateTypes/common';
|
|
2
|
-
import { ZeniDate } from '../../zeniDayJS';
|
|
3
2
|
import { User } from '../user/userState';
|
|
4
3
|
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,26 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { 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">,
|
|
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">;
|
|
7
|
+
}>, updateChargeCard: import("@reduxjs/toolkit").ActionCreatorWithPayload<ChargeCardPayload, "chargeCard/updateChargeCard">, removeChargeCard: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "chargeCard/removeChargeCard">, clearAllChargeCards: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCard/clearAllChargeCards">;
|
|
25
8
|
declare const _default: import("redux").Reducer<ChargeCardState>;
|
|
26
9
|
export default _default;
|
|
@@ -4,11 +4,9 @@ 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.
|
|
7
|
+
exports.clearAllChargeCards = exports.removeChargeCard = 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");
|
|
12
10
|
const chargeCardPayload_1 = require("./chargeCardPayload");
|
|
13
11
|
exports.initialState = {
|
|
14
12
|
chargeCardByID: {},
|
|
@@ -44,37 +42,6 @@ const chargeCard = (0, toolkit_1.createSlice)({
|
|
|
44
42
|
const latestChargeCard = (0, chargeCardPayload_1.mapChargeCardPayloadToChargeCard)(action.payload);
|
|
45
43
|
draft.chargeCardByID[latestChargeCard.id] = latestChargeCard;
|
|
46
44
|
},
|
|
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
|
-
},
|
|
78
45
|
removeChargeCard(draft, action) {
|
|
79
46
|
delete draft.chargeCardByID[action.payload];
|
|
80
47
|
},
|
|
@@ -83,5 +50,5 @@ const chargeCard = (0, toolkit_1.createSlice)({
|
|
|
83
50
|
},
|
|
84
51
|
},
|
|
85
52
|
});
|
|
86
|
-
_a = chargeCard.actions, exports.updateChargeCards = _a.updateChargeCards, exports.updateChargeCard = _a.updateChargeCard, exports.
|
|
53
|
+
_a = chargeCard.actions, exports.updateChargeCards = _a.updateChargeCards, exports.updateChargeCard = _a.updateChargeCard, exports.removeChargeCard = _a.removeChargeCard, exports.clearAllChargeCards = _a.clearAllChargeCards;
|
|
87
54
|
exports.default = chargeCard.reducer;
|
|
@@ -5,20 +5,7 @@ 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">,
|
|
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<{
|
|
8
|
+
}, "chargeCardTransaction/updateChargeCardTransactionAttachments">, removeChargeCardTransaction: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "chargeCardTransaction/removeChargeCardTransaction">, removeChargeCardTransactionAttachmentByThirdPartyTransactionId: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
22
9
|
attachmentFileName: string;
|
|
23
10
|
thirdPartyTransactionId: ID;
|
|
24
11
|
}, "chargeCardTransaction/removeChargeCardTransactionAttachmentByThirdPartyTransactionId">, clearAllChargeCardTransactions: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardTransaction/clearAllChargeCardTransactions">;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearAllChargeCardTransactions = exports.removeChargeCardTransactionAttachmentByThirdPartyTransactionId = exports.removeChargeCardTransaction = exports.
|
|
4
|
+
exports.clearAllChargeCardTransactions = exports.removeChargeCardTransactionAttachmentByThirdPartyTransactionId = exports.removeChargeCardTransaction = 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");
|
|
8
6
|
const chargeCardTransactionPayload_1 = require("./chargeCardTransactionPayload");
|
|
9
7
|
exports.initialState = {
|
|
10
8
|
chargeCardTransactionById: {},
|
|
@@ -52,42 +50,10 @@ const chargeCardTransaction = (0, toolkit_1.createSlice)({
|
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
},
|
|
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
|
-
},
|
|
76
53
|
clearAllChargeCardTransactions(draft) {
|
|
77
54
|
draft.chargeCardTransactionById = {};
|
|
78
55
|
},
|
|
79
56
|
},
|
|
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
|
-
},
|
|
91
57
|
});
|
|
92
|
-
_a = chargeCardTransaction.actions, exports.updateChargeCardTransactions = _a.updateChargeCardTransactions, exports.updateChargeCardTransaction = _a.updateChargeCardTransaction, exports.updateChargeCardTransactionAttachments = _a.updateChargeCardTransactionAttachments, exports.
|
|
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;
|
|
93
59
|
exports.default = chargeCardTransaction.reducer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
|
|
2
|
-
import { SectionByProjectCOABalanceGroupedPayloadV2 } from '../../view/profitAndLossProjectView/profitAndLossProjectViewPayload';
|
|
3
2
|
import { AccountMetadataPayload } from '../account/accountPayload';
|
|
3
|
+
import { SectionByProjectCOABalanceGroupedPayloadV2 } from '../../view/profitAndLossProjectView/profitAndLossProjectViewPayload';
|
|
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 getSumOfBalancesGroupedByPeriod_1 = require("../../commonStateTypes/coaBalance/classBalances/getSumOfBalancesGroupedByPeriod");
|
|
9
8
|
const coaBalance_1 = require("../../commonStateTypes/coaBalance/coaBalance");
|
|
9
|
+
const getSumOfBalancesGroupedByPeriod_1 = require("../../commonStateTypes/coaBalance/classBalances/getSumOfBalancesGroupedByPeriod");
|
|
10
10
|
const subAccountSelector_1 = require("../account/subAccountSelector");
|
|
11
11
|
const projectSelector_1 = require("../project/projectSelector");
|
|
12
12
|
const sectionProjectView_1 = require("./sectionProjectView");
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SessionManager = void 0;
|
|
4
2
|
/**
|
|
5
3
|
* SessionManager — Central session lifecycle manager.
|
|
6
4
|
*
|
|
@@ -12,6 +10,8 @@ exports.SessionManager = void 0;
|
|
|
12
10
|
* 5. Sync activity across same-origin tabs via BroadcastChannel so one
|
|
13
11
|
* active tab keeps other tabs' sessions alive (no cascading logout).
|
|
14
12
|
*/
|
|
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,10 +263,7 @@ 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({
|
|
267
|
-
type: 'heartbeat-fired',
|
|
268
|
-
timestamp: this.lastHeartbeatTime,
|
|
269
|
-
});
|
|
266
|
+
this.broadcast({ type: 'heartbeat-fired', timestamp: this.lastHeartbeatTime });
|
|
270
267
|
}
|
|
271
268
|
// ─── BroadcastChannel (cross-tab activity sync) ───────────
|
|
272
269
|
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';
|
|
6
5
|
import { clearAllEntityApprovalStatus } from '../../entity/entityApprovalStatus/entityApprovalStatusReducer';
|
|
7
6
|
import { clearAllMonthEndCloseChecks } from '../../entity/monthEndCloseChecks/monthEndCloseChecksReducer';
|
|
8
7
|
import { clearAllNotifications } from '../../entity/notification/notificationReducer';
|
|
9
8
|
import { clearAllSectionsClassesViewV2 } from '../../entity/sectionClassesViewV2/sectionClassesViewReducer';
|
|
10
9
|
import { clearAllSectionsProjectView } from '../../entity/sectionProjectView/sectionProjectViewReducer';
|
|
11
10
|
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,6 +39,7 @@ 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';
|
|
42
43
|
import { clearCreditAgentView } from '../../view/creditAgentView/creditAgentViewReducer';
|
|
43
44
|
import { clearDashboard } from '../../view/dashboard/dashboardReducer';
|
|
44
45
|
import { clearDashboardLayout } from '../../view/dashboardLayout/dashboardLayoutReducer';
|
|
@@ -133,7 +134,6 @@ import { clearZeniAccountSetupView } from '../../view/spendManagement/zeniAccoun
|
|
|
133
134
|
import { clearZeniAccountsConfig } from '../../view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigReducer';
|
|
134
135
|
import { clearSubscriptionView } from '../../view/subscriptionView/subscriptionViewReducer';
|
|
135
136
|
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");
|
|
10
9
|
const entityApprovalStatusReducer_1 = require("../../entity/entityApprovalStatus/entityApprovalStatusReducer");
|
|
11
10
|
const monthEndCloseChecksReducer_1 = require("../../entity/monthEndCloseChecks/monthEndCloseChecksReducer");
|
|
12
11
|
const notificationReducer_1 = require("../../entity/notification/notificationReducer");
|
|
13
12
|
const sectionClassesViewReducer_1 = require("../../entity/sectionClassesViewV2/sectionClassesViewReducer");
|
|
14
13
|
const sectionProjectViewReducer_1 = require("../../entity/sectionProjectView/sectionProjectViewReducer");
|
|
15
14
|
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,6 +43,7 @@ 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");
|
|
46
47
|
const creditAgentViewReducer_1 = require("../../view/creditAgentView/creditAgentViewReducer");
|
|
47
48
|
const dashboardReducer_1 = require("../../view/dashboard/dashboardReducer");
|
|
48
49
|
const dashboardLayoutReducer_1 = require("../../view/dashboardLayout/dashboardLayoutReducer");
|
|
@@ -137,7 +138,6 @@ const zeniAccountSetupViewReducer_1 = require("../../view/spendManagement/zeniAc
|
|
|
137
138
|
const zeniAccountsConfigReducer_1 = require("../../view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigReducer");
|
|
138
139
|
const subscriptionViewReducer_1 = require("../../view/subscriptionView/subscriptionViewReducer");
|
|
139
140
|
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,13 +21,9 @@ 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)([
|
|
25
|
-
(0, tenantReducer_1.saveAPIKeyConnectionFailure)(action.payload.tenantId, status),
|
|
26
|
-
]);
|
|
24
|
+
return (0, rxjs_1.from)([(0, tenantReducer_1.saveAPIKeyConnectionFailure)(action.payload.tenantId, status)]);
|
|
27
25
|
}), (0, operators_1.catchError)((error) => {
|
|
28
|
-
const message = error instanceof Error
|
|
29
|
-
? error.message
|
|
30
|
-
: 'Unexpected error saving connection.';
|
|
26
|
+
const message = error instanceof Error ? error.message : 'Unexpected error saving connection.';
|
|
31
27
|
return (0, rxjs_1.from)([
|
|
32
28
|
(0, tenantReducer_1.saveAPIKeyConnectionFailure)(action.payload.tenantId, (0, responsePayload_1.createZeniAPIStatus)(message)),
|
|
33
29
|
]);
|
|
@@ -23,13 +23,9 @@ 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)([
|
|
27
|
-
(0, tenantReducer_1.saveOAuthConnectionFailure)(action.payload.tenantId, status),
|
|
28
|
-
]);
|
|
26
|
+
return (0, rxjs_1.from)([(0, tenantReducer_1.saveOAuthConnectionFailure)(action.payload.tenantId, status)]);
|
|
29
27
|
}), (0, operators_1.catchError)((error) => {
|
|
30
|
-
const message = error instanceof Error
|
|
31
|
-
? error.message
|
|
32
|
-
: 'Unexpected error saving connection.';
|
|
28
|
+
const message = error instanceof Error ? error.message : 'Unexpected error saving connection.';
|
|
33
29
|
return (0, rxjs_1.from)([
|
|
34
30
|
(0, tenantReducer_1.saveOAuthConnectionFailure)(action.payload.tenantId, (0, responsePayload_1.createZeniAPIStatus)(message)),
|
|
35
31
|
]);
|
|
@@ -574,12 +574,7 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
574
574
|
saveConnectorCredentialsSuccess: {
|
|
575
575
|
prepare(tenantId, connectionType, connectionName, connectionPayload) {
|
|
576
576
|
return {
|
|
577
|
-
payload: {
|
|
578
|
-
tenantId,
|
|
579
|
-
connectionType,
|
|
580
|
-
connectionName,
|
|
581
|
-
connectionPayload,
|
|
582
|
-
},
|
|
577
|
+
payload: { tenantId, connectionType, connectionName, connectionPayload },
|
|
583
578
|
};
|
|
584
579
|
},
|
|
585
580
|
reducer(draft, action) {
|
|
@@ -27,9 +27,7 @@ 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
|
|
31
|
-
? payload.linked_transactions.map((transactionIDPayload) => (0, transactionIDPayload_1.toTransactionID)(transactionIDPayload))
|
|
32
|
-
: [],
|
|
30
|
+
linkedTransactions: payload.linked_transactions != null ? payload.linked_transactions.map((transactionIDPayload) => (0, transactionIDPayload_1.toTransactionID)(transactionIDPayload)) : [],
|
|
33
31
|
});
|
|
34
32
|
/**
|
|
35
33
|
* Transaction with account and class line payload with COT tracking
|