fix(frontend): show person name inline in mobile status cell in TrainingHistory
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -117,6 +117,11 @@ function formatCer(cer: number | undefined | null): string {
|
|||||||
{m.training_status_running()}
|
{m.training_status_running()}
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if run.personId && personNames?.[run.personId]}
|
||||||
|
<span class="mt-0.5 block text-xs text-ink-3 md:hidden"
|
||||||
|
>{personNames[run.personId]}</span
|
||||||
|
>
|
||||||
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
<td class="hidden py-2 text-left text-ink-2 md:table-cell">
|
<td class="hidden py-2 text-left text-ink-2 md:table-cell">
|
||||||
{run.personId ? m.training_type_personalized() : m.training_type_base()}
|
{run.personId ? m.training_type_personalized() : m.training_type_base()}
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ describe('TrainingHistory — type and person columns', () => {
|
|||||||
render(TrainingHistory, { runs: [run], personNames: { 'person-1': 'Karl Müller' } });
|
render(TrainingHistory, { runs: [run], personNames: { 'person-1': 'Karl Müller' } });
|
||||||
|
|
||||||
await expect.element(page.getByText(/Personalisiert/i)).toBeInTheDocument();
|
await expect.element(page.getByText(/Personalisiert/i)).toBeInTheDocument();
|
||||||
await expect.element(page.getByText('Karl Müller')).toBeInTheDocument();
|
// Name appears in both the mobile inline span and the desktop table cell
|
||||||
|
await expect.element(page.getByText('Karl Müller').first()).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user