@zeniai/client-epic-state 5.0.46 → 5.0.47-beta0ND
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 +2 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/chargeCardRepayment/chargeCardRepayment.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/creditAgent/creditAgentPayload.d.ts +41 -0
- package/lib/entity/creditAgent/creditAgentPayload.js +40 -0
- package/lib/entity/creditAgent/creditAgentReducer.d.ts +9 -0
- package/lib/entity/creditAgent/creditAgentReducer.js +37 -0
- package/lib/entity/creditAgent/creditAgentSelector.d.ts +3 -0
- package/lib/entity/creditAgent/creditAgentSelector.js +10 -0
- package/lib/entity/creditAgent/creditAgentState.d.ts +39 -0
- package/lib/entity/creditAgent/creditAgentState.js +17 -0
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/project/projectPayload.d.ts +7 -0
- package/lib/entity/project/projectPayload.js +15 -1
- 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/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/entity/tenant/SessionManager.d.ts +4 -0
- package/lib/entity/tenant/SessionManager.js +6 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +6 -3
- package/lib/entity/tenant/clearAllEpic.js +8 -2
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.d.ts +2 -0
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +9 -0
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +2 -0
- package/lib/epic.d.ts +10 -1
- package/lib/epic.js +10 -1
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
- package/lib/esm/entity/creditAgent/creditAgentPayload.js +36 -0
- package/lib/esm/entity/creditAgent/creditAgentReducer.js +33 -0
- package/lib/esm/entity/creditAgent/creditAgentSelector.js +6 -0
- package/lib/esm/entity/creditAgent/creditAgentState.js +13 -0
- package/lib/esm/entity/project/projectPayload.js +12 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/esm/entity/tenant/SessionManager.js +6 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +8 -2
- package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +9 -0
- package/lib/esm/epic.js +10 -1
- package/lib/esm/index.js +19 -10
- package/lib/esm/reducer.js +12 -3
- package/lib/esm/view/creditAgentView/buildCreditReportCsv.js +44 -0
- package/lib/esm/view/creditAgentView/creditAgentViewPayload.js +2 -0
- package/lib/esm/view/creditAgentView/creditAgentViewReducer.js +183 -0
- package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +85 -0
- package/lib/esm/view/creditAgentView/creditAgentViewState.js +20 -0
- package/lib/esm/view/creditAgentView/epics/fetchCardProfilesEpic.js +20 -0
- package/lib/esm/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +13 -0
- package/lib/esm/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +19 -0
- package/lib/esm/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +58 -0
- package/lib/esm/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.js +39 -0
- package/lib/esm/view/creditAgentView/epics/updateCardProfileEpic.js +62 -0
- package/lib/esm/view/projectList/fetchProjectListEpic.js +38 -0
- package/lib/esm/view/projectList/projectListPayload.js +1 -0
- package/lib/esm/view/projectList/projectListReducer.js +39 -0
- package/lib/esm/view/projectList/projectListSelector.js +9 -0
- package/lib/esm/view/projectList/projectListState.js +1 -0
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +1 -0
- package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +6 -0
- package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +3 -0
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +14 -2
- package/lib/esm/view/transactionList/fetchTransactionListByProjectEpic.js +45 -0
- package/lib/esm/view/transactionList/parallelFetchProjectTransactionListEpic.js +32 -0
- package/lib/esm/view/transactionList/transactionListByProjectSelector.js +58 -0
- package/lib/esm/view/transactionList/transactionListReducer.js +83 -2
- package/lib/esm/view/transactionList/transactionListState.js +10 -0
- package/lib/index.d.ts +25 -14
- package/lib/index.js +86 -46
- package/lib/reducer.d.ts +12 -3
- package/lib/reducer.js +12 -3
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- 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/creditAgentView/buildCreditReportCsv.d.ts +17 -0
- package/lib/view/creditAgentView/buildCreditReportCsv.js +47 -0
- package/lib/view/creditAgentView/creditAgentViewPayload.d.ts +9 -0
- package/lib/view/creditAgentView/creditAgentViewPayload.js +7 -0
- package/lib/view/creditAgentView/creditAgentViewReducer.d.ts +41 -0
- package/lib/view/creditAgentView/creditAgentViewReducer.js +187 -0
- package/lib/view/creditAgentView/creditAgentViewSelector.d.ts +20 -0
- package/lib/view/creditAgentView/creditAgentViewSelector.js +93 -0
- package/lib/view/creditAgentView/creditAgentViewState.d.ts +34 -0
- package/lib/view/creditAgentView/creditAgentViewState.js +22 -0
- package/lib/view/creditAgentView/epics/fetchCardProfilesEpic.d.ts +15 -0
- package/lib/view/creditAgentView/epics/fetchCardProfilesEpic.js +24 -0
- package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.d.ts +11 -0
- package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +17 -0
- package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.d.ts +15 -0
- package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +23 -0
- package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.d.ts +29 -0
- package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +62 -0
- package/lib/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.d.ts +30 -0
- package/lib/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.js +43 -0
- package/lib/view/creditAgentView/epics/updateCardProfileEpic.d.ts +37 -0
- package/lib/view/creditAgentView/epics/updateCardProfileEpic.js +66 -0
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/projectList/fetchProjectListEpic.d.ts +8 -0
- package/lib/view/projectList/fetchProjectListEpic.js +42 -0
- package/lib/view/projectList/projectListPayload.d.ts +7 -0
- package/lib/view/projectList/projectListPayload.js +2 -0
- package/lib/view/projectList/projectListReducer.d.ts +9 -0
- package/lib/view/projectList/projectListReducer.js +43 -0
- package/lib/view/projectList/projectListSelector.d.ts +8 -0
- package/lib/view/projectList/projectListSelector.js +13 -0
- package/lib/view/projectList/projectListState.d.ts +4 -0
- package/lib/view/projectList/projectListState.js +2 -0
- 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 +1 -0
- package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +2 -1
- package/lib/view/transactionDetail/epics/transactionDetailEpic.js +6 -0
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +3 -0
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +3 -0
- package/lib/view/transactionDetail/transactionDetailSelector.js +13 -1
- package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -0
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +2 -0
- package/lib/view/transactionList/fetchTransactionListByProjectEpic.d.ts +8 -0
- package/lib/view/transactionList/fetchTransactionListByProjectEpic.js +52 -0
- package/lib/view/transactionList/parallelFetchProjectTransactionListEpic.d.ts +6 -0
- package/lib/view/transactionList/parallelFetchProjectTransactionListEpic.js +36 -0
- package/lib/view/transactionList/transactionListByProjectSelector.d.ts +22 -0
- package/lib/view/transactionList/transactionListByProjectSelector.js +66 -0
- package/lib/view/transactionList/transactionListPayload.d.ts +15 -0
- package/lib/view/transactionList/transactionListReducer.d.ts +25 -2
- package/lib/view/transactionList/transactionListReducer.js +83 -2
- package/lib/view/transactionList/transactionListState.d.ts +15 -0
- package/lib/view/transactionList/transactionListState.js +13 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import recordGet from 'lodash/get';
|
|
2
2
|
import { reduceFetchState } from '../../commonStateTypes/reduceFetchState';
|
|
3
|
-
import { getIsAccountingClassesEnabled } from '../../entity/tenant/tenantSelector';
|
|
3
|
+
import { getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, } from '../../entity/tenant/tenantSelector';
|
|
4
4
|
import { toTransactionTypeStrict } from '../../entity/transaction/stateTypes/transactionType';
|
|
5
5
|
import { getTransactionWithCOT } from '../../entity/transaction/transactionHelper';
|
|
6
6
|
import { getSupportedTransactionById } from '../../entity/transaction/transactionSelector';
|
|
@@ -8,9 +8,10 @@ import { getVendorsByVendorIds } from '../../entity/vendor/vendorSelector';
|
|
|
8
8
|
import { dateNow } from '../../zeniDayJS';
|
|
9
9
|
import { getAccountList, getNestedAccountListHierarchy, } from '../accountList/accountListSelector';
|
|
10
10
|
import { getClassList, getNestedClassListHierarchy, } from '../classList/classListSelector';
|
|
11
|
+
import { getProjectList, } from '../projectList/projectListSelector';
|
|
11
12
|
import { getAllLinkedTransactions, getTransactionDetailKey, initialSupportedTransactionDetail, } from './transactionDetailState';
|
|
12
13
|
export const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = true) => {
|
|
13
|
-
const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, } = state;
|
|
14
|
+
const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, projectState, projectListState, } = state;
|
|
14
15
|
const detailKey = getTransactionDetailKey(transactionId);
|
|
15
16
|
const transactionDetail = recordGet(transactionDetailState.transactionDetailById, detailKey);
|
|
16
17
|
let fetchState = {
|
|
@@ -56,6 +57,15 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
56
57
|
const classList = isAccountingClassesEnabled
|
|
57
58
|
? getClassList(classState, classListState)
|
|
58
59
|
: { classes: [], nestedClassHierarchy: [], fetchState: 'Completed', error: undefined, version: 0 };
|
|
60
|
+
const isAccountingProjectsEnabled = getIsAccountingProjectsEnabled(state);
|
|
61
|
+
const projectList = isAccountingProjectsEnabled
|
|
62
|
+
? getProjectList(projectState, projectListState)
|
|
63
|
+
: {
|
|
64
|
+
projects: [],
|
|
65
|
+
fetchState: 'Completed',
|
|
66
|
+
error: undefined,
|
|
67
|
+
version: 0,
|
|
68
|
+
};
|
|
59
69
|
const accountsHierarchyList = getNestedAccountListHierarchy(accountListState, 'accountList');
|
|
60
70
|
const classHierarchyList = isAccountingClassesEnabled
|
|
61
71
|
? getNestedClassListHierarchy(classListState)
|
|
@@ -78,6 +88,8 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
78
88
|
accountsHierarchyList,
|
|
79
89
|
classList: classList,
|
|
80
90
|
isAccountingClassesEnabled,
|
|
91
|
+
isAccountingProjectsEnabled,
|
|
92
|
+
projectList,
|
|
81
93
|
isUpdateNotAllowed: transactionDetail?.isUpdateNotAllowed,
|
|
82
94
|
transactionDetailLocalData: transactionDetail?.transactionDetailLocalData ??
|
|
83
95
|
initialSupportedTransactionDetail.transactionDetailLocalData,
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
}));
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
};
|
|
@@ -2,7 +2,7 @@ import { createSlice } from '@reduxjs/toolkit';
|
|
|
2
2
|
import { toAbsoluteDay } from '../../commonStateTypes/timePeriod';
|
|
3
3
|
import { mapAccountBasePayloadToAccountBase } from '../../entity/account/accountPayload';
|
|
4
4
|
import { toEntityType } from '../../entity/genericEntity/entity';
|
|
5
|
-
import { accountTransactionsInitialState, getAcKey, getAcTranKey, getCategoryTypeTranKey, getClassAcKey, getClassAcTranKey, getEntityTranKey, initialClassTransactionState, initialEntityTransactionState, initialTransactionsStateByCategoryType, } from './transactionListState';
|
|
5
|
+
import { accountTransactionsInitialState, getAcKey, getAcTranKey, getCategoryTypeTranKey, getClassAcKey, getClassAcTranKey, getEntityTranKey, getProjectAcKey, getProjectAcTranKey, initialClassTransactionState, initialEntityTransactionState, initialProjectTransactionState, initialTransactionsStateByCategoryType, } from './transactionListState';
|
|
6
6
|
export const initialState = {
|
|
7
7
|
byAccount: {
|
|
8
8
|
transactionListByAccountKey: {},
|
|
@@ -37,6 +37,10 @@ export const initialState = {
|
|
|
37
37
|
transactionListByClassKey: {},
|
|
38
38
|
transactionListUIStateByClassKey: {},
|
|
39
39
|
},
|
|
40
|
+
byProject: {
|
|
41
|
+
transactionListByProjectKey: {},
|
|
42
|
+
transactionListUIStateByProjectKey: {},
|
|
43
|
+
},
|
|
40
44
|
};
|
|
41
45
|
const transactionList = createSlice({
|
|
42
46
|
name: 'transactionList',
|
|
@@ -246,6 +250,64 @@ const transactionList = createSlice({
|
|
|
246
250
|
return { payload: { accountId, accountType, classId, period, error } };
|
|
247
251
|
},
|
|
248
252
|
},
|
|
253
|
+
// Transaction list by project related reducers
|
|
254
|
+
//
|
|
255
|
+
// Mirrors the by-class set; the only behavioural difference is that the
|
|
256
|
+
// server query param is `zeni_project_id` (post-Ayon's accounting #3984
|
|
257
|
+
// rename) and there's no equivalent of `include_sub_class_transactions`
|
|
258
|
+
// — projects don't have a sub-project hierarchy in this layout yet.
|
|
259
|
+
parallelFetchProjectTransactionList: {
|
|
260
|
+
reducer() {
|
|
261
|
+
// Do nothing..
|
|
262
|
+
},
|
|
263
|
+
prepare(accountId, accountType, projectId, period, cacheOverride = false) {
|
|
264
|
+
return {
|
|
265
|
+
payload: { accountId, accountType, projectId, period, cacheOverride },
|
|
266
|
+
};
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
fetchProjectTransactionList: {
|
|
270
|
+
reducer(draft, action) {
|
|
271
|
+
const key = getProjectAcTranKey(action.payload.accountId, action.payload.accountType, action.payload.projectId, action.payload.period);
|
|
272
|
+
if (action.payload.cacheOverride === true ||
|
|
273
|
+
draft.byProject.transactionListByProjectKey[key] == null ||
|
|
274
|
+
(draft.byProject.transactionListByProjectKey[key]?.hasValidState() ===
|
|
275
|
+
false &&
|
|
276
|
+
draft.byProject.transactionListByProjectKey[key]?.fetchState !=
|
|
277
|
+
'In-Progress')) {
|
|
278
|
+
draft.byProject.transactionListByProjectKey[key] = {
|
|
279
|
+
...initialProjectTransactionState,
|
|
280
|
+
fetchState: 'In-Progress',
|
|
281
|
+
error: undefined,
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
prepare(accountId, accountType, projectId, period, cacheOverride = false) {
|
|
286
|
+
return {
|
|
287
|
+
payload: { accountId, accountType, projectId, period, cacheOverride },
|
|
288
|
+
};
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
updateTransactionListByProject(draft, action) {
|
|
292
|
+
doUpdateTransactionListByProject(draft.byProject.transactionListByProjectKey, action.payload);
|
|
293
|
+
},
|
|
294
|
+
updateTransactionListByProjectUIState(draft, action) {
|
|
295
|
+
const key = getProjectAcKey(action.payload.accountId, action.payload.accountType, action.payload.projectId);
|
|
296
|
+
draft.byProject.transactionListUIStateByProjectKey[key] = Object.assign({}, draft.byProject.transactionListUIStateByProjectKey[key], action.payload.uiState);
|
|
297
|
+
},
|
|
298
|
+
updateTransactionListByProjectFailure: {
|
|
299
|
+
reducer(draft, action) {
|
|
300
|
+
const key = getProjectAcTranKey(action.payload.accountId, action.payload.accountType, action.payload.projectId, action.payload.period);
|
|
301
|
+
draft.byProject.transactionListByProjectKey[key] = {
|
|
302
|
+
...initialProjectTransactionState,
|
|
303
|
+
fetchState: 'Error',
|
|
304
|
+
error: action.payload.error,
|
|
305
|
+
};
|
|
306
|
+
},
|
|
307
|
+
prepare(accountId, accountType, projectId, period, error) {
|
|
308
|
+
return { payload: { accountId, accountType, projectId, period, error } };
|
|
309
|
+
},
|
|
310
|
+
},
|
|
249
311
|
parallelFetchTransactionListByCategoryType: {
|
|
250
312
|
reducer() {
|
|
251
313
|
// Do nothing..
|
|
@@ -340,7 +402,7 @@ const transactionList = createSlice({
|
|
|
340
402
|
},
|
|
341
403
|
},
|
|
342
404
|
});
|
|
343
|
-
export const { parallelFetchAccountTransactionList, fetchAccountTransactionList, updateTransactionListByAccount, updateTransactionListByAccountFailure, parallelFetchEntityTransactionList, fetchEntityTransactionList, updateTransactionListByEntity, updateTransactionListByEntityFailure, updateTransactionListByAccountUIState, parallelFetchClassTransactionList, fetchClassTransactionList, updateTransactionListByClass, updateTransactionListByClassUIState, updateTransactionListByClassFailure, parallelFetchTransactionListByCategoryType, fetchTransactionsListByCategoryType, updateTransactionListByCategoryType, updateTransactionsListByCategoryTypeFailure, updateTransactionListUIStateByCategoryType, clearTransactionList, updateLatestTransactionId, } = transactionList.actions;
|
|
405
|
+
export const { parallelFetchAccountTransactionList, fetchAccountTransactionList, updateTransactionListByAccount, updateTransactionListByAccountFailure, parallelFetchEntityTransactionList, fetchEntityTransactionList, updateTransactionListByEntity, updateTransactionListByEntityFailure, updateTransactionListByAccountUIState, parallelFetchClassTransactionList, fetchClassTransactionList, updateTransactionListByClass, updateTransactionListByClassUIState, updateTransactionListByClassFailure, parallelFetchProjectTransactionList, fetchProjectTransactionList, updateTransactionListByProject, updateTransactionListByProjectUIState, updateTransactionListByProjectFailure, parallelFetchTransactionListByCategoryType, fetchTransactionsListByCategoryType, updateTransactionListByCategoryType, updateTransactionsListByCategoryTypeFailure, updateTransactionListUIStateByCategoryType, clearTransactionList, updateLatestTransactionId, } = transactionList.actions;
|
|
344
406
|
export default transactionList.reducer;
|
|
345
407
|
/**
|
|
346
408
|
* Helper functions
|
|
@@ -390,3 +452,22 @@ function doUpdateTransactionListByClass(draft, payload) {
|
|
|
390
452
|
transactionIDs,
|
|
391
453
|
};
|
|
392
454
|
}
|
|
455
|
+
function doUpdateTransactionListByProject(draft, payload) {
|
|
456
|
+
const transactionIDs = payload.account.transactions.map((transactionPaylod) => transactionPaylod.transaction_id);
|
|
457
|
+
const account = mapAccountBasePayloadToAccountBase(payload.account);
|
|
458
|
+
const projectId = payload.query.zeni_project_id;
|
|
459
|
+
const start = toAbsoluteDay(payload.query.start_date);
|
|
460
|
+
const end = toAbsoluteDay(payload.query.end_date);
|
|
461
|
+
const key = getProjectAcTranKey(account.accountId, account.accountType, projectId, {
|
|
462
|
+
start,
|
|
463
|
+
end,
|
|
464
|
+
});
|
|
465
|
+
draft[key] = {
|
|
466
|
+
...initialProjectTransactionState,
|
|
467
|
+
fetchState: 'Completed',
|
|
468
|
+
error: undefined,
|
|
469
|
+
account: account,
|
|
470
|
+
projectId: projectId,
|
|
471
|
+
transactionIDs,
|
|
472
|
+
};
|
|
473
|
+
}
|
|
@@ -30,6 +30,16 @@ export const initialClassTransactionState = {
|
|
|
30
30
|
return this.fetchState == 'Completed';
|
|
31
31
|
},
|
|
32
32
|
};
|
|
33
|
+
export 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}`;
|
|
34
|
+
export const getProjectAcKey = (accountId, accountType, projectId) => `${accountId}-${accountType}-${projectId}`;
|
|
35
|
+
export const initialProjectTransactionState = {
|
|
36
|
+
transactionIDs: [],
|
|
37
|
+
fetchState: 'Not-Started',
|
|
38
|
+
error: undefined,
|
|
39
|
+
hasValidState() {
|
|
40
|
+
return this.fetchState == 'Completed';
|
|
41
|
+
},
|
|
42
|
+
};
|
|
33
43
|
export const getCategoryTypeTranKey = (categoryType, period) => `${categoryType}_${period.start.day}_${period.start.month}_${period.start.year}_${period.end.day}_${period.end.month}_${period.end.year}`;
|
|
34
44
|
export const initialTransactionsStateByCategoryType = {
|
|
35
45
|
transactionIDs: [],
|
package/lib/index.d.ts
CHANGED
|
@@ -103,10 +103,12 @@ import { ExternalNotificationData, NotificationActivityType, NotificationGroup,
|
|
|
103
103
|
import { Logo, PaymentAccount, VERIFIED_PAYMENT_ACCOUNT_PROVIDER_VERIFICATION_STATUS } from './entity/paymentAccount/paymentAccountState';
|
|
104
104
|
import { PaymentInstrument } from './entity/paymentInstrument/paymentInstrument';
|
|
105
105
|
import { AccountingSummary, Runway } from './entity/portfolio/accountingSummary/accountingSummaryState';
|
|
106
|
+
import { Project } from './entity/project/projectState';
|
|
106
107
|
import { MilageReimbursementLine, OutofPocketReimbursementLine, Reimbursement, ReimbursementLine, ReimbursementTypeCode } from './entity/reimbursement/reimbursementState';
|
|
107
108
|
import { SectionAccountsViewReport } from './entity/sectionAccountsView/sectionAccountsViewSelector';
|
|
108
109
|
import { SectionClassesView as SectionClassesViewV2 } from './entity/sectionClassesViewV2/sectionClassesView';
|
|
109
110
|
import { NestedClassReportV2, SectionClassesViewReportV2 } from './entity/sectionClassesViewV2/sectionClassesViewSelectorTypes';
|
|
111
|
+
import { ProjectReportWithBalances, SectionProjectViewReport } from './entity/sectionProjectView/sectionProjectViewSelectorTypes';
|
|
110
112
|
import { closeSnackbar, openSnackbar } from './entity/snackbar/snackbarReducer';
|
|
111
113
|
import { getSnackbar } from './entity/snackbar/snackbarSelector';
|
|
112
114
|
import { SnackbarMessageConfig } from './entity/snackbar/snackbarState';
|
|
@@ -123,7 +125,7 @@ import { ALL_WEEK_DAYS, DayOfWeek, PriorityCodeType, Task, TaskCodeType, TaskPri
|
|
|
123
125
|
import { getTaskGroupById } from './entity/taskGroup/taskGroupSelector';
|
|
124
126
|
import { TaskGroupState } from './entity/taskGroup/taskGroupState';
|
|
125
127
|
import { TaskGroupTemplate } from './entity/taskGroupTemplate/taskGroupTemplateState';
|
|
126
|
-
import { DoSignInPayload, clearAll, doMagicLinkSignIn, doSignIn, doSignOut,
|
|
128
|
+
import { DoSignInPayload, clearAll, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, resendVerifyDeviceOTP, resetSignInState, deleteConnection, saveAPIKeyConnection, saveExternalConnection as saveExternalConnectionForTenant, saveOAuthConnection, sendEmailMagicLinkToUser, sendSessionHeartbeat, toExternalIntegrationType, toExternalSupportedTool, updateCurrentTenant, updateSignInState, verifyDeviceWithTwoFA } from './entity/tenant/tenantReducer';
|
|
127
129
|
import { CurrentTenant, TenantBaseView, TenantCoreDetailsView, TenantView, TenantsBaseOrdered, TenantsOrdered, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantBaseById, getTenantBaseViewForTenantId, getTenantBaseViewForTenantView, getTenantsBaseByCheckInDateSelector, getTenantsByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, isOtherProductsEnabledForTenant, isTenantBankingOnly, isTenantBookkeepingEnabled, isTenantCardsOnly, isTenantUsingZeniCOA, isZeniDomainTenant, toTenantCoreDetailsView } from './entity/tenant/tenantSelector';
|
|
128
130
|
import { Connection, LoggedInUser, RoleResource, Tenant, TenantProductSettings } from './entity/tenant/tenantState';
|
|
129
131
|
import { ToastNotificationPayload } from './entity/toastNotification/toastNotificationPayload';
|
|
@@ -213,6 +215,8 @@ import { getCashPosition, getCashPositionForHighlightedRange, getCashPositionFor
|
|
|
213
215
|
import { CashPositionReport, CashPositionUIStateSelectorView } from './view/cashPosition/cashPositionSelectorTypes';
|
|
214
216
|
import { fetchClassList } from './view/classList/classListReducer';
|
|
215
217
|
import { ClassListSelectorView, getClassList } from './view/classList/classListSelector';
|
|
218
|
+
import { fetchProjectList } from './view/projectList/projectListReducer';
|
|
219
|
+
import { ProjectListSelectorView, getProjectList } from './view/projectList/projectListSelector';
|
|
216
220
|
import { RecurringDatePickerOptions, RecurringFrequencyType, SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, getRecurringEndDateFromCount, toRecurringFrequency } from './view/common/recurringViewHelper';
|
|
217
221
|
import { ZENI_CLEARING_ACCOUNT, isZeniClearingAccount, isZeniClearingAccountReport } from './view/common/zeniClearingAccountHelper';
|
|
218
222
|
import { clearTransactionVendorSaveStatus, resetTransactionVendorLocalData, saveTransactionVendor, saveTransactionVendorSuccessOrFailure, updateTransactionVendorLocalData } from './view/commonVendorView/transactionVendorView/transactionVendorViewReducer';
|
|
@@ -358,12 +362,10 @@ import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseSta
|
|
|
358
362
|
import { getProfitAndLossClassesView } from './view/profitAndLossClassesView/profitAndLossClassesViewSelector';
|
|
359
363
|
import { PandLReportViewCalculatedSectionID, PandLReportViewSectionID, ProfitAndLossClassesViewReport, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID } from './view/profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
|
|
360
364
|
import { ClassViewLayout, ProfitAndLossClassesViewUIState } from './view/profitAndLossClassesView/profitAndLossClassesViewState';
|
|
361
|
-
import { clearProfitAndLossProjectView, fetchProfitAndLossForTimeframeProjectView, fetchProfitAndLossProjectView, resetProfitAndLossProjectNodeCollapseState, updateProjectViewAccountViewMode, updateProjectsToFilterOut
|
|
362
|
-
import { ProfitAndLossProjectViewUIState } from './view/profitAndLossProjectView/profitAndLossProjectViewState';
|
|
363
|
-
import { Project } from './entity/project/projectState';
|
|
365
|
+
import { clearProfitAndLossProjectView, fetchProfitAndLossForTimeframeProjectView, fetchProfitAndLossProjectView, resetProfitAndLossProjectNodeCollapseState, updateProfitAndLossProjectViewUIState, updateProjectViewAccountViewMode, updateProjectsToFilterOut } from './view/profitAndLossProjectView/profitAndLossProjectViewReducer';
|
|
364
366
|
import { getProfitAndLossProjectView } from './view/profitAndLossProjectView/profitAndLossProjectViewSelector';
|
|
365
367
|
import { ProfitAndLossProjectViewReport } from './view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes';
|
|
366
|
-
import {
|
|
368
|
+
import { ProfitAndLossProjectViewUIState } from './view/profitAndLossProjectView/profitAndLossProjectViewState';
|
|
367
369
|
import { fetchEntityRecommendationsByTransactionId, fetchRecommendationByEntityId, fetchRecommendationByEntityName } from './view/recommendation/recommendationReducer';
|
|
368
370
|
import { clearReferrals, fetchReferrals, fetchRewardsPlan, resendReferralInvite, saveReferralFormDataInLocalStore, sendReferralInvite, updateReferViewed, updateReferralListSortUiState } from './view/referralView/referralReducer';
|
|
369
371
|
import { ReferralListSelectorView, RewardsPlanCardReport, getInviteFormView, getReferralListView, getRewardsPlanCard } from './view/referralView/referralSelector';
|
|
@@ -539,15 +541,15 @@ import { SubscriptionView } from './view/subscriptionView/types/subscriptionView
|
|
|
539
541
|
import { createTag, deleteTag, fetchTagList } from './view/tagView/tagViewReducer';
|
|
540
542
|
import { TagViewSelectorView, getAllTags } from './view/tagView/tagViewSelector';
|
|
541
543
|
import { TagViewState } from './view/tagView/tagViewState';
|
|
542
|
-
import { EditTaskLocalData, initialTaskDetail, initialTaskDetailLocalData } from './view/taskManager/taskDetailView/taskDetail';
|
|
543
|
-
import { archiveTask, deleteTask, discardTaskUpdatesInLocalStore, fetchTaskDetailPage, saveTaskDetail, saveTaskUpdatesToLocalStore, snoozeTask, unsnoozeTask } from './view/taskManager/taskDetailView/taskDetailReducer';
|
|
544
544
|
import { CannedResponse, CannedResponsesViewState } from './view/taskManager/cannedResponsesView/cannedResponses';
|
|
545
545
|
import { deleteCannedResponse, fetchCannedResponses, saveCannedResponse } from './view/taskManager/cannedResponsesView/cannedResponsesReducer';
|
|
546
546
|
import { getCannedResponsesView } from './view/taskManager/cannedResponsesView/cannedResponsesSelector';
|
|
547
|
+
import { EditTaskLocalData, initialTaskDetail, initialTaskDetailLocalData } from './view/taskManager/taskDetailView/taskDetail';
|
|
548
|
+
import { archiveTask, deleteTask, discardTaskUpdatesInLocalStore, fetchTaskDetailPage, saveTaskDetail, saveTaskUpdatesToLocalStore, snoozeTask, unsnoozeTask } from './view/taskManager/taskDetailView/taskDetailReducer';
|
|
547
549
|
import { TaskDetailSelectorView, allTaskPriority, allTaskStatus, getTaskDetail } from './view/taskManager/taskDetailView/taskDetailSelector';
|
|
548
550
|
import { createTaskFromTaskGroupTemplate } from './view/taskManager/taskGroupTemplateView/taskGroupTemplateViewReducer';
|
|
549
551
|
import { createNewTaskGroup, deleteTaskGroup, fetchAllTaskGroups, updateTaskGroupName } from './view/taskManager/taskGroupView/taskGroupViewReducer';
|
|
550
|
-
import { DueDateGroupKey, TASK_LIST_FILTER_CATEGORIES, TASK_LIST_GROUP_BY_CATEGORIES, TaskFilterCategory, TaskGroupKey, TaskListFilterCategoryField, TaskListFilters, TaskListLocalData, TaskListUIState, TaskListViewSortKey, toDueDateGroupKeyType, toTaskListGroupByKeyType, toTaskListGroupByKeyTypeStrict
|
|
552
|
+
import { ALL_TASK_LIST_TABS, DueDateGroupKey, TASK_LIST_FILTER_CATEGORIES, TASK_LIST_GROUP_BY_CATEGORIES, TaskFilterCategory, TaskGroupKey, TaskListFilterCategoryField, TaskListFilters, TaskListLocalData, TaskListTab, TaskListUIState, TaskListViewSortKey, toDueDateGroupKeyType, toTaskListGroupByKeyType, toTaskListGroupByKeyTypeStrict } from './view/taskManager/taskListView/taskList';
|
|
551
553
|
import { bulkUpdateTaskList, dragNDropTasks, fetchTaskListPage, initiateTaskListLocalData, removeTaskFromList, updateTaskFilters, updateTaskFromListView, updateTaskListLocalData, updateTaskListSearchText, updateTaskListTab, updateTaskListUIState } from './view/taskManager/taskListView/taskListReducer';
|
|
552
554
|
import { TaskGroupWithTasksList, TaskListSelectorView, TaskWithUserDetails, getAllTasks } from './view/taskManager/taskListView/taskListSelector';
|
|
553
555
|
import { getDueDateValueFromDueDateGroupId, getTaskUpdates } from './view/taskManager/taskListView/taskListViewHelpers';
|
|
@@ -569,8 +571,9 @@ import { TransactionDetailLineItemData, TransactionDetailLocalData, TransactionV
|
|
|
569
571
|
import { TransactionListByAccountReport, getTransactionListByAccount, getTransactionListUIStateByAccountKey } from './view/transactionList/transactionListByAccountSelector';
|
|
570
572
|
import { TransactionListByCategoryType, getTransactionListUIStateByCategoryType, getTransactionsListByCategoryType } from './view/transactionList/transactionListByCategoryTypeSelector';
|
|
571
573
|
import { TransactionListByClassReport, getTransactionListByClass, getTransactionListUIStateByClassKey } from './view/transactionList/transactionListByClassSelector';
|
|
574
|
+
import { TransactionListByProjectReport, getTransactionListByProject, getTransactionListUIStateByProjectKey } from './view/transactionList/transactionListByProjectSelector';
|
|
572
575
|
import { TransactionListByEntityView, getTransactionListByEntity, getTransactionListByEntityForSinglePeriod } from './view/transactionList/transactionListByEntitySelector';
|
|
573
|
-
import { clearTransactionList, fetchAccountTransactionList, fetchEntityTransactionList, parallelFetchAccountTransactionList, parallelFetchClassTransactionList, parallelFetchEntityTransactionList, parallelFetchTransactionListByCategoryType, updateLatestTransactionId, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, updateTransactionListByClass, updateTransactionListByClassUIState, updateTransactionListByEntity, updateTransactionListByEntityFailure, updateTransactionListUIStateByCategoryType } from './view/transactionList/transactionListReducer';
|
|
576
|
+
import { clearTransactionList, fetchAccountTransactionList, fetchEntityTransactionList, parallelFetchAccountTransactionList, parallelFetchClassTransactionList, parallelFetchProjectTransactionList, parallelFetchEntityTransactionList, parallelFetchTransactionListByCategoryType, updateLatestTransactionId, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, updateTransactionListByClass, updateTransactionListByClassUIState, updateTransactionListByProject, updateTransactionListByProjectUIState, updateTransactionListByEntity, updateTransactionListByEntityFailure, updateTransactionListUIStateByCategoryType } from './view/transactionList/transactionListReducer';
|
|
574
577
|
import { TransactionCategoryType } from './view/transactionList/transactionListState';
|
|
575
578
|
import { clearTrendData, fetchExpenseTrend, fetchIncomeTrend } from './view/trend/trendReducer';
|
|
576
579
|
import { TrendView, getCurrentFiscalQuarterDateRange, getTrendForEntity } from './view/trend/trendSelector';
|
|
@@ -614,13 +617,21 @@ import { ZeniAccStatementsSelectorView, getZeniAccStatements } from './view/zeni
|
|
|
614
617
|
import { fetchZeniAccountsPromoCard } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer';
|
|
615
618
|
import { ZeniAccountsPromoCardReport, getZeniAccountsPromoCard } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector';
|
|
616
619
|
import { ZeniAccountsPromoCardState } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardState';
|
|
617
|
-
import { ApproveOAuthConsentPayload, approveOAuthConsent, approveOAuthConsentFailure, approveOAuthConsentSuccess, clearZeniOAuthView } from './view/zeniOAuthView/zeniOAuthReducer';
|
|
618
620
|
import { OAuthParams, ParseOAuthParamsResult, parseOAuthParams } from './view/zeniOAuthView/zeniOAuthParamsParser';
|
|
621
|
+
import { ApproveOAuthConsentPayload, approveOAuthConsent, approveOAuthConsentFailure, approveOAuthConsentSuccess, clearZeniOAuthView } from './view/zeniOAuthView/zeniOAuthReducer';
|
|
619
622
|
import { getZeniOAuthApproveError, getZeniOAuthApproveFetchState, getZeniOAuthApproveRedirectUrl } from './view/zeniOAuthView/zeniOAuthSelector';
|
|
620
623
|
import { ZeniOAuthViewState } from './view/zeniOAuthView/zeniOAuthState';
|
|
621
624
|
import { RESTAPIEndpoints } from './zeniAPI';
|
|
622
625
|
import { Dayjs, ZeniDate, date, dateFromYearMonthDate, dateInLocal, dateLocal, dateNow, getBusinessDayOfDate, getLocalTimezone, getMinDate, getMonthIndex, setLocalTimezone, updateZeniDateLocaleID } from './zeniDayJS';
|
|
623
626
|
import { ZeniUrl, toZeniUrl, toZeniUrlWithoutBaseURL } from './zeniUrl';
|
|
627
|
+
export { fetchCreditAgentAccess, fetchCreditAgentAccessSuccess, scheduleTenantCreditScoreCron, fetchCreditAgentMacro, saveCreditAgentMacro, resetSaveMacroState, fetchCardProfiles, updateCardProfile, updateCreditAgentUIState, clearCreditAgentView, } from './view/creditAgentView/creditAgentViewReducer';
|
|
628
|
+
export { toCardTenantProfileRow, toMacro, } from './entity/creditAgent/creditAgentPayload';
|
|
629
|
+
export { getCreditAgentView, getCreditAgentEntity, getCreditAgentMacro, getCardProfilesData, } from './view/creditAgentView/creditAgentViewSelector';
|
|
630
|
+
export { getCreditReportDownloadPayload } from './view/creditAgentView/buildCreditReportCsv';
|
|
631
|
+
export { clearAllCreditAgent, updateCreditAgentMacro, updateCreditAgentRow, updateCreditAgentRows, } from './entity/creditAgent/creditAgentReducer';
|
|
632
|
+
export { getCreditAgentRows, getCreditAgentMacroEntity, } from './entity/creditAgent/creditAgentSelector';
|
|
633
|
+
export type { CardTenantProfileRow, CardStatus, CreditAgentEntityState, CreditAgentMacro, } from './entity/creditAgent/creditAgentState';
|
|
634
|
+
export type { CreditAgentFocusFilter, CreditAgentSortDir, CreditAgentSortKey, CreditAgentUIState, CreditAgentViewState, } from './view/creditAgentView/creditAgentViewState';
|
|
624
635
|
export { AccountSettingsLocalData };
|
|
625
636
|
export { saveJeAccountSettings, saveJeAccountSettingsLocalData };
|
|
626
637
|
export default initialize;
|
|
@@ -709,12 +720,12 @@ export { VendorTransaction, VendorTransactionWithCOT, isVendorTransaction, Vendo
|
|
|
709
720
|
export { TransferTransaction, isTransferTransaction };
|
|
710
721
|
export { MatchedTransaction };
|
|
711
722
|
export { SupportedTransaction, SupportedTransactionWithCOT, SupportedTransactionPayload, getSupportedTransactionById, };
|
|
712
|
-
export { clearTransactionList, updateLatestTransactionId, parallelFetchAccountTransactionList, parallelFetchEntityTransactionList, fetchAccountTransactionList, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, parallelFetchClassTransactionList, updateTransactionListByClassUIState, updateTransactionListByClass, updateTransactionListUIStateByCategoryType, parallelFetchTransactionListByCategoryType, };
|
|
723
|
+
export { clearTransactionList, updateLatestTransactionId, parallelFetchAccountTransactionList, parallelFetchEntityTransactionList, fetchAccountTransactionList, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, parallelFetchClassTransactionList, updateTransactionListByClassUIState, updateTransactionListByClass, parallelFetchProjectTransactionList, updateTransactionListByProjectUIState, updateTransactionListByProject, updateTransactionListUIStateByCategoryType, parallelFetchTransactionListByCategoryType, };
|
|
713
724
|
export { TransactionListByAccountReport, getTransactionListByAccount, getTransactionListUIStateByAccountKey, };
|
|
714
725
|
export { fetchEntityTransactionList, updateTransactionListByEntity, saveTransactionDetailLocalData, clearTransactionDetailSaveStatus, updateTransactionListByEntityFailure, resetLineItemsCategoryClassInLocalData, setAllLineItemsToCategoryClassInLocalData, saveTransactionDetail, setAllLineItemsLocalDataIsUpdateAllChecked, initializeTransactionDetailLocalData, removeEntityRecommendationForLineIdForTransactionDetail, updateSelectedVendor, updateSelectedCustomer, resetSelectedCustomer, resetVendor, updateLocalDataWithTransactionsUpdateWithVendorCheckbox, updateVendorToAllLineItems, resetAllLineItemsToVendor, updateLatestSelectedEntity, updateVendorBulkRecommendationsFetchStatus, setIsVendorUpdateAllChecked, };
|
|
715
726
|
export { TransactionUpdates, downloadAccountingProviderAttachment, downloadAccountingProviderAttachmentSuccess, downloadAccountingProviderAttachmentFailure, fetchTransactionDetail, updateTransactionDetail, uploadMissingAttachmentSuccess, deleteTransactionAttachment, getThirdPartyIdFromTransactionId, };
|
|
716
727
|
export { TransactionListByEntityView, getTransactionListByEntity };
|
|
717
|
-
export { TransactionListByClassReport, getTransactionListByClass, getTransactionListUIStateByClassKey, getTransactionListByEntityForSinglePeriod, };
|
|
728
|
+
export { TransactionListByClassReport, getTransactionListByClass, getTransactionListUIStateByClassKey, TransactionListByProjectReport, getTransactionListByProject, getTransactionListUIStateByProjectKey, getTransactionListByEntityForSinglePeriod, };
|
|
718
729
|
export { TransactionDetailReport, getTransactionDetail, getTransactionDetailForTransaction, VendorDetailsView, getInitialUpdatablePeriodsForTransactionRecommendations as getUpdatablePeriodsForTransactionRecommendations, };
|
|
719
730
|
export { getInsights, fetchInsightsCard, updateSelectedInsightIndex, InsightsView, };
|
|
720
731
|
export { fetchForecastList } from './view/forecastList/forecastListReducer';
|
|
@@ -778,7 +789,7 @@ export { fetchVendorsList, updateScrollYOffset, fetchVendorsFiling1099All, fetch
|
|
|
778
789
|
export { W9FormProcessingPayload, W9Form, updateW9FormUploadFetchState, updateW9FormUploadFile, getVendorUploadDetailsByVendorId, VendorFiling1099UploadDetailsSelectorView, VendorFiling1099UploadDetailsState, vendorFiling1099UploadDetailsSave, vendorFiling1099UploadDetailsResetFormStatus, vendorFiling1099UploadDetailsResetLocalData, initializeVendorFiling1099UploadDetailsLocalState, updateVendor1099DetailsLocalData, updateW9FormOCRDataToLocalData, VendorsFiling1099UploadDetailsLocalData, };
|
|
779
790
|
export { BillTransaction, BillPayInfo, BillStage, BillStageCodeType, BillTransactionView, InternationalTransferFeeBearerPaymentMethod, DeletionSourceType, BillBulkSelectExceptionInfoType, toOutsideZeniPaymentModeType, checkShowMarkAsPaidButton, };
|
|
780
791
|
export { MilageReimbursementLine, OutofPocketReimbursementLine, ReimbursementLine, ReimbursementTypeCode, Reimbursement, RemiTabType, toRemiSubTabType, toRemiSubTabTypeStrict, toRemiTabType, toRemiTabTypeStrict, toReimbursementTypeCode, RemiSubTabType, ReimbursementViewSortKey, RemiListUIState, RemiListReport, RemiListDownloadReport, ReimbursementView, ReimbursementFilters, ReimbursementFilterCategory, RemiListViewFilterCategoryField, getRemiList, getRemiDownloadList, fetchRemiList, fetchRemiListPerTab, updateRemiListTab, updateRemiListSubTab, updateRemiDetailSaveRemiCode, updateRemiListUIState, updateRemiListSearchResult, updateBillListFilterResult, updateRemiListFilterResult, REIMBURSEMENT_FILTER_CATEGORIES, REIMBURSEMENT_FILTER_CATEGORIES_RESTRICTED, updateRemiListDownloadUIState, updateBillListDownloadUIState, updateBillsBulkActionList, removeBillFromBulkActionList, clearAllBillsFromBulkActionList, getBillsBulkReviewView, BillsBulkReviewView, validateBillsBulkAction, approveOrRejectBillsBulkAction, cancelOrDeleteBillsBulkAction, submitDraftBillsBulkAction, autoReviewPendingApprovalBills, incrementBulkActionProcessedCount, getBillsBulkOperationProgress, BulkOperationProgress, clearBillPayBulkActionView, isBillConditionallyValid, getRemisBulkReviewView, RemisBulkReviewView, getRemisBulkOperationProgress, updateRemisBulkActionList, removeRemiFromBulkActionList, clearAllRemisFromBulkActionList, reviewDraftRemisBulkAction, approveOrRejectRemisBulkAction, cancelOrDeleteRemisBulkAction, submitDraftRemisBulkAction, autoReviewPendingApprovalRemis, clearRemiBulkActionView, incrementRemiBulkActionProcessedCount, RemiBulkSelectExceptionInfoType, OutsideZeniPaymentLocalData, updateOutsideZeniPaymentLocalData, discardOutsideZeniPaymentLocalData, checkIfCreatorIsApprover, };
|
|
781
|
-
export { AccountListSelectorView, ClassListSelectorView, getClassList, fetchClassList, };
|
|
792
|
+
export { AccountListSelectorView, ClassListSelectorView, getClassList, fetchClassList, ProjectListSelectorView, getProjectList, fetchProjectList, };
|
|
782
793
|
export { BillTab, BillsSubTabType, SaveBillStageCode, BillPayReviewSelectorView, DuplicateBillsSelectorView, EditBillDetailSelectorView, LineItemRecommendationsLocalData, EditBillInitialDetails, BillableStatus, PaymentDetailsSection, BillListReport, BillListDownloadReport, WhatForSection, fetchBillList, fetchBillListPerTab, updateTab, updateSubTab, updateSelectedBillId, updateBillDetailSaveBillCode, fetchVendorByNameAndParseInvoice, saveBillUpdatesToLocalStore, discardBillUpdatesInLocalStore, saveBillDetail, approveOrRejectBill, updateApprovalStatusOnSuccess, deleteBill, cancelAndDeleteBill, retryOrRefundBill, getBillList, getBillDownloadList, BillDetailViewSelector, ActorActivityWithUser, BillActivity, StepWithStatus, getBillDetailView, checkApproveRejectBtnShowForBill, BillDetailView, getBillTransactionDetailKey, fetchBillDetail, fetchEditBillDetailPage, fetchAndUpdateVendorRecommendations, fetchDuplicateBill, clearBillPayReview, EditBillDetail, EditBillDetailViewState, getEditBillDetail, getReviewPageBillDetail, BillDetailLocalData, PaymentDetailsSectionView, fetchBillAndInitializeLocalStore, updateShowAutofill, saveVendorSuccessOrFailure, BillPaymentStatus, BillPaymentStatusCodeType, BillPaymentRefundStatus, BillPaymentRefundStatusCodeType, BillStatus, BillStatusCodeType, BillApprovalType, updateBillListUIState, BillListUIState, BillPayViewSortKey, BillPayFilters, BillPayFilterCategory, BillListViewFilterCategoryField, BILL_PAY_FILTER_CATEGORIES, updateVendorDetailLocalData, resetVendorDetailLocalData, resetVendorSaveStatus, updateContactsInVendorDetailLocalData, updateVendorTabDetailUIState, updateContactsInVendorTabDetailLocalData, updateBillUploadFetchState, updateBillListSearchResult, fetchUserDetails, verifyUser, updateVendorContact, PaymentToOption, toPaymentToOption, convertAmountToHomeCurrency, RecurringBillInstance, RecurringBillConfigLocalData, EditRecurringBillType, fetchVendorAndUpdateBillLocalData, markBillForRetry, updateWithdrawFromAccountId, removeBillFileFromLocalStore, replaceBillFileInLocalStore, updateShouldReplaceBillData, };
|
|
783
794
|
export { SpendManagementFiltersType, SpendManagementFilterEntityType, FilterCategoryType, BillPayFilterCategoryDropdownOption, ReimbursementFilterCategoryDropdownOption, TaskFilterCategoryDropdownOption, SpendManagementFilterCategoryDropdownOption, MatchingOperatorDropdownOption, CategoryCombinationOperator, hideCreatedByFilter, };
|
|
784
795
|
export { BillPaySetupViewState, ZeniAccountSetupViewState, BillPaySetupViewLocalData, ZeniAccountSetupViewLocalData, PlaidAccountState, fetchBillPaySetupView, fetchZeniAccountSetupView, enableSetup, getPaymentAccounts, getPlaidLinkToken, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData, updateBusinessVerificationDetails, updatePaymentAccount, updatePaymentAccountLoginStatus, updatePaymentAccountStatus, establishPlaidConnection, updateMappedCashAccount, updatePrimaryFundingAccount, acceptBillPayTerms, acceptZeniAccountTerms, acceptBillPayUpdatedTerms, saveSetupViewDataInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, saveIndustryAndIncDateInLocalStore, clearSetupViewDataInLocalStore, clearBillPaySetupView, clearZeniAccountSetupView, sendOtp, resendOtp, verifyOtp, CompanyDetails, CompanyOfficersDetails, BillPaySetupView, ZeniAccountSetupView, BillPayBusinessVerificationDetails, ZeniAccountBusinessVerificationDetails, TreasuryBusinessVerificationDetails, SetupViewState, SetupViewLocalData, SetupView, BusinessVerificationDetails, getBillPaySetupViewDetails, getPlaidAccountDetails, getZeniAccountSetupViewDetails, getBusinessVerificationDetails, getBillPayBusinessVerificationDetails, getZeniAccountBusinessVerificationDetails, getTreasuryBusinessVerificationDetails, getCommonSetupViewDetails, PlaidConnectionDetails, PlaidLinkTokenType, PlaidAccountKeyType, Token, FundingAccount, getTwoFactorAuthenticationView, getTwoFactorAuthenticationViewForCardUserOnboarding, getTwoFactorAuthenticationViewForChargeCardHolder, TwoFactorAuthenticationView, };
|
|
@@ -914,5 +925,5 @@ export { fetchTransactionActivityLog } from './view/transactionActivityLogView/t
|
|
|
914
925
|
export { TransactionActivityLogViewSelectorView, getTransactionActivityLogView, } from './view/transactionActivityLogView/transactionActivityLogViewSelector';
|
|
915
926
|
export { UserGroup } from './entity/userGroups/userGroupsState';
|
|
916
927
|
export { SessionManager } from './entity/tenant/SessionManager';
|
|
917
|
-
export type { SessionCallbacks, SessionConfig } from './entity/tenant/sessionTypes';
|
|
928
|
+
export type { SessionCallbacks, SessionConfig, } from './entity/tenant/sessionTypes';
|
|
918
929
|
export { DEFAULT_SESSION_CONFIG } from './entity/tenant/sessionTypes';
|