feat(team-account-benefit-statistics): implement benefit statistics card with budget and booking details feat(team-account-health-details): create health details component displaying account health metrics feat(team-account-statistics): develop team account statistics page with charts and customer table feat(load-team-account-health-details): add server-side function to retrieve account health details chore(migrations): create trigger for logging changes in account memberships
70 lines
1.4 KiB
TypeScript
70 lines
1.4 KiB
TypeScript
import React from 'react';
|
|
|
|
import { Clock, TrendingUp, User } from 'lucide-react';
|
|
|
|
interface AccountHealthDetailsField {
|
|
title: string;
|
|
value: string;
|
|
Icon: React.ComponentType<{
|
|
size?: number;
|
|
color?: string;
|
|
className?: string;
|
|
}>;
|
|
normStatus: NormStatus;
|
|
}
|
|
|
|
export enum NormStatus {
|
|
CRITICAL = 'CRITICAL',
|
|
WARNING = 'WARNING',
|
|
NORMAL = 'NORMAL',
|
|
}
|
|
|
|
export const getAccountHealthDetailsFields =
|
|
(): AccountHealthDetailsField[] => {
|
|
const test = '';
|
|
return [
|
|
{
|
|
title: 'Naised',
|
|
value: '50% (16)',
|
|
Icon: User,
|
|
normStatus: NormStatus.NORMAL,
|
|
},
|
|
{
|
|
title: 'Mehed',
|
|
value: '50% (16)',
|
|
Icon: User,
|
|
normStatus: NormStatus.NORMAL,
|
|
},
|
|
{
|
|
title: 'Keskmine vanus',
|
|
value: '56',
|
|
Icon: Clock,
|
|
normStatus: NormStatus.NORMAL,
|
|
},
|
|
{
|
|
title: 'KMI',
|
|
value: '271',
|
|
Icon: TrendingUp,
|
|
normStatus: NormStatus.WARNING,
|
|
},
|
|
{
|
|
title: 'Üldkolesterool',
|
|
value: '6.1',
|
|
Icon: TrendingUp,
|
|
normStatus: NormStatus.WARNING,
|
|
},
|
|
{
|
|
title: 'Vitamiin D',
|
|
value: '76',
|
|
Icon: TrendingUp,
|
|
normStatus: NormStatus.NORMAL,
|
|
},
|
|
{
|
|
title: 'Suitsetajad',
|
|
value: '22%',
|
|
Icon: TrendingUp,
|
|
normStatus: NormStatus.CRITICAL,
|
|
},
|
|
];
|
|
};
|