Implemented MVP with all core features:
- Browse 50 newest policies on load with null filtering
- Click row to view details in slide-over sheet
- JSON detection and pretty formatting
- Search with real-time filtering
- Badge colors for policy types (Security=red, Compliance=blue, Config=gray, App=outline)
- Navigation consolidated to 'Policy Explorer'
New components:
- PolicyTable.tsx - table with badges and hover effects
- PolicySearchContainer.tsx - search state management
- PolicyDetailSheet.tsx - JSON detail view with formatting
- PolicyExplorerClient.tsx - client wrapper
- lib/utils/policyBadges.ts - badge color mapping
Updated:
- lib/actions/policySettings.ts - added getRecentPolicySettings() with null filtering
- app/(app)/search/page.tsx - converted to Server Component
- config/nav.ts - renamed Search to Policy Explorer, removed All Settings
- components/search/EmptyState.tsx - updated messaging
Tasks complete: 36/47 (MVP ready)
- Phase 1-7: All critical features implemented
- Phase 8: Core polish complete (T041), optional tasks remain
TypeScript: ✅ No errors
Status: Production-ready MVP
26 lines
738 B
TypeScript
26 lines
738 B
TypeScript
'use client';
|
|
|
|
import { SearchX } from 'lucide-react';
|
|
|
|
interface EmptyStateProps {
|
|
searchTerm?: string;
|
|
}
|
|
|
|
export function EmptyState({ searchTerm }: EmptyStateProps) {
|
|
return (
|
|
<div className="flex flex-col items-center justify-center py-12 text-center">
|
|
<SearchX className="h-12 w-12 text-muted-foreground mb-4" />
|
|
<h3 className="text-lg font-semibold mb-2">No results found</h3>
|
|
{searchTerm ? (
|
|
<p className="text-muted-foreground">
|
|
No policy settings found matching "{searchTerm}"
|
|
</p>
|
|
) : (
|
|
<p className="text-muted-foreground">
|
|
No policy settings available. Trigger a sync to import policies from Intune.
|
|
</p>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|