mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-24 01:18:01 +02:00
fix: use the correct icon for failed scheduled CRs (#5760)
This PR switches the notification icon to an exclamation mark (the Error icon). It updates three components: 1. The badge 2. The timeline 3. The review status Screenshot with all the replaced icons 
This commit is contained in:
parent
1d3394262f
commit
795aa18bca
@ -1,5 +1,11 @@
|
|||||||
import { styled } from '@mui/material';
|
import { styled } from '@mui/material';
|
||||||
import { Cancel, CheckCircle, Schedule, Edit, Info } from '@mui/icons-material';
|
import {
|
||||||
|
Cancel,
|
||||||
|
CheckCircle,
|
||||||
|
Schedule,
|
||||||
|
Edit,
|
||||||
|
Error as ErrorIcon,
|
||||||
|
} from '@mui/icons-material';
|
||||||
import { Box, Typography, Divider } from '@mui/material';
|
import { Box, Typography, Divider } from '@mui/material';
|
||||||
|
|
||||||
const styledComponentPropCheck = () => (prop: string) =>
|
const styledComponentPropCheck = () => (prop: string) =>
|
||||||
@ -43,7 +49,7 @@ export const StyledScheduledIcon = styled(Schedule)(({ theme }) => ({
|
|||||||
marginRight: theme.spacing(1),
|
marginRight: theme.spacing(1),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export const StyledInfoIcon = styled(Info)(({ theme }) => ({
|
export const StyledScheduleFailedIcon = styled(ErrorIcon)(({ theme }) => ({
|
||||||
color: theme.palette.error.main,
|
color: theme.palette.error.main,
|
||||||
height: '35px',
|
height: '35px',
|
||||||
width: '35px',
|
width: '35px',
|
||||||
|
@ -15,14 +15,14 @@ import {
|
|||||||
StyledReviewStatusContainer,
|
StyledReviewStatusContainer,
|
||||||
StyledFlexAlignCenterBox,
|
StyledFlexAlignCenterBox,
|
||||||
StyledSuccessIcon,
|
StyledSuccessIcon,
|
||||||
StyledErrorIcon,
|
|
||||||
StyledWarningIcon,
|
StyledWarningIcon,
|
||||||
StyledReviewTitle,
|
StyledReviewTitle,
|
||||||
StyledDivider,
|
StyledDivider,
|
||||||
StyledScheduledIcon,
|
StyledScheduledIcon,
|
||||||
StyledEditIcon,
|
StyledEditIcon,
|
||||||
StyledScheduledBox,
|
StyledScheduledBox,
|
||||||
StyledInfoIcon,
|
StyledErrorIcon,
|
||||||
|
StyledScheduleFailedIcon,
|
||||||
} from './ChangeRequestReviewStatus.styles';
|
} from './ChangeRequestReviewStatus.styles';
|
||||||
import {
|
import {
|
||||||
ChangeRequestState,
|
ChangeRequestState,
|
||||||
@ -289,7 +289,7 @@ const ScheduledFailed = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledFlexAlignCenterBox>
|
<StyledFlexAlignCenterBox>
|
||||||
<StyledInfoIcon />
|
<StyledScheduleFailedIcon />
|
||||||
<Box>
|
<Box>
|
||||||
<StyledReviewTitle color={theme.palette.error.main}>
|
<StyledReviewTitle color={theme.palette.error.main}>
|
||||||
Changes failed to be applied on {scheduledTime} because of{' '}
|
Changes failed to be applied on {scheduledTime} because of{' '}
|
||||||
|
@ -9,7 +9,7 @@ import TimelineContent from '@mui/lab/TimelineContent';
|
|||||||
import { ChangeRequestState } from '../../changeRequest.types';
|
import { ChangeRequestState } from '../../changeRequest.types';
|
||||||
import { ConditionallyRender } from '../../../common/ConditionallyRender/ConditionallyRender';
|
import { ConditionallyRender } from '../../../common/ConditionallyRender/ConditionallyRender';
|
||||||
import { HtmlTooltip } from '../../../common/HtmlTooltip/HtmlTooltip';
|
import { HtmlTooltip } from '../../../common/HtmlTooltip/HtmlTooltip';
|
||||||
import { Info } from '@mui/icons-material';
|
import { Error as ErrorIcon } from '@mui/icons-material';
|
||||||
import { useLocationSettings } from 'hooks/useLocationSettings';
|
import { useLocationSettings } from 'hooks/useLocationSettings';
|
||||||
import { formatDateYMDHMS } from 'utils/formatDate';
|
import { formatDateYMDHMS } from 'utils/formatDate';
|
||||||
|
|
||||||
@ -184,7 +184,10 @@ const createTimelineItem = (
|
|||||||
title={`Schedule failed because of ${failureReason}`}
|
title={`Schedule failed because of ${failureReason}`}
|
||||||
arrow
|
arrow
|
||||||
>
|
>
|
||||||
<Info color={'error'} fontSize={'small'} />
|
<ErrorIcon
|
||||||
|
color={'error'}
|
||||||
|
fontSize={'small'}
|
||||||
|
/>
|
||||||
</HtmlTooltip>
|
</HtmlTooltip>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
Check,
|
Check,
|
||||||
CircleOutlined,
|
CircleOutlined,
|
||||||
Close,
|
Close,
|
||||||
Info,
|
Error as ErrorIcon,
|
||||||
} from '@mui/icons-material';
|
} from '@mui/icons-material';
|
||||||
|
|
||||||
interface IChangeRequestStatusBadgeProps {
|
interface IChangeRequestStatusBadgeProps {
|
||||||
@ -64,7 +64,7 @@ export const ChangeRequestStatusBadge: VFC<IChangeRequestStatusBadgeProps> = ({
|
|||||||
schedule?.status === 'pending' ? (
|
schedule?.status === 'pending' ? (
|
||||||
<AccessTime fontSize={'small'} />
|
<AccessTime fontSize={'small'} />
|
||||||
) : (
|
) : (
|
||||||
<Info fontSize={'small'} />
|
<ErrorIcon fontSize={'small'} />
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<Badge color={color} icon={icon}>
|
<Badge color={color} icon={icon}>
|
||||||
|
Loading…
Reference in New Issue
Block a user