feat: Structure dashboard AI summary into detailed sections and update UI to display them.
This commit is contained in:
@@ -203,8 +203,26 @@ const userName = computed(() => {
|
||||
<div class="flex flex-col card">
|
||||
<span class="text-xl !font-semibold pl-1 mb-2">AI Summary</span>
|
||||
<div class="ai-summary-wrapper">
|
||||
<div :class="['ai-summary-content', { 'expanded': isAiSummaryExpanded }]">
|
||||
<span v-html="dashboardData.analyzedText" />
|
||||
<div :class="['ai-summary-content', { 'expanded': isAiSummaryExpanded }]" class="">
|
||||
<div class="flex flex-col gap-0">
|
||||
<span class="text-lg bold">Общая оценка</span>
|
||||
<span class="!whitespace-pre-wrap" v-html="dashboardData.analyzedText.common" />
|
||||
</div>
|
||||
<div class="h-4"/>
|
||||
<div class="flex flex-col gap-0">
|
||||
<span class="text-lg bold">Анализ категорий</span>
|
||||
<span class="!whitespace-pre-wrap" v-html="dashboardData.analyzedText.categoryAnalysis" />
|
||||
</div>
|
||||
<div class="h-4"/>
|
||||
<div class="flex flex-col gap-0">
|
||||
<span class="text-lg bold">Ключевые инсайты</span>
|
||||
<span class="!whitespace-pre-wrap" v-html="dashboardData.analyzedText.keyInsights" />
|
||||
</div>
|
||||
<div class="h-4"/>
|
||||
<div class="flex flex-col gap-0">
|
||||
<span class="text-lg bold">Рекомендации</span>
|
||||
<span class="!whitespace-pre-wrap" v-html="dashboardData.analyzedText.recommendations" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!isAiSummaryExpanded" class="ai-summary-fade"></div>
|
||||
</div>
|
||||
@@ -289,6 +307,10 @@ const userName = computed(() => {
|
||||
background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
|
||||
}
|
||||
|
||||
b {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.expand-button:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,14 @@ export interface DashboardData {
|
||||
upcomingTransactions: Transaction[],
|
||||
recentTransactions: Transaction[],
|
||||
weeks: DashboardWeek[],
|
||||
analyzedText: string,
|
||||
analyzedText: AISummary,
|
||||
}
|
||||
|
||||
export interface AISummary {
|
||||
common: string,
|
||||
categoryAnalysis: string,
|
||||
keyInsights: string,
|
||||
recommendations: string
|
||||
}
|
||||
|
||||
export interface DashboardWeek {
|
||||
|
||||
Reference in New Issue
Block a user