Files
Backend-Api/ServiceHost/Areas/AdminNew/Pages/Company/RollCall/Index.cshtml

265 lines
12 KiB
Plaintext

@page
@using Version = _0_Framework.Application.Version
@model ServiceHost.Areas.AdminNew.Pages.Company.RollCall.IndexModel
@{
var index = 1;
}
@section Styles {
<link href="~/AssetsClient/css/table-style.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/table-responsive.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/assetsclient/css/table-grid.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/assetsclient/css/operation-button.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/AssetsAdminNew/Ticket/css/ticket-list.css?ver=@Version.StyleVersion" rel="stylesheet" />
<link href="~/AssetsAdminNew/Ticket/css/ticket-create.css?ver=@Version.StyleVersion" rel="stylesheet" />
<link href="~/AssetsAdminNew/Ticket/css/ticket-message.css?ver=@Version.StyleVersion" rel="stylesheet" />
<link href="~/AssetsAdminNew/Ticket/css/Index.css?ver=@Version.StyleVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/select2.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/datetimepicker.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/dropdown.css?ver=@Version.AdminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/filter-search.css?ver=@Version.AdminVersion" rel="stylesheet" />
<!-- sweet alerts -->
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
<style>
@@media (max-width: 767px) {
.sticky {
position: sticky;
top: 3px;
z-index: 60;
}
}
</style>
}
<div class="row pb-2">
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
<div class="col d-flex">
<img src="~/AssetsClient/images/icons/headphone.png" alt="" class="img-fluid me-2" style="width: 45px;object-fit: cover;" />
<div>
<h4 class="title d-flex align-items-center">مدیریت حضور و غیاب</h4>
<div class="title d-flex align-items-center">کارگاه نورداد مهر گستر کاسپین</div>
</div>
</div>
<div>
<a asp-area="Admin" asp-page="/Index" class="back-btn" type="button">
<span>بازگشت</span>
</a>
</div>
</div>
</div>
<button type="button" class="btn btn-rounded mb-5 goToTop"> <i class="fa fa-chevron-up" style="font-size: 20px"></i> برو بالا</button>
@* <input type="hidden" asp-for="SearchModel.PageIndex" id="pageIndex" value="@Model.SearchModel.PageIndex" /> *@
<!-- List Items -->
<div class="row">
<div class="col-12 mb-2">
<div class="d-flex w-100 section-btns-task">
</div>
</div>
<div class="container-fluid">
<div class="row p-lg-2 p-auto">
<div class="wrapper list-box table-ticket bg-white ">
<div class="Rtable Rtable--collapse">
<div class="Rtable-row Rtable-row--head align-items-center d-flex sticky">
<div class="Rtable-cell column-heading width1">
<span class="d-flex justify-content-start text-white align-items-center">
@* <input type="checkbox" class="form-check-input checkAll me-1" name="" id="checkAll2"> *@
<label for="checkAll2">ردیف</label>
</span>
</div>
<div class="Rtable-cell column-heading d-md-block d-none width2">نام کارگاه</div>
<div class="Rtable-cell column-heading d-md-block d-none width3">نوع سرویس</div>
<div class="Rtable-cell column-heading width4">تعداد پرسنل</div>
<div class="Rtable-cell column-heading width5">تعداد پرسنل فعال</div>
<div class="Rtable-cell column-heading d-md-block d-none width6">تعداد پرسنل در حال حضور و غیاب</div>
<div class="Rtable-cell column-heading width7 text-end">عملیات</div>
</div>
@foreach (var item in Model.Items)
{
<div class="ticket-list Rtable-row align-items-center position-relative openAction">
<div class="Rtable-cell d-md-block d-flex width1">
<div class="Rtable-cell--content">
<span class="d-flex justify-content-center align-items-center justify-content-center">
@* <input type="checkbox" class="form-check-input " name="" id=""> *@
@(index++)
</span>
</div>
</div>
<div class="Rtable-cell d-md-block d-none width2">
<div class="Rtable-cell--content">@item.WorkshopName</div>
</div>
<div class="Rtable-cell d-md-block d-none width3">
<div class="Rtable-cell--content">@item.RollCallServiceType</div>
</div>
<div class="Rtable-cell width4">
<div class="Rtable-cell--content text-start">@item.TotalEmployeesCount</div>
</div>
<div class="Rtable-cell width5">
<div class="Rtable-cell--content text-start">@item.ActiveEmployeesCount</div>
</div>
<div class="Rtable-cell d-md-block d-none width6">
<div class="Rtable-cell--content">@item.ActiveEmployeesWithRollCallInLastWeekCount</div>
</div>
<div class="Rtable-cell width8 text-end">
<div class="Rtable-cell--content align-items-center d-flex justify-content-end">
<a asp-area="AdminNew" asp-page="./Options" asp-route-workshopId="@item.WorkshopId" type="button" class="btn-ticket-detail position-relative d-md-block d-none">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B" />
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826" />
<path d="M7.79175 12.375H13.2917H7.79175Z" fill="#248826" />
<path d="M7.79175 12.375H13.2917" stroke="#248826" stroke-linecap="round" />
<path d="M7.79175 15.125H12.3751H7.79175Z" fill="#248826" />
<path d="M7.79175 15.125H12.3751" stroke="#248826" stroke-linecap="round" />
</svg>
<span class="mx-1 d-md-none d-flex">جزئیات</span>
</a>
<button type="button" class="btn-ticket-delete d-md-block d-none">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-linecap="round" />
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-linecap="round" />
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-linecap="round" />
</svg>
<span class="mx-1 d-md-none d-flex">حذف</span>
</button>
<button type="button" class="btn-ticket-more d-md-none d-block position-relative">
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span class="mx-1 align-items-center d-flex justify-content-center">
<p class="my-0 mx-1">عملیات</p>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)" />
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)" />
<circle cx="8.4001" cy="12.3992" r="1.2" transform="rotate(90 8.4001 12.3992)" />
</svg>
</span>
</button>
</div>
</div>
</div>
<div class="operation-div w-100">
<div class="operations-btns">
<div class="row p-0">
<div class="d-flex align-items-center justify-content-between">
<span class="span1">نام کارگاه</span>
<span class="span1">@item.WorkshopName</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span2">نوع سرویس</span>
<span class="span2">@item.RollCallServiceType</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span2">تعداد پرسنل</span>
<span class="span2">@item.TotalEmployeesCount</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span2">تعداد پرسنل فعال</span>
<span class="span2">@item.ActiveEmployeesCount</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span2">تعداد پرسنل در حال حضور و غیاب</span>
<span class="span2">@item.ActiveEmployeesWithRollCallInLastWeekCount</span>
</div>
<div class="col-md-12 col-12">
<button type="button" class="btn-ticket-detail position-relative d-md-none d-flex align-items-center justify-content-center w-100" onclick="OptionsRollCall(@item.WorkshopId)">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B" />
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826" />
<path d="M7.79175 12.375H13.2917H7.79175Z" fill="#248826" />
<path d="M7.79175 12.375H13.2917" stroke="#248826" stroke-linecap="round" />
<path d="M7.79175 15.125H12.3751H7.79175Z" fill="#248826" />
<path d="M7.79175 15.125H12.3751" stroke="#248826" stroke-linecap="round" />
</svg>
<span class="mx-1 d-md-none d-flex">جزئیات</span>
</button>
</div>
</div>
</div>
</div>
}
</div>
</div>
</div>
</div>
</div>
<div id="MainModal" class="modal fade" aria-labelledby="myModalLabel" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-xl-messageModal modal-dialog-centered">
<div class="modal-content" id="ModalContent">
</div>
</div>
</div>
@section Script {
<script src="~/assetsclient/js/site.js?ver=@Version.StyleVersion"></script>
<script>
if ($(window).width() < 768) {
$(document).on("click", ".openAction", function () {
$(this).next().find(".operations-btns").slideToggle(500);
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
});
}
$(document).ready(function () {
$('.loadingButton').on('click',
function () {
var button = $(this);
var loadingDiv = button.find('.loading');
loadingDiv.show();
});
$(window).scroll(function () {
if ($(window).scrollTop() + $(window).height() > $(document).height() - 600) {
//ajaxDataWithoutEmployee();
}
if ($(this).scrollTop() > 100) {
$('.goToTop').show().fadeIn();
} else {
$('.goToTop').fadeOut().hide();
}
});
$('.goToTop').on('click',
function () {
$('html, body').animate({ scrollTop: 0 }, 360);
return false;
});
});
function OptionsRollCall(id) {
var workshopId = Number(id);
var goTo = `@Url.Page("/Company/RollCall/Options")`;
window.location.href = goTo + workshopId;
}
</script>
}