fix(pres_mgmt): show session/presenter counts in File Downloads header
The summary was showing file counts by type (session-level files vs presenter-level files), which made the session count look wrong (e.g. 6 when there are 40 sessions). Now shows unique session and presenter counts from the grouped data, matching what the label implies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -259,8 +259,8 @@ let session_groups = $derived.by((): SessionGroup[] => {
|
||||
return sorted;
|
||||
});
|
||||
|
||||
let total_session_files = $derived(session_groups.reduce((n, sg) => n + sg.session_files.length, 0));
|
||||
let total_presenter_files = $derived(session_groups.reduce((n, sg) => sg.presenter_groups.reduce((m, pg) => m + pg.files.length, 0) + n, 0));
|
||||
let total_sessions = $derived(session_groups.length);
|
||||
let total_presenters = $derived(session_groups.reduce((n, sg) => n + sg.presenter_groups.length, 0));
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Query
|
||||
@@ -330,7 +330,7 @@ async function handle_qry() {
|
||||
<span class="badge preset-tonal-surface text-sm">{qry__count} files</span>
|
||||
{/if}
|
||||
<span class="text-sm font-normal opacity-60">
|
||||
({total_session_files} session / {total_presenter_files} presenter)
|
||||
({total_sessions} session{total_sessions !== 1 ? 's' : ''} / {total_presenters} presenter{total_presenters !== 1 ? 's' : ''})
|
||||
</span>
|
||||
</h3>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user