v2: empty sections fallback in synthesis detail view

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
master
oabrivard 3 months ago
parent c698f6e4a3
commit 8c7672105c

@ -97,6 +97,7 @@ const fr = {
'synthesis.loadError': 'Erreur lors du chargement de la synthese.', 'synthesis.loadError': 'Erreur lors du chargement de la synthese.',
'synthesis.deleteError': 'Erreur lors de la suppression.', 'synthesis.deleteError': 'Erreur lors de la suppression.',
'synthesis.backToHome': 'Retour a l\'accueil', 'synthesis.backToHome': 'Retour a l\'accueil',
'synthesis.noSections': 'Aucune section trouvee dans cette synthese.',
// Synthesis - Email // Synthesis - Email
'synthesis.email.title': 'Envoyer par email', 'synthesis.email.title': 'Envoyer par email',

@ -356,11 +356,18 @@ const SynthesisDetail: Component = () => {
{/* Sections */} {/* Sections */}
<div class="space-y-12"> <div class="space-y-12">
<For each={synth().sections}> <Show
{(section) => ( when={synth().sections && synth().sections.length > 0}
<Section title={section.title} items={section.items} /> fallback={
)} <p class="text-center text-gray-500 italic py-12">
</For> {t('synthesis.noSections')}
</p>
}
>
<For each={synth().sections}>
{(section) => <Section title={section.title} items={section.items} />}
</For>
</Show>
</div> </div>
</div> </div>
)} )}

Loading…
Cancel
Save