-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.html
More file actions
261 lines (244 loc) · 15.7 KB
/
Copy pathdashboard.html
File metadata and controls
261 lines (244 loc) · 15.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<link rel = "stylesheet" href = "style.css">
<title>Document</title>
</head>
<body>
<!-- Dashboard Section -->
<section id="dashboardSection" class="hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-2xl font-bold text-blue-800 mb-6">User Dashboard</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="dashboard-card bg-blue-50 p-4 rounded-lg border border-blue-200">
<h3 class="text-lg font-semibold text-blue-700 mb-2">Personal Information</h3>
<div id="userInfo" class="text-gray-700">
Loading user data...
</div>
</div>
<div class="dashboard-card bg-green-50 p-4 rounded-lg border border-green-200">
<h3 class="text-lg font-semibold text-green-700 mb-2">Quick Actions</h3>
<div class="space-y-3">
<button onclick="showSection('documents')" class="w-full text-left px-3 py-2 bg-green-100 hover:bg-green-200 rounded transition">Request Document</button>
<button onclick="showSection('complaints')" class="w-full text-left px-3 py-2 bg-green-100 hover:bg-green-200 rounded transition">File a Complaint</button>
<button class="w-full text-left px-3 py-2 bg-green-100 hover:bg-green-200 rounded transition">View Announcements</button>
</div>
</div>
<div class="dashboard-card bg-purple-50 p-4 rounded-lg border border-purple-200">
<h3 class="text-lg font-semibold text-purple-700 mb-2">Recent Activities</h3>
<div id="recentActivities" class="space-y-2">
<p class="text-gray-600 italic">No recent activities found</p>
</div>
</div>
</div>
</div>
</section>
<!-- Admin Section -->
<section id="adminSection" class="hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-2xl font-bold text-blue-800 mb-6">Administration Panel</h2>
<div class="mb-6 flex justify-between items-center">
<h3 class="text-xl font-semibold text-gray-700">User Management</h3>
<button onclick="showAddUserModal()" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">Add User</button>
</div>
<div class="overflow-x-auto">
<table class="min-w-full bg-white border border-gray-200">
<thead>
<tr>
<th class="py-2 px-4 border-b border-gray-200 bg-gray-50 text-left text-gray-600">Name</th>
<th class="py-2 px-4 border-b border-gray-200 bg-gray-50 text-left text-gray-600">Username</th>
<th class="py-2 px-4 border-b border-gray-200 bg-gray-50 text-left text-gray-600">Role</th>
<th class="py-2 px-4 border-b border-gray-200 bg-gray-50 text-left text-gray-600">Actions</th>
</tr>
</thead>
<tbody id="usersTableBody">
<!-- Users will be loaded here -->
</tbody>
</table>
</div>
</div>
</section>
<!-- Documents Section -->
<section id="documentsSection" class="hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-2xl font-bold text-blue-800 mb-6">Document Requests</h2>
<div class="mb-6">
<button onclick="showNewDocumentModal()" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">Request New Document</button>
</div>
<div class="overflow-x-auto">
<table class="min-w-full bg-white border border-gray-200">
<thead>
<tr>
<th class="py-2 px-4 border-b border-gray-200 bg-gray-50 text-left text-gray-600">Document Type</th>
<th class="py-2 px-4 border-b border-gray-200 bg-gray-50 text-left text-gray-600">Date Requested</th>
<th class="py-2 px-4 border-b border-gray-200 bg-gray-50 text-left text-gray-600">Status</th>
<th class="py-2 px-4 border-b border-gray-200 bg-gray-50 text-left text-gray-600">Actions</th>
</tr>
</thead>
<tbody id="documentsTableBody">
<!-- Documents will be loaded here -->
</tbody>
</table>
</div>
</div>
</section>
<!-- Complaints Section -->
<section id="complaintsSection" class="hidden">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-2xl font-bold text-blue-800 mb-6">Complaints and Suggestions</h2>
<div class="mb-6">
<button onclick="showNewComplaintModal()" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">File New Complaint</button>
</div>
<div class="overflow-x-auto">
<table class="min-w-full bg-white border border-gray-200">
<thead>
<tr>
<th class="py-2 px-4 border-b border-gray-200 bg-gray-50 text-left text-gray-600">Subject</th>
<th class="py-2 px-4 border-b border-gray-200 bg-gray-50 text-left text-gray-600">Date Submitted</th>
<th class="py-2 px-4 border-b border-gray-200 bg-gray-50 text-left text-gray-600">Status</th>
<th class="py-2 px-4 border-b border-gray-200 bg-gray-50 text-left text-gray-600">Actions</th>
</tr>
</thead>
<tbody id="complaintsTableBody">
<!-- Complaints will be loaded here -->
</tbody>
</table>
</div>
</div>
</section>
</main>
<!-- Modals -->
<!-- Add User Modal -->
<div id="addUserModal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div class="bg-white rounded-lg p-6 w-full max-w-md">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold text-blue-800">Add New User</h3>
<button onclick="hideModal('addUserModal')" class="text-gray-500 hover:text-gray-700">✕</button>
</div>
<form id="addUserForm" class="space-y-4">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label for="modalFirstName" class="block text-gray-700 mb-2">First Name</label>
<input type="text" id="modalFirstName" class="w-full px-4 py-2 border rounded-lg">
</div>
<div>
<label for="modalLastName" class="block text-gray-700 mb-2">Last Name</label>
<input type="text" id="modalLastName" class="w-full px-4 py-2 border rounded-lg">
</div>
</div>
<div>
<label for="modalUsername" class="block text-gray-700 mb-2">Username</label>
<input type="text" id="modalUsername" class="w-full px-4 py-2 border rounded-lg">
</div>
<div>
<label for="modalEmail" class="block text-gray-700 mb-2">Email</label>
<input type="email" id="modalEmail" class="w-full px-4 py-2 border rounded-lg">
</div>
<div>
<label for="modalPassword" class="block text-gray-700 mb-2">Password</label>
<input type="password" id="modalPassword" class="w-full px-4 py-2 border rounded-lg">
</div>
<div>
<label for="modalRole" class="block text-gray-700 mb-2">Role</label>
<select id="modalRole" class="w-full px-4 py-2 border rounded-lg">
<option value="resident">Resident</option>
<option value="kagawad">KAGAWAD</option>
<option value="chairman">Chairman</option>
<option value="official">Barangay Official</option>
<option value="admin">Administrator</option>
</select>
</div>
<div class="flex justify-end space-x-3">
<button type="button" onclick="hideModal('addUserModal')" class="px-4 py-2 border rounded-lg">Cancel</button>
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded-lg">Save</button>
</div>
</form>
</div>
</div>
<!-- New Document Modal -->
<div id="newDocumentModal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div class="bg-white rounded-lg p-6 w-full max-w-md">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold text-blue-800">Request New Document</h3>
<button onclick="hideModal('newDocumentModal')" class="text-gray-500 hover:text-gray-700">✕</button>
</div>
<form id="newDocumentForm" class="space-y-4">
<div>
<label for="documentType" class="block text-gray-700 mb-2">Document Type</label>
<select id="documentType" class="w-full px-4 py-2 border rounded-lg">
<option value="barangay_clearance">Barangay Clearance</option>
<option value="business_permit">Business Permit</option>
<option value="certificate_of_residency">Certificate of Residency</option>
<option value="indigency_certificate">Certificate of Indigency</option>
<option value="barangay_id">Barangay ID</option>
</select>
</div>
<div>
<label for="documentPurpose" class="block text-gray-700 mb-2">Purpose</label>
<textarea id="documentPurpose" rows="3" class="w-full px-4 py-2 border rounded-lg"></textarea>
</div>
<div class="flex justify-end space-x-3">
<button type="button" onclick="hideModal('newDocumentModal')" class="px-4 py-2 border rounded-lg">Cancel</button>
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded-lg">Submit Request</button>
</div>
</form>
</div>
</div>
<!-- New Complaint Modal -->
<div id="newComplaintModal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div class="bg-white rounded-lg p-6 w-full max-w-md">
<div class="flex justify-between items-center mb-4">
<h3 class="text-xl font-bold text-blue-800">File New Complaint/Suggestion</h3>
<button onclick="hideModal('newComplaintModal')" class="text-gray-500 hover:text-gray-700">✕</button>
</div>
<form id="newComplaintForm" class="space-y-4">
<div>
<label for="complaintType" class="block text-gray-700 mb-2">Type</label>
<select id="complaintType" class="w-full px-4 py-2 border rounded-lg">
<option value="complaint">Complaint</option>
<option value="suggestion">Suggestion</option>
<option value="concern">General Concern</option>
</select>
</div>
<div>
<label for="complaintSubject" class="block text-gray-700 mb-2">Subject</label>
<input type="text" id="complaintSubject" class="w-full px-4 py-2 border rounded-lg">
</div>
<div>
<label for="complaintDescription" class="block text-gray-700 mb-2">Description</label>
<textarea id="complaintDescription" rows="4" class="w-full px-4 py-2 border rounded-lg"></textarea>
</div>
<div class="flex justify-end space-x-3">
<button type="button" onclick="hideModal('newComplaintModal')" class="px-4 py-2 border rounded-lg">Cancel</button>
<button type="submit" class="bg-blue-600 text-white px-4 py-2 rounded-lg">Submit</button>
</div>
</form>
</div>
</div>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-6">
<div class="container mx-auto px-4">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<h3 class="text-xl font-bold">Barangay Management System</h3>
<p class="text-gray-400">Serving the community with digital solutions</p>
</div>
<div class="flex space-x-4">
<a href="#" class="text-gray-400 hover:text-white">Terms of Service</a>
<a href="#" class="text-gray-400 hover:text-white">Privacy Policy</a>
<a href="#" class="text-gray-400 hover:text-white">Contact Us</a>
</div>
</div>
<div class="mt-4 text-center text-gray-400 text-sm">
© 2025 Barangay Management System. All rights reserved By Clarivet Olei.
</div>
</div>
</footer>
</div>
<script src="script.js"></script>
</body>
</html>