feat(MED-131): handle analysis order

This commit is contained in:
2025-08-04 11:53:04 +03:00
parent 08950896e5
commit 91f6dd11be
10 changed files with 310 additions and 140 deletions

View File

@@ -2,7 +2,7 @@ import { cache } from 'react';
import { AdminAccountPage } from '@kit/admin/components/admin-account-page';
import { AdminGuard } from '@kit/admin/components/admin-guard';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { getAccount } from '~/lib/services/account.service';
interface Params {
params: Promise<{
@@ -28,21 +28,4 @@ async function AccountPage(props: Params) {
export default AdminGuard(AccountPage);
const loadAccount = cache(accountLoader);
async function accountLoader(id: string) {
const client = getSupabaseServerClient();
const { data, error } = await client
.schema('medreport')
.from('accounts')
.select('*, memberships: accounts_memberships (*)')
.eq('id', id)
.single();
if (error) {
throw error;
}
return data;
}
const loadAccount = cache(getAccount);