multiple select aoutoExtention - minuse OverTimeWorking And FridayWorking from checkout if has leaving

This commit is contained in:
SamSys
2024-08-10 21:49:16 +03:30
parent 71ff1da980
commit e09da14e15
7 changed files with 1846 additions and 851 deletions

View File

@@ -61,9 +61,26 @@ public class LeaveRepository : RepositoryBase<long, Leave>, ILeaveRepository
Year = x.Year,
Month = x.Month
});
if (searchModel.WorkshopId != 0 && searchModel.EmployeeId != 0)
query = query.Where(x => x.WorkshopId == searchModel.WorkshopId && x.EmployeeId == searchModel.EmployeeId && x.LeaveType == searchModel.LeaveType);
return query.OrderByDescending(x => x.Id).ToList();
if (searchModel.WorkshopId != 0 && searchModel.EmployeeId != 0)
query = query.Where(x => x.WorkshopId == searchModel.WorkshopId && x.EmployeeId == searchModel.EmployeeId);
if (!string.IsNullOrWhiteSpace(searchModel.LeaveType))
query = query.Where(x => x.LeaveType == searchModel.LeaveType);
if (!string.IsNullOrWhiteSpace(searchModel.PaidLeaveType))
query = query.Where(x => x.PaidLeaveType == searchModel.PaidLeaveType);
if (!string.IsNullOrWhiteSpace(searchModel.StartLeave) && !string.IsNullOrWhiteSpace(searchModel.EndLeave))
{
DateTime startSearch = searchModel.StartLeave.ToGeorgianDateTime();
DateTime endSearch = searchModel.EndLeave.ToGeorgianDateTime();
query = query.Where(x => (startSearch <= x.StartLeaveGr && endSearch >= x.StartLeaveGr) ||
(startSearch <= x.EndLeaveGr && endSearch >= x.EndLeaveGr) ||
(startSearch >= x.StartLeaveGr && startSearch <= x.EndLeaveGr) ||
(endSearch >= x.StartLeaveGr && endSearch <= x.EndLeaveGr));
}
return query.OrderByDescending(x => x.Id).ToList();
}
public List<LeaveMainViewModel> searchClient(LeaveSearchModel searchModel)

View File

@@ -1,4 +1,5 @@
@model CompanyManagment.App.Contracts.Checkout.CreateCheckout
@Html.AntiForgeryToken()
@{
<style>
.sendSelectDate {
@@ -695,10 +696,10 @@
$('#createForm').submit(function(e) {
$('#createProcess').show();
e.preventDefault();
e.stopImmediatePropagation();
$.ajax({
async: false,
type: "POST",
url: $(this).attr('action'),
data: $(this).serialize(),

File diff suppressed because it is too large Load Diff

View File

@@ -626,9 +626,6 @@
.countPersonel{
position: relative !important;
top: 55px !important;
display: inline-block !important;
@@ -647,7 +644,7 @@
}
.eye{ z-index: 100;
.eye{ z-index: 1;
position: relative !important;
top: 63px !important;
display: inline-block !important;
@@ -667,6 +664,7 @@
.eye{
float: right !important;
top: 20px !important; margin-right: 5px !important;
z-index : 1;
}
}
@@media screen and (max-width: 500px) {
@@ -676,10 +674,7 @@
}
.eye{
float: right !important;
top: 20px !important; margin-right: 5px !important;
}
}

View File

@@ -355,7 +355,8 @@
<option value="اعلام مسدودی طرف حساب"> اعلام مسدودی طرف حساب </option>
<option value="هشدار اول"> هشدار اول </option>
<option value="هشدار دوم"> هشدار دوم </option>
<option value="اقدام قضایی"> اقدام قضایی </option>
<option value="اقدام قضایی"> اقدام قضایی </option>
<option value="یادآور وظایف"> یادآور وظایف </option>
</select>
</div>
</div>

View File

@@ -15,6 +15,7 @@ using CompanyManagment.App.Contracts.Workshop;
using CompanyManagment.App.Contracts.YearlySalary;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.SignalR;
using PersianTools.Core;
using ServiceHost.Hubs;
@@ -38,6 +39,7 @@ public class AutoExtensionModel : PageModel
private readonly IYearlySalaryApplication _yearlySalaryApplication;
private readonly IYearlySalaryRepository _yearlySalaryRepository;
public List<ContractViweModel> EmployeeList;
public SelectList EmployeeSelectList { get; set; }
private string InterferenceMessage = string.Empty;
public List<string> YearlyList;
@@ -156,6 +158,7 @@ public class AutoExtensionModel : PageModel
ArchiveCode = selctedWorkshop.ArchiveCode,
WorkshopAddress1 = selctedWorkshop.Address
}).OrderBy(x => x.PersonnelCode).ToList();
EmployeeSelectList = new SelectList(personelList, "EmployeeId", "EmployeeFullName");
}
else
{