fix: show page title in insight heading

This commit is contained in:
2026-08-22 17:09:08 +08:00
parent 0cacd163a3
commit 289b2f782c

View File

@@ -23,6 +23,15 @@
let sequence = 0; let sequence = 0;
let activeScope = ''; let activeScope = '';
const pageTitles: Record<AIInsightModule, string> = {
overview: 'پیشخوان',
payments: 'عملکرد پرداخت',
fees: 'کارمزدها',
peers: 'هم‌گروه‌ها',
transactions: 'تراکنش‌ها',
growth: 'مربی رشد',
};
async function load( async function load(
requestedModule: AIInsightModule, requestedModule: AIInsightModule,
requestedTerminalId?: string, requestedTerminalId?: string,
@@ -108,7 +117,7 @@
<CardHeader class="bg-primary/[.035] -mt-4 border-b pt-4"> <CardHeader class="bg-primary/[.035] -mt-4 border-b pt-4">
<div class="flex min-h-6 flex-wrap items-center justify-between gap-3"> <div class="flex min-h-6 flex-wrap items-center justify-between gap-3">
<CardTitle class="flex h-6 items-center gap-2 text-base leading-none"> <CardTitle class="flex h-6 items-center gap-2 text-base leading-none">
<SparklesIcon class="text-primary size-5" /> خلاصه ساده این صفحه <SparklesIcon class="text-primary size-5" /> خلاصه‌ای از {pageTitles[module]}
</CardTitle> </CardTitle>
{#if periodLabel}<Badge class="h-6 leading-none" variant="secondary">{periodLabel}</Badge>{/if} {#if periodLabel}<Badge class="h-6 leading-none" variant="secondary">{periodLabel}</Badge>{/if}
</div> </div>