Ultronprime commited on
Commit
d59eea8
·
verified ·
1 Parent(s): b694f71

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +952 -19
  3. prompts.txt +2 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: St Dashboard
3
- emoji: 📊
4
- colorFrom: gray
5
- colorTo: yellow
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: st-dashboard
3
+ emoji: 🐳
4
+ colorFrom: yellow
5
+ colorTo: purple
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,952 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Seven Tides Commercial Dashboard</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .email-dropzone {
11
+ border: 2px dashed #9CA3AF;
12
+ transition: all 0.3s ease;
13
+ }
14
+ .email-dropzone.dragover {
15
+ border-color: #3B82F6;
16
+ background-color: rgba(59, 130, 246, 0.05);
17
+ }
18
+ .project-card {
19
+ transition: all 0.2s ease;
20
+ }
21
+ .project-card:hover {
22
+ transform: translateY(-2px);
23
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
24
+ }
25
+ .progress-bar {
26
+ height: 6px;
27
+ border-radius: 3px;
28
+ transition: width 0.5s ease;
29
+ }
30
+ .status-critical { background-color: #EF4444; }
31
+ .status-high { background-color: #F59E0B; }
32
+ .status-medium { background-color: #3B82F6; }
33
+ .status-low { background-color: #10B981; }
34
+ .approval-matrix-cell {
35
+ position: relative;
36
+ height: 20px;
37
+ margin: 1px;
38
+ }
39
+ .approval-matrix-cell span {
40
+ position: absolute;
41
+ top: 50%;
42
+ left: 50%;
43
+ transform: translate(-50%, -50%);
44
+ font-size: 10px;
45
+ color: white;
46
+ }
47
+ .timeline-item::before {
48
+ content: '';
49
+ position: absolute;
50
+ left: -24px;
51
+ top: 8px;
52
+ width: 12px;
53
+ height: 12px;
54
+ border-radius: 50%;
55
+ background-color: #3B82F6;
56
+ }
57
+ .document-chip {
58
+ display: inline-block;
59
+ padding: 0.25rem 0.5rem;
60
+ margin: 0.1rem;
61
+ border-radius: 9999px;
62
+ font-size: 0.75rem;
63
+ line-height: 1;
64
+ }
65
+ .financial-card {
66
+ background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
67
+ }
68
+ .authority-card {
69
+ background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
70
+ }
71
+ </style>
72
+ </head>
73
+ <body class="bg-gray-50 font-sans">
74
+ <div class="container mx-auto px-4 py-6">
75
+ <!-- Header with dropzone -->
76
+ <div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8 gap-4">
77
+ <div>
78
+ <div class="flex items-center">
79
+ <img src="https://via.placeholder.com/40" alt="Company Logo" class="h-10 w-10 rounded mr-3">
80
+ <div>
81
+ <h1 class="text-3xl font-bold text-gray-800">Seven Tides Commercial Dashboard</h1>
82
+ <p class="text-gray-600">Project tracking and document/email intelligence system</p>
83
+ </div>
84
+ </div>
85
+ </div>
86
+
87
+ <!-- Email dropzone -->
88
+ <div id="dropzone" class="email-dropzone w-full md:w-64 h-20 p-2 rounded-lg flex flex-col items-center justify-center cursor-pointer">
89
+ <div class="flex items-center">
90
+ <i class="fas fa-envelope text-gray-400 text-xl mr-2"></i>
91
+ <div>
92
+ <p class="text-sm text-gray-500">Drop email .txt files here</p>
93
+ <p class="text-xs text-gray-400">or click to select files</p>
94
+ </div>
95
+ </div>
96
+ <input type="file" id="fileInput" class="hidden" accept=".txt" multiple>
97
+ </div>
98
+ </div>
99
+
100
+ <!-- Processing indicator -->
101
+ <div id="processingContainer" class="hidden mb-8">
102
+ <div class="flex items-center mb-2">
103
+ <i class="fas fa-spinner fa-spin text-blue-500 mr-2"></i>
104
+ <span class="text-sm font-medium">Analyzing emails and documents...</span>
105
+ <span id="processingStatus" class="text-sm text-gray-500 ml-2"></span>
106
+ </div>
107
+ <div class="w-full bg-gray-200 rounded-full overflow-hidden">
108
+ <div id="progressBar" class="progress-bar bg-blue-500" style="width: 0%"></div>
109
+ </div>
110
+ </div>
111
+
112
+ <!-- Dashboard content -->
113
+
114
+ <!-- URGENT section -->
115
+ <div class="bg-red-50 border-l-4 border-red-500 rounded-r-lg p-4 mb-8">
116
+ <div class="flex justify-between items-center mb-3">
117
+ <h2 class="text-xl font-bold text-red-800 flex items-center">
118
+ <i class="fas fa-exclamation-triangle mr-2"></i>
119
+ 🔴 URGENT / MUST ACTION
120
+ </h2>
121
+ <span class="bg-red-100 text-red-800 text-xs font-medium px-2.5 py-0.5 rounded-full">3 CRITICAL</span>
122
+ </div>
123
+
124
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4" id="urgentItemsList">
125
+ <div class="bg-white p-4 rounded-lg shadow border border-red-200">
126
+ <div class="flex justify-between items-start mb-2">
127
+ <h3 class="font-bold text-red-800">IBGOB Contract Renewal</h3>
128
+ <span class="bg-red-100 text-red-800 text-xs font-medium px-2 py-0.5 rounded">TODAY</span>
129
+ </div>
130
+ <p class="text-sm text-gray-600 mb-2">Legal department approval pending for final signature</p>
131
+ <div class="flex items-center text-xs text-gray-500">
132
+ <i class="fas fa-clock mr-1"></i>
133
+ <span>Deadline: Today EOD</span>
134
+ </div>
135
+ <div class="flex mt-2 gap-1 flex-wrap">
136
+ <span class="document-chip bg-red-100 text-red-800">Contract</span>
137
+ <span class="document-chip bg-blue-100 text-blue-800">MD Approval</span>
138
+ </div>
139
+ </div>
140
+
141
+ <div class="bg-white p-4 rounded-lg shadow border border-red-200">
142
+ <div class="flex justify-between items-start mb-2">
143
+ <h3 class="font-bold text-red-800">Dewa Final Approval</h3>
144
+ <span class="bg-red-100 text-red-800 text-xs font-medium px-2 py-0.5 rounded">URGENT</span>
145
+ </div>
146
+ <p class="text-sm text-gray-600 mb-2">Electrical drawings require commercial sign-off before submission</p>
147
+ <div class="flex items-center text-xs text-gray-500">
148
+ <i class="fas fa-clock mr-1"></i>
149
+ <span>Due: Tomorrow AM</span>
150
+ </div>
151
+ <div class="flex mt-2 gap-1 flex-wrap">
152
+ <span class="document-chip bg-green-100 text-green-800">Authority</span>
153
+ <span class="document-chip bg-purple-100 text-purple-800">1-Electrical</span>
154
+ </div>
155
+ </div>
156
+
157
+ <div class="bg-white p-4 rounded-lg shadow border border-red-200">
158
+ <div class="flex justify-between items-start mb-2">
159
+ <h3 class="font-bold text-red-800">Cheque Ready - Mars Digital</h3>
160
+ <span class="bg-red-100 text-red-800 text-xs font-medium px-2 py-0.5 rounded">DELAYED</span>
161
+ </div>
162
+ <p class="text-sm text-gray-600 mb-2">Payment LPO#457-2023 awaiting collection by vendor</p>
163
+ <div class="flex items-center text-xs text-gray-500">
164
+ <i class="fas fa-clock mr-1"></i>
165
+ <span>Since: 2 days ago</span>
166
+ </div>
167
+ <div class="flex mt-2 gap-1 flex-wrap">
168
+ <span class="document-chip bg-yellow-100 text-yellow-800">LPO</span>
169
+ <span class="document-chip bg-pink-100 text-pink-800">Finance</span>
170
+ </div>
171
+ </div>
172
+ </div>
173
+ </div>
174
+
175
+ <!-- Approvals Pipeline -->
176
+ <div class="bg-white rounded-xl shadow p-6 mb-8">
177
+ <h2 class="text-xl font-bold mb-6 text-gray-800 flex items-center">
178
+ <i class="fas fa-tasks mr-2 text-blue-500"></i>
179
+ APPROVALS PIPELINE
180
+ </h2>
181
+
182
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
183
+ <!-- Pending MD -->
184
+ <div>
185
+ <h3 class="font-medium text-gray-700 mb-3 flex items-center">
186
+ <div class="w-3 h-3 rounded-full bg-purple-500 mr-2"></div>
187
+ Pending MD
188
+ </h3>
189
+ <div class="space-y-3">
190
+ <div class="p-3 border-l-4 border-purple-500 bg-purple-50 rounded-r-lg">
191
+ <div class="font-medium text-gray-800">VAF-BSI-1831</div>
192
+ <p class="text-sm text-gray-600">Variance approval request</p>
193
+ <div class="text-xs text-gray-500 mt-2">
194
+ <span class="block">Project: Seven City</span>
195
+ <span class="block">Submitted: Yesterday</span>
196
+ </div>
197
+ </div>
198
+
199
+ <div class="p-3 border-l-4 border-purple-500 bg-purple-50 rounded-r-lg">
200
+ <div class="font-medium text-gray-800">CPX-RENEWAL-2023</div>
201
+ <p class="text-sm text-gray-600">7CJLT elevator maintenance</p>
202
+ <div class="text-xs text-gray-500 mt-2">
203
+ <span class="block">Vendor: Schindler</span>
204
+ <span class="block">Amount: AED 85,000</span>
205
+ </div>
206
+ </div>
207
+ </div>
208
+ </div>
209
+
210
+ <!-- Pending Finance -->
211
+ <div>
212
+ <h3 class="font-medium text-gray-700 mb-3 flex items-center">
213
+ <div class="w-3 h-3 rounded-full bg-green-500 mr-2"></div>
214
+ Pending Finance
215
+ </h3>
216
+ <div class="space-y-3">
217
+ <div class="p-3 border-l-4 border-green-500 bg-green-50 rounded-r-lg">
218
+ <div class="font-medium text-gray-800">INV#457-2023</div>
219
+ <p class="text-sm text-gray-600">Mars Digital Systems</p>
220
+ <div class="text-xs text-gray-500 mt-2">
221
+ <span class="block">Amount: AED 28,500</span>
222
+ <span class="block">Due: 3 days</span>
223
+ </div>
224
+ </div>
225
+
226
+ <div class="p-3 border-l-4 border-green-500 bg-green-50 rounded-r-lg">
227
+ <div class="font-medium text-gray-800">PR/ST-ENG/04</div>
228
+ <p class="text-sm text-gray-600">Emergency plumbing works</p>
229
+ <div class="text-xs text-gray-500 mt-2">
230
+ <span class="block">Vendor: Al Qadar</span>
231
+ <span class="block">Est. Cost: AED 12,300</span>
232
+ </div>
233
+ </div>
234
+ </div>
235
+ </div>
236
+
237
+ <!-- Pending Commercial -->
238
+ <div>
239
+ <h3 class="font-medium text-gray-700 mb-3 flex items-center">
240
+ <div class="w-3 h-3 rounded-full bg-blue-500 mr-2"></div>
241
+ Pending Commercial
242
+ </h3>
243
+ <div class="space-y-3">
244
+ <div class="p-3 border-l-4 border-blue-500 bg-blue-50 rounded-r-lg">
245
+ <div class="font-medium text-gray-800">Service Agreement</div>
246
+ <p class="text-sm text-gray-600">Top Fire maintenance</p>
247
+ <div class="text-xs text-gray-500 mt-2">
248
+ <span class="block">3rd revision</span>
249
+ <span class="block">Requested by Engineering</span>
250
+ </div>
251
+ </div>
252
+
253
+ <div class="p-3 border-l-4 border-blue-500 bg-blue-50 rounded-r-lg">
254
+ <div class="font-medium text-gray-800">Nakheel NOC</div>
255
+ <p class="text-sm text-gray-600">IBGR boundary modification</p>
256
+ <div class="text-xs text-gray-500 mt-2">
257
+ <span class="block">Draft ready for review</span>
258
+ <span class="block">Due: Friday</span>
259
+ </div>
260
+ </div>
261
+ </div>
262
+ </div>
263
+
264
+ <!-- Recently Approved/Rejected -->
265
+ <div>
266
+ <h3 class="font-medium text-gray-700 mb-3 flex items-center">
267
+ <div class="w-3 h-3 rounded-full bg-gray-400 mr-2"></div>
268
+ Recent Decisions
269
+ </h3>
270
+ <div class="space-y-3">
271
+ <div class="p-3 border-l-4 border-green-500 bg-green-50 rounded-r-lg">
272
+ <div class="flex justify-between">
273
+ <div class="font-medium text-gray-800">LPO#123-2023</div>
274
+ <span class="text-xs bg-green-100 text-green-800 px-2 py-0.5 rounded-full">Approved</span>
275
+ </div>
276
+ <p class="text-sm text-gray-600">Bauhaus furniture</p>
277
+ <div class="text-xs text-gray-500 mt-1">Today 10:30 AM</div>
278
+ </div>
279
+
280
+ <div class="p-3 border-l-4 border-red-500 bg-red-50 rounded-r-lg">
281
+ <div class="flex justify-between">
282
+ <div class="font-medium text-gray-800">Artline Contract</div>
283
+ <span class="text-xs bg-red-100 text-red-800 px-2 py-0.5 rounded-full">Rejected</span>
284
+ </div>
285
+ <p class="text-sm text-gray-600">Revised terms needed</p>
286
+ <div class="text-xs text-gray-500 mt-1">Yesterday 4:15 PM</div>
287
+ </div>
288
+ </div>
289
+ </div>
290
+ </div>
291
+ </div>
292
+
293
+ <!-- Projects Overview -->
294
+ <div class="bg-white rounded-xl shadow p-6 mb-8">
295
+ <div class="flex justify-between items-center mb-6">
296
+ <h2 class="text-xl font-bold text-gray-800 flex items-center">
297
+ <i class="fas fa-project-diagram mr-2 text-blue-500"></i>
298
+ PROJECTS OVERVIEW
299
+ </h2>
300
+ <div class="flex space-x-2">
301
+ <div class="text-sm px-3 py-1 bg-gray-100 rounded-full">All (14)</div>
302
+ <div class="text-sm px-3 py-1 bg-green-100 text-green-800 rounded-full">On Track (8)</div>
303
+ <div class="text-sm px-3 py-1 bg-yellow-100 text-yellow-800 rounded-full">At Risk (4)</div>
304
+ <div class="text-sm px-3 py-1 bg-red-100 text-red-800 rounded-full">Off Track (2)</div>
305
+ </div>
306
+ </div>
307
+
308
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6" id="projectsContainer">
309
+ <!-- Project cards will be populated here -->
310
+ </div>
311
+
312
+ <div class="mt-8">
313
+ <h3 class="font-medium text-gray-700 mb-3">Active Projects by Status</h3>
314
+ <div class="h-64" id="projectStatusChart"></div>
315
+ </div>
316
+ </div>
317
+
318
+ <!-- Financial Watch -->
319
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
320
+ <div class="financial-card rounded-xl shadow p-6">
321
+ <div class="flex justify-between items-start mb-4">
322
+ <h2 class="text-xl font-bold text-gray-800 flex items-center">
323
+ <i class="fas fa-money-bill-wave mr-2 text-green-500"></i>
324
+ 💰 FINANCIAL WATCH
325
+ </h2>
326
+ <div class="flex space-x-2">
327
+ <div class="text-xs px-2 py-1 bg-green-200 text-green-800 rounded-full">This Week</div>
328
+ </div>
329
+ </div>
330
+
331
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
332
+ <div class="bg-white rounded-lg p-3 shadow">
333
+ <div class="text-blue-600 text-sm font-medium mb-1">LPOs Issued</div>
334
+ <div class="flex justify-between items-end">
335
+ <div class="text-2xl font-bold">7</div>
336
+ <div class="text-xs bg-green-100 text-green-800 px-2 py-0.5 rounded-full">+2 from last week</div>
337
+ </div>
338
+ </div>
339
+
340
+ <div class="bg-white rounded-lg p-3 shadow">
341
+ <div class="text-blue-600 text-sm font-medium mb-1">Invoices Pending</div>
342
+ <div class="flex justify-between items-end">
343
+ <div class="text-2xl font-bold">12</div>
344
+ <div class="text-xs bg-yellow-100 text-yellow-800 px-2 py-0.5 rounded-full">3 overdue</div>
345
+ </div>
346
+ </div>
347
+ </div>
348
+
349
+ <div class="bg-white rounded-lg p-3 shadow">
350
+ <div class="flex justify-between items-center mb-2">
351
+ <div class="text-blue-600 text-sm font-medium">Top Payments This Week</div>
352
+ <div class="text-xs text-blue-600">AED</div>
353
+ </div>
354
+ <div class="space-y-3">
355
+ <div>
356
+ <div class="flex justify-between text-sm mb-1">
357
+ <span>Schindler Lifts</span>
358
+ <span class="font-medium">85,000</span>
359
+ </div>
360
+ <div class="w-full bg-gray-200 rounded-full h-1.5">
361
+ <div class="bg-green-500 h-1.5 rounded-full" style="width: 100%"></div>
362
+ </div>
363
+ </div>
364
+ <div>
365
+ <div class="flex justify-between text-sm mb-1">
366
+ <span>AG Elevator</span>
367
+ <span class="font-medium">62,300</span>
368
+ </div>
369
+ <div class="w-full bg-gray-200 rounded-full h-1.5">
370
+ <div class="bg-green-500 h-1.5 rounded-full" style="width: 73%"></div>
371
+ </div>
372
+ </div>
373
+ <div>
374
+ <div class="flex justify-between text-sm mb-1">
375
+ <span>Mars Digital</span>
376
+ <span class="font-medium">28,500</span>
377
+ </div>
378
+ <div class="w-full bg-gray-200 rounded-full h-1.5">
379
+ <div class="bg-green-500 h-1.5 rounded-full" style="width: 33%"></div>
380
+ </div>
381
+ </div>
382
+ </div>
383
+ </div>
384
+ </div>
385
+
386
+ <!-- Authority Approvals Matrix -->
387
+ <div class="authority-card rounded-xl shadow p-6">
388
+ <h2 class="text-xl font-bold mb-4 text-gray-800 flex items-center">
389
+ <i class="fas fa-landmark mr-2 text-blue-500"></i>
390
+ 🏛️ AUTHORITY APPROVALS
391
+ </h2>
392
+
393
+ <div class="mb-4 overflow-x-auto">
394
+ <table class="w-full text-sm text-left">
395
+ <thead>
396
+ <tr>
397
+ <th class="py-2 pr-4">Project</th>
398
+ <th class="py-2 px-1 text-center" title="1-Electrical">⚡</th>
399
+ <th class="py-2 px-1 text-center" title="2-Water">💧</th>
400
+ <th class="py-2 px-1 text-center" title="3-Sewage">♻️</th>
401
+ <th class="py-2 px-1 text-center" title="5-Telecom">📡</th>
402
+ <th class="py-2 px-1 text-center" title="8-NOC Building Permit">📝</th>
403
+ <th class="py-2 px-1 text-center" title="9-Building Permit">🏗️</th>
404
+ <th class="py-2 px-1 text-center" title="11-BCC">✅</th>
405
+ </tr>
406
+ </thead>
407
+ <tbody>
408
+ <tr>
409
+ <td class="py-2 pr-4 font-medium">IBGOB</td>
410
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
411
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
412
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
413
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-yellow-500 rounded"><span>!</span></div></td>
414
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-yellow-500 rounded"><span>!</span></div></td>
415
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-gray-300 rounded"></div></td>
416
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-gray-300 rounded"></div></td>
417
+ </tr>
418
+ <tr>
419
+ <td class="py-2 pr-4 font-medium">7CJLT</td>
420
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
421
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
422
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
423
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
424
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
425
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
426
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
427
+ </tr>
428
+ <tr>
429
+ <td class="py-2 pr-4 font-medium">IBGR</td>
430
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
431
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
432
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
433
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
434
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-red-500 rounded"><span>X</span></div></td>
435
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-gray-300 rounded"></div></td>
436
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-gray-300 rounded"></div></td>
437
+ </tr>
438
+ <tr>
439
+ <td class="py-2 pr-4 font-medium">Royal Amwaj</td>
440
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
441
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
442
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
443
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
444
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-green-500 rounded"><span>✓</span></div></td>
445
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-yellow-500 rounded"><span>!</span></div></td>
446
+ <td class="py-2 px-1"><div class="approval-matrix-cell bg-gray-300 rounded"></div></td>
447
+ </tr>
448
+ </tbody>
449
+ </table>
450
+ </div>
451
+
452
+ <div class="flex items-center text-xs text-gray-500">
453
+ <div class="flex items-center mr-3">
454
+ <div class="w-3 h-3 rounded-full bg-green-500 mr-1"></div>
455
+ <span>Approved</span>
456
+ </div>
457
+ <div class="flex items-center mr-3">
458
+ <div class="w-3 h-3 rounded-full bg-yellow-500 mr-1"></div>
459
+ <span>Pending</span>
460
+ </div>
461
+ <div class="flex items-center mr-3">
462
+ <div class="w-3 h-3 rounded-full bg-red-500 mr-1"></div>
463
+ <span>Rejected</span>
464
+ </div>
465
+ <div class="flex items-center">
466
+ <div class="w-3 h-3 rounded-full bg-gray-300 mr-1"></div>
467
+ <span>Not Started</span>
468
+ </div>
469
+ </div>
470
+ </div>
471
+ </div>
472
+
473
+ <!-- Recent Activity -->
474
+ <div class="bg-white rounded-xl shadow p-6 mb-8">
475
+ <h2 class="text-xl font-bold mb-4 text-gray-800 flex items-center">
476
+ <i class="fas fa-history mr-2 text-blue-500"></i>
477
+ RECENT ACTIVITY (Last 24 hours)
478
+ </h2>
479
+
480
+ <div class="space-y-4 relative pl-6 border-l border-gray-200">
481
+ <div class="timeline-item relative pl-3">
482
+ <div class="text-sm font-medium">New Service Agreement processed</div>
483
+ <div class="text-xs text-gray-600">Vendor: Artline Engineering • Project: IBGOB</div>
484
+ <div class="text-xs text-gray-400 mt-1">Today 11:42 AM</div>
485
+ </div>
486
+
487
+ <div class="timeline-item relative pl-3">
488
+ <div class="text-sm font-medium">Email from Legal department</div>
489
+ <div class="text-xs text-gray-600">Subject: URGENT: IBGOB Contract revisions needed</div>
490
+ <div class="text-xs text-gray-400 mt-1">Today 9:15 AM</div>
491
+ </div>
492
+
493
+ <div class="timeline-item relative pl-3">
494
+ <div class="text-sm font-medium">Document handed to Finance</div>
495
+ <div class="text-xs text-gray-600">LPO#457-2023 for Mars Digital Systems</div>
496
+ <div class="text-xs text-gray-400 mt-1">Today 8:30 AM</div>
497
+ </div>
498
+
499
+ <div class="timeline-item relative pl-3">
500
+ <div class="text-sm font-medium">CAPEX approval completed</div>
501
+ <div class="text-xs text-gray-600">CPX-RENEWAL-2023 • Amount: AED 85,000</div>
502
+ <div class="text-xs text-gray-400 mt-1">Yesterday 4:45 PM</div>
503
+ </div>
504
+
505
+ <div class="timeline-item relative pl-3">
506
+ <div class="text-sm font-medium">Project status update received</div>
507
+ <div class="text-xs text-gray-600">Seven City • Milestone: 85% complete</div>
508
+ <div class="text-xs text-gray-400 mt-1">Yesterday 3:20 PM</div>
509
+ </div>
510
+ </div>
511
+ </div>
512
+
513
+ <!-- Document Categories Breakdown -->
514
+ <div class="bg-white rounded-xl shadow p-6 mb-8">
515
+ <h2 class="text-xl font-bold mb-4 text-gray-800 flex items-center">
516
+ <i class="fas fa-folder-open mr-2 text-blue-500"></i>
517
+ DOCUMENT CATEGORIES (Last 30 days)
518
+ </h2>
519
+
520
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
521
+ <div class="flex-1 h-64" id="documentTypeChart"></div>
522
+ <div>
523
+ <div class="mb-4">
524
+ <h3 class="font-medium text-gray-700 mb-2">Top Document Types</h3>
525
+ <div class="space-y-2">
526
+ <div>
527
+ <div class="flex justify-between text-sm mb-1">
528
+ <span>Service Agreements</span>
529
+ <span>24</span>
530
+ </div>
531
+ <div class="w-full bg-gray-200 rounded-full h-2">
532
+ <div class="bg-blue-500 h-2 rounded-full" style="width: 90%"></div>
533
+ </div>
534
+ </div>
535
+ <div>
536
+ <div class="flex justify-between text-sm mb-1">
537
+ <span>Authority Approvals</span>
538
+ <span>18</span>
539
+ </div>
540
+ <div class="w-full bg-gray-200 rounded-full h-2">
541
+ <div class="bg-green-500 h-2 rounded-full" style="width: 70%"></div>
542
+ </div>
543
+ </div>
544
+ <div>
545
+ <div class="flex justify-between text-sm mb-1">
546
+ <span>LPOs</span>
547
+ <span>12</span>
548
+ </div>
549
+ <div class="w-full bg-gray-200 rounded-full h-2">
550
+ <div class="bg-yellow-500 h-2 rounded-full" style="width: 50%"></div>
551
+ </div>
552
+ </div>
553
+ <div>
554
+ <div class="flex justify-between text-sm mb-1">
555
+ <span>Invoices</span>
556
+ <span>9</span>
557
+ </div>
558
+ <div class="w-full bg-gray-200 rounded-full h-2">
559
+ <div class="bg-purple-500 h-2 rounded-full" style="width: 40%"></div>
560
+ </div>
561
+ </div>
562
+ </div>
563
+ </div>
564
+
565
+ <div>
566
+ <h3 class="font-medium text-gray-700 mb-2">Document Status</h3>
567
+ <div class="h-32" id="documentStatusChart"></div>
568
+ </div>
569
+ </div>
570
+ </div>
571
+ </div>
572
+ </div>
573
+
574
+ <!-- Chart.js for visualizations -->
575
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
576
+ <script>
577
+ // Initialize charts and data processing
578
+ document.addEventListener('DOMContentLoaded', function() {
579
+ // Sample configuration from provided JSON
580
+ const config = {
581
+ companyInfo: {
582
+ companyName: "Seven Tides International",
583
+ internalDomains: ["seventides.com", "binsulayem.com"]
584
+ },
585
+ projects: {
586
+ discoveryKeywords: ["IBGOB", "Ayal Nasser", "Hor Al Anz", "Port Rashid", "Centre Residence", "IBGO", "IBGR", "Seven City", "7CJLT", "Royal Amwaj", "Dukes Hotel", "City View", "Oaks Hotel", "DHA", "Plot No.", "J781", "JVC-VILLA", "OIBG", "RIBG", "MBR1", "World Islands", "Al Quoz", "Al Muteena", "Discovery Gardens", "Ibn Battuta Gate", "Zen Tower"],
587
+ pathPatterns: [
588
+ "AUTHORITY APPROVALS/([^/]+)/",
589
+ "PD000 - GENERAL PROJECTS/([^/]+)/CONTRACTORS/",
590
+ "PD000 - GENERAL PROJECTS/([^/]+)/CONSULTANTS/"
591
+ ],
592
+ defaultStatus: "Active",
593
+ learnedProjects: []
594
+ },
595
+ documentTypes: [
596
+ {"name": "Service Agreement", "keywords": ["Service Agreement", "SERVICE AGREEMENT", "S.A.", "Maintenance Agreement"], "category": "Contract", "dashboardSection": "Contracts"},
597
+ {"name": "Amendment", "keywords": ["Amendment", "Addendum"], "category": "Contract", "dashboardSection": "Contracts"},
598
+ {"name": "LOA", "keywords": ["LOA", "Letter of Acceptance"], "category": "Contract", "dashboardSection": "Contracts"},
599
+ {"name": "Lease Agreement", "keywords": ["Lease Agreement", "LEASE AGREEMENT"], "category": "Contract", "dashboardSection": "Contracts"},
600
+ {"name": "LPO", "keywords": ["LPO", "Local Purchase Order"], "category": "Procurement", "dashboardSection": "Financials"},
601
+ {"name": "Purchase Request", "keywords": ["PR", "Purchase Request", "ST/PR/", "BSI/PR/"], "category": "ProcurementRequest", "dashboardSection": "Approvals"},
602
+ {"name": "Invoice", "keywords": ["Invoice", "INV#", "Tax Invoice"], "category": "Finance", "dashboardSection": "Financials"},
603
+ {"name": "Payment Certificate", "keywords": ["Payment Certificate", "PC No."], "category": "Finance", "dashboardSection": "Financials"},
604
+ {"name": "Cheque Ready", "keywords": ["Cheque .* ready for collection"], "category": "FinanceAction", "dashboardSection": "Financials"},
605
+ {"name": "VAF", "keywords": ["VAF"], "category": "Approval", "dashboardSection": "Approvals"},
606
+ {"name": "CAPEX", "keywords": ["CAPEX", "CPX-"], "category": "FinanceApproval", "dashboardSection": "Approvals"},
607
+ {"name": "Transmittal", "keywords": ["Transmittal", "TRANSMITTAL TO"], "category": "Communication", "dashboardSection": "ActivityLog"},
608
+ {"name": "NOC", "keywords": ["NOC", "No Objection Certificate"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"},
609
+ {"name": "Building Permit", "keywords": ["Building Permit"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"},
610
+ {"name": "Completion Certificate", "keywords": ["Completion Certificate", "BCC"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"},
611
+ {"name": "Project Status Update", "keywords": ["Project Status Update"], "category": "ProjectManagement", "dashboardSection": "ProjectUpdates"},
612
+ {"name": "Letter", "keywords": ["Letter", "Letter from", "Letter to"], "category": "Communication", "dashboardSection": "ActivityLog"}
613
+ ],
614
+ urgencyKeywords: [
615
+ {"keyword": "URGENT", "level": "high", "ui_class": "urgent"},
616
+ {"keyword": "IMMEDIATE", "level": "high", "ui_class": "urgent"}
617
+ ],
618
+ departments: [
619
+ {"name": "MD", "keywords": ["MD", "Managing Director", "Mughawir", "Uwais"], "ui_class": "dept-md"},
620
+ {"name": "Commercial", "keywords": ["COMMERCIAL"], "ui_class": "dept-commercial"},
621
+ {"name": "Finance", "keywords": ["FINANCE"], "ui_class": "dept-finance"},
622
+ {"name": "Engineering", "keywords": ["ENGINEERING", "ENG", "Eng Dept"], "ui_class": "dept-engineering"},
623
+ {"name": "IT", "keywords": ["IT", "IT's APPROVAL"], "ui_class": "dept-it"}
624
+ ]
625
+ };
626
+
627
+ // Initialize charts
628
+ initCharts();
629
+
630
+ // Initialize file drop functionality
631
+ initFileDrop();
632
+
633
+ // Initialize projects display
634
+ updateProjects();
635
+
636
+ function initCharts() {
637
+ // Project Status Chart
638
+ const projectStatusCtx = document.getElementById('projectStatusChart').getContext('2d');
639
+ new Chart(projectStatusCtx, {
640
+ type: 'bar',
641
+ data: {
642
+ labels: ['On Track', 'At Risk', 'Off Track', 'On Hold', 'Completed'],
643
+ datasets: [{
644
+ label: 'Projects',
645
+ data: [8, 4, 2, 1, 3],
646
+ backgroundColor: [
647
+ '#10B981',
648
+ '#F59E0B',
649
+ '#EF4444',
650
+ '#9CA3AF',
651
+ '#3B82F6'
652
+ ],
653
+ borderWidth: 0
654
+ }]
655
+ },
656
+ options: {
657
+ responsive: true,
658
+ maintainAspectRatio: false,
659
+ plugins: {
660
+ legend: {
661
+ display: false
662
+ }
663
+ },
664
+ scales: {
665
+ y: {
666
+ beginAtZero: true,
667
+ ticks: {
668
+ stepSize: 1
669
+ }
670
+ }
671
+ }
672
+ }
673
+ });
674
+
675
+ // Document Type Chart
676
+ const documentTypeCtx = document.getElementById('documentTypeChart').getContext('2d');
677
+ new Chart(documentTypeCtx, {
678
+ type: 'doughnut',
679
+ data: {
680
+ labels: ['Contracts', 'Authority Approvals', 'Financial', 'Procurement', 'Project Updates'],
681
+ datasets: [{
682
+ data: [24, 18, 12, 15, 8],
683
+ backgroundColor: [
684
+ '#3B82F6',
685
+ '#10B981',
686
+ '#F59E0B',
687
+ '#8B5CF6',
688
+ '#EC4899'
689
+ ],
690
+ borderWidth: 0
691
+ }]
692
+ },
693
+ options: {
694
+ responsive: true,
695
+ maintainAspectRatio: false,
696
+ plugins: {
697
+ legend: {
698
+ position: 'right'
699
+ }
700
+ }
701
+ }
702
+ });
703
+
704
+ // Document Status Chart
705
+ const documentStatusCtx = document.getElementById('documentStatusChart').getContext('2d');
706
+ new Chart(documentStatusCtx, {
707
+ type: 'doughnut',
708
+ data: {
709
+ labels: ['Approved', 'Pending', 'Rejected', 'Action Required'],
710
+ datasets: [{
711
+ data: [32, 18, 5, 12],
712
+ backgroundColor: [
713
+ '#10B981',
714
+ '#F59E0B',
715
+ '#EF4444',
716
+ '#3B82F6'
717
+ ],
718
+ borderWidth: 0
719
+ }]
720
+ },
721
+ options: {
722
+ responsive: true,
723
+ maintainAspectRatio: false,
724
+ plugins: {
725
+ legend: {
726
+ display: false
727
+ }
728
+ },
729
+ cutout: '70%'
730
+ }
731
+ });
732
+ }
733
+
734
+ function initFileDrop() {
735
+ const dropzone = document.getElementById('dropzone');
736
+ const fileInput = document.getElementById('fileInput');
737
+ const processingContainer = document.getElementById('processingContainer');
738
+ const progressBar = document.getElementById('progressBar');
739
+ const processingStatus = document.getElementById('processingStatus');
740
+
741
+ dropzone.addEventListener('click', () => fileInput.click());
742
+
743
+ dropzone.addEventListener('dragover', (e) => {
744
+ e.preventDefault();
745
+ dropzone.classList.add('dragover');
746
+ });
747
+
748
+ dropzone.addEventListener('dragleave', () => {
749
+ dropzone.classList.remove('dragover');
750
+ });
751
+
752
+ dropzone.addEventListener('drop', (e) => {
753
+ e.preventDefault();
754
+ dropzone.classList.remove('dragover');
755
+
756
+ if (e.dataTransfer.files.length > 0) {
757
+ fileInput.files = e.dataTransfer.files;
758
+ processFiles();
759
+ }
760
+ });
761
+
762
+ fileInput.addEventListener('change', processFiles);
763
+
764
+ function processFiles() {
765
+ if (fileInput.files.length === 0) return;
766
+
767
+ processingContainer.classList.remove('hidden');
768
+ progressBar.style.width = '0%';
769
+
770
+ let processed = 0;
771
+ const totalFiles = fileInput.files.length;
772
+
773
+ const processInterval = setInterval(() => {
774
+ processed++;
775
+ const progress = Math.min(100, (processed / totalFiles) * 100);
776
+ progressBar.style.width = `${progress}%`;
777
+ processingStatus.textContent = `File ${processed} of ${totalFiles}`;
778
+
779
+ if (processed === totalFiles) {
780
+ clearInterval(processInterval);
781
+
782
+ // Simulate final processing
783
+ setTimeout(() => {
784
+ progressBar.style.width = '100%';
785
+ processingStatus.textContent = "Analyzing content...";
786
+
787
+ setTimeout(() => {
788
+ simulateEmailProcessing();
789
+ }, 1500);
790
+ }, 500);
791
+ }
792
+ }, 300);
793
+ }
794
+
795
+ function simulateEmailProcessing() {
796
+ // Generate a random project name from discoveryKeywords
797
+ const randomProject = config.projects.discoveryKeywords[
798
+ Math.floor(Math.random() * config.projects.discoveryKeywords.length)
799
+ ];
800
+
801
+ // Add the project if not already in learnedProjects
802
+ const projectExists = config.projects.learnedProjects.some(
803
+ p => p.name.includes(randomProject) || p.aliases?.includes(randomProject)
804
+ );
805
+
806
+ if (!projectExists) {
807
+ const newProject = {
808
+ id: `PROJ_${config.projects.learnedProjects.length + 1}`,
809
+ name: `${randomProject} Project`,
810
+ aliases: [randomProject],
811
+ status: config.projects.defaultStatus,
812
+ folderPaths: [`AUTHORITY APPROVALS/${randomProject}`],
813
+ keyContacts: []
814
+ };
815
+ config.projects.learnedProjects.push(newProject);
816
+ }
817
+
818
+ // Update dashboard with new data
819
+ updateProjects();
820
+
821
+ // Complete processing
822
+ setTimeout(() => {
823
+ processingContainer.classList.add('hidden');
824
+ alert(`Processed ${fileInput.files.length} email files. Dashboard updated with new data from ${randomProject}.`);
825
+ fileInput.value = ''; // Reset file input
826
+ }, 1000);
827
+ }
828
+ }
829
+
830
+ function updateProjects() {
831
+ // This would be populated with real project data from the JSON config
832
+ // For now we'll simulate some data
833
+ const projectsContainer = document.getElementById('projectsContainer');
834
+
835
+ // Clear existing projects
836
+ projectsContainer.innerHTML = '';
837
+
838
+ // Add projects from the configuration
839
+ const projectsToDisplay = config.projects.learnedProjects.length > 0
840
+ ? config.projects.learnedProjects.slice(0, 6)
841
+ : generateSampleProjects();
842
+
843
+ projectsToDisplay.forEach(project => {
844
+ const progress = Math.floor(Math.random() * 100);
845
+ let status, statusBadgeClass, progressBarColor;
846
+
847
+ if (progress > 80) {
848
+ status = "On Track";
849
+ statusBadgeClass = "bg-green-100 text-green-800";
850
+ progressBarColor = "#10B981";
851
+ } else if (progress > 50) {
852
+ status = "At Risk";
853
+ statusBadgeClass = "bg-yellow-100 text-yellow-800";
854
+ progressBarColor = "#F59E0B";
855
+ } else {
856
+ status = "Off Track";
857
+ statusBadgeClass = "bg-red-100 text-red-800";
858
+ progressBarColor = "#EF4444";
859
+ }
860
+
861
+ const projectHTML = `
862
+ <div class="project-card bg-white rounded-xl shadow overflow-hidden">
863
+ <div class="p-5 border-b">
864
+ <div class="flex justify-between items-start">
865
+ <div>
866
+ <h3 class="font-bold text-lg">${project.name}</h3>
867
+ <p class="text-sm text-gray-500">ID: ${project.id}</p>
868
+ </div>
869
+ <span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium ${statusBadgeClass}">${status}</span>
870
+ </div>
871
+ </div>
872
+ <div class="p-5">
873
+ <div class="mb-3">
874
+ <div class="text-xs text-gray-500 mb-1">Project Progress</div>
875
+ <div class="w-full bg-gray-200 rounded-full h-2">
876
+ <div class="h-2 rounded-full" style="width: ${progress}%; background-color: ${progressBarColor}"></div>
877
+ </div>
878
+ </div>
879
+ <div class="mb-3">
880
+ <div class="text-xs text-gray-500 mb-1">Main Authority</div>
881
+ <div class="text-sm">${getRandomAuthority()}</div>
882
+ </div>
883
+ <div class="text-xs text-gray-500 mb-1">Last Activity</div>
884
+ <div class="text-sm truncate">${getRandomActivity()}</div>
885
+ </div>
886
+ <div class="px-5 py-3 bg-gray-50 flex justify-between items-center">
887
+ <div class="text-xs text-gray-500">${getRandomDate()}</div>
888
+ <button class="text-xs font-medium text-blue-600 hover:text-blue-800">Details →</button>
889
+ </div>
890
+ </div>
891
+ `;
892
+
893
+ projectsContainer.innerHTML += projectHTML;
894
+ });
895
+
896
+ function getRandomAuthority() {
897
+ const authorities = ["DEWA", "Dubai Municipality", "Trakhees", "Nakheel", "Tecom"];
898
+ return authorities[Math.floor(Math.random() * authorities.length)];
899
+ }
900
+
901
+ function getRandomActivity() {
902
+ const activities = [
903
+ "Service agreement revision 3 received",
904
+ "Electrical NOC submission in progress",
905
+ "Payment certificate approved",
906
+ "Contractor meeting scheduled",
907
+ "Authority inspection passed"
908
+ ];
909
+ return activities[Math.floor(Math.random() * activities.length)];
910
+ }
911
+
912
+ function getRandomDate() {
913
+ const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
914
+ const month = months[Math.floor(Math.random() * months.length)];
915
+ const day = Math.floor(Math.random() * 28) + 1;
916
+ const year = 2023 + Math.floor(Math.random() * 2);
917
+ return `${day} ${month} ${year}`;
918
+ }
919
+
920
+ function generateSampleProjects() {
921
+ return [
922
+ {
923
+ id: "PROJ_001",
924
+ name: "IBG Hotel and Residences",
925
+ aliases: ["IBGOB", "IBG Hotel"],
926
+ status: "Active",
927
+ folderPaths: ["AUTHORITY APPROVALS/IBG Hotel and Residences"],
928
+ keyContacts: []
929
+ },
930
+ {
931
+ id: "PROJ_002",
932
+ name: "Seven City Project",
933
+ aliases: ["7CJLT", "Seven City"],
934
+ status: "Active",
935
+ folderPaths: ["AUTHORITY APPROVALS/Seven City"],
936
+ keyContacts: []
937
+ },
938
+ {
939
+ id: "PROJ_003",
940
+ name: "Ibn Battuta Gate",
941
+ aliases: ["IBGR", "Ibn Battuta"],
942
+ status: "Active",
943
+ folderPaths: ["AUTHORITY APPROVALS/Ibn Battuta Gate"],
944
+ keyContacts: []
945
+ }
946
+ ];
947
+ }
948
+ }
949
+ });
950
+ </script>
951
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Ultronprime/st-dashboard" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
952
+ </html>
prompts.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ today i need a new app. which will be a commercial department story and news dashbord app. it will take emails which has been extracted from ouytlook using save as button in txt which i will feed to the app each day but the app should use one bucket to keep its memory of projects and histories to make connections with new emails to ceate the dashbord more comprehensive. all the things in one page no tabs, small drop email field in top corner where i will drop txt email files in it to process, processing brogress bar under that, data visualisations of project that we have (i will instruct you to edit the prompt what is my company name and who will send contract emails who will send w3hat emails and how could we analyse in which way, how many project we have and things,). the app main reason is to summaries emails in a way a infographic news dashbord to show all the current works and urgent things and keep log of all in a proper way. could you help me
2
+ make it show more infOGRAPHIC AS WE WILL USE THIS JSON "{ "companyInfo": { "companyName": "YOUR_COMPANY_NAME_HERE", // e.g., "Seven Tides International" or your actual commercial dept name "internalDomains": ["seventides.com", "binsulayem.com"] // Add all your internal email domains }, "projects": { "discoveryKeywords": [ // Keywords from email subjects or file paths that indicate a project "IBGOB", "Ayal Nasser", "Hor Al Anz", "Port Rashid", "Centre Residence", "IBGO", "IBGR", "Seven City", "7CJLT", "Royal Amwaj", "Dukes Hotel", "City View", "Oaks Hotel", "DHA", "Plot No.", "J781", "JVC-VILLA", "OIBG", "RIBG", "MBR1", "World Islands", "Al Quoz", "Al Muteena", "Discovery Gardens", "Ibn Battuta Gate", "Zen Tower" ], "pathPatterns": [ // Regex patterns for project names/codes in file paths "AUTHORITY APPROVALS/([^/]+)/", // Captures the project name after "AUTHORITY APPROVALS/" "PD000 - GENERAL PROJECTS/([^/]+)/CONTRACTORS/", "PD000 - GENERAL PROJECTS/([^/]+)/CONSULTANTS/" ], "defaultStatus": "Active", "learnedProjects": [] // This array will be populated by the app as it discovers new projects // Example learned project: // { "id": "PROJ_001", "name": "IBG Hotel and Residences", "aliases": ["IBGOB", "IBG Hotel"], "status": "Active", "folderPaths": ["AUTHORITY APPROVALS/IBG Hotel and Residences"], "keyContacts": [] } }, "documentTypes": [ // --- Contracts & Agreements --- {"name": "Service Agreement", "keywords": ["Service Agreement", "SERVICE AGREEMENT", "S.A.", "Maintenance Agreement"], "category": "Contract", "dashboardSection": "Contracts", "filePatterns": ["Service Agreement*.pdf", "Service Agreement*.doc*", "SA-*.pdf"]}, {"name": "Amendment", "keywords": ["Amendment", "Addendum"], "category": "Contract", "dashboardSection": "Contracts", "filePatterns": ["Amendment*.pdf", "Addendum*.doc*"]}, {"name": "LOA", "keywords": ["LOA", "Letter of Acceptance"], "category": "Contract", "dashboardSection": "Contracts", "filePatterns": ["LOA*.pdf", "Letter of Acceptance*.doc*"]}, {"name": "MOU", "keywords": ["MOU", "Memorandum of Understanding"], "category": "Contract", "dashboardSection": "Contracts", "filePatterns": ["MOU*.pdf", "Memorandum*.doc*"]}, {"name": "Lease Agreement", "keywords": ["Lease Agreement", "LEASE AGREEMENT"], "category": "Contract", "dashboardSection": "Contracts", "filePatterns": ["Lease Agreement*.pdf", "Lease Agreement*.doc*"]}, {"name": "Settlement Agreement", "keywords": ["Settlement Agreement"], "category": "Legal", "dashboardSection": "Contracts"}, {"name": "Collateral Warranty", "keywords": ["Collateral Warranty"], "category": "Legal", "dashboardSection": "Contracts"}, // --- Procurement --- {"name": "LPO", "keywords": ["LPO", "Local Purchase Order"], "category": "Procurement", "dashboardSection": "Financials", "filePatterns": ["LPO*.pdf", "Local Purchase Order*.doc*"], "referenceFormatRegex": "LPO/[A-Z0-9\\-]+/[A-Z0-9\\-]+/\\d{2,4}-\\d{4}"}, {"name": "Purchase Request", "keywords": ["PR", "Purchase Request", "ST/PR/", "BSI/PR/"], "category": "ProcurementRequest", "dashboardSection": "Approvals", "referenceFormatRegex": "(ST/PR/|BSI/PR/)[A-Z0-9/-]+-\\d{4}(-Rev\\.\\d+)?"}, // --- Financial --- {"name": "Invoice", "keywords": ["Invoice", "INV#", "Tax Invoice"], "category": "Finance", "dashboardSection": "Financials", "filePatterns": ["Invoice*.pdf", "INV*.xls*", "Tax Invoice*.pdf"]}, {"name": "Payment Certificate", "keywords": ["Payment Certificate", "PC No."], "category": "Finance", "dashboardSection": "Financials", "filePatterns": ["Payment Certificate*.xls*", "PC No*.xls*"]}, {"name": "Cheque Ready", "keywords": ["Cheque .* ready for collection"], "category": "FinanceAction", "dashboardSection": "Financials"}, {"name": "Statement of Account", "keywords": ["Statement of Account", "SOA"], "category": "Finance", "dashboardSection": "Financials", "filePatterns": ["SOA*.pdf", "Statement*.xls*"]}, // --- Approvals & Transmittals --- {"name": "VAF", "keywords": ["VAF"], "category": "Approval", "dashboardSection": "Approvals", "referenceFormatRegex": "VAF\\s*-?BSI\\s*-\\s*\\d+"}, // e.g. VAF -BSI - 1831 {"name": "CAPEX", "keywords": ["CAPEX", "CPX-"], "category": "FinanceApproval", "dashboardSection": "Approvals", "referenceFormatRegex": "(CAPEX|CPX)-[A-Z0-9\\-]+-\\d{4}(-R\\d+)?"}, {"name": "EOL", "keywords": ["EOL"], "category": "Approval", "dashboardSection": "Approvals"}, // Extension of Limit? {"name": "Transmittal", "keywords": ["Transmittal", "TRANSMITTAL TO"], "category": "Communication", "dashboardSection": "ActivityLog"}, {"name": "NOC", "keywords": ["NOC", "No Objection Certificate"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals", "filePatterns": ["NOC*.pdf"]}, {"name": "Building Permit", "keywords": ["Building Permit"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals", "filePatterns": ["Building Permit*.pdf"]}, {"name": "Completion Certificate", "keywords": ["Completion Certificate", "BCC"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals", "filePatterns": ["Completion Certificate*.pdf", "BCC*.pdf"]}, // --- Project Management & Proposals --- {"name": "Project Status Update", "keywords": ["Project Status Update"], "category": "ProjectManagement", "dashboardSection": "ProjectUpdates"}, {"name": "Quotation", "keywords": ["Quotation", "Quote"], "category": "Proposal", "dashboardSection": "Proposals"}, {"name": "Proposal", "keywords": ["Proposal"], "category": "Proposal", "dashboardSection": "Proposals"}, {"name": "Tender Evaluation", "keywords": ["Tender Evaluation"], "category": "Proposal", "dashboardSection": "Proposals"}, // --- General Communication & Others --- {"name": "Letter", "keywords": ["Letter", "Letter from", "Letter to"], "category": "Communication", "dashboardSection": "ActivityLog"}, {"name": "Breakdown", "keywords": ["Breakdown of"], "category": "Information", "dashboardSection": "ProjectUpdates"}, {"name": "Handover Document", "keywords": ["handed to engineering", "Document/s handed", "handed to Finance"], "category": "InternalTransfer", "dashboardSection": "ActivityLog"}, {"name": "Report", "keywords": ["Report"], "category": "Information", "dashboardSection": "ProjectUpdates"}, {"name": "Drawing", "keywords": ["Drawing", "Plan", "Section", "Elevation"], "category": "Design", "dashboardSection": "Drawings", "filePatterns": ["*.dwg", "*.pdf"]}, // General, context from path is better {"name": "Scan", "keywords": ["scan"], "category": "Miscellaneous", "dashboardSection": "ActivityLog", "filePatterns": ["scan*.pdf", "scan*.jpg"]}, {"name": "Authority Electrical Approval", "pathKeywords": ["1-Electrical"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals", "filePatterns": ["Dewa-*.pdf", "CED-*.pdf"]}, {"name": "Authority Water Approval", "pathKeywords": ["2-Water"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"}, {"name": "Authority Sewage Approval", "pathKeywords": ["3-Sewage"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"}, {"name": "Authority District Cooling Approval", "pathKeywords": ["4-District Cooling"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"}, {"name": "Authority Telecom Approval", "pathKeywords": ["5-Telecom"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"}, {"name": "Authority CCTV Approval", "pathKeywords": ["6-CCTV"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"}, {"name": "Authority Master Developer Approval", "pathKeywords": ["7-Master Developer Approval"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"}, {"name": "Authority NOC Building Permit", "pathKeywords": ["8-NOC for Building Permit"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"}, {"name": "Authority Building Permit", "pathKeywords": ["9-Building Permit"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"}, {"name": "Authority NOC Building Completion", "pathKeywords": ["10-NOC for Building Completion Certificate"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"}, {"name": "Authority Building Completion Certificate", "pathKeywords": ["11-Buidling Completion Certificate", "11-BCC"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"}, {"name": "Authority As-Built Approval", "pathKeywords": ["12-Master Developer As-Built Approval"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"}, {"name": "Authority Fire Alarm Approval", "pathKeywords": ["14-Fire Alarm"], "category": "AuthorityApproval", "dashboardSection": "AuthorityApprovals"} ], "statusKeywords": [ {"keyword": "ON HOLD", "ui_class": "on-hold", "isTerminal": false, "type": "Status"}, {"keyword": "COMPLETED", "ui_class": "completed", "isTerminal": true, "type": "Status"}, {"keyword": "APPROVED", "ui_class": "approved", "isTerminal": false, "type": "Status"}, // Could be an intermediate approval {"keyword": "FULLY APPROVED", "ui_class": "approved-final", "isTerminal": true, "type": "Status"}, // If such a term exists {"keyword": "REJECTED", "ui_class": "rejected", "isTerminal": true, "type": "Status"}, {"keyword": "RETURNED", "ui_class": "returned", "isTerminal": false, "type": "Status"}, {"keyword": "For Approval", "ui_class": "pending-approval", "isTerminal": false, "type": "Action"}, {"keyword": "For Review and Approval", "ui_class": "pending-approval", "isTerminal": false, "type": "Action"}, {"keyword": "For.*Approval", "ui_class": "pending-approval", "isTerminal": false, "type": "Action"}, // Regex version {"keyword": "handed to", "ui_class": "in-progress", "isTerminal": false, "type": "Action"}, {"keyword": "ready for collection", "ui_class": "action-required", "isTerminal": false, "type": "Action"}, {"keyword": "EXPIRED", "ui_class": "expired", "isTerminal": true, "type": "Status"} // from folder names like "SERVICE AGREEMENT - 2023 to 2024 - Expired" ], "urgencyKeywords": [ {"keyword": "URGENT", "level": "high", "ui_class": "urgent"}, {"keyword": "IMMEDIATE", "level": "high", "ui_class": "urgent"} ], "actionKeywords": [ // Keywords indicating something needs to be done, often by a specific department "for MD'S APPROVAL", "for MD'S SIGNATURE", "for Uwais's Review and Approval", // Specific to your examples "TRANSMITTAL TO COMMERCIAL", "TRANSMITTAL TO MD", "TRANSMITTAL TO FINANCE", "TRANSMITTAL TO ENGINEERING", "TRANSMITTAL TO IT", "handed to engineering", "handed to finance" ], "financialKeywords": [ "Invoice", "Payment", "LPO", "Cheque", "Balance", "Cost", "CAPEX", "SOA", "STATEMENT OF ACCOUNT" ], "departments": [ // Internal departments {"name": "MD", "keywords": ["MD", "Managing Director", "Mughawir", "Uwais"], "ui_class": "dept-md"}, // Uwais seems to be a key approver, potentially MD or high-level finance/commercial {"name": "Commercial", "keywords": ["COMMERCIAL"], "ui_class": "dept-commercial"}, {"name": "Finance", "keywords": ["FINANCE"], "ui_class": "dept-finance"}, {"name": "Engineering", "keywords": ["ENGINEERING", "ENG", "Eng Dept"], "ui_class": "dept-engineering"}, {"name": "IT", "keywords": ["IT", "IT's APPROVAL"], "ui_class": "dept-it"} ], "externalEntities": { "authorities": [ {"name": "DEWA", "keywords": ["DEWA"], "pathKeywords": ["Dewa-", "/Dewa"]}, {"name": "EHS", "keywords": ["EHS"], "pathKeywords": ["EHS-", "/EHS"]}, {"name": "Trakhees", "keywords": ["Trakhees", "CED"], "pathKeywords": ["Trakhees-", "/Trakhees", "CED-", "/CED"]}, // CED is part of Trakhees {"name": "Nakheel", "keywords": ["Nakheel"], "pathKeywords": ["Nakheel-", "/Nakheel"]}, {"name": "PDC", "keywords": ["PDC", "Palm District Cooling"], "pathKeywords": ["PDC-", "/PDC"]}, {"name": "DU Telecom", "keywords": ["DU"], "pathKeywords": ["DU-", "/DU"]}, {"name": "Tecom", "keywords": ["Tecom"], "pathKeywords": ["Tecom-", "/Tecom"]}, {"name": "Dubai Police", "keywords": ["Dubai Police"], "pathKeywords": ["Dubai Police-", "/Dubai Police"]}, {"name": "DCA", "keywords": ["DCA", "Dubai Civil Aviation"], "pathKeywords": ["DCA-", "/DCA"]}, {"name": "DM", "keywords": ["DM", "Dubai Municipality"], "pathKeywords": ["DM-", "/DM"]}, {"name": "DTCM", "keywords": ["DTCM"], "pathKeywords": ["DTCM-", "/DTCM"]} ], "contractorsConsultants": [ // This will be a long list, learned over time {"name": "AG Elevator Systems", "keywords": ["AG Elevator"], "pathKeywords": ["AG ELEVATOR"]}, {"name": "BSI", "keywords": ["BSI"], "pathKeywords": ["BSI"]}, // Could be client or partner {"name": "Mars Digital Systems", "keywords": ["Mars Digital"], "pathKeywords": ["Mars Digital"]}, {"name": "Dar Al Handasah", "keywords": ["Dar Al Handasah", "DAR"], "pathKeywords": ["DAR AL HANDASAH"]}, {"name": "Freyssinet", "keywords": ["Freyssinet"], "pathKeywords": ["FREYSSINET"]}, {"name": "Schletterer", "keywords": ["Schletterer"], "pathKeywords": ["Schletterer"]}, {"name": "Al Qadar Tech Services", "keywords": ["Al Qadar", "AQTS"], "pathKeywords": ["AL QADAR TECH SERVICES"]}, {"name": "C4C Technologies", "keywords": ["C4C Technologies"], "pathKeywords": ["C4C TECHNOLOGIES"]}, // ... Add many more as discovered from file paths `CONTRACTORS/` and `CONSULTANTS/` {"name": "Airolink", "keywords": ["Airolink"], "pathKeywords": ["AIROLINK"]}, {"name": "Schindler", "keywords": ["Schindler"], "pathKeywords": ["SCHINDLER"]}, {"name": "Plus Prime Building Contracting", "keywords":["Plus Prime"], "pathKeywords":["PLUS PRIME BUILDING CONTRACTING"]}, {"name": "Deacon & Jones", "keywords":["Deacon & Jones", "D&J"], "pathKeywords":["Deacon & Jones (D&J)"]}, {"name": "Russell Sage Studio", "keywords":["Russell Sage Studio", "RSS"], "pathKeywords":["Russell Sage Studio (RSS)"]}, {"name": "Ward Cole Consulting Engineers", "keywords":["Ward Cole"], "pathKeywords":["Ward Cole Consulting Engineers"]}, {"name": "Watson Farley & Williams", "keywords":["Watson Farley & Williams", "WFW"], "pathKeywords":["Watson Farley & Williams (WFW)"]}, {"name": "Bauhaus", "keywords":["Bauhaus"], "pathKeywords":["BAUHAUS"]}, {"name": "BW Interiors", "keywords":["BW Interiors"], "pathKeywords":["BW INTERIORS"]}, {"name": "Duram Trading", "keywords":["Duram Trading"], "pathKeywords":["DURAM TRADING FZE"]}, {"name": "Graff Design", "keywords":["Graff Design"], "pathKeywords":["GRAFF DESIGN"]}, {"name": "I.D.E.A.S. Group", "keywords":["I.D.E.A.S. Group"], "pathKeywords":["I.D.E.A.S. GROUP"]}, {"name": "L.S. Design", "keywords":["L.S. Design"], "pathKeywords":["L.S. DESIGN"]}, {"name": "Artline Engineering", "keywords":["Artline Engineering"], "pathKeywords":["ARTLINE ENGINEERING"]}, {"name": "Top Fire", "keywords":["Top Fire"], "pathKeywords":["TOP FIRE"]} ], "other": [] // Banks, general suppliers, etc. }, "senderMappings": { // To be populated based on your input and app learning // "Paterno Dungca": {"role": "Project Management", "department": "Commercial", "typicalDocs": ["Project Status Update", "Service Agreement"]}, // "Marilyn Geronimo": {"role": "Coordination", "department": "Admin", "typicalDocs": ["Transmittal"]}, // "Moosa Nizar": {"role": "Finance/Approvals", "department": "Finance", "typicalDocs": ["VAF", "CAPEX", "Transmittal TO FINANCE"]}, // "Alvin Dungca": {"role": "Contracts/Procurement", "department": "Commercial", "typicalDocs": ["Service Agreement", "LPO"]}, // "Edmond Taborlupa": {"role": "Procurement/Logistics", "department": "Commercial", "typicalDocs": ["LPO", "Handover Document", "Cheque Ready"]}, // "YOUR_NAME_HERE": {"role": "Dashboard User", "department": "YOUR_DEPARTMENT"} }, "parsingRules": { "emailSubjectRegex": [ // Add regexes to extract project codes, specific dates, or reference numbers if they are consistently formatted in subjects // e.g., {"pattern": "Project (\\w+-\\d+):", "captures": ["projectCode"]} ], "fileNameRegex": [ {"pattern": "^([A-Za-z]+)-(\\d{2}-[A-Za-z]{3}-\\d{4})\\.pdf$", "captures": ["authority", "date"], "source": "AuthorityApprovals"}, // e.g. Dewa-02-Jun-2005.pdf {"pattern": "^([A-Za-z]+)-(\\d{2}-\\d{2}-\\d{4})\\.pdf$", "captures": ["authority", "date"], "source": "AuthorityApprovals"}, // e.g. EHS-23-06-08.pdf (assuming DD-MM-YY) {"pattern": "PC No\\.\\s*(\\d+)\\.xls$", "captures": ["paymentCertificateNumber"], "source": "Financial"}, {"pattern": "LPO.*(\\d{4}-\\d{4})\\.pdf$", "captures": ["lpoReferenceSuffix"], "source": "Procurement"} ], "filePathSegmentParsers": [ // Example: {"level": -2, "pattern": "^(\\d{4}_\\d{2}_\\d{2})$", "captures": {"dateFromName": "$1"}} // if a folder is named like YYYY_MM_DD {"level": -2, "pattern": "SERVICE AGREEMENT - (\\d{4}) to (\\d{4})( - Expired)?", "captures": {"agreementStartYear": "$1", "agreementEndYear": "$2", "statusIfExpired": "$3"}} ], "referenceNumberPatterns": [ {"type": "LPO", "regex": "LPO/[A-Z0-9\\-]+/[A-Z0-9\\-]+/[A-Z0-9\\-]+-\\d{2,4}-\\d{4}"}, {"type": "PR", "regex": "(?:ST/PR/|BSI/PR/ST-ENG/)[A-Za-z0-9/]+-\\d{4}(?:-Rev\\.\\d+)?"}, {"type": "VAF", "regex": "VAF\\s*-?BSI\\s*-\\s*\\d+"}, {"type": "CAPEX", "regex": "CPX-[A-Z0-9\\-]+-\\d{4}(?:-R\\d+)?"}, {"type": "INVOICE", "regex": "INV(?:#|#-|NO-|# | NO |NO. | NO. )\\s*[A-Z0-9/\\-]+"}, // General invoice pattern {"type": "DOC_REF_GENERIC", "regex": "[A-Z]+-[A-Z0-9/\\-]+-\\d{2,4}(?:PD|PD-\\d{4})?"} // General doc ref like STRED-DAR/PND/7CJLT-16PD-2025 ], "dateFormatsInText": [ // For parsing dates from email subjects/bodies if needed "%d %b %Y", // e.g., 19 May 2025 "%d/%m/%Y", // e.g., 16/05/2025 "%Y-%m-%d" ] }, "dashboardLayoutConfig": { "sections": [ {"id": "urgent", "title": "🔴 URGENT / MUST ACTION", "type": "list-cards", "filter": {"urgencyLevel": "high"}}, {"id": "approvalsPipeline", "title": "APPROVALS PIPELINE", "type": "multi-list", "subSections": [ {"id": "pendingMD", "title": "Pending MD", "filter": {"actionRequiredBy": "MD", "status": ["pending-approval", "for-approval"]}}, {"id": "pendingFinance", "title": "Pending Finance", "filter": {"actionRequiredBy": "Finance", "status": ["pending-approval", "for-approval"]}}, {"id": "pendingCommercial", "title": "Pending Commercial", "filter": {"actionRequiredBy": "Commercial", "status": ["pending-approval", "for-approval"]}}, {"id": "pendingEngineering", "title": "Pending Engineering", "filter": {"actionRequiredBy": "Engineering", "status": ["pending-approval", "for-approval"]}}, {"id": "recentlyApproved", "title": "Recently Approved/Rejected", "type": "timeline", "filter": {"status": ["approved", "rejected"], "timeframe": "last_2_days"}} ]}, {"id": "projectsOverview", "title": "PROJECTS OVERVIEW", "type": "cards-expandable", "dataMapping": "projects", "visualizationHints": ["count:active", "list:onHold"]}, {"id": "financials", "title": "💰 FINANCIAL WATCH", "type": "multi-section", "subSections": [ {"id": "lposIssued", "title": "LPOs Issued", "filter": {"documentCategory": "Procurement", "status": "approved", "timeframe": "this_week"}}, {"id": "invoicesAwaiting", "title": "Invoices Awaiting Action", "filter": {"documentCategory": "Finance", "status": ["pending-approval", "new"]}}, {"id": "chequesReady", "title": "Cheques Ready for Collection", "filter": {"documentCategory": "FinanceAction", "keyword": "Cheque .* ready for collection"}}, {"id": "paymentCertificates", "title": "Payment Certificates", "filter": {"documentCategory": "Finance", "documentName": "Payment Certificate"}} ]}, {"id": "authorityApprovalsDashboard", "title": "🏛️ AUTHORITY APPROVALS", "type": "matrix-table", "groupBy": ["Project", "Authority"], "value": "ApprovalDate", "filter": {"documentCategory": "AuthorityApproval"}}, {"id": "documentRegister", "title": "🗂️ DOCUMENT REGISTER (Files)", "type": "searchable-table", "dataMapping": "fileIndex"}, {"id": "activityLog", "title": "RECENT ACTIVITY (Emails)", "type": "timeline", "dataMapping": "emails", "timeframe": "today"} ] }, "fileSystemConfig": { "basePaths": ["./AUTHORITY APPROVALS", "./Project Controls Share/Data", "./CommercialDepartment"], // Paths to scan "projectIdentifierInPathLevel": { // How many levels deep from base path is the project name typically found "./AUTHORITY APPROVALS": 1, // e.g., AUTHORITY APPROVALS/PROJECT_NAME/ "./Project Controls Share/Data/PD000 - GENERAL PROJECTS": 1, // e.g., .../PD000 - GENERAL PROJECTS/PROJECT_NAME/ "./Project Controls Share/Data/PD001-Oceana": 0 // This itself is a project }, "categoryIdentifierPatterns": [ // Regex to find categories in paths relative to project root "^(\\d+-?[A-Za-z ]+)/", // e.g., "1-Electrical", "10-NOC for Building Completion Certificate" "CONTRACTORS/([^/]+)/SERVICE AGREEMENT - (\\d{4}) to (\\d{4})( - Expired)?", "CONSULTANTS/([^/]+)/" ], "ignorePatterns": ["Thumbs.db", ".*\\.tmp$", "~\\$.*\\.docx?$"] // Files/folders to ignore }, "emailProcessingConfig": { "ignoreSenders": ["apple.com", "pdf.co", "google.com", "zapier.com", "todoist.com", "wetransfer.com", "microsoft.com", "adguard.com", "proofmax.com", "boomerang.com", "vsco.com"], // Domains are often better "forwardPrefixes": ["Fw:", "FW:", "FWD:"], "replyPrefixes": ["Re:", "RE:"] }, "generalSettings": { "defaultDateFormat": "%Y-%m-%d", // For internal representation "fuzzyMatchThreshold": 0.8, // For keyword/name matching (0.0 to 1.0) "maxLogItemsDisplay": 100 // Default items to show in logs before pagination/scrolling } }"