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

Add logout buttun for all personal pages #85

Merged
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CheckDrive.Web/CheckDrive.Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@

app.MapControllerRoute(
name: "default",
pattern: "{controller=Auth}/{action=Index}/{id?}");
pattern: "{controller=Dashboard}/{action=Index}/{id?}");
app.Run();
Original file line number Diff line number Diff line change
@@ -1,30 +1,44 @@
@model IEnumerable<CheckDrive.ApiContracts.MechanicAcceptance.MechanicAcceptanceDto>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.10.0/font/bootstrap-icons.min.css">

@{
ViewData["Title"] = "Mechanic Acceptances (Personal)";
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>

<div class="container mt-5">
<div class="row justify-content-center">
<div class="col-md-10">
<div class="d-flex justify-content-end mb-3">
<form method="get" action="@Url.Action("PersonalIndex")">
<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>
<div class="col-md-4 text-end">
<a class="btn btn-success shadow" href="@Url.Action("Create", "MechanicAcceptances")">
<i class="fa fa-plus"></i> Yaratish
</a>
</div>
<form method="get" action="@Url.Action("PersonalIndex")">
<div class="col-md-4 mb-3">
<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>
</form>
</div>

<div class="table-responsive">
<table class="table table-bordered table-striped table-hover paper-shadow">
Expand Down Expand Up @@ -122,7 +136,7 @@
</div>
</div>
</div>
</div>
</form>

<style>
.badge {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,128 +1,147 @@
@model IEnumerable<CheckDrive.ApiContracts.MechanicHandover.MechanicHandoverDto>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.10.0/font/bootstrap-icons.min.css">

@{
ViewData["Title"] = "Mechanic Handovers (Personal)";
Layout = "~/Views/Shared/_PersonalLayout.cshtml";
}

<div class="container mt-5">
<div class="row justify-content-center">
<div class="col-md-10">
<div class="d-flex justify-content-end mb-3">

<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 method="get" action="@Url.Action("PersonalIndex")">
<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>
<div class="col-md-4 text-end">
<a class="btn btn-success shadow" href="@Url.Action("Create", "MechanicHandovers")">
<i class="fa fa-plus"></i> Yaratish
</a>
</div>
<form method="get" action="@Url.Action("PersonalIndex")">
<div class="col-md-4 mb-3">
<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>
</form>

<div class="table-responsive">
<table class="table table-bordered table-striped table-hover paper-shadow">
<thead>
<tr>
<th scope="col" style="width: 13%">Haydovchi F.I</th>
<th scope="col" style="width: 13%">Mexanik F.I</th>
<th scope="col" style="width: 10%">Topshirish</th>
<th scope="col" style="width: 20%">Boshlang'ich masofa</th>
<th scope="col" style="width: 38%">Izoh</th>
<th scope="col" style="width: 15%">Sana</th>
</tr>
</thead>
<tbody>
@if (Model != null && Model.Any())
{
foreach (var item in Model)
</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 scope="col" style="width: 13%">Haydovchi F.I</th>
<th scope="col" style="width: 13%">Mexanik F.I</th>
<th scope="col" style="width: 10%">Topshirish</th>
<th scope="col" style="width: 20%">Boshlang'ich masofa</th>
<th scope="col" style="width: 38%">Izoh</th>
<th scope="col" style="width: 15%">Sana</th>
</tr>
</thead>
<tbody>
@if (Model != null && Model.Any())
{
<tr>
<td class="text-center vertical-align-middle">
@if (!string.IsNullOrEmpty(item.MechanicName))
{
@item.DriverName
}
else
{
<a href="/MechanicHandovers/Create?driverId=@item.DriverId">@item.DriverName</a>
}
</td>
<td>@item.MechanicName</td>
<td>
@if (item.Date != null && item.Date.Value.Date == DateTime.Today)
{
@if (item.IsHanded)
foreach (var item in Model)
{
<tr>
<td class="text-center vertical-align-middle">
@if (!string.IsNullOrEmpty(item.MechanicName))
{
<span class="badge bg-success shadow">Topshirildi</span>
@item.DriverName
}
else
{
<span class="badge bg-danger shadow">Topshirilmadi</span>
<a href="/MechanicHandovers/Create?driverId=@item.DriverId">@item.DriverName</a>
}
}
</td>
<td>@item.MechanicName</td>
<td>
@if (item.Date != null && item.Date.Value.Date == DateTime.Today)
{
@if (item.IsHanded)
{
<span class="badge bg-success shadow">Topshirildi</span>
}
else
{
<span class="badge bg-danger shadow">Topshirilmadi</span>
}
}
</td>
<td>@item.Distance</td>
<td>@item.Comments</td>
<td>@item.Date</td>
</tr>
}
}
else
{
<tr>
<td colspan="6" class="text-center">
Maʼlumotlar mavjud emas
</td>
<td>@item.Distance</td>
<td>@item.Comments</td>
<td>@item.Date</td>
</tr>
}
}
else
{
<tr>
<td colspan="6" class="text-center">
Maʼlumotlar mavjud emas
</td>
</tr>
}
</tbody>
</table>
</div>
</tbody>
</table>
</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("PersonalIndex", 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("PersonalIndex", 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("PersonalIndex", new { pageNumber = ViewBag.CurrentPage + 1 })">@(@ViewBag.CurrentPage + 1)</a>
</li>
<li class="page-item">
<a class="page-link" href="@Url.Action("PersonalIndex", 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 ishchilar soni: @ViewBag.TotalCount)</p>
<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("PersonalIndex", 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("PersonalIndex", 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("PersonalIndex", new { pageNumber = ViewBag.CurrentPage + 1 })">@(@ViewBag.CurrentPage + 1)</a>
</li>
<li class="page-item">
<a class="page-link" href="@Url.Action("PersonalIndex", 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 ishchilar soni: @ViewBag.TotalCount)</p>
</div>
</div>
</div>
</div>
</div>
</div>
</form>

<style>
.badge {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,19 @@
ViewData["Title"] = "Index";
Layout = "~/Views/Shared/_PersonalLayout.cshtml";
}

<h1 class="text-center">Shifokor oynasi</h1>
<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">
Expand All @@ -25,8 +36,8 @@
</div>
<!-- LogOut Link -->
<div class="col-md-4 text-right">
<a href="@Url.Action("Login", "Auth")" class="btn btn-outline-danger">
Profildan Chiqish <i class="bi bi-box-arrow-right" style="margin-left: 5px;"></i>
<a class="btn btn-success shadow" href="@Url.Action("Create", "PersonalDoctorReviews")">
<i class="fa fa-plus"></i> Yaratish
</a>
</div>
</div>
Expand Down
Loading
Loading