Merge branch 'main' into MED-57

This commit is contained in:
Danel Kungla
2025-08-25 12:25:18 +03:00
156 changed files with 2823 additions and 363 deletions

View File

@@ -1,5 +1,6 @@
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';
@@ -81,3 +82,10 @@ export function getBmiBackgroundColor(bmiStatus: BmiCategory | null): string {
return 'bg-success';
}
}
export function getGenderStringFromPersonalCode(personalCode: string) {
const person = new Isikukood(personalCode);
if (person.getGender() === Gender.FEMALE) return 'common:female';
if (person.getGender() === Gender.MALE) return 'common:male';
return 'common:unknown';
}