-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathIndex.cshtml
214 lines (191 loc) · 8.11 KB
/
Index.cshtml
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
@model IEnumerable<CheckDrive.ApiContracts.DoctorReview.DoctorReviewDto>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.10.0/font/bootstrap-icons.min.css">
@{
ViewData["Title"] = "Index";
Layout = "~/Views/Shared/_PersonalLayout.cshtml";
}
<div class="container-fluid py-2 px-4 d-flex justify-content-end">
<div class="d-flex align-items-center">
<div class="dropdown">
<button class="btn btn-secondary" type="button" data-bs-toggle="dropdown" aria-expanded="false" style="background-color: white; border-color: black;">
<i class="fa-solid fa-user" style="background-color: white; color: black;"></i>
<i class="bi bi-caret-down-fill" style="background-color:white; color:black"></i>
</button>
<ul class="dropdown-menu" aria-labelledby="userDropdown">
<li><a class="dropdown-item" style="color: red" href="@Url.Action("Login", "Auth")">Profildan Chiqish</a></li>
</ul>
</div>
</div>
</div>
<form asp-controller="PersonalDoctorReviews" asp-action="Index">
<div class="container mt-5">
<div class="row justify-content-between align-items-center mb-4">
<!-- Search -->
<div class="col-md-4">
<div class="input-group">
<input type="text" class="form-control rounded-left" placeholder="Haydovchini kiriting ..." name="searchString" value="@ViewBag.SearchString">
<div class="input-group-append">
<button type="submit" class="btn btn-primary">
<i class="fa fa-search"></i>
</button>
</div>
</div>
</div>
<!-- LogOut Link -->
<div class="col-md-4 text-right">
<a class="btn btn-success shadow" href="@Url.Action("Create", "PersonalDoctorReviews")">
<i class="fa fa-plus"></i> Yaratish
</a>
</div>
</div>
<div class="row justify-content-center">
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover paper-shadow">
<thead>
<tr>
<th class="text-center vertical-align-middle">Haydovshi F.I.</th>
<th class="text-center vertical-align-middle">Shifokor F.I.</th>
<th class="text-center vertical-align-middle">Sog`lig`i</th>
<th class="text-center vertical-align-middle">Izoh</th>
<th class="text-center vertical-align-middle">Sana</th>
</tr>
</thead>
<tbody>
@foreach (var review in Model)
{
<tr>
<td class="text-center vertical-align-middle">
@if (!string.IsNullOrEmpty(review.DoctorName))
{
@review.DriverName
}
else
{
<a href="/PersonalDoctorReviews/Create?driverId=@review.DriverId&driverName=@review.DriverName">@review.DriverName</a>
}
</td>
<td class="text-center vertical-align-middle">@review.DoctorName</td>
<td class="text-center vertical-align-middle">
@if (review.IsHealthy == true)
{
<span class="badge bg-success shadow">Healthy</span>
}
else if (review.IsHealthy == false)
{
<span class="badge bg-danger shadow">Sick</span>
}
else
{
<span class="badge bg-empty shadow"></span>
}
</td>
<td class="text-center vertical-align-middle">@review.Comments</td>
<td class="text-center vertical-align-middle">@review.Date</td>
</tr>
}
</tbody>
</table>
</div>
</div>
</div>
<div class="d-flex justify-content-between align-items-center my-3">
<nav aria-label="Page navigation">
<ul class="pagination">
@if (ViewBag.HasPreviousPage)
{
<li class="page-item">
<a class="page-link" href="@Url.Action("Index", new { pageNumber = 1 })" aria-label="First">
<span aria-hidden="true">«</span>
</a>
</li>
<li class="page-item">
<a class="page-link" href="@Url.Action("Index", new { pageNumber = ViewBag.CurrentPage - 1 })">@(@ViewBag.CurrentPage - 1)</a>
</li>
}
@if (ViewBag.HasNextPage)
{
<li class="page-item active">
<span class="page-link">@ViewBag.CurrentPage</span>
</li>
<li class="page-item">
<a class="page-link" href="@Url.Action("Index", new { pageNumber = ViewBag.CurrentPage + 1 })">@(@ViewBag.CurrentPage + 1)</a>
</li>
<li class="page-item">
<a class="page-link" href="@Url.Action("Index", new { pageNumber = ViewBag.PageCount })" aria-label="Last">
<span aria-hidden="true">»</span>
</a>
</li>
}
</ul>
</nav>
<div class="p-2">
<p class="h6 mb-0">@ViewBag.PageCount sahifadan @ViewBag.CurrentPage tasi ( umumiy ishchilar soni: @ViewBag.TotalCount)</p>
</div>
</div>
</div>
</form>
<style>
.badge {
font-size: 0.8rem;
padding: 5px 10px;
border-radius: 5px;
}
.bg-success {
background-color: #28a745;
}
.bg-danger {
background-color: #dc3545;
}
.bg-empty {
background-color: gray;
}
.container {
margin-top: 30px;
}
.table-bordered {
border: 1px solid #dee2e6;
}
.table-bordered th,
.table-bordered td {
border: 1px solid #dee2e6;
}
.paper-shadow {
background: white;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
border-radius: 10px;
}
.pagination {
justify-content: flex-end;
}
.shadow {
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.pagination .page-link {
margin-left: 5px;
}
.pagination .page-item.shadow {
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.vertical-align-middle {
vertical-align: middle !important;
}
.row {
margin-right: 0;
margin-left: 0;
}
.col-md-4, .col-md-12 {
padding-right: 0;
padding-left: 0;
}
.text-right {
text-align: right;
}
.btn-secondary {
background-color: #6c757d;
color: white;
}
.btn-secondary:hover {
background-color: #5a6268;
}
</style>