-
Notifications
You must be signed in to change notification settings - Fork 1
/
admin-dashboard.aspx
246 lines (222 loc) · 13.2 KB
/
admin-dashboard.aspx
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
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="admin-dashboard.aspx.cs" Inherits="ComplaintManagement.admin_dashboard" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon.png"/>
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png"/>
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png"/>
<link rel="manifest" href="favicon/site.webmanifest"/>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<link href='https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.css' rel='stylesheet' />
<link rel="stylesheet" href="css/user-dashboard.css">
<title> Admin Dashboard</title>
<style>
@media print{
body *{
visibility:hidden;
}
.main{
margin-left:2vh;
}
.print-container{
position:absolute;
top:0;
}
.print-container, .print-container *{
visibility:visible;
}
}
</style>
</head>
<body>
<form id="form1" runat="server">
<section>
<nav class="navbar bg-dark text-light">
<ul class="navbar-nav">
<li class="logo">
<a href="#" class="nav-link">
<span class="link-text logo-text">LiveDesk</span>
<svg
aria-hidden="true"
focusable="false"
data-prefix="fad"
data-icon="angle-double-right"
role="img"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 448 512"
class="svg-inline--fa fa-angle-double-right fa-w-14 fa-5x"
>
<g class="fa-group">
<path
fill="currentColor"
d="M224 273L88.37 409a23.78 23.78 0 0 1-33.8 0L32 386.36a23.94 23.94 0 0 1 0-33.89l96.13-96.37L32 159.73a23.94 23.94 0 0 1 0-33.89l22.44-22.79a23.78 23.78 0 0 1 33.8 0L223.88 239a23.94 23.94 0 0 1 .1 34z"
class="text-light"
></path>
<path
fill="currentColor"
d="M415.89 273L280.34 409a23.77 23.77 0 0 1-33.79 0L224 386.26a23.94 23.94 0 0 1 0-33.89L320.11 256l-96-96.47a23.94 23.94 0 0 1 0-33.89l22.52-22.59a23.77 23.77 0 0 1 33.79 0L416 239a24 24 0 0 1-.11 34z"
class="text-light"
></path>
</g>
</svg>
</a>
</li>
<li class="nav-item">
<a href="admin-dashboard.aspx" class="nav-link">
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="home" class="svg-inline--fa fa-home fa-w-18" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
<g class="fa-group">
<path fill="currentColor" d="M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"class="text-light">
</path>
</g>
</svg>
<span class="link-text">Dashboard</span>
</a>
</li>
<li class="nav-item">
<a href="manage-complaint.aspx" class="nav-link">
<svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="plus-square" class="svg-inline--fa fa-plus-square fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
<g class="fa-group">
<path fill="currentColor" d="M352 240v32c0 6.6-5.4 12-12 12h-88v88c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-88h-88c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h88v-88c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v88h88c6.6 0 12 5.4 12 12zm96-160v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z" class="text-light">
</path>
</g>
</svg>
<span class="link-text">Manage Complaint</span>
</a>
</li>
<li class="nav-item">
<a href="admin-history.aspx" class="nav-link">
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="history" class="svg-inline--fa fa-history fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<g class="fa-group">
<path fill="currentColor" d="M504 255.531c.253 136.64-111.18 248.372-247.82 248.468-59.015.042-113.223-20.53-155.822-54.911-11.077-8.94-11.905-25.541-1.839-35.607l11.267-11.267c8.609-8.609 22.353-9.551 31.891-1.984C173.062 425.135 212.781 440 256 440c101.705 0 184-82.311 184-184 0-101.705-82.311-184-184-184-48.814 0-93.149 18.969-126.068 49.932l50.754 50.754c10.08 10.08 2.941 27.314-11.313 27.314H24c-8.837 0-16-7.163-16-16V38.627c0-14.254 17.234-21.393 27.314-11.314l49.372 49.372C129.209 34.136 189.552 8 256 8c136.81 0 247.747 110.78 248 247.531zm-180.912 78.784l9.823-12.63c8.138-10.463 6.253-25.542-4.21-33.679L288 256.349V152c0-13.255-10.745-24-24-24h-16c-13.255 0-24 10.745-24 24v135.651l65.409 50.874c10.463 8.137 25.541 6.253 33.679-4.21z" class="text-light">
</path>
</g>
</svg>
<span class="link-text">History</span>
</a>
</li>
<li class="nav-item">
<a href="index.aspx" class="nav-link">
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="sign-out-alt" class="svg-inline--fa fa-sign-out-alt fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<g class="fa-group">
<path fill="currentColor" d="M497 273L329 441c-15 15-41 4.5-41-17v-96H152c-13.3 0-24-10.7-24-24v-96c0-13.3 10.7-24 24-24h136V88c0-21.4 25.9-32 41-17l168 168c9.3 9.4 9.3 24.6 0 34zM192 436v-40c0-6.6-5.4-12-12-12H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h84c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12H96c-53 0-96 43-96 96v192c0 53 43 96 96 96h84c6.6 0 12-5.4 12-12z" class="text-light">
</path>
</g>
</svg>
<span class="link-text">Logout</span>
</a>
</li>
</ul>
</nav>
</section>
<main class="p-5">
<section class="p-3 mb-5 container shadow rounded bg-dark text-light">
<div>
<h2>Welcome <asp:Label runat="server" ID="lbl_user_name"></asp:Label></h2></div>
</section>
<section>
<div>
<div class="container shadow p-3 mb-5 rounded bg-body row">
<div class="col-md">
<div class="card p-3 shadow p-3 my-3 bg-dark rounded text-light" data-bs-toggle="tooltip" data-bs-placement="top" title="New complent that are not accepted by department">
<h2>New Complaints</h2>
<p class="lead"><asp:Label ID="lbl_new" runat="server"></asp:Label></p>
</div>
</div>
<div class="col-md">
<div class="card p-3 shadow p-3 my-3 bg-dark rounded text-light" data-bs-toggle="tooltip" data-bs-placement="top" title="Complent that are accepted and are under process">
<h2>Ongoing Complaints</h2>
<p class="lead"><asp:Label ID="lbl_ongoing" runat="server"></asp:Label></p>
</div>
</div>
<div class="col-md">
<div class="card p-3 shadow p-3 my-3 bg-dark rounded text-light" data-bs-toggle="tooltip" data-bs-placement="top" title="Past complent that are Resolved">
<h2>Resolved Complaints</h2>
<p class="lead"><asp:Label ID="lbl_resolved" runat="server"></asp:Label></p>
</div>
</div>
<div class="col-md">
<div class="card p-3 shadow p-3 my-3 bg-dark rounded text-light"data-bs-toggle="tooltip" data-bs-placement="top" title="Complent that are not accepted by department due to insufficient information">
<h2>Rejected Complaints</h2>
<p class="lead"><asp:Label ID="lbl_rejected" runat="server"></asp:Label>
</p>
</div>
</div>
<div class="col-md">
<div class="card p-3 shadow p-3 my-3 bg-dark rounded text-light"data-bs-toggle="tooltip" data-bs-placement="top" title="All complaints ">
<h2>Total Complaints</h2>
<p class="lead"><asp:Label ID="lbl_total" runat="server"></asp:Label>
</p>
</div>
</div>
</div>
</div>
</section>
<section class="row g-5 print-container">
<div class="container col-md shadow w-100 rounded bg-body " style="height:100%;">
<div>
<h3> Pie Chart</h3>
<asp:Chart ID="Chart1" runat="server" DataSourceId="SqlDataSource1">
<Series>
<asp:Series Name="Series1" ChartType="Pie" XValueMember="status" YValueMembers="total" IsValueShownAsLabel="True" Legend="Legend1"></asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1"></asp:ChartArea>
</ChartAreas>
<Legends>
<asp:Legend Name="Legend1">
</asp:Legend>
</Legends>
<Titles>
<asp:Title BackColor="192, 192, 255" Font="Tahoma, 12pt" Name="Title1" Text="Complaints According to Status">
</asp:Title>
</Titles>
</asp:Chart>
<asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString='<%$ ConnectionStrings:Complaint_dbConnectionString %>' SelectCommand="select count(*) as total, status from complaints
where status = 'new' and department = @department group by status
union
select count(*) as total, status from complaints
where status = 'ongoing' and department = @department group by status
union
select count(*) as total, status from complaints
where status = 'rejected' and department = @department group by status
union
select count(*) as total, status from complaints
where status = 'resolved' and department = @department group by status">
<SelectParameters>
<asp:SessionParameter SessionField="department" Name="department"></asp:SessionParameter>
</SelectParameters>
</asp:SqlDataSource>
</div>
</div>
<div class="container col-md shadow w-100 rounded bg-body ">
<div>
<h3> Barplot Chart</h3>
<asp:Chart ID="Chart2" runat="server" DataSourceID="SqlDataSource1">
<Series>
<asp:Series Name="Series1" Legend="Legend1" XValueMember="status" YValueMembers="total"></asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1"></asp:ChartArea>
</ChartAreas>
<Legends>
<asp:Legend Name="Legend1">
</asp:Legend>
</Legends>
<Titles>
<asp:Title BackColor="255, 192, 255" Font="Tahoma, 12pt" Name="Title1" Text="Status Wise Womplaints">
</asp:Title>
</Titles>
</asp:Chart>
</div>
</div>
<div class="row my-5">
<button class="btn btn-lg btn-dark text-light " onclick="window.print();">Print</button>
</div>
</section>
</main>
</form>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous">