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:
parent
ac829171d9
commit
142fbe8530
4 changed files with 3 additions and 6 deletions
|
|
@ -221,7 +221,7 @@ export const deleteSkinSnapshot = (id: string): Promise<void> => api.del(`/skinc
|
||||||
|
|
||||||
export interface SkinPhotoAnalysisResponse {
|
export interface SkinPhotoAnalysisResponse {
|
||||||
overall_state?: string;
|
overall_state?: string;
|
||||||
trend?: string;
|
texture?: string;
|
||||||
skin_type?: string;
|
skin_type?: string;
|
||||||
hydration_level?: number;
|
hydration_level?: number;
|
||||||
sebum_tzone?: number;
|
sebum_tzone?: number;
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,6 @@
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if s.trend}
|
|
||||||
<p class="text-sm">Trend: <span class="font-medium">{s.trend}</span></p>
|
|
||||||
{/if}
|
|
||||||
{#if s.active_concerns.length}
|
{#if s.active_concerns.length}
|
||||||
<div class="flex flex-wrap gap-1">
|
<div class="flex flex-wrap gap-1">
|
||||||
{#each s.active_concerns as concern (concern)}
|
{#each s.active_concerns as concern (concern)}
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{#each data.results as r (r.id)}
|
{#each data.results as r (r.record_id)}
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell class="text-sm">{r.collected_at.slice(0, 10)}</TableCell>
|
<TableCell class="text-sm">{r.collected_at.slice(0, 10)}</TableCell>
|
||||||
<TableCell class="font-medium">{r.test_name_original ?? r.test_code}</TableCell>
|
<TableCell class="font-medium">{r.test_name_original ?? r.test_code}</TableCell>
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="space-y-3">
|
<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="rounded-md border border-border px-4 py-3">
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue