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

mechanic handover page #241

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
65 changes: 17 additions & 48 deletions CheckDrive.Web/CheckDrive.Web/Views/MechanicHandovers/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,22 @@
Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Mexaniklar ko'riklari (topshirish)</h2>

<form asp-controller="MechanicHandovers" 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="mexanik 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>
<div class="col-md-4 mb-4 d-flex align-items-center">
<div class="col-md-4 mb-4 d-flex align-items-center ">
<input type="date" name="date" class="form-control me-2">
<div class="dropdown">
<div class="create-btn">
<button class="btn btn-outline-info dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false">
<i class="fa-solid fa-download"></i> Yuklab olish
</button>
Expand All @@ -39,54 +36,26 @@

<div class="row">
<div class="col-12">
<ejs-grid id="mechanicHandovers-list" dataSource="@ViewBag.MechanicHandovers" gridLines="Vertical" allowSorting="true" dataBound="onDataBound">
<ejs-grid
id="mechanicHandovers-list"
dataSource="@ViewBag.MechanicHandovers"
gridLines="Both"
allowSorting="true"
allowPaging="true"
dataBound="onDataBound">
<e-grid-pagesettings pageSize="10"></e-grid-pagesettings>
<e-grid-columns>
<e-grid-column headerText="Mexanik F.I.SH" field="MechanicName" type="string" textAlign=Center headerTextAlign=Center width="200"></e-grid-column>
<e-grid-column headerText="Haydovchi F.I.SH" field="DriverName" type="string" textAlign=Center headerTextAlign=Center width="200"></e-grid-column>
<e-grid-column headerText="Mashina" field="CarName" template="#carTemplate" type="string" textAlign=Center headerTextAlign=Center></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="Mexanik" field="MechanicName" type="string" textAlign=Center headerTextAlign=Center width="200"></e-grid-column>
<e-grid-column headerText="Haydovchi" field="DriverName" type="string" textAlign=Center headerTextAlign=Center width="200"></e-grid-column>
<e-grid-column headerText="Avtomobil" field="CarName" template="#carTemplate" type="string" textAlign=Center headerTextAlign=Center></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="Status" field="Status" template="#statusColumnTemplate" textAlign=Center headerTextAlign=Center width="100"></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 mexaniklar topshirishlari soni: @ViewBag.TotalCount)</p>
</div>
</div>

<script>
let selectedYear = new Date().getFullYear();
let selectedMonth = new Date().getMonth() + 1;
Expand Down