97 lines
5.0 KiB
Plaintext
97 lines
5.0 KiB
Plaintext
@model List<CompanyManagment.App.Contracts.Leave.LeaveViewModel>
|
|
@{
|
|
int i = 1;
|
|
}
|
|
<div class="m-t-10">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> سوابق مرخصی استعلاجی </h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
<div class="row">
|
|
<div class="col-sm-12 col-sm-12 col-xs-12 table-container ">
|
|
<table id="datatable" class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th style="font-size: 12px !important;text-align: center">#</th>
|
|
<th style="font-size: 12px !important; text-align: center"> تاریخ شروع</th>
|
|
<th style="font-size: 12px !important; text-align: center"> تاریخ پایان </th>
|
|
<th style="font-size: 12px !important; width: 25%; text-align: center">عملیات</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in Model)
|
|
{
|
|
<tr>
|
|
<td style="font-size: 12px !important; text-align: center">@i </td>
|
|
<td style="font-size: 12px !important; text-align: center">@item.StartLeave </td>
|
|
<td style="font-size: 12px !important; text-align: center">
|
|
@item.EndLeave
|
|
</td>
|
|
@{
|
|
i++;
|
|
}
|
|
<td class="operationBtns">
|
|
<a class="btn btn-warning pull-right m-rl-5 rad"
|
|
href="#showmodal=@Url.Page("/Company/Employees/Index", "EditSickLeave", new { Id = item.Id })">
|
|
<i class="fa faSize fa-edit"></i>
|
|
</a>
|
|
<a href="#" class="btn btn-danger pull-right m-rl-5 fff rad RemoveLeftWork"><i class="fa faSize fa-trash"></i></a>
|
|
<div style="display: none">
|
|
<input type="hidden" name="LeftworkId" value="@item.Id" />
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
$('.RemoveLeftWork').on("click",
|
|
function () {
|
|
var id = $(this).closest("div").find("input[name='LeftworkId']").val();
|
|
$('#LeftId').val(id);
|
|
swal({
|
|
title: "آیا حذف این سابقه مرخصی اطمینان دارید؟",
|
|
text: "",
|
|
type: "warning",
|
|
showCancelButton: true,
|
|
confirmButtonColor: "#DD6B55",
|
|
confirmButtonText: "بله",
|
|
cancelButtonText: "خیر",
|
|
closeOnConfirm: true,
|
|
closeOnCancel: true
|
|
}, function (isConfirm) {
|
|
if (isConfirm) {
|
|
|
|
$('#RemoveForm').submit();
|
|
}
|
|
});
|
|
});
|
|
$('#RemoveForm').submit(function(e){
|
|
e.preventDefault();
|
|
e.stopImmediatePropagation();
|
|
$.ajax({
|
|
type: "POST",
|
|
url: $(this).attr( 'action' ),
|
|
data: $(this).serialize(),
|
|
success: function (response) {
|
|
if (response.isSuccedded == true) {
|
|
$.Notification.autoHideNotify('success', 'top right', response.message);
|
|
reloadSickLeaveList();
|
|
}
|
|
else{
|
|
$.Notification.autoHideNotify('error', 'top right', response.message);
|
|
}
|
|
}
|
|
});
|
|
return false;
|
|
});
|
|
|
|
</script> |