alterzick commited on
Commit
2d01b01
·
verified ·
1 Parent(s): 43d7adf

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +6 -4
  2. index.html +695 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Vendor Workorder
3
- emoji:
4
  colorFrom: gray
5
- colorTo: purple
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: vendor-workorder
3
+ emoji: 🐳
4
  colorFrom: gray
5
+ colorTo: pink
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,695 @@
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>Vendor Work Order System</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
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
10
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
11
+ <style>
12
+ .tab-content {
13
+ display: none;
14
+ }
15
+ .tab-content.active {
16
+ display: block;
17
+ animation: fadeIn 0.3s ease-in-out;
18
+ }
19
+ @keyframes fadeIn {
20
+ from { opacity: 0; transform: translateY(10px); }
21
+ to { opacity: 1; transform: translateY(0); }
22
+ }
23
+ .nav-tab {
24
+ transition: all 0.3s ease;
25
+ }
26
+ .nav-tab:hover:not(.active) {
27
+ background-color: #f3f4f6;
28
+ }
29
+ .nav-tab.active {
30
+ border-bottom: 3px solid #3b82f6;
31
+ }
32
+ .signature-pad {
33
+ border: 1px dashed #ccc;
34
+ background-color: #f9fafb;
35
+ }
36
+ #workOrderPreview {
37
+ background-color: white;
38
+ box-shadow: 0 0 10px rgba(0,0,0,0.1);
39
+ }
40
+ .search-highlight {
41
+ background-color: #fef08a;
42
+ }
43
+ </style>
44
+ </head>
45
+ <body class="bg-gray-50 min-h-screen">
46
+ <div class="container mx-auto px-4 py-8 max-w-6xl">
47
+ <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
48
+ <div class="p-6">
49
+ <div class="flex justify-between items-center mb-6">
50
+ <h1 class="text-3xl font-bold text-gray-800">
51
+ <i class="fas fa-file-invoice mr-3 text-blue-500"></i>Vendor Work Order System
52
+ </h1>
53
+ <div class="flex items-center space-x-2">
54
+ <span class="px-3 py-1 bg-blue-100 text-blue-800 rounded-full text-sm font-medium">
55
+ <i class="fas fa-user-shield mr-1"></i> Admin
56
+ </span>
57
+ </div>
58
+ </div>
59
+
60
+ <!-- Tabs Navigation -->
61
+ <div class="border-b border-gray-200 mb-6">
62
+ <nav class="flex space-x-8">
63
+ <button class="nav-tab py-4 px-1 font-medium text-sm flex items-center" data-tab="initiate">
64
+ <i class="fas fa-pen-to-square mr-2"></i> Initiate Work Order
65
+ </button>
66
+ <button class="nav-tab py-4 px-1 font-medium text-sm flex items-center" data-tab="approval">
67
+ <i class="fas fa-check-double mr-2"></i> Approval
68
+ </button>
69
+ <button class="nav-tab py-4 px-1 font-medium text-sm flex items-center" data-tab="manage">
70
+ <i class="fas fa-database mr-2"></i> Manage Work Orders
71
+ </button>
72
+ <button class="nav-tab py-4 px-1 font-medium text-sm flex items-center" data-tab="print">
73
+ <i class="fas fa-print mr-2"></i> Print/Export
74
+ </button>
75
+ </nav>
76
+ </div>
77
+
78
+ <!-- Tab Contents -->
79
+ <div class="tab-content-container">
80
+ <!-- Initiate Form Tab -->
81
+ <div id="initiate" class="tab-content active">
82
+ <form id="workOrderForm" class="space-y-6">
83
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
84
+ <div>
85
+ <label for="woNumber" class="block text-sm font-medium text-gray-700 mb-1">Work Order #</label>
86
+ <input type="text" id="woNumber" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500" value="WO-2023-001" readonly>
87
+ </div>
88
+ <div>
89
+ <label for="woDate" class="block text-sm font-medium text-gray-700 mb-1">Date</label>
90
+ <input type="date" id="woDate" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500" required>
91
+ </div>
92
+ </div>
93
+
94
+ <div>
95
+ <label for="vendorSelect" class="block text-sm font-medium text-gray-700 mb-1">Vendor</label>
96
+ <select id="vendorSelect" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500" required>
97
+ <option value="">Select a vendor</option>
98
+ <option value="1">ABC Construction Co.</option>
99
+ <option value="2">XYZ Maintenance Services</option>
100
+ <option value="3">Global Tech Solutions</option>
101
+ <option value="4">Premium Cleaning Services</option>
102
+ </select>
103
+ </div>
104
+
105
+ <div>
106
+ <label for="projectName" class="block text-sm font-medium text-gray-700 mb-1">Project Name</label>
107
+ <input type="text" id="projectName" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500" placeholder="Enter project name" required>
108
+ </div>
109
+
110
+ <div>
111
+ <label for="workDescription" class="block text-sm font-medium text-gray-700 mb-1">Work Description</label>
112
+ <textarea id="workDescription" rows="4" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500" placeholder="Detailed description of the work to be performed..." required></textarea>
113
+ </div>
114
+
115
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
116
+ <div>
117
+ <label for="startDate" class="block text-sm font-medium text-gray-700 mb-1">Start Date</label>
118
+ <input type="date" id="startDate" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500" required>
119
+ </div>
120
+ <div>
121
+ <label for="endDate" class="block text-sm font-medium text-gray-700 mb-1">End Date</label>
122
+ <input type="date" id="endDate" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500" required>
123
+ </div>
124
+ <div>
125
+ <label for="estimatedCost" class="block text-sm font-medium text-gray-700 mb-1">Estimated Cost ($)</label>
126
+ <input type="number" id="estimatedCost" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500" placeholder="0.00" step="0.01" required>
127
+ </div>
128
+ </div>
129
+
130
+ <div>
131
+ <label for="attachments" class="block text-sm font-medium text-gray-700 mb-1">Attachments</label>
132
+ <div class="mt-1 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md">
133
+ <div class="space-y-1 text-center">
134
+ <div class="flex text-sm text-gray-600">
135
+ <label for="file-upload" class="relative cursor-pointer bg-white rounded-md font-medium text-blue-600 hover:text-blue-500 focus-within:outline-none">
136
+ <span>Upload files</span>
137
+ <input id="file-upload" name="file-upload" type="file" class="sr-only" multiple>
138
+ </label>
139
+ <p class="pl-1">or drag and drop</p>
140
+ </div>
141
+ <p class="text-xs text-gray-500">PDF, DOC, JPG, PNG up to 10MB</p>
142
+ </div>
143
+ </div>
144
+ </div>
145
+
146
+ <div class="flex justify-end space-x-4 pt-4">
147
+ <button type="reset" class="px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
148
+ <i class="fas fa-eraser mr-2"></i> Clear Form
149
+ </button>
150
+ <button type="submit" class="px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
151
+ <i class="fas fa-paper-plane mr-2"></i> Submit for Approval
152
+ </button>
153
+ </div>
154
+ </form>
155
+ </div>
156
+
157
+ <!-- Approval Tab -->
158
+ <div id="approval" class="tab-content">
159
+ <div class="bg-blue-50 border-l-4 border-blue-400 p-4 mb-6">
160
+ <div class="flex">
161
+ <div class="flex-shrink-0">
162
+ <i class="fas fa-info-circle text-blue-400"></i>
163
+ </div>
164
+ <div class="ml-3">
165
+ <p class="text-sm text-blue-700">
166
+ Work orders pending your approval are listed below. Please review carefully before approving or rejecting.
167
+ </p>
168
+ </div>
169
+ </div>
170
+ </div>
171
+
172
+ <div class="overflow-x-auto">
173
+ <table class="min-w-full divide-y divide-gray-200">
174
+ <thead class="bg-gray-50">
175
+ <tr>
176
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">WO #</th>
177
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Vendor</th>
178
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Project</th>
179
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Est. Cost</th>
180
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
181
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
182
+ </tr>
183
+ </thead>
184
+ <tbody class="bg-white divide-y divide-gray-200">
185
+ <tr>
186
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">WO-2023-015</td>
187
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">ABC Construction Co.</td>
188
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Office Renovation</td>
189
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$12,500.00</td>
190
+ <td class="px-6 py-4 whitespace-nowrap">
191
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">
192
+ Pending Approval
193
+ </span>
194
+ </td>
195
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
196
+ <button class="text-blue-600 hover:text-blue-900 mr-3 approve-btn" data-id="15"><i class="fas fa-check mr-1"></i> Approve</button>
197
+ <button class="text-red-600 hover:text-red-900 reject-btn" data-id="15"><i class="fas fa-times mr-1"></i> Reject</button>
198
+ </td>
199
+ </tr>
200
+ <tr>
201
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">WO-2023-014</td>
202
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Global Tech Solutions</td>
203
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Network Upgrade</td>
204
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$8,200.00</td>
205
+ <td class="px-6 py-4 whitespace-nowrap">
206
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">
207
+ Pending Approval
208
+ </span>
209
+ </td>
210
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
211
+ <button class="text-blue-600 hover:text-blue-900 mr-3 approve-btn" data-id="14"><i class="fas fa-check mr-1"></i> Approve</button>
212
+ <button class="text-red-600 hover:text-red-900 reject-btn" data-id="14"><i class="fas fa-times mr-1"></i> Reject</button>
213
+ </td>
214
+ </tr>
215
+ </tbody>
216
+ </table>
217
+ </div>
218
+
219
+ <div class="mt-8 border-t border-gray-200 pt-6">
220
+ <h3 class="text-lg font-medium text-gray-900 mb-4">Approved Work Orders</h3>
221
+ <div class="overflow-x-auto">
222
+ <table class="min-w-full divide-y divide-gray-200">
223
+ <thead class="bg-gray-50">
224
+ <tr>
225
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">WO #</th>
226
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Vendor</th>
227
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Project</th>
228
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Approved Date</th>
229
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
230
+ </tr>
231
+ </thead>
232
+ <tbody class="bg-white divide-y divide-gray-200">
233
+ <tr>
234
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">WO-2023-013</td>
235
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Premium Cleaning Services</td>
236
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Quarterly Deep Cleaning</td>
237
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-06-15</td>
238
+ <td class="px-6 py-4 whitespace-nowrap">
239
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">
240
+ Approved
241
+ </span>
242
+ </td>
243
+ </tr>
244
+ <tr>
245
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">WO-2023-012</td>
246
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">XYZ Maintenance Services</td>
247
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">HVAC Maintenance</td>
248
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-06-10</td>
249
+ <td class="px-6 py-4 whitespace-nowrap">
250
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">
251
+ Approved
252
+ </span>
253
+ </td>
254
+ </tr>
255
+ </tbody>
256
+ </table>
257
+ </div>
258
+ </div>
259
+ </div>
260
+
261
+ <!-- Manage Work Orders Tab -->
262
+ <div id="manage" class="tab-content">
263
+ <div class="bg-white shadow rounded-lg p-6 mb-6">
264
+ <div class="flex flex-col md:flex-row md:items-center md:justify-between mb-6">
265
+ <h2 class="text-xl font-semibold text-gray-800">Work Order Management</h2>
266
+ <div class="mt-4 md:mt-0">
267
+ <div class="relative">
268
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
269
+ <i class="fas fa-search text-gray-400"></i>
270
+ </div>
271
+ <input type="text" id="searchWorkOrders" class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm" placeholder="Search work orders...">
272
+ </div>
273
+ </div>
274
+ </div>
275
+
276
+ <div class="flex flex-wrap gap-3 mb-6">
277
+ <div class="w-full sm:w-auto">
278
+ <label for="filterStatus" class="block text-sm font-medium text-gray-700 mb-1">Status</label>
279
+ <select id="filterStatus" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
280
+ <option value="">All Statuses</option>
281
+ <option value="approved">Approved</option>
282
+ <option value="completed">Completed</option>
283
+ <option value="archived">Archived</option>
284
+ </select>
285
+ </div>
286
+ <div class="w-full sm:w-auto">
287
+ <label for="filterVendor" class="block text-sm font-medium text-gray-700 mb-1">Vendor</label>
288
+ <select id="filterVendor" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
289
+ <option value="">All Vendors</option>
290
+ <option value="1">ABC Construction Co.</option>
291
+ <option value="2">XYZ Maintenance Services</option>
292
+ <option value="3">Global Tech Solutions</option>
293
+ <option value="4">Premium Cleaning Services</option>
294
+ </select>
295
+ </div>
296
+ <div class="w-full sm:w-auto">
297
+ <label for="filterDateFrom" class="block text-sm font-medium text-gray-700 mb-1">From Date</label>
298
+ <input type="date" id="filterDateFrom" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
299
+ </div>
300
+ <div class="w-full sm:w-auto">
301
+ <label for="filterDateTo" class="block text-sm font-medium text-gray-700 mb-1">To Date</label>
302
+ <input type="date" id="filterDateTo" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
303
+ </div>
304
+ <div class="w-full sm:w-auto flex items-end">
305
+ <button id="applyFilters" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500">
306
+ Apply Filters
307
+ </button>
308
+ </div>
309
+ </div>
310
+
311
+ <div class="overflow-x-auto">
312
+ <table class="min-w-full divide-y divide-gray-200" id="workOrdersTable">
313
+ <thead class="bg-gray-50">
314
+ <tr>
315
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">WO #</th>
316
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Vendor</th>
317
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Project</th>
318
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
319
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
320
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
321
+ </tr>
322
+ </thead>
323
+ <tbody class="bg-white divide-y divide-gray-200" id="workOrdersBody">
324
+ <!-- Work orders will be loaded here -->
325
+ </tbody>
326
+ </table>
327
+ </div>
328
+
329
+ <div class="mt-4 flex items-center justify-between">
330
+ <div class="text-sm text-gray-500">
331
+ Showing <span id="showingFrom">1</span> to <span id="showingTo">10</span> of <span id="totalItems">50</span> work orders
332
+ </div>
333
+ <div class="flex space-x-2">
334
+ <button id="prevPage" class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 disabled:opacity-50" disabled>
335
+ Previous
336
+ </button>
337
+ <button id="nextPage" class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
338
+ Next
339
+ </button>
340
+ </div>
341
+ </div>
342
+ </div>
343
+ </div>
344
+
345
+ <!-- Print/Export Tab -->
346
+ <div id="print" class="tab-content">
347
+ <div class="flex flex-col md:flex-row gap-6">
348
+ <div class="md:w-1/3 space-y-6">
349
+ <div class="bg-white p-4 rounded-lg shadow">
350
+ <h3 class="font-medium text-lg mb-4">Export Options</h3>
351
+ <div class="space-y-4">
352
+ <div>
353
+ <label class="flex items-center">
354
+ <input type="radio" name="exportFormat" value="pdf" class="h-4 w-4 text-blue-600 focus:ring-blue-500" checked>
355
+ <span class="ml-2 block text-sm text-gray-700">PDF Document</span>
356
+ </label>
357
+ </div>
358
+ <div>
359
+ <label class="flex items-center">
360
+ <input type="radio" name="exportFormat" value="doc" class="h-4 w-4 text-blue-600 focus:ring-blue-500">
361
+ <span class="ml-2 block text-sm text-gray-700">Word Document</span>
362
+ </label>
363
+ </div>
364
+ <div>
365
+ <label class="flex items-center">
366
+ <input type="radio" name="exportFormat" value="print" class="h-4 w-4 text-blue-600 focus:ring-blue-500">
367
+ <span class="ml-2 block text-sm text-gray-700">Print Directly</span>
368
+ </label>
369
+ </div>
370
+ </div>
371
+ </div>
372
+
373
+ <div class="bg-white p-4 rounded-lg shadow">
374
+ <h3 class="font-medium text-lg mb-4">Select Work Order</h3>
375
+ <select id="woSelect" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
376
+ <option value="">Select a work order</option>
377
+ <option value="WO-2023-013">WO-2023-013 - Premium Cleaning Services</option>
378
+ <option value="WO-2023-012">WO-2023-012 - XYZ Maintenance Services</option>
379
+ <option value="WO-2023-011">WO-2023-011 - ABC Construction Co.</option>
380
+ </select>
381
+ </div>
382
+
383
+ <div class="bg-white p-4 rounded-lg shadow">
384
+ <h3 class="font-medium text-lg mb-4">Delivery Options</h3>
385
+ <div class="space-y-4">
386
+ <div>
387
+ <label class="flex items-center">
388
+ <input type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500">
389
+ <span class="ml-2 block text-sm text-gray-700">Email to Vendor</span>
390
+ </label>
391
+ </div>
392
+ <div>
393
+ <label class="flex items-center">
394
+ <input type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500">
395
+ <span class="ml-2 block text-sm text-gray-700">Save to Documents</span>
396
+ </label>
397
+ </div>
398
+ <div>
399
+ <label class="flex items-center">
400
+ <input type="checkbox" class="h-4 w-4 text-blue-600 focus:ring-blue-500" checked>
401
+ <span class="ml-2 block text-sm text-gray-700">Download File</span>
402
+ </label>
403
+ </div>
404
+ </div>
405
+ </div>
406
+
407
+ <div class="flex space-x-3">
408
+ <button id="generateBtn" class="flex-1 bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-md flex items-center justify-center">
409
+ <i class="fas fa-file-export mr-2"></i> Generate
410
+ </button>
411
+ <button id="printBtn" class="flex-1 bg-gray-600 hover:bg-gray-700 text-white py-2 px-4 rounded-md flex items-center justify-center">
412
+ <i class="fas fa-print mr-2"></i> Print
413
+ </button>
414
+ </div>
415
+ </div>
416
+
417
+ <div class="md:w-2/3">
418
+ <div class="bg-white p-6 rounded-lg shadow">
419
+ <h3 class="font-medium text-lg mb-4">Preview</h3>
420
+ <div id="workOrderPreview" class="p-6">
421
+ <div class="text-center mb-8">
422
+ <h2 class="text-2xl font-bold">WORK ORDER</h2>
423
+ <div class="flex justify-between mt-4">
424
+ <div class="text-left">
425
+ <p><strong>WO #:</strong> <span id="previewWoNumber">WO-2023-013</span></p>
426
+ <p><strong>Date:</strong> <span id="previewDate">June 15, 2023</span></p>
427
+ </div>
428
+ <div class="text-right">
429
+ <p><strong>Status:</strong> <span class="text-green-600">Approved</span></p>
430
+ </div>
431
+ </div>
432
+ </div>
433
+
434
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
435
+ <div>
436
+ <h3 class="font-bold border-b pb-1 mb-2">Vendor Information</h3>
437
+ <p><strong>Name:</strong> Premium Cleaning Services</p>
438
+ <p><strong>Contact:</strong> John Smith</p>
439
+ <p><strong>Phone:</strong> (555) 123-4567</p>
440
+ <p><strong>Email:</strong> john@premiumclean.com</p>
441
+ </div>
442
+ <div>
443
+ <h3 class="font-bold border-b pb-1 mb-2">Project Details</h3>
444
+ <p><strong>Project:</strong> Quarterly Deep Cleaning</p>
445
+ <p><strong>Location:</strong> Main Office Building</p>
446
+ <p><strong>Start Date:</strong> June 20, 2023</p>
447
+ <p><strong>End Date:</strong> June 22, 2023</p>
448
+ </div>
449
+ </div>
450
+
451
+ <div class="mb-6">
452
+ <h3 class="font-bold border-b pb-1 mb-2">Work Description</h3>
453
+ <p>Complete deep cleaning of all office spaces including carpets, windows, restrooms, and kitchen areas. Special attention to high-touch surfaces and disinfecting all areas.</p>
454
+ </div>
455
+
456
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
457
+ <div>
458
+ <h3 class="font-bold border-b pb-1 mb-2">Financial Details</h3>
459
+ <p><strong>Estimated Cost:</strong> $3,500.00</p>
460
+ <p><strong>Payment Terms:</strong> Net 30 days</p>
461
+ </div>
462
+ <div>
463
+ <h3 class="font-bold border-b pb-1 mb-2">Approval</h3>
464
+ <p><strong>Approved By:</strong> Sarah Johnson</p>
465
+ <p><strong>Approval Date:</strong> June 15, 2023</p>
466
+ </div>
467
+ </div>
468
+
469
+ <div class="mt-8">
470
+ <div class="flex justify-between">
471
+ <div class="w-1/2 pr-4">
472
+ <p class="border-t pt-2 text-center">Vendor Signature</p>
473
+ <div class="signature-pad h-20 mt-2"></div>
474
+ </div>
475
+ <div class="w-1/2 pl-4">
476
+ <p class="border-t pt-2 text-center">Company Representative</p>
477
+ <div class="signature-pad h-20 mt-2"></div>
478
+ </div>
479
+ </div>
480
+ </div>
481
+ </div>
482
+ </div>
483
+ </div>
484
+ </div>
485
+ </div>
486
+ </div>
487
+ </div>
488
+ </div>
489
+ </div>
490
+
491
+ <!-- Approval Modal -->
492
+ <div id="approvalModal" class="fixed inset-0 z-50 hidden overflow-y-auto">
493
+ <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
494
+ <div class="fixed inset-0 transition-opacity" aria-hidden="true">
495
+ <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
496
+ </div>
497
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
498
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
499
+ <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
500
+ <div class="sm:flex sm:items-start">
501
+ <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-100 sm:mx-0 sm:h-10 sm:w-10">
502
+ <i class="fas fa-check text-blue-600"></i>
503
+ </div>
504
+ <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
505
+ <h3 class="text-lg leading-6 font-medium text-gray-900" id="modalTitle">Approve Work Order</h3>
506
+ <div class="mt-2">
507
+ <p class="text-sm text-gray-500">Are you sure you want to approve this work order?</p>
508
+ <div class="mt-4">
509
+ <label for="approvalNotes" class="block text-sm font-medium text-gray-700">Approval Notes (Optional)</label>
510
+ <textarea id="approvalNotes" rows="3" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm"></textarea>
511
+ </div>
512
+ </div>
513
+ </div>
514
+ </div>
515
+ </div>
516
+ <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
517
+ <button type="button" id="confirmApprove" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-green-600 text-base font-medium text-white hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 sm:ml-3 sm:w-auto sm:text-sm">
518
+ Confirm Approval
519
+ </button>
520
+ <button type="button" id="cancelApprove" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
521
+ Cancel
522
+ </button>
523
+ </div>
524
+ </div>
525
+ </div>
526
+ </div>
527
+
528
+ <!-- Rejection Modal -->
529
+ <div id="rejectionModal" class="fixed inset-0 z-50 hidden overflow-y-auto">
530
+ <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
531
+ <div class="fixed inset-0 transition-opacity" aria-hidden="true">
532
+ <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
533
+ </div>
534
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
535
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
536
+ <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
537
+ <div class="sm:flex sm:items-start">
538
+ <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10">
539
+ <i class="fas fa-times text-red-600"></i>
540
+ </div>
541
+ <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
542
+ <h3 class="text-lg leading-6 font-medium text-gray-900" id="modalTitle">Reject Work Order</h3>
543
+ <div class="mt-2">
544
+ <p class="text-sm text-gray-500">Are you sure you want to reject this work order?</p>
545
+ <div class="mt-4">
546
+ <label for="rejectionReason" class="block text-sm font-medium text-gray-700">Reason for Rejection (Required)</label>
547
+ <textarea id="rejectionReason" rows="3" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm" required></textarea>
548
+ </div>
549
+ </div>
550
+ </div>
551
+ </div>
552
+ </div>
553
+ <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
554
+ <button type="button" id="confirmReject" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm">
555
+ Confirm Rejection
556
+ </button>
557
+ <button type="button" id="cancelReject" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
558
+ Cancel
559
+ </button>
560
+ </div>
561
+ </div>
562
+ </div>
563
+ </div>
564
+
565
+ <!-- Edit Work Order Modal -->
566
+ <div id="editModal" class="fixed inset-0 z-50 hidden overflow-y-auto">
567
+ <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
568
+ <div class="fixed inset-0 transition-opacity" aria-hidden="true">
569
+ <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
570
+ </div>
571
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
572
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-4xl sm:w-full">
573
+ <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
574
+ <div class="sm:flex sm:items-start">
575
+ <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-100 sm:mx-0 sm:h-10 sm:w-10">
576
+ <i class="fas fa-edit text-blue-600"></i>
577
+ </div>
578
+ <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full">
579
+ <h3 class="text-lg leading-6 font-medium text-gray-900">Edit Work Order</h3>
580
+ <div class="mt-2">
581
+ <form id="editWorkOrderForm" class="space-y-4">
582
+ <input type="hidden" id="editWoId">
583
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
584
+ <div>
585
+ <label for="editWoNumber" class="block text-sm font-medium text-gray-700">Work Order #</label>
586
+ <input type="text" id="editWoNumber" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm" readonly>
587
+ </div>
588
+ <div>
589
+ <label for="editWoDate" class="block text-sm font-medium text-gray-700">Date</label>
590
+ <input type="date" id="editWoDate" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
591
+ </div>
592
+ </div>
593
+ <div>
594
+ <label for="editVendor" class="block text-sm font-medium text-gray-700">Vendor</label>
595
+ <select id="editVendor" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
596
+ <option value="1">ABC Construction Co.</option>
597
+ <option value="2">XYZ Maintenance Services</option>
598
+ <option value="3">Global Tech Solutions</option>
599
+ <option value="4">Premium Cleaning Services</option>
600
+ </select>
601
+ </div>
602
+ <div>
603
+ <label for="editProject" class="block text-sm font-medium text-gray-700">Project Name</label>
604
+ <input type="text" id="editProject" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
605
+ </div>
606
+ <div>
607
+ <label for="editDescription" class="block text-sm font-medium text-gray-700">Work Description</label>
608
+ <textarea id="editDescription" rows="3" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm"></textarea>
609
+ </div>
610
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
611
+ <div>
612
+ <label for="editStartDate" class="block text-sm font-medium text-gray-700">Start Date</label>
613
+ <input type="date" id="editStartDate" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
614
+ </div>
615
+ <div>
616
+ <label for="editEndDate" class="block text-sm font-medium text-gray-700">End Date</label>
617
+ <input type="date" id="editEndDate" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
618
+ </div>
619
+ <div>
620
+ <label for="editCost" class="block text-sm font-medium text-gray-700">Estimated Cost ($)</label>
621
+ <input type="number" id="editCost" step="0.01" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
622
+ </div>
623
+ </div>
624
+ <div>
625
+ <label for="editStatus" class="block text-sm font-medium text-gray-700">Status</label>
626
+ <select id="editStatus" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm">
627
+ <option value="approved">Approved</option>
628
+ <option value="completed">Completed</option>
629
+ <option value="archived">Archived</option>
630
+ </select>
631
+ </div>
632
+ </form>
633
+ </div>
634
+ </div>
635
+ </div>
636
+ </div>
637
+ <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
638
+ <button type="button" id="confirmEdit" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
639
+ Save Changes
640
+ </button>
641
+ <button type="button" id="cancelEdit" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
642
+ Cancel
643
+ </button>
644
+ </div>
645
+ </div>
646
+ </div>
647
+ </div>
648
+
649
+ <!-- Delete Confirmation Modal -->
650
+ <div id="deleteModal" class="fixed inset-0 z-50 hidden overflow-y-auto">
651
+ <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
652
+ <div class="fixed inset-0 transition-opacity" aria-hidden="true">
653
+ <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
654
+ </div>
655
+ <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
656
+ <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full">
657
+ <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
658
+ <div class="sm:flex sm:items-start">
659
+ <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10">
660
+ <i class="fas fa-exclamation-triangle text-red-600"></i>
661
+ </div>
662
+ <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
663
+ <h3 class="text-lg leading-6 font-medium text-gray-900">Delete Work Order</h3>
664
+ <div class="mt-2">
665
+ <p class="text-sm text-gray-500">Are you sure you want to delete this work order? This action cannot be undone.</p>
666
+ <div class="mt-4">
667
+ <label for="deleteReason" class="block text-sm font-medium text-gray-700">Reason for Deletion (Optional)</label>
668
+ <textarea id="deleteReason" rows="3" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm"></textarea>
669
+ </div>
670
+ </div>
671
+ </div>
672
+ </div>
673
+ </div>
674
+ <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
675
+ <button type="button" id="confirmDelete" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm">
676
+ Delete
677
+ </button>
678
+ <button type="button" id="cancelDelete" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
679
+ Cancel
680
+ </button>
681
+ </div>
682
+ </div>
683
+ </div>
684
+ </div>
685
+
686
+ <script>
687
+ // Work Order Data Storage
688
+ const workOrders = [
689
+ {
690
+ id: 1,
691
+ woNumber: 'WO-2023-013',
692
+ date: '2023-06-15',
693
+ vendor: 'Premium Cleaning Services',
694
+
695
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ continue coding