WIP jordan
This commit is contained in:
25
app/composables/useWelcomeDashboard.ts
Normal file
25
app/composables/useWelcomeDashboard.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { WelcomeDashboardConfig } from '~/types/welcome-dashboard'
|
||||
|
||||
/**
|
||||
* Home / welcome dashboard content. Reads `app.config` first; later merge runtime config or APIs.
|
||||
* Brokerage company name from Settings → Personalization overrides `productName` when set.
|
||||
*/
|
||||
export function useWelcomeDashboard(): ComputedRef<WelcomeDashboardConfig> {
|
||||
const app = useAppConfig()
|
||||
const { saved: branding } = useBrokerageBranding()
|
||||
|
||||
return computed((): WelcomeDashboardConfig => {
|
||||
const base = (app.welcomeDashboard ?? {}) as Partial<WelcomeDashboardConfig>
|
||||
const fromBranding = branding.value.companyName?.trim()
|
||||
return {
|
||||
greetingName: base.greetingName ?? 'User',
|
||||
productName: fromBranding || base.productName || 'Segur-OS Beta',
|
||||
subtitle: base.subtitle ?? '',
|
||||
dailyTasks: base.dailyTasks ?? [],
|
||||
alerts: base.alerts ?? [],
|
||||
performanceKpis: base.performanceKpis ?? [],
|
||||
ceoKpis: base.ceoKpis ?? [],
|
||||
quickLinks: base.quickLinks ?? []
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user