feat(MED-97): update benefit stats view in dashboards

This commit is contained in:
2025-09-26 13:47:32 +03:00
parent fdc2e3e064
commit 1aeee0bc30
23 changed files with 518 additions and 374 deletions

View File

@@ -1,9 +1,9 @@
import { Database } from '@/packages/supabase/src/database.types';
import { type ClassValue, clsx } from 'clsx';
import Isikukood, { Gender } from 'isikukood';
import { twMerge } from 'tailwind-merge';
import { BmiCategory } from './types/bmi';
import type { BmiThresholds } from '@kit/accounts/types/accounts';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
@@ -45,10 +45,7 @@ export const bmiFromMetric = (kg: number, cm: number) => {
};
export function getBmiStatus(
thresholds: Omit<
Database['medreport']['Tables']['bmi_thresholds']['Row'],
'id'
>[],
thresholds: Omit<BmiThresholds, 'id'>[],
params: { age: number; height: number; weight: number },
): BmiCategory | null {
const age = params.age;