fix(frontend): resolve TypeScript type errors from skin model refactor

- Remove s.trend from dashboard (field removed from SkinConditionSnapshot)
- Replace trend with texture in SkinPhotoAnalysisResponse (api.ts)
- Use record_id instead of id for LabResult and MedicationEntry keyed each blocks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Piotr Oleszczyk 2026-02-28 18:01:17 +01:00
parent ac829171d9
commit 142fbe8530
4 changed files with 3 additions and 6 deletions

View file

@ -221,7 +221,7 @@ export const deleteSkinSnapshot = (id: string): Promise<void> => api.del(`/skinc
export interface SkinPhotoAnalysisResponse {
overall_state?: string;
trend?: string;
texture?: string;
skin_type?: string;
hydration_level?: number;
sebum_tzone?: number;

View file

@ -39,9 +39,6 @@
</span>
{/if}
</div>
{#if s.trend}
<p class="text-sm">Trend: <span class="font-medium">{s.trend}</span></p>
{/if}
{#if s.active_concerns.length}
<div class="flex flex-wrap gap-1">
{#each s.active_concerns as concern (concern)}

View file

@ -137,7 +137,7 @@
</TableRow>
</TableHeader>
<TableBody>
{#each data.results as r (r.id)}
{#each data.results as r (r.record_id)}
<TableRow>
<TableCell class="text-sm">{r.collected_at.slice(0, 10)}</TableCell>
<TableCell class="font-medium">{r.test_name_original ?? r.test_code}</TableCell>

View file

@ -81,7 +81,7 @@
{/if}
<div class="space-y-3">
{#each data.medications as med (med.id)}
{#each data.medications as med (med.record_id)}
<div class="rounded-md border border-border px-4 py-3">
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">