@zeniai/client-epic-state 4.19.91-beta4ND → 4.19.91-betaJK2
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/reduceFetchState.d.ts +0 -9
- package/lib/commonStateTypes/reduceFetchState.js +0 -26
- package/lib/entity/userGroups/userGroupsPayload.d.ts +7 -0
- package/lib/entity/userGroups/userGroupsPayload.js +10 -0
- package/lib/entity/userGroups/userGroupsReducer.d.ts +8 -0
- package/lib/entity/userGroups/userGroupsReducer.js +29 -0
- package/lib/entity/userGroups/userGroupsSelector.d.ts +4 -0
- package/lib/entity/userGroups/userGroupsSelector.js +12 -0
- package/lib/entity/userGroups/userGroupsState.d.ts +9 -0
- package/lib/esm/commonStateTypes/reduceFetchState.js +0 -25
- package/lib/esm/entity/userGroups/userGroupsPayload.js +7 -0
- package/lib/esm/entity/userGroups/userGroupsReducer.js +25 -0
- package/lib/esm/entity/userGroups/userGroupsSelector.js +8 -0
- package/lib/esm/index.js +4 -5
- package/lib/esm/reducer.js +6 -0
- package/lib/esm/view/financeStatement/financeStatementReducer.js +8 -11
- package/lib/esm/view/financeStatement/financeStatementSelector.js +5 -10
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +1 -6
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +29 -2
- package/lib/esm/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +5 -7
- package/lib/esm/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +7 -9
- package/lib/esm/view/taskManager/taskListView/taskListSelector.js +3 -1
- package/lib/esm/view/userGroupListView/userGroupListViewReducer.js +69 -0
- package/lib/esm/view/userGroupListView/userGroupListViewSelector.js +16 -0
- package/lib/esm/view/userGroupListView/userGroupListViewState.js +1 -0
- package/lib/esm/view/userListView/fetchUserListByTypeEpic.js +11 -0
- package/lib/index.d.ts +5 -7
- package/lib/index.js +25 -29
- package/lib/reducer.d.ts +6 -0
- package/lib/reducer.js +6 -0
- package/lib/view/financeStatement/financeStatementReducer.js +8 -11
- package/lib/view/financeStatement/financeStatementSelector.d.ts +0 -2
- package/lib/view/financeStatement/financeStatementSelector.js +5 -10
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.d.ts +2 -4
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +2 -7
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +29 -2
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +0 -4
- package/lib/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +5 -7
- package/lib/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +6 -8
- package/lib/view/taskManager/taskListView/taskListSelector.js +3 -1
- package/lib/view/userGroupListView/userGroupListViewReducer.d.ts +23 -0
- package/lib/view/userGroupListView/userGroupListViewReducer.js +73 -0
- package/lib/view/userGroupListView/userGroupListViewSelector.d.ts +7 -0
- package/lib/view/userGroupListView/userGroupListViewSelector.js +20 -0
- package/lib/view/userGroupListView/userGroupListViewState.d.ts +8 -0
- package/lib/view/userGroupListView/userGroupListViewState.js +2 -0
- package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +3 -1
- package/lib/view/userListView/fetchUserListByTypeEpic.js +11 -0
- package/lib/view/userListView/userListViewPayload.d.ts +2 -0
- package/package.json +1 -1
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -290
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.d.ts +0 -13
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -294
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.d.ts +0 -59
- /package/lib/{view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js → entity/userGroups/userGroupsState.js} +0 -0
- /package/lib/esm/{view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js → entity/userGroups/userGroupsState.js} +0 -0
|
@@ -11,15 +11,6 @@ export declare const isAllFetchCompleted: (fetchStateList: FetchStateAndError[])
|
|
|
11
11
|
* @return single fetchStateWithError
|
|
12
12
|
*/
|
|
13
13
|
export declare function reduceFetchState(fetchStateList: FetchStateAndError[]): FetchStateAndError;
|
|
14
|
-
/**
|
|
15
|
-
* Combine multiple independent fetches (e.g. month / quarter / year for one report).
|
|
16
|
-
* In-Progress if any fetch is in progress; Completed only when all complete; Error if
|
|
17
|
-
* any failed once nothing is still in progress.
|
|
18
|
-
*
|
|
19
|
-
* Differs from {@link reduceFetchState} (requires all In-Progress for that state) and
|
|
20
|
-
* from {@link reduceAllFetchState} (Error only when every fetch failed).
|
|
21
|
-
*/
|
|
22
|
-
export declare function reduceFetchStateParallelTimeframes(fetchStateList: FetchStateAndError[]): FetchStateAndError;
|
|
23
14
|
/**
|
|
24
15
|
* Reduces list of fetch state to boolean
|
|
25
16
|
* @param fetchStateList list of fetch states
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.reduceAnyCompletedFetchState = exports.reduceAllFetchState = exports.reduceAnyFetchState = exports.isAnyFetchCompleted = exports.isAnyFetchInProgress = exports.isAllFetchCompleted = void 0;
|
|
4
4
|
exports.reduceFetchState = reduceFetchState;
|
|
5
|
-
exports.reduceFetchStateParallelTimeframes = reduceFetchStateParallelTimeframes;
|
|
6
5
|
/**
|
|
7
6
|
* Reduces list of fetch state to boolean
|
|
8
7
|
* @param fetchStateList list of fetch states
|
|
@@ -56,31 +55,6 @@ function reduceFetchState(fetchStateList) {
|
|
|
56
55
|
error,
|
|
57
56
|
};
|
|
58
57
|
}
|
|
59
|
-
/**
|
|
60
|
-
* Combine multiple independent fetches (e.g. month / quarter / year for one report).
|
|
61
|
-
* In-Progress if any fetch is in progress; Completed only when all complete; Error if
|
|
62
|
-
* any failed once nothing is still in progress.
|
|
63
|
-
*
|
|
64
|
-
* Differs from {@link reduceFetchState} (requires all In-Progress for that state) and
|
|
65
|
-
* from {@link reduceAllFetchState} (Error only when every fetch failed).
|
|
66
|
-
*/
|
|
67
|
-
function reduceFetchStateParallelTimeframes(fetchStateList) {
|
|
68
|
-
const isAnyProgress = fetchStateList.some((s) => s.fetchState === 'In-Progress');
|
|
69
|
-
const isAllCompleted = fetchStateList.every((s) => s.fetchState === 'Completed');
|
|
70
|
-
const isAnyError = fetchStateList.some((s) => s.fetchState === 'Error');
|
|
71
|
-
const error = reduceError(fetchStateList);
|
|
72
|
-
let fetchState = 'Not-Started';
|
|
73
|
-
if (isAnyProgress) {
|
|
74
|
-
fetchState = 'In-Progress';
|
|
75
|
-
}
|
|
76
|
-
else if (isAllCompleted) {
|
|
77
|
-
fetchState = 'Completed';
|
|
78
|
-
}
|
|
79
|
-
else if (isAnyError) {
|
|
80
|
-
fetchState = 'Error';
|
|
81
|
-
}
|
|
82
|
-
return { fetchState, error };
|
|
83
|
-
}
|
|
84
58
|
/**
|
|
85
59
|
* Reduces list of fetch state to boolean
|
|
86
60
|
* @param fetchStateList list of fetch states
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapUserGroupPayloadToUserGroup = mapUserGroupPayloadToUserGroup;
|
|
4
|
+
function mapUserGroupPayloadToUserGroup(payload) {
|
|
5
|
+
return {
|
|
6
|
+
userGroupId: payload.id,
|
|
7
|
+
name: payload.name,
|
|
8
|
+
userIds: payload.user_ids ?? [],
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UserGroupPayload } from './userGroupsPayload';
|
|
2
|
+
import { UserGroupsState } from './userGroupsState';
|
|
3
|
+
export declare const initialState: UserGroupsState;
|
|
4
|
+
export declare const updateAllUserGroups: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
5
|
+
userGroups: UserGroupPayload[];
|
|
6
|
+
}, "userGroups/updateAllUserGroups">, removeUserGroup: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "userGroups/removeUserGroup">, clearAllUserGroups: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"userGroups/clearAllUserGroups">;
|
|
7
|
+
declare const _default: import("redux").Reducer<UserGroupsState>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearAllUserGroups = exports.removeUserGroup = exports.updateAllUserGroups = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const userGroupsPayload_1 = require("./userGroupsPayload");
|
|
7
|
+
exports.initialState = {
|
|
8
|
+
userGroupByUserGroupId: {},
|
|
9
|
+
};
|
|
10
|
+
const userGroups = (0, toolkit_1.createSlice)({
|
|
11
|
+
name: 'userGroups',
|
|
12
|
+
initialState: exports.initialState,
|
|
13
|
+
reducers: {
|
|
14
|
+
updateAllUserGroups(draft, action) {
|
|
15
|
+
action.payload.userGroups.forEach((payload) => {
|
|
16
|
+
const userGroup = (0, userGroupsPayload_1.mapUserGroupPayloadToUserGroup)(payload);
|
|
17
|
+
draft.userGroupByUserGroupId[userGroup.userGroupId] = userGroup;
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
removeUserGroup(draft, action) {
|
|
21
|
+
delete draft.userGroupByUserGroupId[action.payload];
|
|
22
|
+
},
|
|
23
|
+
clearAllUserGroups(draft) {
|
|
24
|
+
Object.assign(draft, exports.initialState);
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
_a = userGroups.actions, exports.updateAllUserGroups = _a.updateAllUserGroups, exports.removeUserGroup = _a.removeUserGroup, exports.clearAllUserGroups = _a.clearAllUserGroups;
|
|
29
|
+
exports.default = userGroups.reducer;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { UserGroup, UserGroupsState } from './userGroupsState';
|
|
3
|
+
export declare function getUserGroupsByUserGroupIds(userGroupsState: UserGroupsState, userGroupIds: ID[]): UserGroup[];
|
|
4
|
+
export declare function getUserGroupByUserGroupId(userGroupsState: UserGroupsState, userGroupId: ID): UserGroup | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUserGroupsByUserGroupIds = getUserGroupsByUserGroupIds;
|
|
4
|
+
exports.getUserGroupByUserGroupId = getUserGroupByUserGroupId;
|
|
5
|
+
function getUserGroupsByUserGroupIds(userGroupsState, userGroupIds) {
|
|
6
|
+
return userGroupIds
|
|
7
|
+
.map((id) => getUserGroupByUserGroupId(userGroupsState, id))
|
|
8
|
+
.filter((value) => value != null);
|
|
9
|
+
}
|
|
10
|
+
function getUserGroupByUserGroupId(userGroupsState, userGroupId) {
|
|
11
|
+
return userGroupsState.userGroupByUserGroupId[userGroupId] ?? undefined;
|
|
12
|
+
}
|
|
@@ -50,31 +50,6 @@ export function reduceFetchState(fetchStateList) {
|
|
|
50
50
|
error,
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
/**
|
|
54
|
-
* Combine multiple independent fetches (e.g. month / quarter / year for one report).
|
|
55
|
-
* In-Progress if any fetch is in progress; Completed only when all complete; Error if
|
|
56
|
-
* any failed once nothing is still in progress.
|
|
57
|
-
*
|
|
58
|
-
* Differs from {@link reduceFetchState} (requires all In-Progress for that state) and
|
|
59
|
-
* from {@link reduceAllFetchState} (Error only when every fetch failed).
|
|
60
|
-
*/
|
|
61
|
-
export function reduceFetchStateParallelTimeframes(fetchStateList) {
|
|
62
|
-
const isAnyProgress = fetchStateList.some((s) => s.fetchState === 'In-Progress');
|
|
63
|
-
const isAllCompleted = fetchStateList.every((s) => s.fetchState === 'Completed');
|
|
64
|
-
const isAnyError = fetchStateList.some((s) => s.fetchState === 'Error');
|
|
65
|
-
const error = reduceError(fetchStateList);
|
|
66
|
-
let fetchState = 'Not-Started';
|
|
67
|
-
if (isAnyProgress) {
|
|
68
|
-
fetchState = 'In-Progress';
|
|
69
|
-
}
|
|
70
|
-
else if (isAllCompleted) {
|
|
71
|
-
fetchState = 'Completed';
|
|
72
|
-
}
|
|
73
|
-
else if (isAnyError) {
|
|
74
|
-
fetchState = 'Error';
|
|
75
|
-
}
|
|
76
|
-
return { fetchState, error };
|
|
77
|
-
}
|
|
78
53
|
/**
|
|
79
54
|
* Reduces list of fetch state to boolean
|
|
80
55
|
* @param fetchStateList list of fetch states
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
+
import { mapUserGroupPayloadToUserGroup, } from './userGroupsPayload';
|
|
3
|
+
export const initialState = {
|
|
4
|
+
userGroupByUserGroupId: {},
|
|
5
|
+
};
|
|
6
|
+
const userGroups = createSlice({
|
|
7
|
+
name: 'userGroups',
|
|
8
|
+
initialState,
|
|
9
|
+
reducers: {
|
|
10
|
+
updateAllUserGroups(draft, action) {
|
|
11
|
+
action.payload.userGroups.forEach((payload) => {
|
|
12
|
+
const userGroup = mapUserGroupPayloadToUserGroup(payload);
|
|
13
|
+
draft.userGroupByUserGroupId[userGroup.userGroupId] = userGroup;
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
removeUserGroup(draft, action) {
|
|
17
|
+
delete draft.userGroupByUserGroupId[action.payload];
|
|
18
|
+
},
|
|
19
|
+
clearAllUserGroups(draft) {
|
|
20
|
+
Object.assign(draft, initialState);
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
export const { updateAllUserGroups, removeUserGroup, clearAllUserGroups } = userGroups.actions;
|
|
25
|
+
export default userGroups.reducer;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function getUserGroupsByUserGroupIds(userGroupsState, userGroupIds) {
|
|
2
|
+
return userGroupIds
|
|
3
|
+
.map((id) => getUserGroupByUserGroupId(userGroupsState, id))
|
|
4
|
+
.filter((value) => value != null);
|
|
5
|
+
}
|
|
6
|
+
export function getUserGroupByUserGroupId(userGroupsState, userGroupId) {
|
|
7
|
+
return userGroupsState.userGroupByUserGroupId[userGroupId] ?? undefined;
|
|
8
|
+
}
|
package/lib/esm/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { getActualPeriodOfFY, getActualPeriodOfFYQtr, } from './commonStateTypes
|
|
|
14
14
|
import { getFYMonths } from './commonStateTypes/fiscalYearHelpers/getFYMonths';
|
|
15
15
|
import { getFYQuarterAndYear, getLastMonthOfFYQuarter, getLastMonthOfFYYear, } from './commonStateTypes/fiscalYearHelpers/getFYQuarterAndYear';
|
|
16
16
|
import { getStartOfAndEndOfTimeframeForFY } from './commonStateTypes/fiscalYearHelpers/getStartOfAndEndOfTimeframeFY';
|
|
17
|
-
import { isAllFetchCompleted, isAnyFetchInProgress, reduceAllFetchState, reduceAnyCompletedFetchState, reduceAnyFetchState, reduceFetchState,
|
|
17
|
+
import { isAllFetchCompleted, isAnyFetchInProgress, reduceAllFetchState, reduceAnyCompletedFetchState, reduceAnyFetchState, reduceFetchState, } from './commonStateTypes/reduceFetchState';
|
|
18
18
|
import { toReimbursementTypeCode } from './commonStateTypes/reimbursementTypeCode';
|
|
19
19
|
import { stringToUnion, stringToUnionStrict, } from './commonStateTypes/stringToUnion';
|
|
20
20
|
import { SCHEDULE_DAYS_OF_MONTH, convertToPeriod, toAbsoluteDay, toMonth, toMonthStrict, toMonthYearPeriodId, toQuarter, toQuarterStrict, toScheduleDaysOfMonth, } from './commonStateTypes/timePeriod';
|
|
@@ -217,8 +217,7 @@ import { changeZeniPersonRoles, deletePerson, fetchAllPeopleRequiredViews, fetch
|
|
|
217
217
|
import { getPeople, getPeopleLocalData } from './view/people/peopleSelector';
|
|
218
218
|
import { fetchProfitAndLoss, fetchProfitAndLossForTimeframe, resetProfitAndLossNodeCollapseState, updateProfitAndLossUIState, } from './view/profitAndLoss/profitAndLossReducer';
|
|
219
219
|
import { getPandLReportFetchState, getProfitAndLossReport, } from './view/profitAndLoss/profitAndLossSelector';
|
|
220
|
-
import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseState, updateAccountViewMode as updateProfitAndLossAccountViewMode, updateClassesToFilterOut as updateProfitAndLossClassesToFilterOut,
|
|
221
|
-
import { getProfitAndLossClassesHorizontalView } from './view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector';
|
|
220
|
+
import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseState, updateAccountViewMode as updateProfitAndLossAccountViewMode, updateClassesToFilterOut as updateProfitAndLossClassesToFilterOut, updateProfitAndLossClassesViewUIState, } from './view/profitAndLossClassesView/profitAndLossClassesViewReducer';
|
|
222
221
|
import { getProfitAndLossClassesView } from './view/profitAndLossClassesView/profitAndLossClassesViewSelector';
|
|
223
222
|
import { isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, } from './view/profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
|
|
224
223
|
import { fetchEntityRecommendationsByTransactionId, fetchRecommendationByEntityId, fetchRecommendationByEntityName, } from './view/recommendation/recommendationReducer';
|
|
@@ -452,7 +451,7 @@ export { fetchDashboard, getDashboard, updateTreasuryVideoClosed, };
|
|
|
452
451
|
export { updateDashboardLayout };
|
|
453
452
|
export { getPandLWithForecast, } from './view/profitAndLoss/pAndLWithForecast/pAndLWithForecastSelector';
|
|
454
453
|
export { fetchProfitAndLoss, resetProfitAndLossNodeCollapseState, updateProfitAndLossUIState, getProfitAndLossReport, getPandLReportFetchState, fetchProfitAndLossForTimeframe, };
|
|
455
|
-
export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode,
|
|
454
|
+
export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, getProfitAndLossClassesView, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, };
|
|
456
455
|
export { getAccountingProviderAttachment };
|
|
457
456
|
export { fetchUserListByType, getUserList };
|
|
458
457
|
export { fetchAllPeopleRequiredViews, fetchPeoplePage, fetchPeople, deletePerson, resendInvite, changeZeniPersonRoles, invitePeople, inviteZeniPeople, updatePeopleUIState, peopleSaveUpdates, resetUpdateErrorMessage, peopleSaveDataInLocalStore, peopleClearDataInLocalStore, getPeople, getPeopleLocalData, initializeEditPerson, };
|
|
@@ -544,7 +543,7 @@ export { saveRealTimeApproval, updateIsEditModeRealTimeApprovals, };
|
|
|
544
543
|
export { deleteRemi, fetchRemiDetail, cancelAndDeleteRemi, approveOrRejectRemi, clearRemiDetailView, fetchDuplicateReimbursement, clearDuplicateReimbursementDetail, removeDuplicateReimbursementByLineId, };
|
|
545
544
|
export { getEditRemiDetail, };
|
|
546
545
|
export { fetchEditRemiDetailPage, fetchRecommendationsAndUpdateMerchantRecommendations, fetchRemiAndInitializeLocalStore, initializeRemiToLocalStore, saveRemiUpdatesToLocalStore, fetchCurrencyConversionValue, discardRemiUpdatesInLocalStore, removeFileFromRemiUpdatesInLocalStore, saveRemiDetail, saveRemiSuccessOrFailure, parseReceiptsToRemi, clearEditRemiViewDetail, updateAddRemiAutoFields, updateUploadFetchState, updateTentativeMerchantNames, clearTentativeMerchantName, updateReimbursementType, updateHomeCurrencyConversion, clearAddRemiAutoFields, };
|
|
547
|
-
export { reduceFetchState,
|
|
546
|
+
export { reduceFetchState, reduceAnyFetchState, reduceAllFetchState, reduceAnyCompletedFetchState, isAnyFetchInProgress, isAllFetchCompleted, ALL_FILE_TYPES, toFileTypeStrict, };
|
|
548
547
|
export { getNextNthWorkingDay, getPreviousNthWorkingDay, isHolidayToday, filterDays, getYearsList, isHoliday, holidaysFormatted, PAYMENT_BUSINESS_DAYS, };
|
|
549
548
|
export { fetchCompanyOnboardingView, fetchQBOConnectionPool, updateQBOConnectionPoolExternalConnection, fetchOnboardingCompletedCompanies, saveOnboardingCustomerCompletedStatus, toProductType, toProductTypeStrict, getOnboardingCockpitView, getNewOnboardingCustomerView, getOnboardingEmailGroup, initializeOnboardingCustomerViewUpdateData, clearOnboardingCustomerViewUpdateData, saveOnboardingCustomerViewUpdateData, updateOnboardingCustomerListUIState, updateCustomerCreationStatus, updateStatusAfterOnboardingCompleted, saveOnboardingCustomerViewUpdates, saveOnboardingCustomerNotes, saveOnboardingCustomerDataInLocalStore, updateOnboardingCustomerDataInLocalStore, resetNewOnboardedCustomerId, sendOnboardingCustomerViewInvite, retryBankAccountConnectionForOnboarding, };
|
|
550
549
|
export { getTransactionsListByCategoryType, getTransactionListUIStateByCategoryType, };
|
package/lib/esm/reducer.js
CHANGED
|
@@ -58,6 +58,7 @@ import toastNotification, { initialState as initialToastNotificationState, } fro
|
|
|
58
58
|
import transaction, { initialState as initialTransactionState, } from './entity/transaction/transactionReducer';
|
|
59
59
|
import transactionActivityLog, { initialState as initialTransactionActivityLogState, } from './entity/transactionActivityLog/transactionActivityLogReducer';
|
|
60
60
|
import user, { initialState as initialUserState, } from './entity/user/userReducer';
|
|
61
|
+
import userGroups, { initialState as initialUserGroupsState, } from './entity/userGroups/userGroupsReducer';
|
|
61
62
|
import userRole, { initialState as initialUserRoleState, } from './entity/userRole/userRoleReducer';
|
|
62
63
|
import vendor, { initialState as initialVendorState, } from './entity/vendor/vendorReducer';
|
|
63
64
|
import vendorExpense, { initialState as initialVendorExpenseState, } from './entity/vendorExpense/vendorExpenseReducer';
|
|
@@ -198,6 +199,7 @@ import trend, { initialTrendState } from './view/trend/trendReducer';
|
|
|
198
199
|
import trendWithTransactions, { initialTrendWithTransactionsState, } from './view/trendWithTransactions/trendWithTransactionsReducer';
|
|
199
200
|
import twoFactorAuthentication, { initialState as initialTwoFactorAuthenticationState, } from './view/twoFactorAuthentication/twoFactorAuthenticationReducer';
|
|
200
201
|
import userFinancialAccountState, { initialState as initialUserFinancialAccountState, } from './view/userFinancialAccount/userFinancialAccountReducer';
|
|
202
|
+
import userGroupListView, { initialState as initialUserGroupListViewState, } from './view/userGroupListView/userGroupListViewReducer';
|
|
201
203
|
import userListView, { initialState as initialUserListViewState, } from './view/userListView/userListViewReducer';
|
|
202
204
|
import userRoleConfig, { initialState as initialUserRoleConfigState, } from './view/userRoleConfigView/userRoleConfigReducer';
|
|
203
205
|
import vendor1099TypeList, { initialState as initialVendor1099TypeListState, } from './view/vendor1099TypeList/vendor1099TypeListReducer';
|
|
@@ -270,6 +272,7 @@ const initialEntitiesState = {
|
|
|
270
272
|
toastNotificationState: initialToastNotificationState,
|
|
271
273
|
transactionActivityLogState: initialTransactionActivityLogState,
|
|
272
274
|
transactionState: initialTransactionState,
|
|
275
|
+
userGroupsState: initialUserGroupsState,
|
|
273
276
|
userRoleState: initialUserRoleState,
|
|
274
277
|
userState: initialUserState,
|
|
275
278
|
vendorExpenseState: initialVendorExpenseState,
|
|
@@ -408,6 +411,7 @@ const initialViewsState = {
|
|
|
408
411
|
trendWithTransactionsState: initialTrendWithTransactionsState,
|
|
409
412
|
twoFactorAuthenticationState: initialTwoFactorAuthenticationState,
|
|
410
413
|
userFinancialAccountState: initialUserFinancialAccountState,
|
|
414
|
+
userGroupListViewState: initialUserGroupListViewState,
|
|
411
415
|
userListViewState: initialUserListViewState,
|
|
412
416
|
userRoleConfigState: initialUserRoleConfigState,
|
|
413
417
|
vendorFirstReviewViewState: initialVendorFirstReviewViewState,
|
|
@@ -492,6 +496,7 @@ const entityReducers = {
|
|
|
492
496
|
toastNotificationState: toastNotification,
|
|
493
497
|
transactionActivityLogState: transactionActivityLog,
|
|
494
498
|
transactionState: transaction,
|
|
499
|
+
userGroupsState: userGroups,
|
|
495
500
|
userRoleState: userRole,
|
|
496
501
|
userState: user,
|
|
497
502
|
vendorExpenseState: vendorExpense,
|
|
@@ -630,6 +635,7 @@ const viewReducers = {
|
|
|
630
635
|
trendWithTransactionsState: trendWithTransactions,
|
|
631
636
|
twoFactorAuthenticationState: twoFactorAuthentication,
|
|
632
637
|
userFinancialAccountState: userFinancialAccountState,
|
|
638
|
+
userGroupListViewState: userGroupListView,
|
|
633
639
|
userListViewState: userListView,
|
|
634
640
|
userRoleConfigState: userRoleConfig,
|
|
635
641
|
vendorFirstReviewViewState: vendorFirstReviewView,
|
|
@@ -44,20 +44,19 @@ const financeStatement = createSlice({
|
|
|
44
44
|
updateFinanceStatementThisPeriod(draft, action) {
|
|
45
45
|
const { firstMonthOfFY, coaBalances, maxNumOfPeriodsToHighlight } = action.payload;
|
|
46
46
|
const { timeframe, selectedCOABalancesRange } = draft;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const prevThisPeriod = extractThisPeriod(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, safeCoaBalances);
|
|
47
|
+
if (coaBalances.length > 0) {
|
|
48
|
+
const prevThisPeriod = extractThisPeriod(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, coaBalances);
|
|
50
49
|
if (prevThisPeriod != null) {
|
|
51
50
|
const selectedCoaBalancesRangeWithThisPeriod = {
|
|
52
51
|
...selectedCOABalancesRange,
|
|
53
52
|
thisPeriod: prevThisPeriod,
|
|
54
53
|
};
|
|
55
|
-
const newThisPeriod = getMatchingThisPeriod(action.payload.firstMonthOfFY, timeframe, action.payload.thisPeriod,
|
|
54
|
+
const newThisPeriod = getMatchingThisPeriod(action.payload.firstMonthOfFY, timeframe, action.payload.thisPeriod, coaBalances);
|
|
56
55
|
if (newThisPeriod != null) {
|
|
57
56
|
const selectionRanges = getSelectedAndHighlightedRangesForThisPeriod({
|
|
58
57
|
firstMonthOfFY,
|
|
59
58
|
thisPeriod: newThisPeriod,
|
|
60
|
-
coaBalances
|
|
59
|
+
coaBalances,
|
|
61
60
|
timeframe,
|
|
62
61
|
maxNumOfPeriodsToSelect: maxNumOfPeriodsToHighlight,
|
|
63
62
|
currentSelection: {
|
|
@@ -76,9 +75,7 @@ const financeStatement = createSlice({
|
|
|
76
75
|
draft.selectedReportId = action.payload;
|
|
77
76
|
},
|
|
78
77
|
updateFinanceStatementAdditionalBalancesSelection(draft, action) {
|
|
79
|
-
const { firstMonthOfFY, additionalBalances
|
|
80
|
-
const safeCoaBalances = coaBalances != null ? coaBalances : [];
|
|
81
|
-
const additionalBalances = additionalBalancesPayload ?? [];
|
|
78
|
+
const { firstMonthOfFY, additionalBalances, coaBalances, maxNumOfPeriodsToHighlight, } = action.payload;
|
|
82
79
|
let tempAdditionalBalances = [...additionalBalances];
|
|
83
80
|
if (additionalBalances.includes('this_period_vs_last_period') ||
|
|
84
81
|
additionalBalances.includes('this_period_vs_last_period_percent')) {
|
|
@@ -94,8 +91,8 @@ const financeStatement = createSlice({
|
|
|
94
91
|
draft.isAdditionalBalancesShown =
|
|
95
92
|
additionalBalances.length != 0 ? true : false;
|
|
96
93
|
const { timeframe, selectedCOABalancesRange } = draft;
|
|
97
|
-
if (
|
|
98
|
-
const thisPeriod = extractThisPeriod(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange,
|
|
94
|
+
if (coaBalances.length > 0) {
|
|
95
|
+
const thisPeriod = extractThisPeriod(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, coaBalances);
|
|
99
96
|
if (thisPeriod != null) {
|
|
100
97
|
const selectedCoaBalancesRangeWithThisPeriod = {
|
|
101
98
|
...selectedCOABalancesRange,
|
|
@@ -104,7 +101,7 @@ const financeStatement = createSlice({
|
|
|
104
101
|
const selectionRanges = getSelectedAndHighlightedRangesForThisPeriod({
|
|
105
102
|
firstMonthOfFY,
|
|
106
103
|
thisPeriod: thisPeriod,
|
|
107
|
-
coaBalances
|
|
104
|
+
coaBalances,
|
|
108
105
|
timeframe,
|
|
109
106
|
maxNumOfPeriodsToHighlight: maxNumOfPeriodsToHighlight,
|
|
110
107
|
currentSelection: {
|
|
@@ -8,7 +8,6 @@ import { extractThisPeriod } from '../../commonStateTypes/viewAndReport/thisPeri
|
|
|
8
8
|
import { getBalanceSheet } from '../balanceSheet/balanceSheetSelector';
|
|
9
9
|
import { getCashFlow } from '../cashFlow/cashFlowSelector';
|
|
10
10
|
import { getProfitAndLossReport, } from '../profitAndLoss/profitAndLossSelector';
|
|
11
|
-
import { getProfitAndLossClassesHorizontalView } from '../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector';
|
|
12
11
|
import { getProfitAndLossClassesView } from '../profitAndLossClassesView/profitAndLossClassesViewSelector';
|
|
13
12
|
function getDateRangeForFinanceReports(profitAndLossState, balanceSheetState, cashFlowState) {
|
|
14
13
|
const datesSorted = [
|
|
@@ -43,11 +42,11 @@ export const getFinanceStatement = createSelector((state) => state.accountState,
|
|
|
43
42
|
if (dataAvailable != null) {
|
|
44
43
|
const noFilter = newBalancesFilterForDateRange(firstMonthOfFY, financeStatementState.timeframe, dataAvailable, 'ascending_date', []);
|
|
45
44
|
const profitAndLossForTimeframeTicks = getProfitAndLossReport(noFilter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
if (profitAndLossForTimeframeTicks.sections.expenses != null) {
|
|
46
|
+
balancesInTimeframe =
|
|
47
|
+
profitAndLossForTimeframeTicks.sections.expenses.balances.length > 0
|
|
48
|
+
? profitAndLossForTimeframeTicks.sections['expenses'].balances
|
|
49
|
+
: profitAndLossForTimeframeTicks.sections['income'].balances;
|
|
51
50
|
allTimeframeTicks = balancesInTimeframe.map((balance) => toTimeframeTick(balance));
|
|
52
51
|
}
|
|
53
52
|
}
|
|
@@ -61,9 +60,6 @@ export const getFinanceStatement = createSelector((state) => state.accountState,
|
|
|
61
60
|
const profitAndLossReport = getProfitAndLossReport(filter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
|
|
62
61
|
const classFilter = newBalancesFilterClassesView(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, profitAndLossClassesViewState.uiState.classesToFilterOut);
|
|
63
62
|
const profitAndLossByClassReport = getProfitAndLossClassesView(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState);
|
|
64
|
-
const profitAndLossByClassHorizontalReport = getProfitAndLossClassesHorizontalView(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState, profitAndLossClassesViewState.uiState.classViewLayout === 'horizontal'
|
|
65
|
-
? thisPeriod
|
|
66
|
-
: undefined);
|
|
67
63
|
const balanceSheetReport = getBalanceSheet(filter, accountState, accountGroupState, sectionAccountsViewState, balanceSheetState);
|
|
68
64
|
const cashFlowReport = getCashFlow(filter, accountState, accountGroupState, sectionAccountsViewState, cashFlowState);
|
|
69
65
|
const allReports = [
|
|
@@ -111,7 +107,6 @@ export const getFinanceStatement = createSelector((state) => state.accountState,
|
|
|
111
107
|
dataAvailable,
|
|
112
108
|
profitAndLossReport,
|
|
113
109
|
profitAndLossByClassReport,
|
|
114
|
-
profitAndLossByClassHorizontalReport,
|
|
115
110
|
balanceSheetReport,
|
|
116
111
|
cashFlowReport,
|
|
117
112
|
filter,
|
|
@@ -23,7 +23,6 @@ export const initialState = {
|
|
|
23
23
|
nodeCollapseState: {},
|
|
24
24
|
scrollPosition: undefined,
|
|
25
25
|
accountViewMode: 'account_group',
|
|
26
|
-
classViewLayout: 'vertical',
|
|
27
26
|
classesToFilterOut: [],
|
|
28
27
|
},
|
|
29
28
|
firstMonthOfFY: 1,
|
|
@@ -95,9 +94,6 @@ const profitAndLossClassesView = createSlice({
|
|
|
95
94
|
updateAccountViewMode(draft, action) {
|
|
96
95
|
draft.uiState.accountViewMode = action.payload.viewMode;
|
|
97
96
|
},
|
|
98
|
-
updateClassViewLayout(draft, action) {
|
|
99
|
-
draft.uiState.classViewLayout = action.payload.classViewLayout;
|
|
100
|
-
},
|
|
101
97
|
resetProfitAndLossClassesNodeCollapseState(draft) {
|
|
102
98
|
draft.uiState.nodeCollapseState = {};
|
|
103
99
|
},
|
|
@@ -106,11 +102,10 @@ const profitAndLossClassesView = createSlice({
|
|
|
106
102
|
},
|
|
107
103
|
},
|
|
108
104
|
});
|
|
109
|
-
export const { fetchProfitAndLossClassesView, fetchProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesViewFailure, updateClassesToFilterOut, updateProfitAndLossClassesViewUIState, updateAccountViewMode,
|
|
105
|
+
export const { fetchProfitAndLossClassesView, fetchProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesView, updateProfitAndLossForTimeframeClassesViewFailure, updateClassesToFilterOut, updateProfitAndLossClassesViewUIState, updateAccountViewMode, resetProfitAndLossClassesNodeCollapseState, clearProfitAndLossClassesView, } = profitAndLossClassesView.actions;
|
|
110
106
|
export default profitAndLossClassesView.reducer;
|
|
111
107
|
const doUpdatedProfitAndLossClassesView = (draft, timeframe, pandLReport) => {
|
|
112
108
|
const report = mapReportPayloadV2ToReportV2(pandLReport.report);
|
|
113
|
-
draft.currency = report.currency;
|
|
114
109
|
draft.dataAvailable = report.dataAvailable;
|
|
115
110
|
draft.firstMonthOfFY = report.firstMonthOfFY;
|
|
116
111
|
draft.bookCloseDate = report.bookCloseDate;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getDifferenceOfBalancesGroupedByPeriod } from '../../commonStateTypes/coaBalance/classBalances/getDifferenceOfBalancesGroupedByPeriod';
|
|
2
2
|
import { getSumOfBalancesByGroupedByPeriod } from '../../commonStateTypes/coaBalance/classBalances/getSumOfBalancesGroupedByPeriod';
|
|
3
3
|
import { getCOABalances } from '../../commonStateTypes/coaBalance/coaBalance';
|
|
4
|
-
import { reduceFetchStateParallelTimeframes } from '../../commonStateTypes/reduceFetchState';
|
|
5
4
|
import { getSectionClassesViewReport } from '../../entity/sectionClassesViewV2/sectionClassesViewSelector';
|
|
6
5
|
import { ALL_PANDL_REPORT_VIEW_SECTION_IDS, } from './profitAndLossClassesViewSelectorTypes';
|
|
7
6
|
export const profitAndLossIdsInOrder = [
|
|
@@ -16,7 +15,7 @@ export const profitAndLossIdsInOrder = [
|
|
|
16
15
|
'netIncome',
|
|
17
16
|
];
|
|
18
17
|
export const getProfitAndLossClassesView = (filter, accountState, classState, sectionsState, profitAndLossClassesViewState) => {
|
|
19
|
-
const fetchState =
|
|
18
|
+
const fetchState = reduceFetchState([
|
|
20
19
|
profitAndLossClassesViewState.fetchState.month,
|
|
21
20
|
profitAndLossClassesViewState.fetchState.quarter,
|
|
22
21
|
profitAndLossClassesViewState.fetchState.year,
|
|
@@ -65,3 +64,31 @@ export const getProfitAndLossClassesView = (filter, accountState, classState, se
|
|
|
65
64
|
idsInOrder: profitAndLossIdsInOrder,
|
|
66
65
|
};
|
|
67
66
|
};
|
|
67
|
+
function reduceFetchState(fetchStateList) {
|
|
68
|
+
const isAnyProgress = fetchStateList.reduce((prevValue, currentValue) => {
|
|
69
|
+
return prevValue === true || currentValue.fetchState === 'In-Progress';
|
|
70
|
+
}, false);
|
|
71
|
+
const isAllCompleted = fetchStateList.reduce((prevValue, currentValue) => {
|
|
72
|
+
return prevValue === true && currentValue.fetchState === 'Completed';
|
|
73
|
+
}, true);
|
|
74
|
+
const isAnyError = fetchStateList.reduce((prevValue, currentValue) => {
|
|
75
|
+
return prevValue === true || currentValue.fetchState === 'Error';
|
|
76
|
+
}, false);
|
|
77
|
+
const error = fetchStateList.reduce((prevValue, currentValue) => {
|
|
78
|
+
return prevValue ?? currentValue.error;
|
|
79
|
+
}, undefined);
|
|
80
|
+
let fetchState = 'Not-Started';
|
|
81
|
+
if (isAnyProgress) {
|
|
82
|
+
fetchState = 'In-Progress';
|
|
83
|
+
}
|
|
84
|
+
else if (isAllCompleted) {
|
|
85
|
+
fetchState = 'Completed';
|
|
86
|
+
}
|
|
87
|
+
else if (isAnyError) {
|
|
88
|
+
fetchState = 'Error';
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
fetchState,
|
|
92
|
+
error,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
@@ -24,13 +24,11 @@ export const fetchProfitAndLossForTimeframeClassesViewEpic = (actions$, _, zeniA
|
|
|
24
24
|
.pipe(mergeMap((response) => {
|
|
25
25
|
if (response.data != null && isSuccessResponse(response)) {
|
|
26
26
|
const actions = [];
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
actions.push(updateSectionClassesView(action.payload.timeframe, '
|
|
30
|
-
actions.push(updateSectionClassesView(action.payload.timeframe, '
|
|
31
|
-
actions.push(updateSectionClassesView(action.payload.timeframe, '
|
|
32
|
-
actions.push(updateSectionClassesView(action.payload.timeframe, 'otherExpenses', 'profit_and_loss_by_classes', report.other_expenses, report.classes, report.accounts, currency));
|
|
33
|
-
actions.push(updateSectionClassesView(action.payload.timeframe, 'otherIncome', 'profit_and_loss_by_classes', report.other_income, report.classes, report.accounts, currency));
|
|
27
|
+
actions.push(updateSectionClassesView(action.payload.timeframe, 'cogs', 'profit_and_loss_by_classes', response.data.report.cogs, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
|
|
28
|
+
actions.push(updateSectionClassesView(action.payload.timeframe, 'expenses', 'profit_and_loss_by_classes', response.data.report.expenses, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
|
|
29
|
+
actions.push(updateSectionClassesView(action.payload.timeframe, 'income', 'profit_and_loss_by_classes', response.data.report.income, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
|
|
30
|
+
actions.push(updateSectionClassesView(action.payload.timeframe, 'otherExpenses', 'profit_and_loss_by_classes', response.data.report.other_expenses, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
|
|
31
|
+
actions.push(updateSectionClassesView(action.payload.timeframe, 'otherIncome', 'profit_and_loss_by_classes', response.data.report.other_income, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
|
|
34
32
|
actions.push(updateProfitAndLossForTimeframeClassesView({
|
|
35
33
|
timeframe: action.payload.timeframe,
|
|
36
34
|
report: response.data,
|
|
@@ -2,19 +2,15 @@ import { of } from 'rxjs';
|
|
|
2
2
|
import { filter, switchMap } from 'rxjs/operators';
|
|
3
3
|
import { updateCashInCashOutCOABalancesRange } from '../cashInCashOut/cashInCashOutReducer';
|
|
4
4
|
import { updateCashPositionCOABalancesRange } from '../cashPosition/cashPositionReducer';
|
|
5
|
-
import { updateCOABalancesRange } from '../financeStatement/financeStatementReducer';
|
|
5
|
+
import { initialFinanceStatementState, updateCOABalancesRange, } from '../financeStatement/financeStatementReducer';
|
|
6
6
|
import { updateNetBurnOrIncomeCOABalancesRange } from '../netBurnOrIncome/netBurnOrIncomeReducer';
|
|
7
7
|
import { updateOpExCOABalancesRange } from '../opEx/opExReducer';
|
|
8
8
|
import { updateRevenueCOABalancesRange } from '../revenue/revenueReducer';
|
|
9
9
|
import { updateReportUIOptionCOABalancesRange } from './reportUIOptionsReducer';
|
|
10
10
|
export const updateReportUIOptionCOABalancesRangeEpic = (actions$, state$) => actions$.pipe(filter(updateReportUIOptionCOABalancesRange.match), switchMap((action) => {
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const numberOfPeriodsFromSelection = selectedRange.numberOfPeriods;
|
|
15
|
-
const highlightedNoOfPeriods = state$.value.reportUIOptionsState.isCompareModeOn === true
|
|
16
|
-
? numberOfPeriodsFromSelection
|
|
17
|
-
: 1;
|
|
11
|
+
const thisPeriod = action.payload.selectedCOABalancesRange.thisPeriod;
|
|
12
|
+
const orderBy = action.payload.selectedCOABalancesRange.orderBy;
|
|
13
|
+
const highlightedNoOfPeriods = state$.value.reportUIOptionsState.isCompareModeOn === true ? 4 : 1;
|
|
18
14
|
const highlightedCOABalancesRange = action.payload.highlightedCOABalancesRange == null && thisPeriod != null
|
|
19
15
|
? {
|
|
20
16
|
numberOfPeriods: highlightedNoOfPeriods,
|
|
@@ -66,7 +62,9 @@ export const updateReportUIOptionCOABalancesRangeEpic = (actions$, state$) => ac
|
|
|
66
62
|
thisPeriod: action.payload.highlightedCOABalancesRange != null
|
|
67
63
|
? action.payload.highlightedCOABalancesRange.thisPeriod
|
|
68
64
|
: thisPeriod,
|
|
69
|
-
numberOfPeriods:
|
|
65
|
+
numberOfPeriods: state$.value.reportUIOptionsState.isCompareModeOn === true
|
|
66
|
+
? 4
|
|
67
|
+
: initialFinanceStatementState.maxNumOfPeriodsToHighlight,
|
|
70
68
|
orderBy,
|
|
71
69
|
}));
|
|
72
70
|
}));
|
|
@@ -11,6 +11,7 @@ import { getTaskGroupTemplateByIds } from '../../../entity/taskGroupTemplate/tas
|
|
|
11
11
|
import { getUserName, getUsersByUserIds, } from '../../../entity/user/userSelector';
|
|
12
12
|
import { getUserAndUserRole, } from '../../companyView/types/userAndRole';
|
|
13
13
|
import { applyAdvancedFiltersOnList } from '../../spendManagement/spendManagementFilterHelpers';
|
|
14
|
+
import { getUserGroupList } from '../../userGroupListView/userGroupListViewSelector';
|
|
14
15
|
import { getUserList, } from '../../userListView/userListViewSelector';
|
|
15
16
|
import { allTaskPriority, allTaskStatus, } from '../taskDetailView/taskDetailSelector';
|
|
16
17
|
import { DUE_DATE_GROUP_KEYS, } from './taskList';
|
|
@@ -308,7 +309,7 @@ const getTaskGroupsWithTaskList = ({ taskListState, taskState, userState, userRo
|
|
|
308
309
|
tagState,
|
|
309
310
|
});
|
|
310
311
|
};
|
|
311
|
-
export const getAllTasks = createSelector((state) => state.taskListState, (state) => state.taskState, (state) => state.userState, (state) => state.userRoleState, (state) => state.userListViewState, (state) => state.addressState, (state) => state.taskGroupState, (state) => state.taskGroupViewState, (state) => state.tagViewState, (state) => state.tagState, (state) => state.taskGroupTemplateState, (state) => state.taskGroupTemplateViewState, (_state, isTaskTemplatesEnabled) => isTaskTemplatesEnabled, (taskListState, taskState, userState, userRoleState, userListViewState, addressState, taskGroupState, taskGroupViewState, tagViewState, tagState, taskGroupTemplateState, taskGroupTemplateViewState, isTaskTemplatesEnabled) => {
|
|
312
|
+
export const getAllTasks = createSelector((state) => state.taskListState, (state) => state.taskState, (state) => state.userState, (state) => state.userRoleState, (state) => state.userListViewState, (state) => state.addressState, (state) => state.taskGroupState, (state) => state.taskGroupViewState, (state) => state.tagViewState, (state) => state.tagState, (state) => state.taskGroupTemplateState, (state) => state.taskGroupTemplateViewState, (state) => state.userGroupsState, (state) => state.userGroupListViewState, (_state, isTaskTemplatesEnabled) => isTaskTemplatesEnabled, (taskListState, taskState, userState, userRoleState, userListViewState, addressState, taskGroupState, taskGroupViewState, tagViewState, tagState, taskGroupTemplateState, taskGroupTemplateViewState, userGroupsState, userGroupListViewState, isTaskTemplatesEnabled) => {
|
|
312
313
|
const { localData } = taskListState;
|
|
313
314
|
const taskGroupsWithTasksList = getTaskGroupsWithTaskList({
|
|
314
315
|
taskListState,
|
|
@@ -336,6 +337,7 @@ export const getAllTasks = createSelector((state) => state.taskListState, (state
|
|
|
336
337
|
taskGroupTemplates,
|
|
337
338
|
fetchState: fetchState,
|
|
338
339
|
userList: getUserList(userState, userRoleState, userListViewState, 'taskManagerCandidate'),
|
|
340
|
+
userGroupList: getUserGroupList(userGroupsState, userGroupListViewState, 'taskManagerCandidate'),
|
|
339
341
|
error: error,
|
|
340
342
|
version: 0,
|
|
341
343
|
taskGroupsWithTasksList,
|