MED-137: add doctor other jobs view (#55)

* add doctor jobs view

* change translation

* another translation change

* clean up

* add analaysis detail view to paths config

* translation

* merge fix

* fix path

* move components to shared

* refactor

* imports

* clean up
This commit is contained in:
Helena
2025-08-25 11:12:57 +03:00
committed by GitHub
parent ee86bb8829
commit 195af1db3d
156 changed files with 2823 additions and 364 deletions

View File

@@ -10,8 +10,8 @@ import {
initializeServerI18n,
parseAcceptLanguageHeader,
} from '@kit/i18n/server';
import { featureFlagsConfig } from '@kit/shared/config';
import featuresFlagConfig from '~/config/feature-flags.config';
import {
I18N_COOKIE_NAME,
getI18nSettings,
@@ -24,7 +24,7 @@ import { i18nResolver } from './i18n.resolver';
* @name priority
* @description The language priority setting from the feature flag configuration.
*/
const priority = featuresFlagConfig.languagePriority;
const priority = featureFlagsConfig.languagePriority;
/**
* @name createI18nServerInstance

View File

@@ -40,6 +40,7 @@ export const defaultI18nNamespaces = [
'cart',
'orders',
'analysis-results',
'doctor',
];
/**

View File

@@ -2,7 +2,7 @@ import { Metadata } from 'next';
import { headers } from 'next/headers';
import appConfig from '~/config/app.config';
import { appConfig } from '@kit/shared/config';
/**
* @name generateRootMetadata

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';
@@ -83,3 +84,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';
}