@zeniai/client-epic-state 5.1.68 → 5.1.69
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/esm/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +8 -2
- package/lib/esm/view/spendManagement/helpers.js +12 -0
- package/lib/esm/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +0 -12
- package/lib/esm/view/spendManagement/reimbursement/remiDetailView/remiDetailViewSelector.js +4 -2
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.d.ts +1 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +7 -1
- package/lib/view/spendManagement/helpers.d.ts +1 -0
- package/lib/view/spendManagement/helpers.js +14 -1
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.d.ts +1 -2
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +0 -12
- package/lib/view/spendManagement/reimbursement/remiDetailView/remiDetailViewSelector.d.ts +1 -0
- package/lib/view/spendManagement/reimbursement/remiDetailView/remiDetailViewSelector.js +3 -1
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ import { getUserByUserId } from '../../../../entity/user/userSelector';
|
|
|
13
13
|
import { getUserRoleByUserId } from '../../../../entity/userRole/userRoleSelector';
|
|
14
14
|
import { getActivityHistory, } from '../../commonHistoryView/commonHistorySelector';
|
|
15
15
|
import { getAllFundingAccounts, } from '../../commonSetup/setupViewSelector';
|
|
16
|
-
import { getLatestApprovalDate, isAwaitingMarkAsPaid, isSodAdminFallbackEligibleForStep, isSodExcludedViewerBlocked, } from '../../helpers';
|
|
16
|
+
import { getLatestApprovalDate, isAwaitingMarkAsPaid, isSodAdminFallbackEligibleForStep, isSodExcludedViewerBlocked, shouldShowSodAdminLabel, } from '../../helpers';
|
|
17
17
|
import { getActivityRealTimeApproval, } from '../../realTimeApprovalView/realTimeApprovalSelector';
|
|
18
18
|
import { getEntityRealTimeApprovalDetailKey } from '../../realTimeApprovalView/realTimeApprovalState';
|
|
19
19
|
import { getBillPaymentSubConfigCodeKey, getInternationalSubConfigCodeKey, getInternationalWireMethodCodeKey, } from '../billPayConfig/billPayConfigPayload';
|
|
@@ -22,7 +22,12 @@ import { getBillPayConfigMethodKey, toBillPaymentSubConfigCodeKeyType, } from '.
|
|
|
22
22
|
import { getPreviousBills, } from '../previousBills/previousBillsSelector';
|
|
23
23
|
import { getBillTransactionDetailKey, initialBillDetailView, } from './billDetailViewState';
|
|
24
24
|
export const getBillActivities = (state, billId, billStageCode) => {
|
|
25
|
-
const { billDetailViewState, approvalRuleState, entityApprovalStatusState, userState, } = state;
|
|
25
|
+
const { billDetailViewState, approvalRuleState, entityApprovalStatusState, userState, billTransactionState, } = state;
|
|
26
|
+
// Note: createdBy is undefined until billTransactionState is populated.
|
|
27
|
+
// getBillActivities is called from getBillDetailView which runs after the
|
|
28
|
+
// bill entity epic completes — this assumption must hold for showSodAdminLabel
|
|
29
|
+
// to render on first paint.
|
|
30
|
+
const createdBy = billTransactionState.transactionById[billId]?.createdBy;
|
|
26
31
|
const key = getBillTransactionDetailKey(billId);
|
|
27
32
|
const billDetail = recordGet(billDetailViewState.billDetailById, key, undefined);
|
|
28
33
|
let billActivities = [];
|
|
@@ -85,6 +90,7 @@ export const getBillActivities = (state, billId, billStageCode) => {
|
|
|
85
90
|
actorsActivity,
|
|
86
91
|
isOriginalApprovalStep: step.isOriginalApprovalStep,
|
|
87
92
|
displayPendingApproverAsAdmin: isSodAdminFallbackEligibleForStep(sodExcludedApproverUserId, isAdminFallbackApprover, actorsActivity),
|
|
93
|
+
showSodAdminLabel: shouldShowSodAdminLabel(sodExcludedApproverUserId, actorsActivity, createdBy),
|
|
88
94
|
};
|
|
89
95
|
}),
|
|
90
96
|
};
|
|
@@ -19,6 +19,18 @@ export const isSodAdminFallbackEligibleForStep = (sodExcludedApproverUserId, isA
|
|
|
19
19
|
return (pendingResolvedApprovers.length > 0 &&
|
|
20
20
|
pendingResolvedApprovers.every((activity) => getUserActorId(activity) === sodExcludedApproverUserId));
|
|
21
21
|
};
|
|
22
|
+
const isSodExcludedUserSolePendingApproverOnStep = (sodExcludedApproverUserId, stepActorsActivity = []) => {
|
|
23
|
+
if (sodExcludedApproverUserId == null) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
const pendingResolvedApprovers = stepActorsActivity.filter((activity) => activity.activity === 'pending' && getUserActorId(activity) != null);
|
|
27
|
+
return (pendingResolvedApprovers.length > 0 &&
|
|
28
|
+
pendingResolvedApprovers.every((activity) => getUserActorId(activity) === sodExcludedApproverUserId));
|
|
29
|
+
};
|
|
30
|
+
export const shouldShowSodAdminLabel = (sodExcludedApproverUserId, stepActorsActivity = [], entitySubjectUserId) => sodExcludedApproverUserId != null &&
|
|
31
|
+
entitySubjectUserId != null &&
|
|
32
|
+
sodExcludedApproverUserId === entitySubjectUserId &&
|
|
33
|
+
isSodExcludedUserSolePendingApproverOnStep(sodExcludedApproverUserId, stepActorsActivity);
|
|
22
34
|
export const getLatestApprovalDate = (allActivities) => {
|
|
23
35
|
let allStepsWithStatus = [];
|
|
24
36
|
let allApprovedActions = [];
|
package/lib/esm/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js
CHANGED
|
@@ -6,7 +6,6 @@ import { fetchUserFinancialAccount } from '../../../../userFinancialAccount/user
|
|
|
6
6
|
import { getLatestCreatedUserBankAccount } from '../../../../userFinancialAccount/userFinancialAccountSelector';
|
|
7
7
|
import { fetchMerchantList } from '../../../merchantList/merchantListReducer';
|
|
8
8
|
import { fetchReimbursementConfig } from '../../reimbursementConfig/reimbursementConfigReducer';
|
|
9
|
-
import { fetchRemiSetupApproverView } from '../../remiSetupApproverView/remiSetupApproverViewReducer';
|
|
10
9
|
import { fetchEditRemiDetailPage, fetchRemiAndInitializeLocalStore, updatesPaymentToInLocalStore, } from '../editRemiViewReducer';
|
|
11
10
|
export const fetchEditRemiDetailPageEpic = (actions$, state$) => actions$.pipe(filter(fetchEditRemiDetailPage.match), mergeMap((action) => {
|
|
12
11
|
const { cacheOverride, isLimitedCategoryEnabled, reimbursementId, isShowDeletedReimbursementEnabled, } = action.payload;
|
|
@@ -59,17 +58,6 @@ export const fetchEditRemiDetailPageEpic = (actions$, state$) => actions$.pipe(f
|
|
|
59
58
|
if (reimbursementId != null) {
|
|
60
59
|
remiDetailActions.push(fetchRemiAndInitializeLocalStore(reimbursementId, false, isShowDeletedReimbursementEnabled));
|
|
61
60
|
}
|
|
62
|
-
else {
|
|
63
|
-
const approvalRules = state.remiSetupApproverViewState;
|
|
64
|
-
if (approvalRules.fetchState !== 'Completed' &&
|
|
65
|
-
approvalRules.fetchState !== 'In-Progress') {
|
|
66
|
-
// Side-fetch from the edit-reim page bootstrap. The
|
|
67
|
-
// triggering action doesn't carry the V3 flag, so we
|
|
68
|
-
// explicitly target v1; v3 tenants re-fetch via their
|
|
69
|
-
// own screen connector.
|
|
70
|
-
remiDetailActions.push(fetchRemiSetupApproverView(true, false, false, false));
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
61
|
}
|
|
74
62
|
return concat(from(remiDetailActions));
|
|
75
63
|
}));
|
|
@@ -7,7 +7,7 @@ import { getEntityApprovalStatusByIds } from '../../../../entity/entityApprovalS
|
|
|
7
7
|
import { getUserByUserId } from '../../../../entity/user/userSelector';
|
|
8
8
|
import { getUserRoleByUserId } from '../../../../entity/userRole/userRoleSelector';
|
|
9
9
|
import { getActivityHistory, } from '../../commonHistoryView/commonHistorySelector';
|
|
10
|
-
import { getLatestApprovalDate, isSodAdminFallbackEligibleForStep, isSodExcludedViewerBlocked, } from '../../helpers';
|
|
10
|
+
import { getLatestApprovalDate, isSodAdminFallbackEligibleForStep, isSodExcludedViewerBlocked, shouldShowSodAdminLabel, } from '../../helpers';
|
|
11
11
|
import { getActivityRealTimeApproval, } from '../../realTimeApprovalView/realTimeApprovalSelector';
|
|
12
12
|
import { getReimbursementConfigByKey } from '../reimbursementConfig/reimbursementConfigSelector';
|
|
13
13
|
import { REIMBURSEMENT_PAYMENT_NUMBER_OF_DAYS } from '../reimbursementConfig/reimbursementConfigState';
|
|
@@ -110,7 +110,8 @@ export const getRemiDetailView = (state, reimbursementId) => {
|
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
112
|
export const getRemiActivities = (state, reimbursementId, billStageCode) => {
|
|
113
|
-
const { remiDetailViewState, approvalRuleState, entityApprovalStatusState, userState, } = state;
|
|
113
|
+
const { remiDetailViewState, approvalRuleState, entityApprovalStatusState, userState, reimbursementState, } = state;
|
|
114
|
+
const reimburseeUserId = reimbursementState.reimbursementById[reimbursementId]?.reimburseeUserId;
|
|
114
115
|
const remiTransactionDetails = recordGet(remiDetailViewState.remiDetailById, reimbursementId, undefined);
|
|
115
116
|
let remiActivities = [];
|
|
116
117
|
if (remiTransactionDetails != null) {
|
|
@@ -172,6 +173,7 @@ export const getRemiActivities = (state, reimbursementId, billStageCode) => {
|
|
|
172
173
|
actorsActivity,
|
|
173
174
|
isOriginalApprovalStep: step.isOriginalApprovalStep,
|
|
174
175
|
displayPendingApproverAsAdmin: isSodAdminFallbackEligibleForStep(sodExcludedApproverUserId, isAdminFallbackApprover, actorsActivity),
|
|
176
|
+
showSodAdminLabel: shouldShowSodAdminLabel(sodExcludedApproverUserId, actorsActivity, reimburseeUserId),
|
|
175
177
|
};
|
|
176
178
|
}),
|
|
177
179
|
};
|
|
@@ -55,6 +55,7 @@ export interface StepWithStatus extends StepWithUser {
|
|
|
55
55
|
actorsActivity: ActorActivityWithUser[];
|
|
56
56
|
isOriginalApprovalStep: boolean;
|
|
57
57
|
displayPendingApproverAsAdmin?: boolean;
|
|
58
|
+
showSodAdminLabel?: boolean;
|
|
58
59
|
}
|
|
59
60
|
export interface ActorActivityWithUser {
|
|
60
61
|
activity: ActivityStatus;
|
|
@@ -28,7 +28,12 @@ const billPayConfigState_1 = require("../billPayConfig/billPayConfigState");
|
|
|
28
28
|
const previousBillsSelector_1 = require("../previousBills/previousBillsSelector");
|
|
29
29
|
const billDetailViewState_1 = require("./billDetailViewState");
|
|
30
30
|
const getBillActivities = (state, billId, billStageCode) => {
|
|
31
|
-
const { billDetailViewState, approvalRuleState, entityApprovalStatusState, userState, } = state;
|
|
31
|
+
const { billDetailViewState, approvalRuleState, entityApprovalStatusState, userState, billTransactionState, } = state;
|
|
32
|
+
// Note: createdBy is undefined until billTransactionState is populated.
|
|
33
|
+
// getBillActivities is called from getBillDetailView which runs after the
|
|
34
|
+
// bill entity epic completes — this assumption must hold for showSodAdminLabel
|
|
35
|
+
// to render on first paint.
|
|
36
|
+
const createdBy = billTransactionState.transactionById[billId]?.createdBy;
|
|
32
37
|
const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId);
|
|
33
38
|
const billDetail = (0, get_1.default)(billDetailViewState.billDetailById, key, undefined);
|
|
34
39
|
let billActivities = [];
|
|
@@ -91,6 +96,7 @@ const getBillActivities = (state, billId, billStageCode) => {
|
|
|
91
96
|
actorsActivity,
|
|
92
97
|
isOriginalApprovalStep: step.isOriginalApprovalStep,
|
|
93
98
|
displayPendingApproverAsAdmin: (0, helpers_1.isSodAdminFallbackEligibleForStep)(sodExcludedApproverUserId, isAdminFallbackApprover, actorsActivity),
|
|
99
|
+
showSodAdminLabel: (0, helpers_1.shouldShowSodAdminLabel)(sodExcludedApproverUserId, actorsActivity, createdBy),
|
|
94
100
|
};
|
|
95
101
|
}),
|
|
96
102
|
};
|
|
@@ -17,6 +17,7 @@ import { RemiActivity } from './reimbursement/remiDetailView/remiDetailViewSelec
|
|
|
17
17
|
export declare const isUserActorOnApprovalStep: (userId: ID, stepActorsActivity: ActorActivityWithUser[]) => boolean;
|
|
18
18
|
export declare const isSodExcludedViewerBlocked: (sodExcludedApproverUserId?: ID, signedInUserId?: ID, stepActorsActivity?: ActorActivityWithUser[]) => boolean;
|
|
19
19
|
export declare const isSodAdminFallbackEligibleForStep: (sodExcludedApproverUserId?: ID, isAdminFallbackApprover?: boolean, stepActorsActivity?: ActorActivityWithUser[]) => boolean;
|
|
20
|
+
export declare const shouldShowSodAdminLabel: (sodExcludedApproverUserId?: ID, stepActorsActivity?: ActorActivityWithUser[], entitySubjectUserId?: ID) => boolean;
|
|
20
21
|
export declare const getLatestApprovalDate: (allActivities: BillActivity[] | RemiActivity[]) => ZeniDate | undefined;
|
|
21
22
|
export declare function getSpendManagementEffectiveListPeriod(): import("../..").TimePeriod;
|
|
22
23
|
export declare const getSelectedCompanyOfficer: (verificationDetails: BusinessVerificationDetails) => CompanyOfficersDetails | undefined;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.toSameDayAchDisablementConfig = exports.checkIfLowBalance = exports.getReportIDPlusForecastIDFromSetupViewType = exports.isAwaitingMarkAsPaid = exports.isPaymentMethodOutsideZeni = exports.toAccountsPromoConfig = exports.getBulkOperationSuffix = exports.getRemiListUniqueType = exports.getBillListUniqueType = exports.isBulkProcessing = exports.getActualPaymentDate = exports.accountTypeSubConfigCodeToAccType = exports.isRecurringConfigChanged = exports.updateRecurringBillDetails = exports.getPaymentDateFromVendorReceiveDate = exports.getSelectedCompanyOfficer = exports.getLatestApprovalDate = exports.isSodAdminFallbackEligibleForStep = exports.isSodExcludedViewerBlocked = exports.isUserActorOnApprovalStep = void 0;
|
|
6
|
+
exports.toSameDayAchDisablementConfig = exports.checkIfLowBalance = exports.getReportIDPlusForecastIDFromSetupViewType = exports.isAwaitingMarkAsPaid = exports.isPaymentMethodOutsideZeni = exports.toAccountsPromoConfig = exports.getBulkOperationSuffix = exports.getRemiListUniqueType = exports.getBillListUniqueType = exports.isBulkProcessing = exports.getActualPaymentDate = exports.accountTypeSubConfigCodeToAccType = exports.isRecurringConfigChanged = exports.updateRecurringBillDetails = exports.getPaymentDateFromVendorReceiveDate = exports.getSelectedCompanyOfficer = exports.getLatestApprovalDate = exports.shouldShowSodAdminLabel = exports.isSodAdminFallbackEligibleForStep = exports.isSodExcludedViewerBlocked = exports.isUserActorOnApprovalStep = void 0;
|
|
7
7
|
exports.getSpendManagementEffectiveListPeriod = getSpendManagementEffectiveListPeriod;
|
|
8
8
|
exports.showReimbursementPromoPage = showReimbursementPromoPage;
|
|
9
9
|
exports.showBillPayPromoPage = showBillPayPromoPage;
|
|
@@ -33,6 +33,19 @@ const isSodAdminFallbackEligibleForStep = (sodExcludedApproverUserId, isAdminFal
|
|
|
33
33
|
pendingResolvedApprovers.every((activity) => getUserActorId(activity) === sodExcludedApproverUserId));
|
|
34
34
|
};
|
|
35
35
|
exports.isSodAdminFallbackEligibleForStep = isSodAdminFallbackEligibleForStep;
|
|
36
|
+
const isSodExcludedUserSolePendingApproverOnStep = (sodExcludedApproverUserId, stepActorsActivity = []) => {
|
|
37
|
+
if (sodExcludedApproverUserId == null) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
const pendingResolvedApprovers = stepActorsActivity.filter((activity) => activity.activity === 'pending' && getUserActorId(activity) != null);
|
|
41
|
+
return (pendingResolvedApprovers.length > 0 &&
|
|
42
|
+
pendingResolvedApprovers.every((activity) => getUserActorId(activity) === sodExcludedApproverUserId));
|
|
43
|
+
};
|
|
44
|
+
const shouldShowSodAdminLabel = (sodExcludedApproverUserId, stepActorsActivity = [], entitySubjectUserId) => sodExcludedApproverUserId != null &&
|
|
45
|
+
entitySubjectUserId != null &&
|
|
46
|
+
sodExcludedApproverUserId === entitySubjectUserId &&
|
|
47
|
+
isSodExcludedUserSolePendingApproverOnStep(sodExcludedApproverUserId, stepActorsActivity);
|
|
48
|
+
exports.shouldShowSodAdminLabel = shouldShowSodAdminLabel;
|
|
36
49
|
const getLatestApprovalDate = (allActivities) => {
|
|
37
50
|
let allStepsWithStatus = [];
|
|
38
51
|
let allApprovedActions = [];
|
package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { fetchUserFinancialAccount } from '../../../../userFinancialAccount/user
|
|
|
7
7
|
import { fetchMerchantList } from '../../../merchantList/merchantListReducer';
|
|
8
8
|
import { fetchReimbursementConfig } from '../../reimbursementConfig/reimbursementConfigReducer';
|
|
9
9
|
import { fetchRemiDetail } from '../../remiDetailView/remiDetailViewReducer';
|
|
10
|
-
import { fetchRemiSetupApproverView } from '../../remiSetupApproverView/remiSetupApproverViewReducer';
|
|
11
10
|
import { fetchEditRemiDetailPage, fetchRemiAndInitializeLocalStore, updatesPaymentToInLocalStore } from '../editRemiViewReducer';
|
|
12
|
-
export type ActionType = ReturnType<typeof fetchEditRemiDetailPage> | ReturnType<typeof fetchRemiDetail> | ReturnType<typeof fetchClassList> | ReturnType<typeof fetchMerchantList> | ReturnType<typeof fetchUserFinancialAccount> | ReturnType<typeof updatesPaymentToInLocalStore> | ReturnType<typeof fetchReimbursementConfig> | ReturnType<typeof fetchAccountList> | ReturnType<typeof fetchRemiAndInitializeLocalStore
|
|
11
|
+
export type ActionType = ReturnType<typeof fetchEditRemiDetailPage> | ReturnType<typeof fetchRemiDetail> | ReturnType<typeof fetchClassList> | ReturnType<typeof fetchMerchantList> | ReturnType<typeof fetchUserFinancialAccount> | ReturnType<typeof updatesPaymentToInLocalStore> | ReturnType<typeof fetchReimbursementConfig> | ReturnType<typeof fetchAccountList> | ReturnType<typeof fetchRemiAndInitializeLocalStore>;
|
|
13
12
|
export declare const fetchEditRemiDetailPageEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js
CHANGED
|
@@ -9,7 +9,6 @@ const userFinancialAccountReducer_1 = require("../../../../userFinancialAccount/
|
|
|
9
9
|
const userFinancialAccountSelector_1 = require("../../../../userFinancialAccount/userFinancialAccountSelector");
|
|
10
10
|
const merchantListReducer_1 = require("../../../merchantList/merchantListReducer");
|
|
11
11
|
const reimbursementConfigReducer_1 = require("../../reimbursementConfig/reimbursementConfigReducer");
|
|
12
|
-
const remiSetupApproverViewReducer_1 = require("../../remiSetupApproverView/remiSetupApproverViewReducer");
|
|
13
12
|
const editRemiViewReducer_1 = require("../editRemiViewReducer");
|
|
14
13
|
const fetchEditRemiDetailPageEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(editRemiViewReducer_1.fetchEditRemiDetailPage.match), (0, operators_1.mergeMap)((action) => {
|
|
15
14
|
const { cacheOverride, isLimitedCategoryEnabled, reimbursementId, isShowDeletedReimbursementEnabled, } = action.payload;
|
|
@@ -62,17 +61,6 @@ const fetchEditRemiDetailPageEpic = (actions$, state$) => actions$.pipe((0, oper
|
|
|
62
61
|
if (reimbursementId != null) {
|
|
63
62
|
remiDetailActions.push((0, editRemiViewReducer_1.fetchRemiAndInitializeLocalStore)(reimbursementId, false, isShowDeletedReimbursementEnabled));
|
|
64
63
|
}
|
|
65
|
-
else {
|
|
66
|
-
const approvalRules = state.remiSetupApproverViewState;
|
|
67
|
-
if (approvalRules.fetchState !== 'Completed' &&
|
|
68
|
-
approvalRules.fetchState !== 'In-Progress') {
|
|
69
|
-
// Side-fetch from the edit-reim page bootstrap. The
|
|
70
|
-
// triggering action doesn't carry the V3 flag, so we
|
|
71
|
-
// explicitly target v1; v3 tenants re-fetch via their
|
|
72
|
-
// own screen connector.
|
|
73
|
-
remiDetailActions.push((0, remiSetupApproverViewReducer_1.fetchRemiSetupApproverView)(true, false, false, false));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
64
|
}
|
|
77
65
|
return (0, rxjs_1.concat)((0, rxjs_1.from)(remiDetailActions));
|
|
78
66
|
}));
|
|
@@ -44,6 +44,7 @@ export interface StepWithStatus extends StepWithUser {
|
|
|
44
44
|
actorsActivity: ActorActivityWithUser[];
|
|
45
45
|
isOriginalApprovalStep: boolean;
|
|
46
46
|
displayPendingApproverAsAdmin?: boolean;
|
|
47
|
+
showSodAdminLabel?: boolean;
|
|
47
48
|
}
|
|
48
49
|
export interface ActorActivityWithUser extends Actor {
|
|
49
50
|
activity: ActivityStatus;
|
|
@@ -117,7 +117,8 @@ const getRemiDetailView = (state, reimbursementId) => {
|
|
|
117
117
|
};
|
|
118
118
|
exports.getRemiDetailView = getRemiDetailView;
|
|
119
119
|
const getRemiActivities = (state, reimbursementId, billStageCode) => {
|
|
120
|
-
const { remiDetailViewState, approvalRuleState, entityApprovalStatusState, userState, } = state;
|
|
120
|
+
const { remiDetailViewState, approvalRuleState, entityApprovalStatusState, userState, reimbursementState, } = state;
|
|
121
|
+
const reimburseeUserId = reimbursementState.reimbursementById[reimbursementId]?.reimburseeUserId;
|
|
121
122
|
const remiTransactionDetails = (0, get_1.default)(remiDetailViewState.remiDetailById, reimbursementId, undefined);
|
|
122
123
|
let remiActivities = [];
|
|
123
124
|
if (remiTransactionDetails != null) {
|
|
@@ -179,6 +180,7 @@ const getRemiActivities = (state, reimbursementId, billStageCode) => {
|
|
|
179
180
|
actorsActivity,
|
|
180
181
|
isOriginalApprovalStep: step.isOriginalApprovalStep,
|
|
181
182
|
displayPendingApproverAsAdmin: (0, helpers_1.isSodAdminFallbackEligibleForStep)(sodExcludedApproverUserId, isAdminFallbackApprover, actorsActivity),
|
|
183
|
+
showSodAdminLabel: (0, helpers_1.shouldShowSodAdminLabel)(sodExcludedApproverUserId, actorsActivity, reimburseeUserId),
|
|
182
184
|
};
|
|
183
185
|
}),
|
|
184
186
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.69",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|