demo seed change 4
This commit is contained in:
@@ -122,6 +122,7 @@ export function useDashboardData(tenantId: string) {
|
||||
|
||||
// Get reasoning data from multiple possible locations
|
||||
const reasoningData = alert.event_metadata?.reasoning_data ||
|
||||
alert.metadata?.reasoning_data ||
|
||||
alert.ai_reasoning_details ||
|
||||
alert.reasoning_data ||
|
||||
alert.ai_reasoning ||
|
||||
@@ -150,8 +151,9 @@ export function useDashboardData(tenantId: string) {
|
||||
return {
|
||||
...po,
|
||||
supplier_name: supplierName, // Enrich with actual supplier name
|
||||
reasoning_data: reasoningInfo?.reasoning_data,
|
||||
ai_reasoning_summary: reasoningInfo?.ai_reasoning_summary,
|
||||
// Prioritize reasoning_data from PO itself, then fall back to alert
|
||||
reasoning_data: po.reasoning_data || reasoningInfo?.reasoning_data,
|
||||
ai_reasoning_summary: po.ai_reasoning_summary || reasoningInfo?.ai_reasoning_summary,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@ export interface PurchaseOrderSummary {
|
||||
total_amount: string; // Decimal as string
|
||||
currency: string;
|
||||
created_at: string;
|
||||
reasoning_data?: any; // AI reasoning data for dashboard display
|
||||
ai_reasoning_summary?: string; // Human-readable summary
|
||||
}
|
||||
|
||||
export interface PurchaseOrderDetail extends PurchaseOrderSummary {
|
||||
|
||||
Reference in New Issue
Block a user