INFRA-2874 | pr comment resolve
This commit is contained in:
@@ -51,6 +51,9 @@ const TeamDetails: React.FC = () => {
|
||||
});
|
||||
}, [teamData]);
|
||||
|
||||
const isNeitherParticipantNorAdmin: boolean =
|
||||
!isUserParticipant(teamMembers, userEmail) && !Role.includes('Admin');
|
||||
|
||||
const handleslackChannelId = (
|
||||
e: React.ChangeEvent<HTMLInputElement>,
|
||||
): void => {
|
||||
@@ -114,16 +117,14 @@ const TeamDetails: React.FC = () => {
|
||||
}) as MutableRefObject<HTMLDivElement>;
|
||||
|
||||
const handleOncallPicker = (): void => {
|
||||
if (!isUserParticipant(teamMembers, userEmail) && !Role.includes('Admin'))
|
||||
return;
|
||||
if (isNeitherParticipantNorAdmin) return;
|
||||
dispatchData({
|
||||
type: actionTypes.SET_OPEN_ONCALL,
|
||||
payload: !state.openOnCall,
|
||||
});
|
||||
};
|
||||
const handleOpenPsecOnCallPicker = (): void => {
|
||||
if (!isUserParticipant(teamMembers, userEmail) && !Role.includes('Admin'))
|
||||
return;
|
||||
if (isNeitherParticipantNorAdmin) return;
|
||||
dispatchData({
|
||||
type: actionTypes.SET_PSEC_OPEN_ONCALL,
|
||||
payload: !state.openPsecOnCall,
|
||||
@@ -151,9 +152,6 @@ const TeamDetails: React.FC = () => {
|
||||
? styles['hint-text']
|
||||
: styles['hint-text-disabled'];
|
||||
|
||||
const isNeitherParticipantNorAdmin: boolean =
|
||||
!isUserParticipant(teamMembers, userEmail) && !Role.includes('Admin');
|
||||
|
||||
return (
|
||||
<div className={styles['team-details-wrapper']}>
|
||||
<Typography variant="h1" className={styles['team-name']}>
|
||||
|
||||
Reference in New Issue
Block a user