Merge branch 'main' into MED-57
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user