TP-66615 |Feature flags (#1011)
This commit is contained in:
@@ -302,17 +302,19 @@ function SideNavBar({ isDc97User, isHRCChatUser }: ISideNavbarProps) {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
unsubscribe.current = poll(
|
||||
() => dispatch(getPendingIdCardApprovalsCount()),
|
||||
json => json,
|
||||
10 * MILLI_IN_MIN,
|
||||
noop
|
||||
);
|
||||
if (isIdCardApprovalVisible) {
|
||||
unsubscribe.current = poll(
|
||||
() => dispatch(getPendingIdCardApprovalsCount()),
|
||||
json => json,
|
||||
10 * MILLI_IN_MIN,
|
||||
noop
|
||||
);
|
||||
}
|
||||
|
||||
return () => {
|
||||
isFunction(unsubscribe.current) && unsubscribe.current?.();
|
||||
};
|
||||
}, []);
|
||||
}, [isIdCardApprovalVisible]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -375,10 +375,7 @@ export const commonSlice = createSlice({
|
||||
action.payload?.featureFlags?.performanceDashboard ?? false;
|
||||
|
||||
const isIdCardApprovalVisible =
|
||||
roles?.includes(Roles.ROLE_NAVI_FIELD_EXTERNAL_TEAM_LEAD) ||
|
||||
roles?.includes(Roles.ROLE_NAVI_FIELD_TEAM_LEAD) ||
|
||||
roles?.includes(Roles.ROLE_NAVI_16_30_FIELD_AGENCY_MANAGER);
|
||||
|
||||
action.payload?.featureFlags?.isAgentIdCardDetailsVisible ?? false;
|
||||
const isPincodeMappingVisible = action.payload?.featureFlags?.agencyServiceability ?? false;
|
||||
const isAmeyoUtilityVisible = action.payload?.featureFlags?.ameyoSelfServeFlag ?? false;
|
||||
const isAmeyoGeneratePasswordVisible =
|
||||
|
||||
Reference in New Issue
Block a user