Files
Backend-Api/ServiceHost/Areas/Client/Pages/Company/Employees/CreateLeave.cshtml
2025-04-08 19:27:25 +03:30

212 lines
10 KiB
Plaintext

@model CompanyManagment.App.Contracts.Leave.CreateLeave
@{
string clientVersion = _0_Framework.Application.Version.StyleVersion;
<link href="~/AssetsClient/css/select2.css" rel="stylesheet" />
<style>
.errored {
color: #FF3A3A !important;
border: 1px solid #FF3A3A !important
}
#printSection {
display: none;
}
.blackSelect {
background-color: #cbd5e1;
}
.modal-xxl {
max-width: 900px;
}
</style>
}
<form asp-page="./Leave" asp-page-handler="SaveLeave" id="employee" autocomplete="off"
method="post"
data-ajax="true"
data-callback=""
data-action="ReloadLeave">
<input type="hidden" asp-for="@Model.WorkshopId" />
<div class="modal-content">
<div class="modal-header d-block text-center position-relative">
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
<h5 class="modal-title" id="morakhasiEstehghaghiModalLabel">ثبت مرخصی</h5>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row form-morakhasi-estehghaghi">
<div class="container-fluid">
<div class="row mb-1">
<div class="col-12 my-1">
<select class="form-select select2OptionEmployee" aria-label="انتخاب پرسنل ..." asp-for="@Model.EmployeeId" id="employeeSelectList">
<option value="">پرسنل را انتخاب کنید ...</option>
</select>
</div>
</div>
<div id="cardSectionLeave" class="card px-2 border blur">
<div class="row my-3">
<div class="col-12 col-md-8 d-block d-sm-flex">
<div class="d-flex align-items-center mb-2">
<label class="d-flex justify-content-center align-items-center">نوع مرخصی:</label>
<div class="inputGroup-morakhasi-type d-flex flex-sm-column">
<div class="d-flex align-items-center my-1">
<div class="d-flex align-items-center">
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="paid" value="استحقاقی" checked>
<label class="form-check-label" for="paid">
استحقاقی
</label>
</div>
</div>
<div class="my-1">
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="sick" value="استعلاجی">
<label class="form-check-label" for="sick">
استعلاجی
</label>
</div>
</div>
</div>
<div class="ms-sm-4" id="dailyType">
<div class="d-flex align-items-center">
<label class="d-block d-sm-flex justify-content-center align-items-center" for="inputGroup-morakhasi-time">مدت مرخصی:</label>
<div class="inputGroup-morakhasi-time d-flex align-items-center">
<input class="form-check-input LeaveTime" type="radio" asp-for="PaidLeaveType" id="daily" value="روزانه" checked>
<label class="form-check-label" for="daily">
روزانه
</label>
<input class="form-check-input LeaveTime" type="radio" asp-for="PaidLeaveType" id="hourly" value="ساعتی">
<label class="form-check-label" for="hourly">
ساعتی
</label>
</div>
</div>
</div>
</div>
<div class="col-12 col-md-4 mt-2 mt-md-0" id="rotatingShiftSection" style="display: none">
<div>
<input type="hidden" asp-for="HasRollCall" id="HasRollCall">
<input type="hidden" name="SelectedShift.StartTime" id="SelectedShift_StartTime" />
<input type="hidden" name="SelectedShift.EndTime" id="SelectedShift_EndTime" />
<label class="w-100">
<span>شیفت</span>
<select class="form-select select2OptionShift" aria-label="انتخاب شیفت ..." id="rotatingShift">
<option value="">شیفت را انتخاب کنید ...</option>
</select>
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-12 my-1">
<div class="input-group">
<label class="input-group-text" for="StartLeave">تاریخ شروع</label>
<input type="text" asp-for="StartLeave" class="form-control d-flex justify-content-center align-items-center text-center date" id="StartLeave">
</div>
</div>
<div class="col-lg-6 col-12 my-1" id="end_date_estehghaghi">
<div class="input-group">
<label class="input-group-text" for="EndLeave">تاریخ پایان</label>
<input type="text" asp-for="EndLeave" class="form-control d-flex justify-content-center align-items-center text-center date" id="EndLeave">
</div>
</div>
<div class="col-lg-3 col-6 my-1 time_paid" style="display:none;">
<div class="input-group">
<label class="input-group-text" for="StartHoures">ساعت شروع</label>
<input type="text" asp-for="StartHoures" class="form-control d-flex justify-content-center align-items-center text-center dateTime" style="direction: ltr" id="StartHoures">
</div>
</div>
<div class="col-lg-3 col-6 my-1 time_paid" style="display:none;">
<div class="input-group">
<label class="input-group-text" for="EndHours">ساعت پایان</label>
<input type="text" asp-for="EndHours" class="form-control d-flex justify-content-center align-items-center text-center dateTime" style="direction: ltr" id="EndHours">
</div>
</div>
<p class="mt-2">
<span>مدت مرخصی: </span>
<span class="sumHours sumHourseDiv"></span>
<span class="sumDaysDiv sumDays"></span>
</p>
</div>
<div class="row">
<div class="col-12">
<div class="form-check form-switch d-flex align-items-center">
<label class="form-check-label me-2" for="IsAccepted">عدم موافقت</label>
<input type="checkbox" asp-for="IsAccepted" id="IsAccepted" class="form-check-input" checked>
<label class="form-check-label" for="IsAccepted">موافقت</label>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="position-relative blur" id="blur-div">
<div class="position-absolute title-legend">دلیل عدم موافقت:</div>
<textarea asp-for="Decription" disabled="disabled" id="descriptionAcceptedCheck" class="w-100 mt-3 p-2" cols="10" rows="3"></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<div class="container-fluid">
<div class="row">
<div class="col-12 text-center">
<div class="d-flex justify-content-center">
<a class="btn-cancel text-white w-25 mx-2" data-bs-dismiss="modal" aria-label="Close">انصراف</a>
<a href="#" id="save" class="btn-primary text-white w-25 mx-2">ثبت</a>
<button style="display: none;" type="submit" id="saveFinaly"></button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
<style>
.validTime {
color: #4d7c0f !important;
}
.invalidTime {
color: #b91c1c !important;
}
</style>
<script>
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
var computeLeaveHourlyAjax = `@Url.Page("/Company/Employees/Leave", "ComputeLeaveHourly")`;
var computeLeaveDailyAjax = `@Url.Page("/Company/Employees/Leave", "ComputeLeaveDaily")`;
var employeeListAjax = `@Url.Page("Index", "EmployeeList")`;
var hasRotatingShiftAjax = `@Url.Page("/Company/Employees/Leave", "HasRotatingShift")`;
</script>
<script src="~/assetsclient/pages/employees/js/createleave.js?ver=@clientVersion"></script>