fix cleint portal employee-data, dashboard, hide notification

This commit is contained in:
Muhammad Fajar
2023-12-31 23:44:43 +07:00
parent ae884f8cd0
commit 96034d069a
26 changed files with 684 additions and 804 deletions

View File

@@ -41,6 +41,7 @@ const ItemNotificationStyle = styled(Card)(({ theme }) => ({
marginTop: 2,
overflowY: 'auto',
maxHeight: '154px',
minHeight: '154px',
gap: '0.5rem',
}));
@@ -100,31 +101,37 @@ export default function CardNotification({ data }: NotificationProps) {
</Button>
</Stack>
<ItemNotificationStyle>
{data
? data.map(({ info, date, time }, index) => (
<div key={index}>
{index >= 1 ? <Divider sx={{ marginY: 0.5 }} /> : ''}
<Stack direction="row" justifyContent="space-between" alignItems="center">
<Stack direction="column" justifyContent="flex-start" alignItems="flex-start">
<Typography sx={{ typography: 'caption' }}>{info}</Typography>
<Link
component="button"
variant="caption"
underline="always"
onClick={() => clickHandler('infoDetail')}
>
Info Detail
</Link>
</Stack>
<Stack direction="column" justifyContent="flex-start" alignItems="flex-start">
<Typography sx={{ typography: 'caption', color: '#656565' }}>{date}</Typography>
<Typography sx={{ typography: 'caption', color: '#656565' }}>{time}</Typography>
</Stack>
<ItemNotificationStyle
sx={{ display: data?.length === 0 || data === undefined ? 'flex' : 'block' }}
>
{data ? (
data.map(({ info, date, time }, index) => (
<div key={index}>
{index >= 1 ? <Divider sx={{ marginY: 0.5 }} /> : ''}
<Stack direction="row" justifyContent="space-between" alignItems="center">
<Stack direction="column" justifyContent="flex-start" alignItems="flex-start">
<Typography sx={{ typography: 'caption' }}>{info}</Typography>
<Link
component="button"
variant="caption"
underline="always"
onClick={() => clickHandler('infoDetail')}
>
Info Detail
</Link>
</Stack>
</div>
))
: ''}
<Stack direction="column" justifyContent="flex-start" alignItems="flex-start">
<Typography sx={{ typography: 'caption', color: '#656565' }}>{date}</Typography>
<Typography sx={{ typography: 'caption', color: '#656565' }}>{time}</Typography>
</Stack>
</Stack>
</div>
))
) : (
<Stack justifyContent="center" alignItems="center" flexGrow={1}>
No Notification
</Stack>
)}
</ItemNotificationStyle>
{isDialog === 'allNotification' && (