Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DoctorReviews page #234

Merged
merged 3 commits into from
Dec 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 15 additions & 46 deletions CheckDrive.Web/CheckDrive.Web/Views/DoctorReviews/Index.cshtml
Original file line number Diff line number Diff line change
@@ -5,24 +5,20 @@
Layout = "~/Views/Shared/_Layout.cshtml";
}

<h1>Shifokorlar ko'riklari</h1>

<form asp-controller="DoctorReviews" asp-action="Index">
<div class="row">
<div class="row mt-4">
<div class="d-flex justify-content-between">
<!-- Search -->
<div class="col-md-4 mb-4">
<div class="col-md-4 mb-4 filter-bar">
<div class="input-group">
<input type="text" class="form-control rounded-left" placeholder="shifokor yoki haydovchini izlash..." name="searchString" value="@ViewBag.SearchString">
<input type="text" class="form-control rounded-left" placeholder="Izlash..." name="searchString" value="@ViewBag.SearchString">
<div class="input-group-append">
<button type="submit" class="btn btn-primary">
<i class="fa fa-search"></i> Qidirish
</button>
</div>
</div>
</div>
<!-- Date -->
<div class="col-md-2 mb-4">
<div class="col-md-2 mb-4 date-filter">
<input type="date" name="date" class="form-control">
</div>
</div>
@@ -31,52 +27,25 @@

<div class="row">
<div class="col-12">
<ejs-grid id="operatorReview-list" dataSource="@ViewBag.DoctorsReview" gridLines="Vertical" allowSorting="true" dataBound="onDataBound">
<ejs-grid
id="operatorReview-list"
dataSource="@ViewBag.DoctorsReview"
gridLines="Both"
allowSorting="true"
allowPaging="true"
dataBound="onDataBound">
<e-grid-pagesettings pageSize="10"></e-grid-pagesettings>
<e-grid-columns>
<e-grid-column headerText="Shifokor F.I.SH" field="DoctorName" type="string" textAlign=Center headerTextAlign=Center width="300"></e-grid-column>
<e-grid-column headerText="Haydovchi F.I.SH" field="DriverName" type="string" textAlign=Center headerTextAlign=Center width="300"></e-grid-column>
<e-grid-column headerText="Ro'yxatdan o'tgan vaqt" field="Date" type="date" format="dd-MM-yyyy | HH:mm" textAlign=Center headerTextAlign=Center></e-grid-column>
<e-grid-column headerText="Shifokor" field="DoctorName" type="string" textAlign=Center headerTextAlign=Center width="300"></e-grid-column>
<e-grid-column headerText="Haydovchi" field="DriverName" type="string" textAlign=Center headerTextAlign=Center width="300"></e-grid-column>
<e-grid-column headerText="Ko'rik vaqti" field="Date" type="date" format="dd-MM-yyyy | HH:mm" textAlign=Center headerTextAlign=Center></e-grid-column>
<e-grid-column headerText="Sog'ligi" field="IsHealthy" template="#booleanColumnTemplate" textAlign=Center headerTextAlign=Center></e-grid-column>
<e-grid-column width="100" type="text" textAlign="Center" template="#actionTemplate"></e-grid-column>
</e-grid-columns>
</ejs-grid>
</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">&laquo;</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">&raquo;</span>
</a>
</li>
}
</ul>
</nav>
<div class="p-2">
<p class="h6 mb-0">@ViewBag.PageCount sahifadan @ViewBag.CurrentPage tasi ( umumiy doctorlar ko'riklari soni: @ViewBag.TotalCount)</p>
</div>
</div>

<script>
function onDataBound() {
4 changes: 4 additions & 0 deletions CheckDrive.Web/CheckDrive.Web/wwwroot/css/site.css
Original file line number Diff line number Diff line change
@@ -50,6 +50,10 @@ body {
margin-right:40px;
}

.date-filter{
margin-right:40px;
}

.no-a-decoration, .no-a-decoration:hover {
text-decoration: none;
color: inherit;