@zeniai/client-epic-state 5.0.44-betaRD2 → 5.0.44
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/recommendationBase.d.ts +1 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/project/projectPayload.d.ts +0 -7
- package/lib/entity/project/projectPayload.js +1 -15
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/sectionProjectView/sectionProjectView.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
- package/lib/entity/tenant/clearAllEpic.d.ts +1 -2
- package/lib/entity/tenant/clearAllEpic.js +0 -2
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.d.ts +0 -2
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +0 -9
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +0 -2
- package/lib/epic.d.ts +1 -4
- package/lib/epic.js +1 -4
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/esm/entity/project/projectPayload.js +0 -12
- package/lib/esm/entity/tenant/clearAllEpic.js +0 -2
- package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +0 -9
- package/lib/esm/epic.js +1 -4
- package/lib/esm/index.js +4 -7
- package/lib/esm/reducer.js +0 -3
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +0 -1
- package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +0 -6
- package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +0 -3
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +2 -14
- package/lib/esm/view/transactionList/transactionListReducer.js +2 -83
- package/lib/esm/view/transactionList/transactionListState.js +0 -10
- package/lib/index.d.ts +4 -7
- package/lib/index.js +24 -35
- package/lib/reducer.d.ts +0 -3
- package/lib/reducer.js +0 -3
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +0 -1
- package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +1 -2
- package/lib/view/transactionDetail/epics/transactionDetailEpic.js +0 -6
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +0 -3
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +0 -3
- package/lib/view/transactionDetail/transactionDetailSelector.js +1 -13
- package/lib/view/transactionDetail/transactionDetailState.d.ts +0 -2
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +0 -2
- package/lib/view/transactionList/transactionListPayload.d.ts +0 -15
- package/lib/view/transactionList/transactionListReducer.d.ts +2 -25
- package/lib/view/transactionList/transactionListReducer.js +2 -83
- package/lib/view/transactionList/transactionListState.d.ts +0 -15
- package/lib/view/transactionList/transactionListState.js +1 -13
- package/package.json +1 -1
- package/lib/esm/view/projectList/fetchProjectListEpic.js +0 -38
- package/lib/esm/view/projectList/projectListPayload.js +0 -1
- package/lib/esm/view/projectList/projectListReducer.js +0 -39
- package/lib/esm/view/projectList/projectListSelector.js +0 -9
- package/lib/esm/view/projectList/projectListState.js +0 -1
- package/lib/esm/view/transactionList/fetchTransactionListByProjectEpic.js +0 -45
- package/lib/esm/view/transactionList/parallelFetchProjectTransactionListEpic.js +0 -32
- package/lib/esm/view/transactionList/transactionListByProjectSelector.js +0 -58
- package/lib/view/projectList/fetchProjectListEpic.d.ts +0 -8
- package/lib/view/projectList/fetchProjectListEpic.js +0 -42
- package/lib/view/projectList/projectListPayload.d.ts +0 -7
- package/lib/view/projectList/projectListPayload.js +0 -2
- package/lib/view/projectList/projectListReducer.d.ts +0 -9
- package/lib/view/projectList/projectListReducer.js +0 -43
- package/lib/view/projectList/projectListSelector.d.ts +0 -8
- package/lib/view/projectList/projectListSelector.js +0 -13
- package/lib/view/projectList/projectListState.d.ts +0 -4
- package/lib/view/projectList/projectListState.js +0 -2
- package/lib/view/transactionList/fetchTransactionListByProjectEpic.d.ts +0 -8
- package/lib/view/transactionList/fetchTransactionListByProjectEpic.js +0 -52
- package/lib/view/transactionList/parallelFetchProjectTransactionListEpic.d.ts +0 -6
- package/lib/view/transactionList/parallelFetchProjectTransactionListEpic.js +0 -36
- package/lib/view/transactionList/transactionListByProjectSelector.d.ts +0 -22
- package/lib/view/transactionList/transactionListByProjectSelector.js +0 -66
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateLatestTransactionId = exports.clearTransactionList = exports.updateTransactionListUIStateByCategoryType = exports.updateTransactionsListByCategoryTypeFailure = exports.updateTransactionListByCategoryType = exports.fetchTransactionsListByCategoryType = exports.parallelFetchTransactionListByCategoryType = exports.
|
|
4
|
+
exports.updateLatestTransactionId = exports.clearTransactionList = exports.updateTransactionListUIStateByCategoryType = exports.updateTransactionsListByCategoryTypeFailure = exports.updateTransactionListByCategoryType = exports.fetchTransactionsListByCategoryType = exports.parallelFetchTransactionListByCategoryType = exports.updateTransactionListByClassFailure = exports.updateTransactionListByClassUIState = exports.updateTransactionListByClass = exports.fetchClassTransactionList = exports.parallelFetchClassTransactionList = exports.updateTransactionListByAccountUIState = exports.updateTransactionListByEntityFailure = exports.updateTransactionListByEntity = exports.fetchEntityTransactionList = exports.parallelFetchEntityTransactionList = exports.updateTransactionListByAccountFailure = exports.updateTransactionListByAccount = exports.fetchAccountTransactionList = exports.parallelFetchAccountTransactionList = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
7
7
|
const accountPayload_1 = require("../../entity/account/accountPayload");
|
|
@@ -41,10 +41,6 @@ exports.initialState = {
|
|
|
41
41
|
transactionListByClassKey: {},
|
|
42
42
|
transactionListUIStateByClassKey: {},
|
|
43
43
|
},
|
|
44
|
-
byProject: {
|
|
45
|
-
transactionListByProjectKey: {},
|
|
46
|
-
transactionListUIStateByProjectKey: {},
|
|
47
|
-
},
|
|
48
44
|
};
|
|
49
45
|
const transactionList = (0, toolkit_1.createSlice)({
|
|
50
46
|
name: 'transactionList',
|
|
@@ -254,64 +250,6 @@ const transactionList = (0, toolkit_1.createSlice)({
|
|
|
254
250
|
return { payload: { accountId, accountType, classId, period, error } };
|
|
255
251
|
},
|
|
256
252
|
},
|
|
257
|
-
// Transaction list by project related reducers
|
|
258
|
-
//
|
|
259
|
-
// Mirrors the by-class set; the only behavioural difference is that the
|
|
260
|
-
// server query param is `zeni_project_id` (post-Ayon's accounting #3984
|
|
261
|
-
// rename) and there's no equivalent of `include_sub_class_transactions`
|
|
262
|
-
// — projects don't have a sub-project hierarchy in this layout yet.
|
|
263
|
-
parallelFetchProjectTransactionList: {
|
|
264
|
-
reducer() {
|
|
265
|
-
// Do nothing..
|
|
266
|
-
},
|
|
267
|
-
prepare(accountId, accountType, projectId, period, cacheOverride = false) {
|
|
268
|
-
return {
|
|
269
|
-
payload: { accountId, accountType, projectId, period, cacheOverride },
|
|
270
|
-
};
|
|
271
|
-
},
|
|
272
|
-
},
|
|
273
|
-
fetchProjectTransactionList: {
|
|
274
|
-
reducer(draft, action) {
|
|
275
|
-
const key = (0, transactionListState_1.getProjectAcTranKey)(action.payload.accountId, action.payload.accountType, action.payload.projectId, action.payload.period);
|
|
276
|
-
if (action.payload.cacheOverride === true ||
|
|
277
|
-
draft.byProject.transactionListByProjectKey[key] == null ||
|
|
278
|
-
(draft.byProject.transactionListByProjectKey[key]?.hasValidState() ===
|
|
279
|
-
false &&
|
|
280
|
-
draft.byProject.transactionListByProjectKey[key]?.fetchState !=
|
|
281
|
-
'In-Progress')) {
|
|
282
|
-
draft.byProject.transactionListByProjectKey[key] = {
|
|
283
|
-
...transactionListState_1.initialProjectTransactionState,
|
|
284
|
-
fetchState: 'In-Progress',
|
|
285
|
-
error: undefined,
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
prepare(accountId, accountType, projectId, period, cacheOverride = false) {
|
|
290
|
-
return {
|
|
291
|
-
payload: { accountId, accountType, projectId, period, cacheOverride },
|
|
292
|
-
};
|
|
293
|
-
},
|
|
294
|
-
},
|
|
295
|
-
updateTransactionListByProject(draft, action) {
|
|
296
|
-
doUpdateTransactionListByProject(draft.byProject.transactionListByProjectKey, action.payload);
|
|
297
|
-
},
|
|
298
|
-
updateTransactionListByProjectUIState(draft, action) {
|
|
299
|
-
const key = (0, transactionListState_1.getProjectAcKey)(action.payload.accountId, action.payload.accountType, action.payload.projectId);
|
|
300
|
-
draft.byProject.transactionListUIStateByProjectKey[key] = Object.assign({}, draft.byProject.transactionListUIStateByProjectKey[key], action.payload.uiState);
|
|
301
|
-
},
|
|
302
|
-
updateTransactionListByProjectFailure: {
|
|
303
|
-
reducer(draft, action) {
|
|
304
|
-
const key = (0, transactionListState_1.getProjectAcTranKey)(action.payload.accountId, action.payload.accountType, action.payload.projectId, action.payload.period);
|
|
305
|
-
draft.byProject.transactionListByProjectKey[key] = {
|
|
306
|
-
...transactionListState_1.initialProjectTransactionState,
|
|
307
|
-
fetchState: 'Error',
|
|
308
|
-
error: action.payload.error,
|
|
309
|
-
};
|
|
310
|
-
},
|
|
311
|
-
prepare(accountId, accountType, projectId, period, error) {
|
|
312
|
-
return { payload: { accountId, accountType, projectId, period, error } };
|
|
313
|
-
},
|
|
314
|
-
},
|
|
315
253
|
parallelFetchTransactionListByCategoryType: {
|
|
316
254
|
reducer() {
|
|
317
255
|
// Do nothing..
|
|
@@ -406,7 +344,7 @@ const transactionList = (0, toolkit_1.createSlice)({
|
|
|
406
344
|
},
|
|
407
345
|
},
|
|
408
346
|
});
|
|
409
|
-
_a = transactionList.actions, exports.parallelFetchAccountTransactionList = _a.parallelFetchAccountTransactionList, exports.fetchAccountTransactionList = _a.fetchAccountTransactionList, exports.updateTransactionListByAccount = _a.updateTransactionListByAccount, exports.updateTransactionListByAccountFailure = _a.updateTransactionListByAccountFailure, exports.parallelFetchEntityTransactionList = _a.parallelFetchEntityTransactionList, exports.fetchEntityTransactionList = _a.fetchEntityTransactionList, exports.updateTransactionListByEntity = _a.updateTransactionListByEntity, exports.updateTransactionListByEntityFailure = _a.updateTransactionListByEntityFailure, exports.updateTransactionListByAccountUIState = _a.updateTransactionListByAccountUIState, exports.parallelFetchClassTransactionList = _a.parallelFetchClassTransactionList, exports.fetchClassTransactionList = _a.fetchClassTransactionList, exports.updateTransactionListByClass = _a.updateTransactionListByClass, exports.updateTransactionListByClassUIState = _a.updateTransactionListByClassUIState, exports.updateTransactionListByClassFailure = _a.updateTransactionListByClassFailure, exports.
|
|
347
|
+
_a = transactionList.actions, exports.parallelFetchAccountTransactionList = _a.parallelFetchAccountTransactionList, exports.fetchAccountTransactionList = _a.fetchAccountTransactionList, exports.updateTransactionListByAccount = _a.updateTransactionListByAccount, exports.updateTransactionListByAccountFailure = _a.updateTransactionListByAccountFailure, exports.parallelFetchEntityTransactionList = _a.parallelFetchEntityTransactionList, exports.fetchEntityTransactionList = _a.fetchEntityTransactionList, exports.updateTransactionListByEntity = _a.updateTransactionListByEntity, exports.updateTransactionListByEntityFailure = _a.updateTransactionListByEntityFailure, exports.updateTransactionListByAccountUIState = _a.updateTransactionListByAccountUIState, exports.parallelFetchClassTransactionList = _a.parallelFetchClassTransactionList, exports.fetchClassTransactionList = _a.fetchClassTransactionList, exports.updateTransactionListByClass = _a.updateTransactionListByClass, exports.updateTransactionListByClassUIState = _a.updateTransactionListByClassUIState, exports.updateTransactionListByClassFailure = _a.updateTransactionListByClassFailure, exports.parallelFetchTransactionListByCategoryType = _a.parallelFetchTransactionListByCategoryType, exports.fetchTransactionsListByCategoryType = _a.fetchTransactionsListByCategoryType, exports.updateTransactionListByCategoryType = _a.updateTransactionListByCategoryType, exports.updateTransactionsListByCategoryTypeFailure = _a.updateTransactionsListByCategoryTypeFailure, exports.updateTransactionListUIStateByCategoryType = _a.updateTransactionListUIStateByCategoryType, exports.clearTransactionList = _a.clearTransactionList, exports.updateLatestTransactionId = _a.updateLatestTransactionId;
|
|
410
348
|
exports.default = transactionList.reducer;
|
|
411
349
|
/**
|
|
412
350
|
* Helper functions
|
|
@@ -456,22 +394,3 @@ function doUpdateTransactionListByClass(draft, payload) {
|
|
|
456
394
|
transactionIDs,
|
|
457
395
|
};
|
|
458
396
|
}
|
|
459
|
-
function doUpdateTransactionListByProject(draft, payload) {
|
|
460
|
-
const transactionIDs = payload.account.transactions.map((transactionPaylod) => transactionPaylod.transaction_id);
|
|
461
|
-
const account = (0, accountPayload_1.mapAccountBasePayloadToAccountBase)(payload.account);
|
|
462
|
-
const projectId = payload.query.zeni_project_id;
|
|
463
|
-
const start = (0, timePeriod_1.toAbsoluteDay)(payload.query.start_date);
|
|
464
|
-
const end = (0, timePeriod_1.toAbsoluteDay)(payload.query.end_date);
|
|
465
|
-
const key = (0, transactionListState_1.getProjectAcTranKey)(account.accountId, account.accountType, projectId, {
|
|
466
|
-
start,
|
|
467
|
-
end,
|
|
468
|
-
});
|
|
469
|
-
draft[key] = {
|
|
470
|
-
...transactionListState_1.initialProjectTransactionState,
|
|
471
|
-
fetchState: 'Completed',
|
|
472
|
-
error: undefined,
|
|
473
|
-
account: account,
|
|
474
|
-
projectId: projectId,
|
|
475
|
-
transactionIDs,
|
|
476
|
-
};
|
|
477
|
-
}
|
|
@@ -45,20 +45,6 @@ export interface TransactionListByClassState {
|
|
|
45
45
|
transactionListUIStateByClassKey: Record<ClassAcKey, TransactionListUIState>;
|
|
46
46
|
}
|
|
47
47
|
export declare const initialClassTransactionState: ClassAccountTransactions;
|
|
48
|
-
export declare const getProjectAcTranKey: (accountId: ID, accountType: AccountType, projectId: ID, period: TimePeriod) => string;
|
|
49
|
-
export type ProjectAcTranKey = ReturnType<typeof getProjectAcTranKey>;
|
|
50
|
-
export declare const getProjectAcKey: (accountId: ID, accountType: AccountType, projectId: ID) => string;
|
|
51
|
-
type ProjectAcKey = ReturnType<typeof getProjectAcKey>;
|
|
52
|
-
export interface ProjectAccountTransactions extends FetchedState {
|
|
53
|
-
transactionIDs: ID[];
|
|
54
|
-
account?: AccountBase;
|
|
55
|
-
projectId?: ID;
|
|
56
|
-
}
|
|
57
|
-
export interface TransactionListByProjectState {
|
|
58
|
-
transactionListByProjectKey: Record<ProjectAcTranKey, ProjectAccountTransactions>;
|
|
59
|
-
transactionListUIStateByProjectKey: Record<ProjectAcKey, TransactionListUIState>;
|
|
60
|
-
}
|
|
61
|
-
export declare const initialProjectTransactionState: ProjectAccountTransactions;
|
|
62
48
|
export type TransactionCategoryType = 'missingReceipts' | 'miscategorizedExpense' | 'miscategorizedIncome' | 'uncategorizedIncome' | 'uncategorizedExpense';
|
|
63
49
|
export declare const getCategoryTypeTranKey: (categoryType: TransactionCategoryType, period: TimePeriod) => string;
|
|
64
50
|
type CategoryTypeTranKey = ReturnType<typeof getCategoryTypeTranKey>;
|
|
@@ -73,7 +59,6 @@ export interface TransactionListState {
|
|
|
73
59
|
byAccount: TransactionListByAccountState;
|
|
74
60
|
byClass: TransactionListByClassState;
|
|
75
61
|
byEntity: TransactionListByEntityState;
|
|
76
|
-
byProject: TransactionListByProjectState;
|
|
77
62
|
byType: Record<TransactionCategoryType, TransactionListByCategoryState>;
|
|
78
63
|
latestTransactionId?: TransactionID;
|
|
79
64
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initialTransactionsStateByCategoryType = exports.getCategoryTypeTranKey = exports.
|
|
3
|
+
exports.initialTransactionsStateByCategoryType = exports.getCategoryTypeTranKey = exports.initialClassTransactionState = exports.getClassAcKey = exports.getClassAcTranKey = exports.initialEntityTransactionState = exports.getEntityTranKey = exports.accountTransactionsInitialState = exports.getAcKey = exports.getAcTranKey = void 0;
|
|
4
4
|
const getAcTranKey = (accountId, accountType, period) => `${accountId}-${accountType}-${period.start.day}_${period.start.month}_${period.start.year}_${period.end.day}_${period.end.month}_${period.end.year}`;
|
|
5
5
|
exports.getAcTranKey = getAcTranKey;
|
|
6
6
|
const getAcKey = (accountId, accountType) => `${accountId}-${accountType}`;
|
|
@@ -38,18 +38,6 @@ exports.initialClassTransactionState = {
|
|
|
38
38
|
return this.fetchState == 'Completed';
|
|
39
39
|
},
|
|
40
40
|
};
|
|
41
|
-
const getProjectAcTranKey = (accountId, accountType, projectId, period) => `${accountId}-${accountType}-${projectId}-${period.start.day}_${period.start.month}_${period.start.year}_${period.end.day}_${period.end.month}_${period.end.year}`;
|
|
42
|
-
exports.getProjectAcTranKey = getProjectAcTranKey;
|
|
43
|
-
const getProjectAcKey = (accountId, accountType, projectId) => `${accountId}-${accountType}-${projectId}`;
|
|
44
|
-
exports.getProjectAcKey = getProjectAcKey;
|
|
45
|
-
exports.initialProjectTransactionState = {
|
|
46
|
-
transactionIDs: [],
|
|
47
|
-
fetchState: 'Not-Started',
|
|
48
|
-
error: undefined,
|
|
49
|
-
hasValidState() {
|
|
50
|
-
return this.fetchState == 'Completed';
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
41
|
const getCategoryTypeTranKey = (categoryType, period) => `${categoryType}_${period.start.day}_${period.start.month}_${period.start.year}_${period.end.day}_${period.end.month}_${period.end.year}`;
|
|
54
42
|
exports.getCategoryTypeTranKey = getCategoryTypeTranKey;
|
|
55
43
|
exports.initialTransactionsStateByCategoryType = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.44
|
|
3
|
+
"version": "5.0.44",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap, switchMap, withLatestFrom, } from 'rxjs/operators';
|
|
3
|
-
import { updateProjects } from '../../entity/project/projectReducer';
|
|
4
|
-
import { getIsAccountingProjectsEnabled } from '../../entity/tenant/tenantSelector';
|
|
5
|
-
import { createZeniAPIStatus, isSuccessResponse } from '../../responsePayload';
|
|
6
|
-
import { fetchProjectList, updateProjectList, updateProjectListFailure, } from './projectListReducer';
|
|
7
|
-
const buildProjectListQuery = (isIncludeDeleted) => {
|
|
8
|
-
const query = {
|
|
9
|
-
is_deleted: isIncludeDeleted,
|
|
10
|
-
sort_by: 'project_name',
|
|
11
|
-
sort_order: 'asc',
|
|
12
|
-
is_full: true,
|
|
13
|
-
};
|
|
14
|
-
return `?query=${encodeURIComponent(JSON.stringify(query))}`;
|
|
15
|
-
};
|
|
16
|
-
export const fetchProjectListEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchProjectList.match), withLatestFrom(state$), switchMap(([action, state]) => {
|
|
17
|
-
if (!getIsAccountingProjectsEnabled(state)) {
|
|
18
|
-
return of(updateProjectList({
|
|
19
|
-
status: createZeniAPIStatus('Success', ''),
|
|
20
|
-
data: { projects: [] },
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
const { isIncludeDeleted } = action.payload;
|
|
24
|
-
const queryParams = buildProjectListQuery(isIncludeDeleted);
|
|
25
|
-
return zeniAPI
|
|
26
|
-
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/projects${queryParams}`)
|
|
27
|
-
.pipe(mergeMap((response) => {
|
|
28
|
-
if (isSuccessResponse(response)) {
|
|
29
|
-
return of(updateProjects(response.data?.projects ?? []), updateProjectList(response));
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
return of(updateProjectListFailure(response.status));
|
|
33
|
-
}
|
|
34
|
-
}), catchError((error) => {
|
|
35
|
-
return of(updateProjectListFailure(createZeniAPIStatus('Unexpected Error', 'Fetch Projects REST API call errored out' +
|
|
36
|
-
JSON.stringify(error))));
|
|
37
|
-
}));
|
|
38
|
-
}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const initialState = {
|
|
3
|
-
fetchState: 'Not-Started',
|
|
4
|
-
error: undefined,
|
|
5
|
-
projectIds: [],
|
|
6
|
-
hasValidState() {
|
|
7
|
-
return this.fetchState == 'Completed';
|
|
8
|
-
},
|
|
9
|
-
};
|
|
10
|
-
const projectList = createSlice({
|
|
11
|
-
name: 'projectList',
|
|
12
|
-
initialState,
|
|
13
|
-
reducers: {
|
|
14
|
-
fetchProjectList: {
|
|
15
|
-
reducer(draft) {
|
|
16
|
-
draft.fetchState = 'In-Progress';
|
|
17
|
-
draft.error = undefined;
|
|
18
|
-
},
|
|
19
|
-
prepare(isIncludeDeleted) {
|
|
20
|
-
return { payload: { isIncludeDeleted: isIncludeDeleted ?? false } };
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
updateProjectList(draft, action) {
|
|
24
|
-
draft.projectIds =
|
|
25
|
-
action.payload.data?.projects.map((project) => project.zeni_project_id) ?? [];
|
|
26
|
-
draft.fetchState = 'Completed';
|
|
27
|
-
draft.error = undefined;
|
|
28
|
-
},
|
|
29
|
-
updateProjectListFailure(draft, action) {
|
|
30
|
-
draft.fetchState = 'Error';
|
|
31
|
-
draft.error = action.payload;
|
|
32
|
-
},
|
|
33
|
-
clearProjectList(draft) {
|
|
34
|
-
Object.assign(draft, initialState);
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
export const { fetchProjectList, updateProjectList, updateProjectListFailure, clearProjectList, } = projectList.actions;
|
|
39
|
-
export default projectList.reducer;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { getProjectsByIds } from '../../entity/project/projectSelector';
|
|
2
|
-
export const getProjectList = (projectState, projectListState) => {
|
|
3
|
-
return {
|
|
4
|
-
projects: getProjectsByIds(projectState, projectListState.projectIds),
|
|
5
|
-
fetchState: projectListState.fetchState,
|
|
6
|
-
error: projectListState.error,
|
|
7
|
-
version: 0,
|
|
8
|
-
};
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { toBase64 } from 'js-base64';
|
|
2
|
-
import lodashGet from 'lodash/get';
|
|
3
|
-
import { from, of } from 'rxjs';
|
|
4
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
5
|
-
import { toString } from '../../commonStateTypes/timePeriod';
|
|
6
|
-
import { updateTransactions } from '../../entity/transaction/transactionReducer';
|
|
7
|
-
import { createZeniAPIStatus, isSuccessResponse } from '../../responsePayload';
|
|
8
|
-
import { fetchProjectTransactionList, updateTransactionListByProject, updateTransactionListByProjectFailure, } from './transactionListReducer';
|
|
9
|
-
import { getProjectAcTranKey } from './transactionListState';
|
|
10
|
-
export const fetchTransactionListByProjectEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchProjectTransactionList.match), mergeMap((action) => {
|
|
11
|
-
const state = state$.value;
|
|
12
|
-
const key = getProjectAcTranKey(action.payload.accountId, action.payload.accountType, action.payload.projectId, action.payload.period);
|
|
13
|
-
const projectTransactions = lodashGet(state.transactionListState.byProject.transactionListByProjectKey, key, undefined);
|
|
14
|
-
if (action.payload.cacheOverride === true ||
|
|
15
|
-
projectTransactions == null ||
|
|
16
|
-
projectTransactions.hasValidState() === false) {
|
|
17
|
-
const queryParam = {
|
|
18
|
-
start_date: toString(action.payload.period.start),
|
|
19
|
-
end_date: toString(action.payload.period.end),
|
|
20
|
-
sort_by: 'create_time',
|
|
21
|
-
sort_order: 'desc',
|
|
22
|
-
account_id: action.payload.accountId,
|
|
23
|
-
account_type: action.payload.accountType,
|
|
24
|
-
zeni_project_id: action.payload.projectId,
|
|
25
|
-
};
|
|
26
|
-
const base64AccountId = toBase64(action.payload.accountId);
|
|
27
|
-
return zeniAPI
|
|
28
|
-
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accounts/${base64AccountId}/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
29
|
-
.pipe(mergeMap((response) => {
|
|
30
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
31
|
-
const updateActions = [];
|
|
32
|
-
updateActions.push(updateTransactions(response.data.account.transactions, (value) => value.transaction_id));
|
|
33
|
-
updateActions.push(updateTransactionListByProject(response.data));
|
|
34
|
-
return from(updateActions);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return of(updateTransactionListByProjectFailure(action.payload.accountId, action.payload.accountType, action.payload.projectId, action.payload.period, response.status));
|
|
38
|
-
}
|
|
39
|
-
}), catchError((error) => of(updateTransactionListByProjectFailure(action.payload.accountId, action.payload.accountType, action.payload.projectId, action.payload.period, createZeniAPIStatus('Unexpected Error', 'fetch transaction list REST API call errored out' +
|
|
40
|
-
JSON.stringify(error))))));
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
return from([]);
|
|
44
|
-
}
|
|
45
|
-
}));
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { from } from 'rxjs';
|
|
2
|
-
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { splitPeriod } from './parallelFetchClassTransactionListEpic';
|
|
4
|
-
import { fetchProjectTransactionList, parallelFetchProjectTransactionList, } from './transactionListReducer';
|
|
5
|
-
import { getProjectAcTranKey, } from './transactionListState';
|
|
6
|
-
export const parallelFetchProjectTransactionListEpic = (actions$, state$) => actions$.pipe(filter(parallelFetchProjectTransactionList.match), mergeMap((action) => {
|
|
7
|
-
const state = state$.value.transactionListState;
|
|
8
|
-
const timePeriods = splitPeriod(action.payload.period);
|
|
9
|
-
const filteredTimePeriods = timePeriods.filter((value) => {
|
|
10
|
-
if (action.payload.cacheOverride === false) {
|
|
11
|
-
return (isDataAvailableOrFetching(state.byProject, action.payload.accountId, action.payload.accountType, action.payload.projectId, value) === false);
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
if (filteredTimePeriods.length > 12) {
|
|
18
|
-
console.error('Only maximum 12 parallel fetch are allowed!');
|
|
19
|
-
return from([]);
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
const fetchActions = filteredTimePeriods.map((period) => fetchProjectTransactionList(action.payload.accountId, action.payload.accountType, action.payload.projectId, period, true));
|
|
23
|
-
return from(fetchActions);
|
|
24
|
-
}
|
|
25
|
-
}));
|
|
26
|
-
function isDataAvailableOrFetching(state, accountId, accountType, projectId, period) {
|
|
27
|
-
const key = getProjectAcTranKey(accountId, accountType, projectId, period);
|
|
28
|
-
const projectTransactions = state.transactionListByProjectKey[key];
|
|
29
|
-
return (projectTransactions != null &&
|
|
30
|
-
(projectTransactions.fetchState === 'In-Progress' ||
|
|
31
|
-
projectTransactions.hasValidState()));
|
|
32
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import flatMap from 'lodash/flatMap';
|
|
2
|
-
import recordGet from 'lodash/get';
|
|
3
|
-
import orderBy from 'lodash/orderBy';
|
|
4
|
-
import { getSupportedTransactionById } from '../../entity/transaction/transactionSelector';
|
|
5
|
-
import { splitPeriod } from './parallelFetchAccountTransactionListEpic';
|
|
6
|
-
import { isAnyFetchCompleted, reduceFetchState, } from './reduceTransactionListFetchState';
|
|
7
|
-
import { getProjectAcKey, getProjectAcTranKey, } from './transactionListState';
|
|
8
|
-
export const getTransactionListByProject = (transactionState, transactionListState, accountId, accountType, projectId, timeframe, filterByTimePeriod) => {
|
|
9
|
-
const timePeriods = splitPeriod(filterByTimePeriod); // Note: Split by months.
|
|
10
|
-
const accountTransactions = timePeriods
|
|
11
|
-
.map((thisTimePeriod) => {
|
|
12
|
-
const key = getProjectAcTranKey(accountId, accountType, projectId, thisTimePeriod);
|
|
13
|
-
return recordGet(transactionListState.byProject.transactionListByProjectKey, key, undefined);
|
|
14
|
-
})
|
|
15
|
-
.filter((acTransaction) => acTransaction != null);
|
|
16
|
-
let account = undefined;
|
|
17
|
-
if (accountTransactions.length > 0) {
|
|
18
|
-
account = accountTransactions[0].account;
|
|
19
|
-
}
|
|
20
|
-
const fetchState = reduceFetchState(accountTransactions);
|
|
21
|
-
let transactions = [];
|
|
22
|
-
if (isAnyFetchCompleted(accountTransactions)) {
|
|
23
|
-
const allTransactionIDs = flatMap(accountTransactions, (value) => value.transactionIDs);
|
|
24
|
-
const transactionsUnsorted = allTransactionIDs
|
|
25
|
-
.map((transactionId) => getSupportedTransactionById(transactionState, transactionId))
|
|
26
|
-
.filter((value) => {
|
|
27
|
-
if (value == null) {
|
|
28
|
-
console.error("Can't have null transaction at this stage!");
|
|
29
|
-
}
|
|
30
|
-
return value != null;
|
|
31
|
-
});
|
|
32
|
-
transactions = orderBy(transactionsUnsorted, (value) => value.date.valueOf(), 'desc');
|
|
33
|
-
}
|
|
34
|
-
const key = getProjectAcKey(accountId, accountType, projectId);
|
|
35
|
-
const uiState = recordGet(transactionListState.byProject.transactionListUIStateByProjectKey, key, {});
|
|
36
|
-
return {
|
|
37
|
-
reportId: 'transaction_list_of_account_by_project',
|
|
38
|
-
reportTitle: 'Transaction List of Account By Project',
|
|
39
|
-
version: 1,
|
|
40
|
-
status: undefined,
|
|
41
|
-
fetchState: fetchState.fetchState,
|
|
42
|
-
error: fetchState.error,
|
|
43
|
-
timeframe,
|
|
44
|
-
filterByTimePeriod,
|
|
45
|
-
accountId,
|
|
46
|
-
accountType,
|
|
47
|
-
projectId,
|
|
48
|
-
account,
|
|
49
|
-
transactionOrder: 'descending_transaction_date',
|
|
50
|
-
transactions,
|
|
51
|
-
uiState,
|
|
52
|
-
latestTransactionId: transactionListState.latestTransactionId,
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
export const getTransactionListUIStateByProjectKey = (transactionListState, accountId, accountType, projectId) => {
|
|
56
|
-
const key = getProjectAcKey(accountId, accountType, projectId);
|
|
57
|
-
return recordGet(transactionListState.byProject.transactionListUIStateByProjectKey, key, undefined);
|
|
58
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { updateProjects } from '../../entity/project/projectReducer';
|
|
4
|
-
import { RootState } from '../../reducer';
|
|
5
|
-
import { ZeniAPI } from '../../zeniAPI';
|
|
6
|
-
import { fetchProjectList, updateProjectList, updateProjectListFailure } from './projectListReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof fetchProjectList> | ReturnType<typeof updateProjects> | ReturnType<typeof updateProjectList> | ReturnType<typeof updateProjectListFailure>;
|
|
8
|
-
export declare const fetchProjectListEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchProjectListEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const projectReducer_1 = require("../../entity/project/projectReducer");
|
|
7
|
-
const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
|
|
8
|
-
const responsePayload_1 = require("../../responsePayload");
|
|
9
|
-
const projectListReducer_1 = require("./projectListReducer");
|
|
10
|
-
const buildProjectListQuery = (isIncludeDeleted) => {
|
|
11
|
-
const query = {
|
|
12
|
-
is_deleted: isIncludeDeleted,
|
|
13
|
-
sort_by: 'project_name',
|
|
14
|
-
sort_order: 'asc',
|
|
15
|
-
is_full: true,
|
|
16
|
-
};
|
|
17
|
-
return `?query=${encodeURIComponent(JSON.stringify(query))}`;
|
|
18
|
-
};
|
|
19
|
-
const fetchProjectListEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(projectListReducer_1.fetchProjectList.match), (0, operators_1.withLatestFrom)(state$), (0, operators_1.switchMap)(([action, state]) => {
|
|
20
|
-
if (!(0, tenantSelector_1.getIsAccountingProjectsEnabled)(state)) {
|
|
21
|
-
return (0, rxjs_1.of)((0, projectListReducer_1.updateProjectList)({
|
|
22
|
-
status: (0, responsePayload_1.createZeniAPIStatus)('Success', ''),
|
|
23
|
-
data: { projects: [] },
|
|
24
|
-
}));
|
|
25
|
-
}
|
|
26
|
-
const { isIncludeDeleted } = action.payload;
|
|
27
|
-
const queryParams = buildProjectListQuery(isIncludeDeleted);
|
|
28
|
-
return zeniAPI
|
|
29
|
-
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/projects${queryParams}`)
|
|
30
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
31
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
32
|
-
return (0, rxjs_1.of)((0, projectReducer_1.updateProjects)(response.data?.projects ?? []), (0, projectListReducer_1.updateProjectList)(response));
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
return (0, rxjs_1.of)((0, projectListReducer_1.updateProjectListFailure)(response.status));
|
|
36
|
-
}
|
|
37
|
-
}), (0, operators_1.catchError)((error) => {
|
|
38
|
-
return (0, rxjs_1.of)((0, projectListReducer_1.updateProjectListFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch Projects REST API call errored out' +
|
|
39
|
-
JSON.stringify(error))));
|
|
40
|
-
}));
|
|
41
|
-
}));
|
|
42
|
-
exports.fetchProjectListEpic = fetchProjectListEpic;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ProjectMetadataPayload } from '../../entity/project/projectPayload';
|
|
2
|
-
import { ZeniAPIResponse } from '../../responsePayload';
|
|
3
|
-
interface ProjectListPayloadData {
|
|
4
|
-
projects: ProjectMetadataPayload[];
|
|
5
|
-
}
|
|
6
|
-
export type ProjectListResponse = ZeniAPIResponse<ProjectListPayloadData>;
|
|
7
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ZeniAPIStatus } from '../../responsePayload';
|
|
2
|
-
import { ProjectListResponse } from './projectListPayload';
|
|
3
|
-
import { ProjectListState } from './projectListState';
|
|
4
|
-
export declare const initialState: ProjectListState;
|
|
5
|
-
export declare const fetchProjectList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[isIncludeDeleted?: boolean | undefined], {
|
|
6
|
-
isIncludeDeleted: boolean;
|
|
7
|
-
}, "projectList/fetchProjectList", never, never>, updateProjectList: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProjectListResponse, "projectList/updateProjectList">, updateProjectListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "projectList/updateProjectListFailure">, clearProjectList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"projectList/clearProjectList">;
|
|
8
|
-
declare const _default: import("redux").Reducer<ProjectListState>;
|
|
9
|
-
export default _default;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearProjectList = exports.updateProjectListFailure = exports.updateProjectList = exports.fetchProjectList = exports.initialState = void 0;
|
|
5
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
-
exports.initialState = {
|
|
7
|
-
fetchState: 'Not-Started',
|
|
8
|
-
error: undefined,
|
|
9
|
-
projectIds: [],
|
|
10
|
-
hasValidState() {
|
|
11
|
-
return this.fetchState == 'Completed';
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
const projectList = (0, toolkit_1.createSlice)({
|
|
15
|
-
name: 'projectList',
|
|
16
|
-
initialState: exports.initialState,
|
|
17
|
-
reducers: {
|
|
18
|
-
fetchProjectList: {
|
|
19
|
-
reducer(draft) {
|
|
20
|
-
draft.fetchState = 'In-Progress';
|
|
21
|
-
draft.error = undefined;
|
|
22
|
-
},
|
|
23
|
-
prepare(isIncludeDeleted) {
|
|
24
|
-
return { payload: { isIncludeDeleted: isIncludeDeleted ?? false } };
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
updateProjectList(draft, action) {
|
|
28
|
-
draft.projectIds =
|
|
29
|
-
action.payload.data?.projects.map((project) => project.zeni_project_id) ?? [];
|
|
30
|
-
draft.fetchState = 'Completed';
|
|
31
|
-
draft.error = undefined;
|
|
32
|
-
},
|
|
33
|
-
updateProjectListFailure(draft, action) {
|
|
34
|
-
draft.fetchState = 'Error';
|
|
35
|
-
draft.error = action.payload;
|
|
36
|
-
},
|
|
37
|
-
clearProjectList(draft) {
|
|
38
|
-
Object.assign(draft, exports.initialState);
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
_a = projectList.actions, exports.fetchProjectList = _a.fetchProjectList, exports.updateProjectList = _a.updateProjectList, exports.updateProjectListFailure = _a.updateProjectListFailure, exports.clearProjectList = _a.clearProjectList;
|
|
43
|
-
exports.default = projectList.reducer;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
2
|
-
import { ProjectState } from '../../entity/project/projectReducer';
|
|
3
|
-
import { Project } from '../../entity/project/projectState';
|
|
4
|
-
import { ProjectListState } from './projectListState';
|
|
5
|
-
export interface ProjectListSelectorView extends SelectorView {
|
|
6
|
-
projects: Project[];
|
|
7
|
-
}
|
|
8
|
-
export declare const getProjectList: (projectState: ProjectState, projectListState: ProjectListState) => ProjectListSelectorView;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getProjectList = void 0;
|
|
4
|
-
const projectSelector_1 = require("../../entity/project/projectSelector");
|
|
5
|
-
const getProjectList = (projectState, projectListState) => {
|
|
6
|
-
return {
|
|
7
|
-
projects: (0, projectSelector_1.getProjectsByIds)(projectState, projectListState.projectIds),
|
|
8
|
-
fetchState: projectListState.fetchState,
|
|
9
|
-
error: projectListState.error,
|
|
10
|
-
version: 0,
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
exports.getProjectList = getProjectList;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { updateTransactions } from '../../entity/transaction/transactionReducer';
|
|
4
|
-
import { RootState } from '../../reducer';
|
|
5
|
-
import { ZeniAPI } from '../../zeniAPI';
|
|
6
|
-
import { fetchProjectTransactionList, updateTransactionListByProject, updateTransactionListByProjectFailure } from './transactionListReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof fetchProjectTransactionList> | ReturnType<typeof updateTransactions> | ReturnType<typeof updateTransactionListByProject> | ReturnType<typeof updateTransactionListByProjectFailure>;
|
|
8
|
-
export declare const fetchTransactionListByProjectEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|