update the protal dashboard

This commit is contained in:
Mengisteab
2026-06-15 12:40:26 +00:00
parent 7e6e9eb1a7
commit fbcd68bb5b
11 changed files with 1175 additions and 1864 deletions

View File

@@ -0,0 +1,59 @@
import { Badge, Box, useMantineTheme } from '@mantine/core';
import { APPLICATION_STATUS_COLORS } from '../features/licenses/constants';
import type { ApplicationStatus } from '../features/licenses/types/license.types';
import { useLicenseLabels } from '../features/licenses/hooks/useLicenseLabels';
export function StatusPill({ status }: { status: ApplicationStatus }) {
const { applicationStatus } = useLicenseLabels();
const color = APPLICATION_STATUS_COLORS[status];
return (
<Badge
variant="light"
color={color}
radius="sm"
tt="none"
fw={600}
leftSection={
<Box
w={6}
h={6}
style={{
borderRadius: '50%',
background: `var(--mantine-color-${color}-filled)`,
}}
/>
}
>
{applicationStatus(status)}
</Badge>
);
}
export function BrandAvatar({
initials = 'AB',
size = 38,
}: {
initials?: string;
size?: number;
}) {
const theme = useMantineTheme();
return (
<Box
w={size}
h={size}
style={{
borderRadius: '50%',
background: theme.other.heroGradient as string,
color: '#fff',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontSize: size * 0.36,
fontWeight: 700,
flexShrink: 0,
}}
>
{initials}
</Box>
);
}