-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathadmin.html
More file actions
164 lines (147 loc) · 4.64 KB
/
admin.html
File metadata and controls
164 lines (147 loc) · 4.64 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Portal - Complaint System</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
:root {
--primary-color: #3b82f6;
--secondary-color: #d1d5db;
--text-primary: #1f2937;
--text-secondary: #6b7280;
--bg-color: #f3f4f6;
}
body {
font-family: 'Inter', sans-serif;
background-color: var(--bg-color);
color: var(--text-primary);
line-height: 1.6;
}
.container {
max-width: 960px;
margin: 2rem auto;
padding: 2rem;
background-color: #fff;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
background-color: var(--primary-color);
color: white;
padding: 1rem 2rem;
border-radius: 12px 12px 0 0;
margin-bottom: -2rem; /* Merge with container */
}
.header h1 {
font-size: 1.5rem;
font-weight: 600;
}
.header button {
background-color: #ef4444;
color: white;
padding: 0.5rem 1.5rem;
border-radius: 9999px;
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
}
.header button:hover {
background-color: #dc2626;
}
.dashboard-nav {
display: flex;
justify-content: center;
gap: 1rem;
margin-bottom: 2rem;
padding-top: 2rem;
}
.nav-btn {
background-color: var(--secondary-color);
color: var(--text-secondary);
padding: 0.75rem 1.5rem;
border-radius: 9999px;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s, color 0.2s;
}
.nav-btn.active {
background-color: var(--primary-color);
color: white;
}
.stat-card {
background: #fff;
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
text-align: center;
border: 1px solid #e5e7eb;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.5rem;
margin-bottom: 2rem;
}
.complaints-grid {
display: grid;
gap: 1.5rem;
}
.complaint-card {
background: #fff;
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
border: 1px solid #e5e7eb;
}
.complaint-actions button {
border: 5px;
padding: 0.5rem 1rem;
border-radius: 0.25rem;
cursor: pointer;
font-size: 0.875rem;
transition: background-color 0.2s;
}
.complaint-actions .resolve {
background-color: #10b981;
color: white;
margin-right: 0.5rem;
}
.complaint-actions .delete {
background-color: #e62222;
color: white;
margin-left: 0.5rem;
}
</style>
</head>
<body>
<div class="header">
<h1>Admin Complaint Portal</h1>
<button onclick="logout()">Logout</button>
</div>
<div class="container">
<h2>Admin Dashboard</h2>
<div id="dashboard-stats">Loading...</div>
<div class="dashboard-nav">
<button id="pending-btn" onclick="showPendingComplaints()" class="nav-btn active">Pending Complaints</button>
<button id="resolved-btn" onclick="showResolvedComplaints()" class="nav-btn">Resolved Complaints</button>
<button id="all-btn" onclick="showAllComplaints()" class="nav-btn">All Complaints</button>
</div>
<div id="complaints-section">
<h3 id="complaints-title">Pending Complaints</h3>
<div id="complaints-list">Loading...</div>
</div>
</div>
<script src="api.js"></script>
<script src="admin.js"></script>
<style>
</style>
</body>
</html>