File size: 23,601 Bytes
175e918
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f5995fc
 
175e918
f5995fc
175e918
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f5995fc
 
175e918
 
 
 
 
 
 
 
 
 
 
 
 
f5995fc
 
175e918
 
 
 
 
 
 
 
 
 
 
 
 
f5995fc
 
175e918
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f5995fc
 
 
 
175e918
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f5995fc
 
 
 
175e918
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f5995fc
 
 
 
175e918
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f5995fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175e918
 
 
 
 
 
 
f5995fc
175e918
 
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Project Management System</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <style>
        .dashboard-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        .progress-bar {
            transition: width 0.5s ease-in-out;
        }
        .document-card:hover .document-actions {
            opacity: 1;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Navigation -->
    <nav class="bg-blue-800 text-white shadow-lg">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex justify-between h-16 items-center">
                <div class="flex items-center">
                    <div class="flex-shrink-0 flex items-center">
                        <i class="fas fa-project-diagram text-2xl mr-2"></i>
                        <span class="text-xl font-bold">ProjectHub</span>
                    </div>
                </div>
                <div class="hidden md:block">
                    <div class="ml-10 flex items-center space-x-4">
                        <a href="project-management.html" class="px-3 py-2 rounded-md text-sm font-medium bg-blue-700">Dashboard</a>
                        <a href="document-management.html" class="px-3 py-2 rounded-md text-sm font-medium hover:bg-blue-600">Documents</a>
                        <a href="#" class="px-3 py-2 rounded-md text-sm font-medium hover:bg-blue-600">Workflows</a>
<a href="#" class="px-3 py-2 rounded-md text-sm font-medium hover:bg-blue-600">Checklists</a>
                        <a href="#" class="px-3 py-2 rounded-md text-sm font-medium hover:bg-blue-600">Assets</a>
                        <a href="#" class="px-3 py-2 rounded-md text-sm font-medium hover:bg-blue-600">Reports</a>
                    </div>
                </div>
                <div class="flex items-center">
                    <button class="p-1 rounded-full text-blue-200 hover:text-white focus:outline-none">
                        <i class="fas fa-bell"></i>
                    </button>
                    <div class="ml-3 relative">
                        <div class="h-8 w-8 rounded-full bg-blue-600 flex items-center justify-center cursor-pointer">
                            <span class="text-white font-medium">AD</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </nav>

    <!-- Main Content -->
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
        <!-- Dashboard Header -->
        <div class="flex justify-between items-center mb-8">
            <div>
                <h1 class="text-3xl font-bold text-gray-800">Project Dashboard</h1>
                <p class="text-gray-600">Welcome back, Admin! Here's your project overview.</p>
            </div>
            <div class="flex space-x-3">
                <button class="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 flex items-center">
                    <i class="fas fa-plus mr-2"></i> New Project
                </button>
                <button class="bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 flex items-center">
                    <i class="fas fa-filter mr-2"></i> Filter
                </button>
            </div>
        </div>

        <!-- Stats Cards -->
        <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
            <div class="bg-white rounded-lg shadow-md p-6 dashboard-card transition-all duration-300">
                <div class="flex justify-between items-start">
                    <div>
                        <p class="text-gray-500">Total Projects</p>
                        <h3 class="text-3xl font-bold mt-2">24</h3>
                    </div>
                    <div class="bg-blue-100 p-3 rounded-lg">
                        <i class="fas fa-folder-open text-blue-600"></i>
                    </div>
                </div>
                <div class="mt-4">
                    <div class="flex items-center">
                        <span class="text-green-500 text-sm font-medium">+12%</span>
                        <span class="text-gray-500 text-sm ml-2">vs last month</span>
                    </div>
                </div>
            </div>

            <div class="bg-white rounded-lg shadow-md p-6 dashboard-card transition-all duration-300">
                <div class="flex justify-between items-start">
                    <div>
                        <p class="text-gray-500">Active Workflows</p>
                        <h3 class="text-3xl font-bold mt-2">156</h3>
                    </div>
                    <div class="bg-green-100 p-3 rounded-lg">
                        <i class="fas fa-tasks text-green-600"></i>
                    </div>
                </div>
                <div class="mt-4">
                    <div class="flex items-center">
                        <span class="text-green-500 text-sm font-medium">+8%</span>
                        <span class="text-gray-500 text-sm ml-2">vs last week</span>
                    </div>
                </div>
            </div>

            <div class="bg-white rounded-lg shadow-md p-6 dashboard-card transition-all duration-300">
                <div class="flex justify-between items-start">
                    <div>
                        <p class="text-gray-500">Pending Approvals</p>
                        <h3 class="text-3xl font-bold mt-2">42</h3>
                    </div>
                    <div class="bg-yellow-100 p-3 rounded-lg">
                        <i class="fas fa-clipboard-check text-yellow-600"></i>
                    </div>
                </div>
                <div class="mt-4">
                    <div class="flex items-center">
                        <span class="text-red-500 text-sm font-medium">-5%</span>
                        <span class="text-gray-500 text-sm ml-2">vs yesterday</span>
                    </div>
                </div>
            </div>

            <div class="bg-white rounded-lg shadow-md p-6 dashboard-card transition-all duration-300">
                <div class="flex justify-between items-start">
                    <div>
                        <p class="text-gray-500">Open Issues</p>
                        <h3 class="text-3xl font-bold mt-2">89</h3>
                    </div>
                    <div class="bg-red-100 p-3 rounded-lg">
                        <i class="fas fa-exclamation-triangle text-red-600"></i>
                    </div>
                </div>
                <div class="mt-4">
                    <div class="flex items-center">
                        <span class="text-red-500 text-sm font-medium">+15%</span>
                        <span class="text-gray-500 text-sm ml-2">vs last week</span>
                    </div>
                </div>
            </div>
        </div>

        <!-- Project Progress -->
        <div class="bg-white rounded-lg shadow-md p-6 mb-8">
            <div class="flex justify-between items-center mb-6">
                <h2 class="text-xl font-bold text-gray-800">Project Progress</h2>
                <select class="border border-gray-300 rounded-md px-3 py-1 bg-white text-gray-700">
                    <option>All Projects</option>
                    <option>Mechanical Completion</option>
                    <option>Pre-Commissioning</option>
                    <option>Commissioning</option>
                </select>
            </div>
            
            <div class="space-y-6">
                <!-- Project 1 -->
                <div>
                    <div class="flex justify-between mb-1">
                        <span class="font-medium">EPC Project A - Mechanical</span>
                        <span class="font-medium">75%</span>
                    </div>
                    <div class="w-full bg-gray-200 rounded-full h-2.5">
                        <div class="bg-blue-600 h-2.5 rounded-full progress-bar" style="width: 75%" data-project="epc-a"></div>
</div>
                    <div class="flex justify-between text-sm text-gray-500 mt-1">
                        <span>42/56 systems completed</span>
                        <span>Next milestone: Pre-Commissioning</span>
                    </div>
                </div>
                
                <!-- Project 2 -->
                <div>
                    <div class="flex justify-between mb-1">
                        <span class="font-medium">Turnaround Project B - Commissioning</span>
                        <span class="font-medium">32%</span>
                    </div>
                    <div class="w-full bg-gray-200 rounded-full h-2.5">
                        <div class="bg-green-500 h-2.5 rounded-full progress-bar" style="width: 32%" data-project="turnaround-b"></div>
</div>
                    <div class="flex justify-between text-sm text-gray-500 mt-1">
                        <span>18/56 systems completed</span>
                        <span>Next milestone: System Testing</span>
                    </div>
                </div>
                
                <!-- Project 3 -->
                <div>
                    <div class="flex justify-between mb-1">
                        <span class="font-medium">Greenfield Project C - Handover</span>
                        <span class="font-medium">89%</span>
                    </div>
                    <div class="w-full bg-gray-200 rounded-full h-2.5">
                        <div class="bg-purple-500 h-2.5 rounded-full progress-bar" style="width: 89%" data-project="greenfield-c"></div>
</div>
                    <div class="flex justify-between text-sm text-gray-500 mt-1">
                        <span>89/100 punch items closed</span>
                        <span>Next milestone: Final Documentation</span>
                    </div>
                </div>
            </div>
        </div>

        <!-- Recent Documents & Activities -->
        <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
            <!-- Recent Documents -->
            <div class="bg-white rounded-lg shadow-md p-6">
                <div class="flex justify-between items-center mb-6">
                    <h2 class="text-xl font-bold text-gray-800">Recent Documents</h2>
                    <button class="text-blue-600 hover:text-blue-800 text-sm font-medium">View All</button>
                </div>
                
                <div class="space-y-4">
                    <div class="document-card border border-gray-200 rounded-lg p-4 hover:border-blue-200 hover:bg-blue-50 transition-colors duration-200">
                        <div class="flex justify-between">
                            <div class="flex items-start">
                                <div class="bg-blue-100 p-2 rounded-lg mr-3">
                                    <i class="fas fa-file-pdf text-blue-600"></i>
                                </div>
                                <div>
                                    <h3 class="font-medium">ITR-001 Mechanical Completion</h3>
                                    <p class="text-sm text-gray-500">EPC Project A • Version 1.2</p>
                                    <div class="flex items-center mt-1 text-sm text-gray-500">
                                        <span>Updated 2 hours ago</span>
                                        <span class="mx-2"></span>
                                        <span>John Doe</span>
                                    </div>
                                </div>
                            </div>
                            <div class="document-actions opacity-0 transition-opacity duration-200">
                            <button class="text-blue-600 hover:text-blue-800 p-1" onclick="viewDocument('itr-001')"><i class="fas fa-eye"></i></button>
                            <button class="text-blue-600 hover:text-blue-800 p-1 ml-2"><i class="fas fa-download"></i></button>
                            <button class="text-blue-600 hover:text-blue-800 p-1 ml-2" onclick="updateProjectStatus('epc-a', 'mechanical-complete', 'itr-001')"><i class="fas fa-check-circle"></i></button>
</div>
                        </div>
                    </div>
                    
                    <div class="document-card border border-gray-200 rounded-lg p-4 hover:border-blue-200 hover:bg-blue-50 transition-colors duration-200">
                        <div class="flex justify-between">
                            <div class="flex items-start">
                                <div class="bg-green-100 p-2 rounded-lg mr-3">
                                    <i class="fas fa-file-excel text-green-600"></i>
                                </div>
                                <div>
                                    <h3 class="font-medium">Check Sheet - Pump P-101</h3>
                                    <p class="text-sm text-gray-500">Turnaround Project B • Version 3.1</p>
                                    <div class="flex items-center mt-1 text-sm text-gray-500">
                                        <span>Updated yesterday</span>
                                        <span class="mx-2"></span>
                                        <span>Jane Smith</span>
                                    </div>
                                </div>
                            </div>
                            <div class="document-actions opacity-0 transition-opacity duration-200">
                            <button class="text-blue-600 hover:text-blue-800 p-1" onclick="viewDocument('pump-check')"><i class="fas fa-eye"></i></button>
                            <button class="text-blue-600 hover:text-blue-800 p-1 ml-2"><i class="fas fa-download"></i></button>
                            <button class="text-blue-600 hover:text-blue-800 p-1 ml-2" onclick="updateProjectStatus('turnaround-b', 'testing', 'pump-check')"><i class="fas fa-check-circle"></i></button>
</div>
                        </div>
                    </div>
                    
                    <div class="document-card border border-gray-200 rounded-lg p-4 hover:border-blue-200 hover:bg-blue-50 transition-colors duration-200">
                        <div class="flex justify-between">
                            <div class="flex items-start">
                                <div class="bg-purple-100 p-2 rounded-lg mr-3">
                                    <i class="fas fa-file-word text-purple-600"></i>
                                </div>
                                <div>
                                    <h3 class="font-medium">Commissioning Procedure</h3>
                                    <p class="text-sm text-gray-500">Greenfield Project C • Version 2.0</p>
                                    <div class="flex items-center mt-1 text-sm text-gray-500">
                                        <span>Updated 3 days ago</span>
                                        <span class="mx-2"></span>
                                        <span>Mike Johnson</span>
                                    </div>
                                </div>
                            </div>
                            <div class="document-actions opacity-0 transition-opacity duration-200">
                            <button class="text-blue-600 hover:text-blue-800 p-1" onclick="viewDocument('commissioning-proc')"><i class="fas fa-eye"></i></button>
                            <button class="text-blue-600 hover:text-blue-800 p-1 ml-2"><i class="fas fa-download"></i></button>
                            <button class="text-blue-600 hover:text-blue-800 p-1 ml-2" onclick="updateProjectStatus('greenfield-c', 'commissioning', 'commissioning-proc')"><i class="fas fa-check-circle"></i></button>
</div>
                        </div>
                    </div>
                </div>
                
                <button class="mt-4 w-full py-2 border border-dashed border-gray-300 rounded-lg text-gray-500 hover:border-blue-300 hover:text-blue-600 transition-colors duration-200">
                    <i class="fas fa-plus mr-2"></i> Upload New Document
                </button>
            </div>
            
            <!-- Recent Activities -->
            <div class="bg-white rounded-lg shadow-md p-6">
                <div class="flex justify-between items-center mb-6">
                    <h2 class="text-xl font-bold text-gray-800">Recent Activities</h2>
                    <button class="text-blue-600 hover:text-blue-800 text-sm font-medium">View All</button>
                </div>
                
                <div class="space-y-4">
                    <div class="flex items-start">
                        <div class="bg-blue-100 p-2 rounded-full mr-3">
                            <i class="fas fa-tasks text-blue-600 text-sm"></i>
                        </div>
                        <div>
                            <p class="text-sm"><span class="font-medium">Sarah Lee</span> completed checklist <span class="font-medium">Pump Alignment</span> for <span class="text-blue-600">P-101</span></p>
                            <p class="text-xs text-gray-500 mt-1">2 hours ago • EPC Project A</p>
                        </div>
                    </div>
                    
                    <div class="flex items-start">
                        <div class="bg-green-100 p-2 rounded-full mr-3">
                            <i class="fas fa-check-circle text-green-600 text-sm"></i>
                        </div>
                        <div>
                            <p class="text-sm"><span class="font-medium">David Kim</span> approved <span class="font-medium">ITR-002</span> for Mechanical Completion</p>
                            <p class="text-xs text-gray-500 mt-1">5 hours ago • Turnaround Project B</p>
                        </div>
                    </div>
                    
                    <div class="flex items-start">
                        <div class="bg-yellow-100 p-2 rounded-full mr-3">
                            <i class="fas fa-exclamation-triangle text-yellow-600 text-sm"></i>
                        </div>
                        <div>
                            <p class="text-sm"><span class="font-medium">System</span> assigned punch item <span class="text-yellow-600">#PL-204</span> to <span class="font-medium">John Doe</span></p>
                            <p class="text-xs text-gray-500 mt-1">Yesterday • Greenfield Project C</p>
                        </div>
                    </div>
                    
                    <div class="flex items-start">
                        <div class="bg-purple-100 p-2 rounded-full mr-3">
                            <i class="fas fa-file-upload text-purple-600 text-sm"></i>
                        </div>
                        <div>
                            <p class="text-sm"><span class="font-medium">Emma Wilson</span> uploaded new version of <span class="font-medium">Commissioning Procedure</span></p>
                            <p class="text-xs text-gray-500 mt-1">Yesterday • EPC Project A</p>
                        </div>
                    </div>
                    
                    <div class="flex items-start">
                        <div class="bg-red-100 p-2 rounded-full mr-3">
                            <i class="fas fa-comment-dots text-red-600 text-sm"></i>
                        </div>
                        <div>
                            <p class="text-sm"><span class="font-medium">Mark Taylor</span> commented on punch item <span class="text-red-600">#PL-198</span></p>
                            <p class="text-xs text-gray-500 mt-1">2 days ago • Turnaround Project B</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Mobile Bottom Navigation (hidden on desktop) -->
    <div class="md:hidden fixed bottom-0 left-0 right-0 bg-white shadow-lg border-t border-gray-200">
        <div class="flex justify-around py-3">
            <a href="#" class="text-blue-600 flex flex-col items-center">
                <i class="fas fa-home"></i>
                <span class="text-xs mt-1">Home</span>
            </a>
            <a href="#" class="text-gray-600 flex flex-col items-center">
                <i class="fas fa-tasks"></i>
                <span class="text-xs mt-1">Tasks</span>
            </a>
            <a href="#" class="text-gray-600 flex flex-col items-center">
                <i class="fas fa-file"></i>
                <span class="text-xs mt-1">Docs</span>
            </a>
            <a href="#" class="text-gray-600 flex flex-col items-center">
                <i class="fas fa-cog"></i>
                <span class="text-xs mt-1">Settings</span>
            </a>
        </div>
    </div>

    <script>
        // Document version control functionality
        document.querySelectorAll('.document-card').forEach(card => {
            card.addEventListener('mouseenter', function() {
                this.querySelector('.document-actions').style.opacity = '1';
            });
            card.addEventListener('mouseleave', function() {
                this.querySelector('.document-actions').style.opacity = '0';
            });
        });

        // Barcode scanning simulation
        function scanBarcode() {
            alert('Barcode scanning would be implemented here using device camera API');
            // In real implementation would use:
            // navigator.mediaDevices.getUserMedia or QuaggaJS for barcode scanning
        }
        // Document and project status functions
        function viewDocument(docId) {
            window.location.href = `document-management.html#${docId}`;
        }

        function updateProjectStatus(projectId, newStatus, documentId) {
            if (confirm(`Update project ${projectId} to ${newStatus} based on document ${documentId}?`)) {
                // In real implementation would make API call to update status
                alert(`Project ${projectId} status updated to ${newStatus}`);
                // Refresh project progress bars
                document.querySelectorAll('.progress-bar').forEach(bar => {
                    if (bar.getAttribute('data-project') === projectId) {
                        const newWidth = getNewWidthForStatus(newStatus);
                        bar.style.width = newWidth;
                        bar.previousElementSibling.textContent = newWidth;
                    }
                });
            }
        }

        function getNewWidthForStatus(status) {
            // Simplified for demo - would calculate based on actual project phase
            const statusMap = {
                'mechanical-complete': '75%',
                'testing': '32%',
                'commissioning': '89%'
            };
            return statusMap[status] || '50%';
        }

        // Mobile offline sync simulation
        if (navigator.onLine) {
            console.log('Online - syncing data with cloud');
        } else {
            console.log('Offline - working in offline mode, changes will sync when online');
        }
</script>
</body>
</html>