320 lines
9.2 KiB
Plaintext
320 lines
9.2 KiB
Plaintext
@using CompanyManagment.EFCore.Migrations
|
|
@model CompanyManagment.App.Contracts.RollCall.EmployeeRollCallsViewModel
|
|
@{
|
|
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
|
var index = 0;
|
|
var count = Model.RollCalls.Count;
|
|
string countString;
|
|
string txtString;
|
|
|
|
<link rel="stylesheet" href="~/AssetsClient/css/rollcall-package.css?ver=@adminVersion">
|
|
<link href="~/AssetsClient/css/select2.css" rel="stylesheet" />
|
|
|
|
<style>
|
|
.errored {
|
|
animation: shake 300ms;
|
|
color: #eb3434 !important;
|
|
background-color: #fef2f2 !important;
|
|
border: 1px solid #eb3434 !important;
|
|
}
|
|
|
|
.modal-dialog, .modal-content {
|
|
height: 420px;
|
|
}
|
|
|
|
.timeWorkTitle {
|
|
color: #5C5C5C;
|
|
font-weight: 600;
|
|
font-size: 12px;
|
|
margin: auto 0 auto 6px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.groupBox {
|
|
background-color: #F5F5F5;
|
|
border-radius: 10px;
|
|
border: 1px solid #E7E7E7;
|
|
padding: 6px;
|
|
margin: 6px 3px;
|
|
}
|
|
|
|
.groupBox .form-control {
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
.groupBox .form-control::placeholder {
|
|
color: #bfbfbf;
|
|
opacity: 1; /* Firefox */
|
|
}
|
|
|
|
.groupBox .form-control::-ms-input-placeholder { /* Edge 12-18 */
|
|
color: #bfbfbf;
|
|
}
|
|
|
|
.btnAddTimeWork {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: #84CC16;
|
|
border-radius: 5px;
|
|
color: #ffffff;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
padding: 4px 8px;
|
|
}
|
|
|
|
.btnRemoveTimeWork {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: #F87171;
|
|
border-radius: 7px;
|
|
padding: 3px;
|
|
width: 30px;
|
|
height: 30px;
|
|
}
|
|
|
|
.ShowMessage {
|
|
position: absolute;
|
|
background: #dfdfdf;
|
|
width: 100%;
|
|
top: 0;
|
|
right: 0;
|
|
height: 100%;
|
|
border-radius: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.heightControll {
|
|
height: 190px;
|
|
overflow-y: scroll;
|
|
}
|
|
</style>
|
|
}
|
|
|
|
<form role="form" method="post" name="edit-form" id="edit-form" autocomplete="off">
|
|
|
|
<div class="modal-content">
|
|
<div class="modal-header d-block text-center mb-2">
|
|
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
<h4 class="textListTitle">ویرایش ساعت حضور و غیاب</h4>
|
|
<h6 class="textListTitle" id="modalWorkshopFullname"></h6>
|
|
</div>
|
|
|
|
<div class="modal-body py-0">
|
|
<div class="container p-0 m-0">
|
|
<div class="row">
|
|
<div class="col-12 my-1">
|
|
<div class="select-alert">
|
|
<input type="hidden" name="Command.EmployeeId" value="@Model.EmployeeId" />
|
|
<input class="form-control disable" value="@Model.EmployeeFullName" placeholder="نام پرسنل" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-12 my-1">
|
|
<input type="hidden" name="Command.DateFa" value="@Model.DateFa" />
|
|
<input class="form-control form-control-date text-center disable" value="@Model.DateFa" placeholder="تاریخ" style="direction: ltr" />
|
|
</div>
|
|
|
|
<div class="heightControll">
|
|
<div class="col-12" id="appendChildTimeWorkHtml">
|
|
@if (@Model.RollCalls.Count > 0)
|
|
{
|
|
@foreach (var item in Model.RollCalls)
|
|
{
|
|
@switch (index)
|
|
{
|
|
case 1:
|
|
txtString = "دوم";
|
|
break;
|
|
case 2:
|
|
txtString = "سوم";
|
|
break;
|
|
case 3:
|
|
txtString = "چهارم";
|
|
break;
|
|
case 4:
|
|
txtString = "پنجم";
|
|
break;
|
|
case 5:
|
|
txtString = "ششم";
|
|
break;
|
|
case 6:
|
|
txtString = "هفتم";
|
|
break;
|
|
case 7:
|
|
txtString = "هشتم";
|
|
break;
|
|
case 8:
|
|
txtString = "نهم";
|
|
break;
|
|
case 9:
|
|
txtString = "دهم";
|
|
break;
|
|
default:
|
|
txtString = "اول";
|
|
break;
|
|
}
|
|
|
|
<div class="groupBox">
|
|
<div class="row align-items-center justify-content-between">
|
|
<div class="col-2 d-flex align-items-center">
|
|
<div class="timeWorkTitle">
|
|
نوبت @txtString
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-4 d-flex align-items-center">
|
|
<div class="timeWorkTitle">از</div>
|
|
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[@index].StartTime" placeholder="00:00" value="@item.StartTimeString" style="direction: ltr;">
|
|
</div>
|
|
|
|
<div class="col-4 d-flex align-items-center">
|
|
<div class="timeWorkTitle">الی</div>
|
|
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[@index].EndTime" placeholder="00:00" value="@item.EndTimeString" style="direction: ltr;">
|
|
</div>
|
|
@if (index == 0)
|
|
{
|
|
<div class="col-2 d-flex align-items-center justify-content-end">
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="col-2 d-flex align-items-center justify-content-end">
|
|
<button type="button" class="btnRemoveTimeWork">
|
|
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
|
<path d="M6.875 11H15.125" stroke="white" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
index++;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<div class="groupBox">
|
|
<div class="row align-items-center justify-content-between">
|
|
<div class="col-2 d-flex align-items-center">
|
|
<div class="timeWorkTitle">
|
|
نوبت اول
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-4 d-flex align-items-center">
|
|
<div class="timeWorkTitle">از</div>
|
|
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].StartTime" placeholder="00:00" style="direction: ltr;">
|
|
</div>
|
|
|
|
<div class="col-4 d-flex align-items-center">
|
|
<div class="timeWorkTitle">الی</div>
|
|
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].EndTime" placeholder="00:00" style="direction: ltr;">
|
|
</div>
|
|
|
|
<div class="col-2 d-flex align-items-center justify-content-end">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
</div>
|
|
|
|
<div class="d-flex align-items-center justify-content-center w-100 my-2">
|
|
<button type="button" class="btnAddTimeWork">
|
|
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
|
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
|
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
|
</svg>
|
|
|
|
|
|
@switch (count)
|
|
{
|
|
case 0:
|
|
countString = "دوم";
|
|
break;
|
|
case 1:
|
|
countString = "دوم";
|
|
break;
|
|
case 2:
|
|
countString = "سوم";
|
|
break;
|
|
case 3:
|
|
countString = "چهارم";
|
|
break;
|
|
case 4:
|
|
countString = "پنجم";
|
|
break;
|
|
case 5:
|
|
countString = "ششم";
|
|
break;
|
|
case 6:
|
|
countString = "هفتم";
|
|
break;
|
|
case 7:
|
|
countString = "هشتم";
|
|
break;
|
|
case 8:
|
|
countString = "نهم";
|
|
break;
|
|
case 9:
|
|
countString = "دهم";
|
|
break;
|
|
default:
|
|
countString = "اول";
|
|
break;
|
|
}
|
|
|
|
<div class="mx-1 btnAppendChildTimeWork">افزودن نوبت @countString</div>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="ShowMessage d-none">
|
|
<p class="m-0" id="ShowSettingMessage"></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<div class="container m-0">
|
|
<div class="row">
|
|
<div class="col-6 text-end">
|
|
<button type="button" class="btn-cancel2 d-flex justify-content-center w-100" id="prev-step" data-bs-dismiss="modal" aria-label="Close">انصراف</button>
|
|
</div>
|
|
<div class="col-6 text-start">
|
|
<button type="button" class="btn-register w-100 position-relative" id="next-step">
|
|
<span>ثبت</span>
|
|
<div class="spinner-loading loading" style="display: none;">
|
|
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
|
</div>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<script src="~/assetsclient/libs/jalaali-js/jalaali.js"></script>
|
|
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
|
|
|
|
<script>
|
|
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
|
|
var saveRollCallWorkTimeAjax = `@Url.Page("./CaseHistory", "ManualCreateOrEdit")`;
|
|
var loadByEmployeeRollCallWorkTimeAjax = `@Url.Page("./CaseHistory", "ManualCreateOrEdit")`;
|
|
var employeeListAjax = `@Url.Page("./CaseHistory", "EmployeeList")`;
|
|
</script>
|
|
<script src="~/AssetsAdminNew/rollcall/js/ModalEditRollCall.js?ver=@adminVersion"></script> |