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,23 +1,25 @@
import { Database } from '@kit/supabase/database';
export type ApplicationRole =
Database['medreport']['Tables']['accounts']['Row']['application_role'];
export type ApplicationRole = Account['application_role'];
export enum ApplicationRoleEnum {
User = 'user',
Doctor = 'doctor',
SuperAdmin = 'super_admin',
}
export type AccountWithParams =
Database['medreport']['Tables']['accounts']['Row'] & {
accountParams:
| (Pick<
Database['medreport']['Tables']['account_params']['Row'],
'weight' | 'height'
> & {
isSmoker:
| Database['medreport']['Tables']['account_params']['Row']['is_smoker']
| null;
})
| null;
};
export type AccountParams =
Database['medreport']['Tables']['account_params']['Row'];
export type Account = Database['medreport']['Tables']['accounts']['Row'];
export type AccountWithParams = Account & {
accountParams:
| (Pick<AccountParams, 'weight' | 'height'> & {
isSmoker: AccountParams['is_smoker'] | null;
})
| null;
};
export type CompanyParams =
Database['medreport']['Tables']['company_params']['Row'];
export type BmiThresholds = Database['medreport']['Tables']['bmi_thresholds']['Row'];