File size: 16,611 Bytes
5cb3a81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AssetNinja Tracker - Dashboard</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
        <script>
            tailwind.config = {
                theme: {
                    extend: {
                        colors: {
                            primary: '#3B82F6',
                            secondary: '#10B981',
                            warning: '#F59E0B'
                        }
                    }
                }
            }

            function highlightSolutionType(type) {
                const rows = document.querySelectorAll('#itemsTable tr');
                rows.forEach(row => row.classList.remove('highlight-row'));
                
                document.querySelectorAll(`#itemsTable tr[data-solution-type="${type}"]`)
                    .forEach(row => row.classList.add('highlight-row'));
            }

            // Toggle user dropdown
            document.getElementById('userDropdownBtn')?.addEventListener('click', function() {
                const dropdown = document.getElementById('userDropdown');
                dropdown.classList.toggle('hidden');
            });

            // Close dropdown when clicking outside
            document.addEventListener('click', function(event) {
                const dropdownBtn = document.getElementById('userDropdownBtn');
                const dropdown = document.getElementById('userDropdown');
                
                if (!dropdownBtn.contains(event.target) && !dropdown.contains(event.target)) {
                    dropdown.classList.add('hidden');
                }
            });
        </script>
<style>
        .highlight-row {
            background-color: rgba(59, 130, 246, 0.1);
        }
        .highlight-location {
            background-color: rgba(16, 185, 129, 0.1);
        }
        .highlight-user {
            background-color: rgba(249, 168, 37, 0.1);
        }
    </style>
</head>
<body class="bg-gray-50">
    <div class="min-h-screen flex flex-col">
        <!-- Header -->
        <header class="bg-white shadow-sm">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 flex justify-between items-center">
                <div class="flex items-center space-x-2">
                    <i data-feather="package" class="text-primary"></i>
    <h1 class="text-xl font-bold text-gray-800">AssetNinja Tracker</h1>
</div>
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <button id="userDropdownBtn" class="flex items-center space-x-2 focus:outline-none">
                            <span class="text-sm font-medium text-gray-700">John Doe</span>
                            <i data-feather="chevron-down" class="w-4 h-4 text-gray-500"></i>
                        </button>
                        <div id="userDropdown" class="hidden absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-10">
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Jane Smith</a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Mike Johnson</a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Sarah Williams</a>
                            <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">David Brown</a>
                        </div>
                    </div>
                    <button class="p-2 rounded-full bg-gray-100 text-gray-500 hover:bg-gray-200">
                        <i data-feather="bell"></i>
                    </button>
                </div>
            </div>
        </header>

        <!-- Main Content -->
        <main class="flex-grow">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
                <div class="mb-8">
                    <h2 class="text-2xl font-bold text-gray-800 mb-4">Dashboard Overview</h2>
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                        <div class="bg-white rounded-lg shadow p-6">
                            <div class="flex items-center justify-between">
                                <div>
                                    <p class="text-sm font-medium text-gray-500">Total Assets</p>
                                    <p class="text-2xl font-bold text-primary mt-1">42</p>
                                </div>
                                <div class="p-3 rounded-full bg-blue-50 text-primary">
                                    <i data-feather="box"></i>
                                </div>
                            </div>
                        </div>
                        <div class="bg-white rounded-lg shadow p-6">
                            <div class="flex items-center justify-between">
                                <div>
                                    <p class="text-sm font-medium text-gray-500">Inventory Items</p>
                                    <p class="text-2xl font-bold text-secondary mt-1">28</p>
                                </div>
                                <div class="p-3 rounded-full bg-green-50 text-secondary">
                                    <i data-feather="clipboard"></i>
                                </div>
                            </div>
                        </div>
                        <div class="bg-white rounded-lg shadow p-6">
                            <div class="flex items-center justify-between">
                                <div>
                                    <p class="text-sm font-medium text-gray-500">Work Orders</p>
                                    <p class="text-2xl font-bold text-yellow-500 mt-1">15</p>
                                </div>
                                <div class="p-3 rounded-full bg-yellow-50 text-yellow-500">
                                    <i data-feather="tool"></i>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
    <div class="bg-white rounded-lg shadow overflow-hidden">
        <div class="px-6 py-4 border-b border-gray-200">
            <h3 class="text-lg font-medium text-gray-900">Items List</h3>
        </div>
        <div class="overflow-x-auto">
            <table class="min-w-full divide-y divide-gray-200">
                <thead class="bg-gray-50">
                    <tr>
                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Name</th>
                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Solution Type</th>
                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Last Location</th>
                        <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
                    </tr>
                </thead>
                <tbody class="bg-white divide-y divide-gray-200" id="itemsTable">
                    <!-- Asset Items -->
                    <tr class="asset-row hover:bg-gray-50" data-solution-type="asset" onclick="highlightSolutionType('asset')">
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Laptop Dell XPS</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Asset</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Office Floor 3</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                            <a href="details.html?type=asset&id=1" class="text-primary hover:text-primary-600">View Details</a>
                        </td>
                    </tr>
                    <tr class="asset-row hover:bg-gray-50" data-solution-type="asset" onclick="highlightSolutionType('asset')">
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Projector Epson</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Asset</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Conference Room B</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                            <a href="details.html?type=asset&id=2" class="text-primary hover:text-primary-600">View Details</a>
                        </td>
                    </tr>
                    <tr class="asset-row hover:bg-gray-50" data-solution-type="asset" onclick="highlightSolutionType('asset')">
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">MacBook Pro</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Asset</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Office Floor 1</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                            <a href="details.html?type=asset&id=3" class="text-primary hover:text-primary-600">View Details</a>
                        </td>
                    </tr>
                    <tr class="asset-row hover:bg-gray-50" data-solution-type="asset" onclick="highlightSolutionType('asset')">
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Monitor Dell 24"</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Asset</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Office Floor 2</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                            <a href="details.html?type=asset&id=4" class="text-primary hover:text-primary-600">View Details</a>
                        </td>
                    </tr>
                    <!-- Inventory Items -->
                    <tr class="inventory-row hover:bg-gray-50" data-solution-type="inventory" onclick="highlightSolutionType('inventory')">
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">AA Batteries</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Inventory</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Storage Room</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                            <a href="details.html?type=inventory&id=1" class="text-secondary hover:text-secondary-600">View Details</a>
                        </td>
                    </tr>
                    <tr class="inventory-row hover:bg-gray-50" data-solution-type="inventory" onclick="highlightSolutionType('inventory')">
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">HDMI Cables</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Inventory</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">IT Closet</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                            <a href="details.html?type=inventory&id=2" class="text-secondary hover:text-secondary-600">View Details</a>
                        </td>
                    </tr>
                    <tr class="inventory-row hover:bg-gray-50" data-solution-type="inventory" onclick="highlightSolutionType('inventory')">
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">USB Hubs</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Inventory</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Office Floor 2</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                            <a href="details.html?type=inventory&id=3" class="text-secondary hover:text-secondary-600">View Details</a>
                        </td>
                    </tr>
                    <tr class="inventory-row hover:bg-gray-50" data-solution-type="inventory" onclick="highlightSolutionType('inventory')">
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Notebooks</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Inventory</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Supply Cabinet</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                            <a href="details.html?type=inventory&id=4" class="text-secondary hover:text-secondary-600">View Details</a>
                        </td>
                    </tr>
                    <!-- Work Order Items -->
                    <tr class="workorder-row hover:bg-gray-50" data-solution-type="workorder" onclick="highlightSolutionType('workorder')">
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Printer Maintenance</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Work Order</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Office Floor 1</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                            <a href="details.html?type=workorder&id=1" class="text-yellow-500 hover:text-yellow-600">View Details</a>
                        </td>
                    </tr>
                    <tr class="workorder-row hover:bg-gray-50" data-solution-type="workorder" onclick="highlightSolutionType('workorder')">
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Network Setup</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Work Order</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Conference Room A</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                            <a href="details.html?type=workorder&id=2" class="text-yellow-500 hover:text-yellow-600">View Details</a>
                        </td>
                    </tr>
                    <tr class="workorder-row hover:bg-gray-50" data-solution-type="workorder" onclick="highlightSolutionType('workorder')">
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Desk Assembly</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Work Order</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Office Floor 3</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                            <a href="details.html?type=workorder&id=3" class="text-yellow-500 hover:text-yellow-600">View Details</a>
                        </td>
                    </tr>
                    <tr class="workorder-row hover:bg-gray-50" data-solution-type="workorder" onclick="highlightSolutionType('workorder')">
                        <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Software Installation</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Work Order</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Office Floor 2</td>
                        <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                            <a href="details.html?type=workorder&id=4" class="text-yellow-500 hover:text-yellow-600">View Details</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</body>
</html>