|
1 | 1 | { |
2 | 2 | "type": "page", |
3 | | - "title": "CRM Home", |
4 | | - "className": "flex h-screen items-center justify-center bg-slate-100", |
5 | | - "body": { |
6 | | - "type": "card", |
7 | | - "className": "w-full max-w-md p-6 text-center shadow-lg", |
8 | | - "title": "Welcome to Object CRM", |
9 | | - "description": "Select a module to continue", |
10 | | - "body": { |
| 3 | + "title": "Dashboard", |
| 4 | + "className": "bg-slate-50/50", |
| 5 | + "body": [ |
| 6 | + { |
11 | 7 | "type": "div", |
12 | | - "className": "grid grid-cols-2 gap-4 mt-6", |
13 | | - "body": [ |
| 8 | + "className": "flex flex-col gap-6", |
| 9 | + "children": [ |
14 | 10 | { |
15 | | - "type": "button", |
16 | | - "label": "View Customers", |
17 | | - "className": "h-24 flex-col gap-2 bg-blue-50 text-blue-700 hover:bg-blue-100 border-blue-200", |
18 | | - "onClick": "navigate('/customers')" |
| 11 | + "type": "div", |
| 12 | + "className": "flex justify-between items-center", |
| 13 | + "children": [ |
| 14 | + { |
| 15 | + "type": "html", |
| 16 | + "html": "<h2 class='text-3xl font-bold tracking-tight'>Dashboard</h2>" |
| 17 | + }, |
| 18 | + { |
| 19 | + "type": "button", |
| 20 | + "label": "Download Report", |
| 21 | + "variant": "outline", |
| 22 | + "className": "h-9" |
| 23 | + } |
| 24 | + ] |
19 | 25 | }, |
20 | 26 | { |
21 | | - "type": "button", |
22 | | - "label": "System Settings", |
23 | | - "className": "h-24 flex-col gap-2 bg-slate-50 text-slate-700 hover:bg-slate-100 border-slate-200", |
24 | | - "onClick": "navigate('/settings')" |
| 27 | + "type": "grid", |
| 28 | + "className": "grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4", |
| 29 | + "children": [ |
| 30 | + { |
| 31 | + "type": "card", |
| 32 | + "className": "p-6 shadow-sm", |
| 33 | + "children": [ |
| 34 | + { |
| 35 | + "type": "html", |
| 36 | + "html": "<div class='text-sm font-medium text-muted-foreground'>Total Revenue</div><div class='text-2xl font-bold mt-2'>$45,231.89</div><div class='text-xs text-green-600 mt-1'>+20.1% from last month</div>" |
| 37 | + } |
| 38 | + ] |
| 39 | + }, |
| 40 | + { |
| 41 | + "type": "card", |
| 42 | + "className": "p-6 shadow-sm", |
| 43 | + "children": [ |
| 44 | + { |
| 45 | + "type": "html", |
| 46 | + "html": "<div class='text-sm font-medium text-muted-foreground'>Subscriptions</div><div class='text-2xl font-bold mt-2'>+2350</div><div class='text-xs text-green-600 mt-1'>+180.1% from last month</div>" |
| 47 | + } |
| 48 | + ] |
| 49 | + }, |
| 50 | + { |
| 51 | + "type": "card", |
| 52 | + "className": "p-6 shadow-sm", |
| 53 | + "children": [ |
| 54 | + { |
| 55 | + "type": "html", |
| 56 | + "html": "<div class='text-sm font-medium text-muted-foreground'>Sales</div><div class='text-2xl font-bold mt-2'>+12,234</div><div class='text-xs text-green-600 mt-1'>+19% from last month</div>" |
| 57 | + } |
| 58 | + ] |
| 59 | + }, |
| 60 | + { |
| 61 | + "type": "card", |
| 62 | + "className": "p-6 shadow-sm", |
| 63 | + "children": [ |
| 64 | + { |
| 65 | + "type": "html", |
| 66 | + "html": "<div class='text-sm font-medium text-muted-foreground'>Active Now</div><div class='text-2xl font-bold mt-2'>+573</div><div class='text-xs text-blue-600 mt-1'>+201 since last hour</div>" |
| 67 | + } |
| 68 | + ] |
| 69 | + } |
| 70 | + ] |
| 71 | + }, |
| 72 | + { |
| 73 | + "type": "grid", |
| 74 | + "className": "grid-cols-1 lg:grid-cols-7 gap-4", |
| 75 | + "children": [ |
| 76 | + { |
| 77 | + "type": "card", |
| 78 | + "className": "lg:col-span-4 p-6 shadow-sm border rounded-xl bg-white text-card-foreground", |
| 79 | + "children": [ |
| 80 | + { |
| 81 | + "type": "html", |
| 82 | + "html": "<div class='flex flex-col space-y-1.5 p-6'><h3 class='font-semibold leading-none tracking-tight'>Overview</h3><p class='text-sm text-muted-foreground'>Monthly View</p></div><div class='p-6 pt-0 pl-2'><div class='h-[250px] w-full bg-slate-100 flex items-center justify-center text-slate-400 border border-dashed rounded'>Chart Placeholder</div></div>" |
| 83 | + } |
| 84 | + ] |
| 85 | + }, |
| 86 | + { |
| 87 | + "type": "card", |
| 88 | + "className": "lg:col-span-3 p-0 shadow-sm overflow-hidden", |
| 89 | + "children": [ |
| 90 | + { |
| 91 | + "type": "html", |
| 92 | + "html": "<div class='p-6 pb-2'><h3 class='font-semibold text-lg'>Recent Sales</h3><p class='text-sm text-muted-foreground'>You made 265 sales this month.</p></div>" |
| 93 | + }, |
| 94 | + { |
| 95 | + "type": "div", |
| 96 | + "className": "p-6 pt-0 space-y-6", |
| 97 | + "children": [ |
| 98 | + { |
| 99 | + "type": "html", |
| 100 | + "html": "<div class='flex items-center'><span class='relative flex h-9 w-9 shrink-0 overflow-hidden rounded-full mr-4 bg-slate-200'></span><div class='space-y-1'><p class='text-sm font-medium leading-none'>Olivia Martin</p><p class='text-sm text-muted-foreground'>[email protected]</p></div><div class='ml-auto font-medium'>+$1,999.00</div></div>" |
| 101 | + }, |
| 102 | + { |
| 103 | + "type": "html", |
| 104 | + "html": "<div class='flex items-center'><span class='relative flex h-9 w-9 shrink-0 overflow-hidden rounded-full mr-4 bg-slate-200'></span><div class='space-y-1'><p class='text-sm font-medium leading-none'>Jackson Lee</p><p class='text-sm text-muted-foreground'>[email protected]</p></div><div class='ml-auto font-medium'>+$39.00</div></div>" |
| 105 | + }, |
| 106 | + { |
| 107 | + "type": "html", |
| 108 | + "html": "<div class='flex items-center'><span class='relative flex h-9 w-9 shrink-0 overflow-hidden rounded-full mr-4 bg-slate-200'></span><div class='space-y-1'><p class='text-sm font-medium leading-none'>Isabella Nguyen</p><p class='text-sm text-muted-foreground'>[email protected]</p></div><div class='ml-auto font-medium'>+$299.00</div></div>" |
| 109 | + }, |
| 110 | + { |
| 111 | + "type": "html", |
| 112 | + "html": "<div class='flex items-center'><span class='relative flex h-9 w-9 shrink-0 overflow-hidden rounded-full mr-4 bg-slate-200'></span><div class='space-y-1'><p class='text-sm font-medium leading-none'>William Kim</p><p class='text-sm text-muted-foreground'>[email protected]</p></div><div class='ml-auto font-medium'>+$99.00</div></div>" |
| 113 | + }, |
| 114 | + { |
| 115 | + "type": "html", |
| 116 | + "html": "<div class='flex items-center'><span class='relative flex h-9 w-9 shrink-0 overflow-hidden rounded-full mr-4 bg-slate-200'></span><div class='space-y-1'><p class='text-sm font-medium leading-none'>Sofia Davis</p><p class='text-sm text-muted-foreground'>[email protected]</p></div><div class='ml-auto font-medium'>+$39.00</div></div>" |
| 117 | + } |
| 118 | + ] |
| 119 | + } |
| 120 | + ] |
| 121 | + } |
| 122 | + ] |
25 | 123 | } |
26 | 124 | ] |
27 | 125 | } |
28 | | - } |
| 126 | + ] |
29 | 127 | } |
0 commit comments