workflow - rollcallEdit - grouping...
This commit is contained in:
@@ -112,12 +112,14 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
||||
public void SimpleEdit(
|
||||
ICollection<CustomizeWorkshopEmployeeSettingsShift> employeeSettingsShift,
|
||||
IrregularShift irregularShift,
|
||||
WorkshopShiftStatus workshopShiftStatus, BreakTime breakTime, bool isShiftChange)
|
||||
WorkshopShiftStatus workshopShiftStatus, BreakTime breakTime, bool isShiftChange,HolidayWork holidayWork,FridayWork fridayWork)
|
||||
{
|
||||
CustomizeWorkshopEmployeeSettingsShifts = EmployeeSettingsShiftsConvertor(employeeSettingsShift);
|
||||
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
||||
IsShiftChanged = isShiftChange;
|
||||
WorkshopShiftStatus = workshopShiftStatus;
|
||||
HolidayWork = holidayWork;
|
||||
FridayWork = fridayWork;
|
||||
|
||||
IrregularShift = workshopShiftStatus == WorkshopShiftStatus.Regular ?
|
||||
new IrregularShift(new TimeOnly(), new TimeOnly(), WorkshopIrregularShifts.None)
|
||||
|
||||
@@ -190,7 +190,7 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
||||
|
||||
public void EditSimpleAndOverwriteOnEmployee(string groupName, IEnumerable<long> employeeIds,
|
||||
ICollection<CustomizeWorkshopGroupSettingsShift> customizeWorkshopGroupSettingsShifts, WorkshopShiftStatus workshopShiftStatus,
|
||||
IrregularShift irregularShift, BreakTime breakTime, bool isShiftChange)
|
||||
IrregularShift irregularShift, BreakTime breakTime, bool isShiftChange,HolidayWork holidayWork , FridayWork fridayWork)
|
||||
{
|
||||
GroupName = groupName;
|
||||
CustomizeWorkshopGroupSettingsShifts = customizeWorkshopGroupSettingsShifts;
|
||||
@@ -200,7 +200,8 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
||||
: new IrregularShift(irregularShift.StartTime, irregularShift.EndTime, irregularShift.WorkshopIrregularShifts);
|
||||
BreakTime = new BreakTime(breakTime.HasBreakTimeValue, breakTime.BreakTimeValue);
|
||||
IsShiftChange = isShiftChange;
|
||||
|
||||
FridayWork = fridayWork;
|
||||
HolidayWork = holidayWork;
|
||||
//var employeeSettingsShift = customizeWorkshopGroupSettingsShifts
|
||||
// .Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList();
|
||||
if (isShiftChange)
|
||||
@@ -213,7 +214,7 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
||||
{
|
||||
item.SimpleEdit(customizeWorkshopGroupSettingsShifts
|
||||
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList(),
|
||||
IrregularShift, WorkshopShiftStatus, BreakTime, false);
|
||||
IrregularShift, WorkshopShiftStatus, BreakTime, false,holidayWork, fridayWork);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -237,7 +238,7 @@ public class CustomizeWorkshopGroupSettings : BaseCustomizeEntity
|
||||
{
|
||||
item.SimpleEdit(customizeWorkshopGroupSettingsShifts
|
||||
.Select(x => new CustomizeWorkshopEmployeeSettingsShift(x.StartTime, x.EndTime, x.Placement)).ToList(),
|
||||
irregularShift, workshopShiftStatus, breakTime, false);
|
||||
irregularShift, workshopShiftStatus, breakTime, false,HolidayWork,FridayWork);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,10 +46,7 @@ namespace CompanyManagment.App.Contracts.RollCall
|
||||
TimeSpan GetEmployeeRollCallTimeSpanForDuration(long employeeId, long workshopId, string startFa, string endFa);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت بازه قابل تغییر برای ویرایش دستی حضور غیاب
|
||||
/// </summary>
|
||||
List<RollCallEditableDatesForManualEditViewModel> GetEditableDatesForManualEdit(DateTime date);
|
||||
|
||||
/// <summary>
|
||||
/// برای صدور فیش حقوقی
|
||||
/// </summary>
|
||||
|
||||
@@ -523,7 +523,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
var breakTime = new BreakTime(command.BreakTime.HasBreakTimeValue, command.BreakTime.BreakTimeValue);
|
||||
|
||||
entity.EditSimpleAndOverwriteOnEmployee(command.Name, employeeIds, groupSettingsShifts, command.WorkshopShiftStatus,
|
||||
command.IrregularShift, breakTime, isChanged);
|
||||
command.IrregularShift, breakTime, isChanged,command.HolidayWork,command.FridayWork);
|
||||
|
||||
_customizeWorkshopGroupSettingsRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
@@ -539,11 +539,17 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
if (entity == null)
|
||||
return op.Failed("چنین پرسنلی وجود ندارد");
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
List<CustomizeWorkshopEmployeeSettingsShift> employeesShifts = new();
|
||||
var groupSettings =
|
||||
_customizeWorkshopGroupSettingsRepository.GetIncludeWorkshopSettings(
|
||||
entity.CustomizeWorkshopGroupSettingId);
|
||||
|
||||
if (command.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
|
||||
List<CustomizeWorkshopEmployeeSettingsShift> employeesShifts = new();
|
||||
bool isChanged = false;
|
||||
|
||||
|
||||
if (command.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
|
||||
{
|
||||
|
||||
#region Validation
|
||||
@@ -621,8 +627,20 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
{
|
||||
return op.Failed("بازه زمانی کارگاه نمیتواند بیشتر از 24 ساعت باشد");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (employeesShifts.All(x => groupSettings.CustomizeWorkshopGroupSettingsShifts.Any(y => x.Equals(y)))
|
||||
&& command.WorkshopShiftStatus == groupSettings.WorkshopShiftStatus && command.FridayWork == groupSettings.FridayWork &&
|
||||
command.HolidayWork == groupSettings.HolidayWork && command.BreakTime == groupSettings.BreakTime)
|
||||
{
|
||||
isChanged = false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
isChanged = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var irregularShiftStartTime = new DateTime(DateOnly.MinValue, command.IrregularShift.StartTime);
|
||||
@@ -650,10 +668,21 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (command.WorkshopShiftStatus == groupSettings.WorkshopShiftStatus && command.BreakTime == groupSettings.BreakTime &&
|
||||
command.IrregularShift == groupSettings.IrregularShift && command.FridayWork == groupSettings.FridayWork &&
|
||||
command.HolidayWork == groupSettings.HolidayWork)
|
||||
{
|
||||
isChanged = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
isChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
entity.SimpleEdit(employeesShifts, command.IrregularShift, command.WorkshopShiftStatus, command.BreakTime, true);
|
||||
entity.SimpleEdit(employeesShifts, command.IrregularShift, command.WorkshopShiftStatus, command.BreakTime, isChanged,command.HolidayWork,command.FridayWork);
|
||||
|
||||
_customizeWorkshopGroupSettingsRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
|
||||
@@ -94,27 +94,7 @@ public class RollCallApplication : IRollCallApplication
|
||||
|
||||
return _rollCallRepository.GetEmployeeRollCallTimeSpanForDuration(employeeId, workshopId, startDateTime, endDateTime);
|
||||
}
|
||||
public List<RollCallEditableDatesForManualEditViewModel> GetEditableDatesForManualEdit(DateTime date)
|
||||
{
|
||||
var date1 = new RollCallEditableDatesForManualEditViewModel()
|
||||
{
|
||||
StartFa = date.AddDays(-1).Date.ToFarsi(),
|
||||
EndFa = date.Date.ToFarsi(),
|
||||
|
||||
};
|
||||
var date2 = new RollCallEditableDatesForManualEditViewModel()
|
||||
{
|
||||
StartFa = date.Date.ToFarsi(),
|
||||
EndFa = date.Date.ToFarsi()
|
||||
};
|
||||
var date3 = new RollCallEditableDatesForManualEditViewModel()
|
||||
{
|
||||
StartFa = date.Date.ToFarsi(),
|
||||
EndFa = date.AddDays(1).Date.ToFarsi()
|
||||
};
|
||||
|
||||
return [date1, date2, date3];
|
||||
}
|
||||
|
||||
|
||||
public List<OverlappedRollCallWithLeave> GetOverlappedRollCallsWithLeaveInDates(long workshopId, DateTime start, DateTime end)
|
||||
@@ -334,11 +314,11 @@ public class RollCallApplication : IRollCallApplication
|
||||
|
||||
if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate >= y.StartDateGr && x.EndDate <= y.EndDateGr)))
|
||||
return operation.Failed("کارمند در بازه وارد شده غیر فعال است");
|
||||
var editableDates = GetEditableDatesForManualEdit(date);
|
||||
|
||||
if (newRollCallDates.Any(x => !editableDates.Any(y =>
|
||||
x.StartDate.Value.Date == y.StartFa.ToGeorgianDateTime().Date &&
|
||||
x.EndDate.Value.Date == y.EndFa.ToGeorgianDateTime().Date)))
|
||||
|
||||
if (newRollCallDates.Any(x =>
|
||||
x.StartDate.Value.Date < date.Date.AddDays(-1) ||
|
||||
x.EndDate.Value.Date > date.Date.AddDays(1)))
|
||||
{
|
||||
return operation.Failed("حضور غیاب در حال ویرایش را نمیتوانید بیشتر از یک روز از ثبت حضور غیاب عقب تر یا جلو تر ببرید");
|
||||
}
|
||||
|
||||
@@ -246,7 +246,9 @@ namespace CompanyManagment.EFCore.Repository
|
||||
}).ToList(),
|
||||
Id = entity.id,
|
||||
WorkshopId = entity.WorkshopId,
|
||||
WorkshopShiftStatus = entity.WorkshopShiftStatus
|
||||
WorkshopShiftStatus = entity.WorkshopShiftStatus,
|
||||
FridayWork = entity.FridayWork,
|
||||
HolidayWork = entity.HolidayWork
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using CompanyManagment.EFCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Query.AdminReports.Models;
|
||||
using System.Data;
|
||||
using _0_Framework.Application;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
|
||||
|
||||
namespace Query.AdminReports.Handlers
|
||||
@@ -28,8 +29,7 @@ namespace Query.AdminReports.Handlers
|
||||
|
||||
|
||||
//workshop filter by parameters
|
||||
var rollCallServiceQuery = _companyContext.RollCallServices
|
||||
.Where(x => x.StartService <= DateTime.Now && x.EndService >= DateTime.Now);
|
||||
var rollCallServiceQuery = _companyContext.RollCallServices.AsSplitQuery();
|
||||
var allWorkshops = _companyContext.Workshops.Select(x => new { x.id, x.WorkshopFullName });
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(parameters.WorkshopName))
|
||||
@@ -42,8 +42,12 @@ namespace Query.AdminReports.Handlers
|
||||
{
|
||||
WorkshopId = workshop.id,
|
||||
RollCallServiceType = rcs.ServiceType,
|
||||
WorkshopName = workshop.WorkshopFullName
|
||||
});
|
||||
WorkshopName = workshop.WorkshopFullName,
|
||||
MaxPersonValid = rcs.MaxPersonValid,
|
||||
IsActive = rcs.StartService <= DateTime.Now && rcs.EndService >= DateTime.Now,
|
||||
ServiceStartFa=rcs.StartService.ToFarsi(),
|
||||
ServiceEndFa=rcs.EndService.ToFarsi()
|
||||
});
|
||||
|
||||
|
||||
//workshop population
|
||||
@@ -77,14 +81,18 @@ namespace Query.AdminReports.Handlers
|
||||
var workshopsWithServiceList = workshopsWithService.ToList();
|
||||
return workshopsWithServiceList.Select(x => new WorkshopWithRollCallServiceQueryModel()
|
||||
{
|
||||
IsActive = x.IsActive,
|
||||
ServiceStartFa = x.ServiceStartFa,
|
||||
ServiceEndFa = x.ServiceEndFa,
|
||||
WorkshopId = x.WorkshopId,
|
||||
RollCallServiceType = x.RollCallServiceType,
|
||||
MaxPersonValid = x.MaxPersonValid,
|
||||
WorkshopName = x.WorkshopName,
|
||||
ActiveEmployeesCount = activeEmployeesList.Count(y => y.WorkshopId == x.WorkshopId),
|
||||
ActiveEmployeesWithRollCallInLastWeekCount = activeEmployeesList.Count(y => y.WorkshopId == x.WorkshopId &&
|
||||
lastWeekRollCalls.Contains(y.EmployeeId) && !leavesList.Contains(y.EmployeeId)),
|
||||
TotalEmployeesCount = workshopsWorkingEmployeesList.FirstOrDefault(y => y.WorkshopId == x.WorkshopId).TotalWorkingEmployeesCount
|
||||
}).ToList();
|
||||
}).OrderByDescending(x=>x.IsActive).ToList();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,5 +20,10 @@
|
||||
return ((float)ActiveEmployeesWithRollCallInLastWeekCount / ActiveEmployeesCount) * 100;
|
||||
}
|
||||
}
|
||||
|
||||
public int MaxPersonValid { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public string ServiceStartFa { get; set; }
|
||||
public string ServiceEndFa { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -205,7 +205,7 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.RollCall
|
||||
|
||||
public IActionResult OnGetEditEmployee(long groupId, List<long> employeeId, long workshopId)
|
||||
{
|
||||
var employee = _customizeWorkshopSettingsApplication.GetEmployeeSettingsByEmployeeIdGroupSettingsId(workshopId, employeeId.First());
|
||||
var employee = _customizeWorkshopSettingsApplication.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(workshopId, employeeId.First());
|
||||
var command = new EditCustomizeEmployeeSettings()
|
||||
{
|
||||
Id = employee.Id,
|
||||
|
||||
@@ -13,9 +13,7 @@ var index = 1;
|
||||
<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/rollcall/css/index.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" />
|
||||
@@ -24,7 +22,6 @@ var index = 1;
|
||||
<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) {
|
||||
@@ -36,16 +33,16 @@ var index = 1;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<link href="c:\users\gozareshgir04\source\repos\gozareshgirteamwork\servicehost\wwwroot\" rel="stylesheet" />
|
||||
|
||||
|
||||
<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;" />
|
||||
<img src="~/AssetsClient/images/icons/workshop.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 class="title d-flex align-items-center">لیست کارگاه های حضور و غیاب</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -70,7 +67,7 @@ var index = 1;
|
||||
<div class="container-fluid">
|
||||
<div class="row p-lg-2 p-auto">
|
||||
|
||||
<div class="wrapper list-box table-ticket bg-white ">
|
||||
<div class="wrapper list-box table-rollcall bg-white ">
|
||||
|
||||
<div class="Rtable Rtable--collapse">
|
||||
|
||||
@@ -83,16 +80,17 @@ var index = 1;
|
||||
</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 class="Rtable-cell column-heading width4 text-center">تعداد پرسنل</div>
|
||||
<div class="Rtable-cell column-heading width5 text-center">تعداد پرسنل فعال</div>
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width6 text-center">تعداد پرسنل در حال حضور و غیاب</div>
|
||||
<div class="Rtable-cell column-heading d-md-block d-none width7 text-center">وضعیت</div>
|
||||
<div class="Rtable-cell column-heading d-flex width8 text-end">عملیات</div>
|
||||
</div>
|
||||
|
||||
|
||||
@foreach (var item in Model.Items)
|
||||
{
|
||||
<div class="ticket-list Rtable-row align-items-center position-relative openAction">
|
||||
<div class="rollcall-list Rtable-row align-items-center position-relative openAction @(@item.IsActive ? "" : "black-background")">
|
||||
<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">
|
||||
@@ -105,18 +103,29 @@ var index = 1;
|
||||
<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 class="Rtable-cell--content text-start">@item.RollCallServiceType</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width4">
|
||||
<div class="Rtable-cell--content text-start">@item.TotalEmployeesCount</div>
|
||||
<div class="Rtable-cell--content text-center">@item.TotalEmployeesCount</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width5">
|
||||
<div class="Rtable-cell--content text-start">@item.ActiveEmployeesCount</div>
|
||||
<div class="Rtable-cell--content text-center">@item.ActiveEmployeesCount</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width6">
|
||||
<div class="Rtable-cell--content">@item.ActiveEmployeesWithRollCallInLastWeekCount</div>
|
||||
<div class="Rtable-cell--content text-center">@item.ActiveEmployeesWithRollCallInLastWeekCount</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width7">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
@if (item.IsActive)
|
||||
{
|
||||
<div class="status status-green">فعال</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="status status-red">غیر فعال</div>
|
||||
}
|
||||
</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">
|
||||
@@ -130,16 +139,7 @@ var index = 1;
|
||||
</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>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/pages/CustomizeCheckout/css/group.css" rel="stylesheet" />
|
||||
<link href="~/assetsclient/pages/CustomizeCheckout/css/group.css?ver=@clientVersion" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
button.btn-setting {
|
||||
@@ -53,6 +53,23 @@
|
||||
color: #ffffff;
|
||||
background-color: rgba(132, 204, 22, 0.40);
|
||||
}
|
||||
|
||||
.greenBtn {
|
||||
background: linear-gradient(90deg, #63d141 0%, #8adb30 100%);
|
||||
color: #fff !important;
|
||||
padding: 5px;
|
||||
border-radius: 8px;
|
||||
border: none;
|
||||
transition: all ease-in .3s;
|
||||
width: 215px;
|
||||
transition:all ease-in .3s
|
||||
}
|
||||
|
||||
@@media (max-width: 768px) {
|
||||
.greenBtn {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
@@ -81,11 +98,24 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row px-lg-1">
|
||||
|
||||
<div class="col-12 col-md-5 p-0 pe-1">
|
||||
<div class="col-12">
|
||||
<a href="#showmodal=@Url.Page("../CustomizeCheckout/Index", "ModalSettingRollCall")" class="click loadingButton position-relative greenBtn d-block">
|
||||
<div class="d-flex align-items-center justify-content-center p-1">
|
||||
<div class="text-center">
|
||||
<div class="card-title">تنظیمات محاسبه فیش حقوقی</div>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-6 col-lg-5 p-0">
|
||||
<div class="wrapper list-box w-100 table-rollcall-group1">
|
||||
<div class="Rtable Rtable--5cols Rtable--collapse">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex mb-2 px-2 d-none d-md-flex">
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-none d-md-flex mb-2 px-2">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام گروه</div>
|
||||
<div class="Rtable-cell column-heading text-center width3">ساعت کاری</div>
|
||||
@@ -97,7 +127,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-7 p-0 ps-1 d-none d-md-flex">
|
||||
<div class="col-12 col-md-6 col-lg-7 p-0 d-none d-md-flex">
|
||||
<div class="wrapper list-box w-100 table-rollcall-group2">
|
||||
<div class="Rtable Rtable--5cols Rtable--collapse">
|
||||
|
||||
@@ -106,7 +136,8 @@
|
||||
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
|
||||
<div class="Rtable-cell column-heading text-center width3">ساعت کاری</div>
|
||||
<div class="Rtable-cell column-heading width4">حقوق</div>
|
||||
<div class="Rtable-cell column-heading text-end width5">عملیات</div>
|
||||
<div class="Rtable-cell column-heading text-center width5">مرخصی مجاز</div>
|
||||
<div class="Rtable-cell column-heading text-end width6">عملیات</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100 overflow-auto" id="loadAccountItems"></div>
|
||||
@@ -129,6 +160,14 @@
|
||||
<script src="~/assetsclient/js/site.js?ver=@clientVersion"></script>
|
||||
<script src="~/assetsadminnew/libs/sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('.loadingButton').on('click', function () {
|
||||
var button = $(this);
|
||||
var loadingDiv = button.find('.loading');
|
||||
loadingDiv.show();
|
||||
});
|
||||
});
|
||||
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var loadWorkshopSettingsDataAjax = `@Url.Page("./Grouping", "WorkshopSettingsDataAjax")`;
|
||||
var loadEmployeesGroupAjax = `@Url.Page("./Grouping", "EmployeesGroupAjax")`;
|
||||
|
||||
@@ -61,13 +61,19 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
|
||||
public override void OnPageHandlerExecuting(PageHandlerExecutingContext context)
|
||||
{
|
||||
if (context.HttpContext.Request.Query["handler"].ToString().ToLower().Trim() == "edit")
|
||||
{
|
||||
|
||||
}
|
||||
else if (IrregularWorkshopHaveGroupedAllPersonnelValidation(_workshopId) == false)
|
||||
context.HttpContext.Response.Redirect("./grouping");
|
||||
//if (context.HttpContext.Request.Query["handler"].ToString().ToLower().Trim() == "edit" ||
|
||||
// context.HttpContext.Request.Query["handler"].ToString().ToLower().Trim() == "totalworking" ||
|
||||
// context.HttpContext.Request.Query["handler"].ToString().ToLower().Trim() == "manualcreateoredit" ||
|
||||
// context.HttpContext.Request.Query["handler"].ToString().ToLower().Trim() == "dayofweek")
|
||||
//{
|
||||
|
||||
//}
|
||||
//else if (IrregularWorkshopHaveGroupedAllPersonnelValidation(_workshopId) == false)
|
||||
// context.HttpContext.Response.Redirect("./grouping");
|
||||
var stringValues = context.HttpContext.Request.Query["handler"];
|
||||
if (string.IsNullOrWhiteSpace(stringValues))
|
||||
if (IrregularWorkshopHaveGroupedAllPersonnelValidation(_workshopId) == false)
|
||||
context.HttpContext.Response.Redirect("./grouping");
|
||||
base.OnPageHandlerExecuting(context);
|
||||
}
|
||||
|
||||
@@ -107,31 +113,31 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetCaseHistoryRollCallAjax(int dateIndex, string exactDateFa, string startDate, string endDate, long employeeId, string dateEmployeeIndex)
|
||||
{
|
||||
if (employeeId > 0)
|
||||
{
|
||||
RollCallEmployeeViewModels = _rollCallApplication.GetEmployeeRollCallsHistory(employeeId, _workshopId, startDate, endDate, exactDateFa, dateEmployeeIndex);
|
||||
if (RollCallEmployeeViewModels == null || RollCallEmployeeViewModels.DateGr == new DateTime())
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = false,
|
||||
message = "داده ای یافت نشد!",
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var searchModel = new RollCallSearchModel()
|
||||
{
|
||||
WorkshopId = _workshopId,
|
||||
DateIndex = dateIndex,
|
||||
ExactDateFa = exactDateFa,
|
||||
StarDateFa = startDate,
|
||||
EndDateFa = endDate,
|
||||
EmployeeId = employeeId
|
||||
};
|
||||
RollCallViewModels = _rollCallApplication.GetWorkshopRollCallHistory(searchModel);
|
||||
}
|
||||
public IActionResult OnGetCaseHistoryRollCallAjax(int dateIndex, string exactDateFa, string startDate, string endDate, long employeeId, string dateEmployeeIndex)
|
||||
{
|
||||
if (employeeId > 0)
|
||||
{
|
||||
RollCallEmployeeViewModels = _rollCallApplication.GetEmployeeRollCallsHistory(employeeId, _workshopId, startDate, endDate, exactDateFa, dateEmployeeIndex);
|
||||
if (RollCallEmployeeViewModels == null || RollCallEmployeeViewModels.DateGr == new DateTime())
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = false,
|
||||
message = "داده ای یافت نشد!",
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var searchModel = new RollCallSearchModel()
|
||||
{
|
||||
WorkshopId = _workshopId,
|
||||
DateIndex = dateIndex,
|
||||
ExactDateFa = exactDateFa,
|
||||
StarDateFa = startDate,
|
||||
EndDateFa = endDate,
|
||||
EmployeeId = employeeId
|
||||
};
|
||||
RollCallViewModels = _rollCallApplication.GetWorkshopRollCallHistory(searchModel);
|
||||
}
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
@@ -176,7 +182,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
public IActionResult OnGetCheckEmployeeData(long employeeId, string date)
|
||||
{
|
||||
bool isSuccess = false;
|
||||
var dates = _rollCallApplication.GetEditableDatesForManualEdit(date.ToGeorgianDateTime());
|
||||
//var dates = _rollCallApplication.GetEditableDatesForManualEdit(date.ToGeorgianDateTime());
|
||||
|
||||
List<RollCallViewModel> resultData = new List<RollCallViewModel>();
|
||||
|
||||
@@ -197,7 +203,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
success = isSuccess,
|
||||
data = resultData,
|
||||
hasLeave = isLeave,
|
||||
EditableDates = dates,
|
||||
//EditableDates = dates,
|
||||
hasNullEndDate = isNullEndDate
|
||||
});
|
||||
}
|
||||
@@ -205,14 +211,14 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
public IActionResult OnGetEdit(long employeeId, string date)
|
||||
{
|
||||
var result = _rollCallApplication.GetWorkshopEmployeeRollCallsForDate(_workshopId, employeeId, date);
|
||||
var dates = _rollCallApplication.GetEditableDatesForManualEdit(date.ToGeorgianDateTime());
|
||||
//var dates = _rollCallApplication.GetEditableDatesForManualEdit(date.ToGeorgianDateTime());
|
||||
var name = _rollCallEmployeeApplication.GetByEmployeeIdAndWorkshopId(employeeId, _workshopId);
|
||||
var command = new EmployeeRollCallsViewModel()
|
||||
{
|
||||
EmployeeFullName = name.EmployeeFullName,
|
||||
EmployeeId = employeeId,
|
||||
DateFa = date,
|
||||
EditableDates = dates,
|
||||
//EditableDates = dates,
|
||||
RollCalls = result
|
||||
};
|
||||
|
||||
@@ -230,7 +236,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
|
||||
start = start + startTimeOnly.ToTimeSpan();
|
||||
end = end + endTimeOnly.ToTimeSpan();
|
||||
if(start >= end)
|
||||
if (start >= end)
|
||||
return new JsonResult(new
|
||||
{
|
||||
message = "",
|
||||
@@ -279,9 +285,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetDayOfWeek(string dateFa)
|
||||
public IActionResult OnGetDayOfWeek(string dateFa)
|
||||
{
|
||||
if (dateFa.TryToGeorgianDateTime(out DateTime date) == false)
|
||||
if (dateFa.TryToGeorgianDateTime(out DateTime date) == false)
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
@@ -291,7 +297,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
{
|
||||
success = true,
|
||||
message = date.DayOfWeek.DayOfWeeKToPersian(),
|
||||
});
|
||||
});
|
||||
}
|
||||
public IActionResult OnPostManualCreateOrEdit(CreateOrEditEmployeeRollCall command)
|
||||
{
|
||||
@@ -313,9 +319,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -68,11 +68,11 @@
|
||||
|
||||
<div class="row px-lg-1">
|
||||
|
||||
<div class="col-12 col-md-5 p-0 pe-1">
|
||||
<div class="col-12 col-md-6 col-lg-5 p-0">
|
||||
<div class="wrapper list-box w-100 table-rollcall-group1">
|
||||
<div class="Rtable Rtable--5cols Rtable--collapse">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex mb-2 px-2 d-none d-md-flex">
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-none d-md-flex mb-2 px-2">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام گروه</div>
|
||||
<div class="Rtable-cell column-heading text-center width3">ساعت کاری</div>
|
||||
@@ -83,7 +83,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-7 p-0 ps-1 d-none d-md-flex">
|
||||
<div class="col-12 col-md-6 col-lg-7 p-0 d-none d-md-flex">
|
||||
<div class="wrapper list-box w-100 table-rollcall-group2">
|
||||
<div class="Rtable Rtable--5cols Rtable--collapse">
|
||||
|
||||
|
||||
@@ -608,6 +608,6 @@
|
||||
var dayOfWeekDataUrl = `@Url.Page("./CaseHistory", "DayOfWeek")`;
|
||||
var totalWorkingDataUrl = `@Url.Page("./CaseHistory", "TotalWorking")`;
|
||||
|
||||
var itemsEditableDatesData = @Html.Raw(Json.Serialize(Model.EditableDates));
|
||||
//var itemsEditableDatesData = @@Html.Raw(Json.Serialize(Model.EditableDates));
|
||||
</script>
|
||||
<script src="~/assetsclient/pages/rollcall/js/ModalEditRollCall.js?ver=@clientVersion"></script>
|
||||
@@ -69,14 +69,19 @@
|
||||
<div class="card-title">حضور و غیاب</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (@Model.CountRollCall != 0)
|
||||
{
|
||||
<div class="countNumber">
|
||||
<span>
|
||||
@Model.CountRollCall
|
||||
</span>
|
||||
@* @if (@Model.CountRollCall != 0)
|
||||
{ *@
|
||||
|
||||
<div>
|
||||
<div id="CountLoading" class="spinner-grow text-danger" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="countNumber" id="CountRollCallSection" style="display: none">
|
||||
<span id="CountRollCall"></span>
|
||||
</div>
|
||||
</div>
|
||||
@* } *@
|
||||
</div>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
@@ -142,5 +147,20 @@
|
||||
loadingDiv.show();
|
||||
});
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: `@Url.Page("./Index", "CountRollCall")`,
|
||||
headers: { "RequestVerificationToken": $(`@Html.AntiForgeryToken()`).val() },
|
||||
success: function (response) {
|
||||
$("#CountLoading").hide();
|
||||
if (response.countWorkFlow !== 0) {
|
||||
$("#CountRollCallSection").show();
|
||||
$('#CountRollCall').html(response.countWorkFlow);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -43,16 +43,27 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
public IActionResult OnGet()
|
||||
{
|
||||
WorkshopFullName = _workshopApplication.GetWorkshopInfo(_workshopId).WorkshopFullName;
|
||||
CountRollCall = _workFlowApplication.GetAllWorkFlowCount(_workshopId);
|
||||
//CountRollCall = _workFlowApplication.GetAllWorkFlowCount(_workshopId);
|
||||
|
||||
HasRollCallService = _rollCallServiceApplication.GetActiveServiceByWorkshopId(_workshopId) != null;
|
||||
|
||||
return Page();
|
||||
}
|
||||
|
||||
public IActionResult OnGetCountWorkFlowLayout()
|
||||
public async Task<IActionResult> OnGetCountRollCall()
|
||||
{
|
||||
int countWorkFlowResult = _workFlowApplication.GetCountAllWorkFlows(_workshopId);
|
||||
var allWorkFlowCount = await _workFlowApplication.GetAllWorkFlowCount(_workshopId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
countWorkFlow = allWorkFlowCount,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public async Task<IActionResult> OnGetCountWorkFlowLayout()
|
||||
{
|
||||
int countWorkFlowResult = await _workFlowApplication.GetCountAllWorkFlows(_workshopId);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
|
||||
@@ -69,55 +69,65 @@
|
||||
<div class="bottom"></div>
|
||||
</div>
|
||||
|
||||
<li class="active">
|
||||
<li class="active" data-menu="absent">
|
||||
<div class="d-flex align-items-center justify-content-between" id="clickAbsentTab">
|
||||
<a href="javascript:void(0);">غیبت</a>
|
||||
@if (@Model.CountWorkFlowAbsent != 0)
|
||||
{
|
||||
<span id="CountAbsent">@Model.CountWorkFlowAbsent</span>
|
||||
}
|
||||
<div>
|
||||
<div id="CountAbsentLoading" class="spinner-grow text-danger" role="status" style="align-items: center;justify-content: center;display: flex;margin: 0 0 0 9px;">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
<span id="CountAbsent" style="display: none"></span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<li data-menu="cut">
|
||||
<div class="d-flex align-items-center justify-content-between" id="clickCutTab">
|
||||
<a href="javascript:void(0);">قطع شده توسط سیستم</a>
|
||||
@if (@Model.CountWorkFlowCut != 0)
|
||||
{
|
||||
<span id="CountCut">@Model.CountWorkFlowCut</span>
|
||||
}
|
||||
<div>
|
||||
<div id="CountCutLoading" class="spinner-grow text-danger" role="status" style="align-items: center;justify-content: center;display: flex;margin: 0 0 0 9px;">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
<span id="CountCut" style="display: none"></span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<li data-menu="lunchBreak">
|
||||
<div class="d-flex align-items-center justify-content-between" id="clickLunchBreakTab">
|
||||
<a href="javascript:void(0);">عدم ثبت ساعت استراحت</a>
|
||||
@if (@Model.CountWorkFlowLunchBreak != 0)
|
||||
{
|
||||
<span id="CountLunchBreak">@Model.CountWorkFlowLunchBreak</span>
|
||||
}
|
||||
<div>
|
||||
<div id="CountLunchBreakLoading" class="spinner-grow text-danger" role="status" style="align-items: center;justify-content: center;display: flex;margin: 0 0 0 9px;">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
<span id="CountLunchBreak" style="display: none"></span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<li data-menu="undefined">
|
||||
<div class="d-flex align-items-center justify-content-between" id="clickUndefinedTab">
|
||||
<a href="javascript:void(0);">قطع شده مختلط</a>
|
||||
@if (@Model.CountUndefinedRollCalls != 0)
|
||||
{
|
||||
<span id="CountUndefined">@Model.CountUndefinedRollCalls</span>
|
||||
}
|
||||
<a href="javascript:void(0);">تعیین وضعیت تردد پرسنل فوری</a>
|
||||
<div>
|
||||
<div id="CountUndefinedLoading" class="spinner-grow text-danger" role="status" style="align-items: center;justify-content: center;display: flex;margin: 0 0 0 9px;">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
<span id="CountUndefined" style="display: none"></span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="lastRole">
|
||||
@* <li class="lastRole" data-menu="overlappingLeave">
|
||||
<div class="d-flex align-items-center justify-content-between" id="clickOverlappingLeavesTab">
|
||||
<a href="javascript:void(0);">تداخل مرخصی و حضور و غیاب</a>
|
||||
@if (@Model.CountRollCallsOverlappingLeave != 0)
|
||||
{
|
||||
<span id="CountOverlappingLeave">@Model.CountRollCallsOverlappingLeave</span>
|
||||
}
|
||||
<a href="javascript:void(0);">رفع تداخل مرخصی و تردد پرسنل</a>
|
||||
<div>
|
||||
<div id="CountOverlappingLeaveLoading" class="spinner-grow text-danger" role="status" style="align-items: center;justify-content: center;display: flex;margin: 0 0 0 9px;">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
<span id="CountOverlappingLeave" style="display: none"></span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</li> *@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -142,29 +152,59 @@
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="Rtable Rtable--collapse absentWorkFlowLists">
|
||||
<div id="loadingSkeletonAbsent" style="display: contents;">
|
||||
@for (int j = 0; j < 30; j++)
|
||||
{
|
||||
<div class="skeleton-loader" style="margin: 3px 0 !important;height: 39px;"></div>
|
||||
}
|
||||
</div>
|
||||
<div class="w-100" id="loadRollCallAbsentWorkFlow">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable Rtable--collapse cutWorkFlowLists" style="display: none">
|
||||
<div id="loadingSkeletonCut" style="display: contents;">
|
||||
@for (int j = 0; j < 30; j++)
|
||||
{
|
||||
<div class="skeleton-loader" style="margin: 3px 0 !important;height: 39px;"></div>
|
||||
}
|
||||
</div>
|
||||
<div class="w-100" id="loadRollCallCutWorkFlow">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable Rtable--collapse lunchBreakWorkFlowLists" style="display: none">
|
||||
<div id="loadingSkeletonLunchBreak" style="display: contents;">
|
||||
@for (int j = 0; j < 30; j++)
|
||||
{
|
||||
<div class="skeleton-loader" style="margin: 3px 0 !important;height: 39px;"></div>
|
||||
}
|
||||
</div>
|
||||
<div class="w-100" id="loadRollCallLunchBreakWorkFlow">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable Rtable--collapse undefinedWorkFlowLists" style="display: none">
|
||||
<div id="loadingSkeletonUndefined" style="display: contents;">
|
||||
@for (int j = 0; j < 30; j++)
|
||||
{
|
||||
<div class="skeleton-loader" style="margin: 3px 0 !important;height: 39px;"></div>
|
||||
}
|
||||
</div>
|
||||
<div class="w-100" id="loadRollCallUndefinedWorkFlow">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable Rtable--collapse overlappingLeavesLists" style="display: none">
|
||||
@* <div class="Rtable Rtable--collapse overlappingLeavesLists" style="display: none">
|
||||
<div id="loadingSkeletonOverlappingLeaves" style="display: contents;">
|
||||
@for (int j = 0; j < 30; j++)
|
||||
{
|
||||
<div class="skeleton-loader" style="margin: 3px 0 !important;height: 39px;"></div>
|
||||
}
|
||||
</div>
|
||||
<div class="w-100" id="loadOverlappingLeaves">
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -181,10 +221,9 @@
|
||||
<div class="roleName">غیبت</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (@Model.CountWorkFlowAbsent != 0)
|
||||
{
|
||||
<span class="countNumber" id="CountAbsentMobile">@Model.CountWorkFlowAbsent</span>
|
||||
}
|
||||
<div>
|
||||
<span class="countNumber" id="CountAbsentMobile"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100 operation-div">
|
||||
@@ -211,23 +250,13 @@
|
||||
<div class="roleName">قطع شده توسط سیستم</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (@Model.CountWorkFlowCut != 0)
|
||||
{
|
||||
<span class="countNumber" id="CountCutMobile">@Model.CountWorkFlowCut</span>
|
||||
}
|
||||
<div>
|
||||
<span class="countNumber" id="CountCutMobile"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100 operation-div">
|
||||
<div class="operations-btns">
|
||||
@* <div class="position-relative ms-2">
|
||||
<input type="text" class="form-control" id="search" placeholder="جستجو ...">
|
||||
<button type="button" id="clear-search" class="close-btn-search d-none">
|
||||
<svg width="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div> *@
|
||||
|
||||
<div id="loadRollCallCutWorkFlowMobile"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -241,23 +270,13 @@
|
||||
<div class="roleName">عدم ثبت ساعت استراحت</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (@Model.CountWorkFlowLunchBreak != 0)
|
||||
{
|
||||
<span class="countNumber" id="CountLunchBreakMobile">@Model.CountWorkFlowLunchBreak</span>
|
||||
}
|
||||
<div>
|
||||
<span class="countNumber" id="CountLunchBreakMobile"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100 operation-div">
|
||||
<div class="operations-btns">
|
||||
@* <div class="position-relative ms-2">
|
||||
<input type="text" class="form-control" id="search" placeholder="جستجو ...">
|
||||
<button type="button" id="clear-search" class="close-btn-search d-none">
|
||||
<svg width="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div> *@
|
||||
|
||||
<div id="loadRollCallLunchBreakWorkFlowMobile"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -268,60 +287,40 @@
|
||||
<div class="Rtable-row SubAccountRowMobile align-items-center position-relative openAction">
|
||||
<div class="Rtable-cell d-md-block d-flex width2">
|
||||
<div class="Rtable-cell--content text-start">
|
||||
<div class="roleName">قطع شده مختلط</div>
|
||||
<div class="roleName">تعیین وضعیت تردد پرسنل فوری</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (@Model.CountUndefinedRollCalls != 0)
|
||||
{
|
||||
<span class="countNumber" id="CountUndefinedMobile">@Model.CountUndefinedRollCalls</span>
|
||||
}
|
||||
<div>
|
||||
<span class="countNumber" id="CountUndefinedMobile"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100 operation-div">
|
||||
<div class="operations-btns">
|
||||
@* <div class="position-relative ms-2">
|
||||
<input type="text" class="form-control" id="search" placeholder="جستجو ...">
|
||||
<button type="button" id="clear-search" class="close-btn-search d-none">
|
||||
<svg width="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div> *@
|
||||
|
||||
<div id="loadRollCallUndefinedWorkFlowMobile"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable Rtable--collapse">
|
||||
@* <div class="Rtable Rtable--collapse">
|
||||
<div></div>
|
||||
<div class="Rtable-row SubAccountRowMobile align-items-center position-relative openAction">
|
||||
<div class="Rtable-cell d-md-block d-flex width2">
|
||||
<div class="Rtable-cell--content text-start">
|
||||
<div class="roleName">تداخل مرخصی و حضور و غیاب</div>
|
||||
<div class="roleName">رفع تداخل مرخصی و تردد پرسنل</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (@Model.CountRollCallsOverlappingLeave != 0)
|
||||
{
|
||||
<span class="countNumber" id="CountOverlappingLeaveMobile">@Model.CountRollCallsOverlappingLeave</span>
|
||||
}
|
||||
<div>
|
||||
<span class="countNumber" id="CountOverlappingLeaveMobile"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100 operation-div">
|
||||
<div class="operations-btns">
|
||||
@* <div class="position-relative ms-2">
|
||||
<input type="text" class="form-control" id="search" placeholder="جستجو ...">
|
||||
<button type="button" id="clear-search" class="close-btn-search d-none">
|
||||
<svg width="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div> *@
|
||||
|
||||
<div id="loadOverlappingLeavesMobile"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
throw new InvalidDataException("اختلال در کارگاه");
|
||||
}
|
||||
|
||||
public IActionResult OnGet()
|
||||
public async Task<IActionResult> OnGet()
|
||||
{
|
||||
var hasRollCallService = _rollCallServiceApplication.GetActiveServiceByWorkshopId(_workshopId) != null;
|
||||
if (!hasRollCallService)
|
||||
@@ -61,40 +61,40 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
var workshopInfo = _workshopApplication.GetWorkshopInfo(_workshopId);
|
||||
WorkshopFullName = workshopInfo.WorkshopFullName;
|
||||
|
||||
CountWorkFlowCut = _workflowApplication.GetCountCutRollCallByBgService(_workshopId);
|
||||
//CountWorkFlowAbsent = _workflowApplication.GetRollCallAbsentsWorkFlows(accountId, workshopId);
|
||||
CountWorkFlowAbsent = _workflowApplication.GetAbsentRollCallWorkFlows(_workshopId).Count();
|
||||
CountWorkFlowLunchBreak = _workflowApplication.GetEmployeesWithoutLunchBreak(_workshopId).Count();
|
||||
CountUndefinedRollCalls = _workflowApplication.GetUndefinedRollCalls(_workshopId).Count();
|
||||
CountRollCallsOverlappingLeave = _workflowApplication.GetRollCallsOverlappingLeaves(_workshopId).Count();
|
||||
// CountWorkFlowCut = await _workflowApplication.GetCountCutRollCallByBgService(_workshopId);
|
||||
// //CountWorkFlowAbsent = _workflowApplication.GetRollCallAbsentsWorkFlows(accountId, workshopId);
|
||||
// CountWorkFlowAbsent = (await _workflowApplication.GetAbsentRollCallWorkFlows(_workshopId)).Count();
|
||||
// CountWorkFlowLunchBreak = (await _workflowApplication.GetEmployeesWithoutLunchBreak(_workshopId)).Count();
|
||||
//CountUndefinedRollCalls = (await _workflowApplication.GetUndefinedRollCalls(_workshopId)).Count();
|
||||
//CountRollCallsOverlappingLeave = (await _workflowApplication.GetRollCallsOverlappingLeaves(_workshopId)).Count();
|
||||
|
||||
return Page();
|
||||
}
|
||||
|
||||
public IActionResult OnGetCountWorkFlowOfAbsentAndCut()
|
||||
public async Task<IActionResult> OnGetCountWorkFlowOfAbsentAndCut()
|
||||
{
|
||||
var countWorkFlowCut = _workflowApplication.GetCountCutRollCallByBgService(_workshopId);
|
||||
var countWorkFlowCut = (await _workflowApplication.GetCountCutRollCallByBgService(_workshopId));
|
||||
//CountWorkFlowAbsent = _workflowApplication.GetRollCallAbsentsWorkFlows(accountId, workshopId);
|
||||
var countWorkFlowAbsent = _workflowApplication.GetAbsentRollCallWorkFlows(_workshopId).Count();
|
||||
var countWorkFlowLunchBreak = _workflowApplication.GetEmployeesWithoutLunchBreak(_workshopId).Count();
|
||||
var countUndefinedRollCalls = _workflowApplication.GetUndefinedRollCalls(_workshopId).Count();
|
||||
var countRollCallsOverlappingLeave = _workflowApplication.GetRollCallsOverlappingLeaves(_workshopId).Count();
|
||||
var countWorkFlowAbsent = (await _workflowApplication.GetAbsentRollCallWorkFlows(_workshopId)).Count();
|
||||
var countWorkFlowLunchBreak = (await _workflowApplication.GetEmployeesWithoutLunchBreak(_workshopId)).Count();
|
||||
var countUndefinedRollCalls = (await _workflowApplication.GetUndefinedRollCalls(_workshopId)).Count();
|
||||
var countRollCallsOverlappingLeave = (await _workflowApplication.GetRollCallsOverlappingLeaves(_workshopId)).Count();
|
||||
|
||||
return new JsonResult(new
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
dataCut = countWorkFlowCut,
|
||||
dataAbsent = countWorkFlowAbsent,
|
||||
dataLunchBreak = countWorkFlowLunchBreak,
|
||||
dataUndefined = countUndefinedRollCalls,
|
||||
dataOverlappingLeave = countRollCallsOverlappingLeave,
|
||||
});
|
||||
dataUndefined = countUndefinedRollCalls,
|
||||
dataOverlappingLeave = countRollCallsOverlappingLeave
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetRollCallWorkFlowsCut()
|
||||
public async Task<IActionResult> OnGetRollCallWorkFlowsCut()
|
||||
{
|
||||
|
||||
var resultData = _workflowApplication.GetRollCallWorkFlowsCutByBgService(_workshopId);
|
||||
var resultData = await _workflowApplication.GetRollCallWorkFlowsCutByBgService(_workshopId);
|
||||
foreach (var item in resultData)
|
||||
{
|
||||
item.RollCallWorkFlowPerDayCount = item.RollCallWorkFlowPerDayViewModels.Count;
|
||||
@@ -107,9 +107,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeeListByWorkFlowsCut(DateTime date)
|
||||
public async Task<IActionResult> OnGetEmployeeListByWorkFlowsCut(DateTime date)
|
||||
{
|
||||
var resultData = _workflowApplication.GetRollCallWorkFlowsCutByBgServiceByDate(_workshopId, date);
|
||||
var resultData = await _workflowApplication.GetRollCallWorkFlowsCutByBgServiceByDate(_workshopId, date);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
@@ -118,9 +118,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetRollCallWorkFlowsAbsents()
|
||||
public async Task<IActionResult> OnGetRollCallWorkFlowsAbsents()
|
||||
{
|
||||
var resultData = _workflowApplication.GetAbsentRollCallWorkFlows(_workshopId);
|
||||
var resultData = await _workflowApplication.GetAbsentRollCallWorkFlows(_workshopId);
|
||||
foreach (var item in resultData)
|
||||
{
|
||||
item.RollCallWorkFlowPerDayCount = item.RollCallWorkFlowPerDayViewModels.Count;
|
||||
@@ -133,9 +133,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeeListByWorkFlowsAbsents(DateTime date)
|
||||
public async Task<IActionResult> OnGetEmployeeListByWorkFlowsAbsents(DateTime date)
|
||||
{
|
||||
var resultData = _workflowApplication.GetAbsentRollCallWorkFlowsByDate(_workshopId, date);
|
||||
var resultData = await _workflowApplication.GetAbsentRollCallWorkFlowsByDate(_workshopId, date);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
@@ -144,9 +144,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetRollCallWorkFlowEmployeesWithoutLunchBreak()
|
||||
public async Task<IActionResult> OnGetRollCallWorkFlowEmployeesWithoutLunchBreak()
|
||||
{
|
||||
var resultData = _workflowApplication.GetEmployeesWithoutLunchBreak(_workshopId);
|
||||
var resultData = await _workflowApplication.GetEmployeesWithoutLunchBreak(_workshopId);
|
||||
foreach (var item in resultData)
|
||||
{
|
||||
item.Count = item.RollCallConfirmedWithoutLunchList.Count;
|
||||
@@ -159,9 +159,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeeListByWorkFlowsEmployeesWithoutLunchBreak(DateTime date)
|
||||
public async Task<IActionResult> OnGetEmployeeListByWorkFlowsEmployeesWithoutLunchBreak(DateTime date)
|
||||
{
|
||||
var resultData = _workflowApplication.GetEmployeesWithoutLunchBreakByDate(_workshopId, date);
|
||||
var resultData = await _workflowApplication.GetEmployeesWithoutLunchBreakByDate(_workshopId, date);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
@@ -170,9 +170,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetUndefinedRollCalls()
|
||||
public async Task<IActionResult> OnGetUndefinedRollCalls()
|
||||
{
|
||||
var resultData = _workflowApplication.GetUndefinedRollCalls(_workshopId);
|
||||
var resultData = await _workflowApplication.GetUndefinedRollCalls(_workshopId);
|
||||
foreach (var item in resultData)
|
||||
{
|
||||
item.RollCallWorkFlowPerDayCount = item.RollCallWorkFlowPerDayViewModels.Count;
|
||||
@@ -185,9 +185,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeeListByUndefinedRollCalls(DateTime date)
|
||||
public async Task<IActionResult> OnGetEmployeeListByUndefinedRollCalls(DateTime date)
|
||||
{
|
||||
var resultData = _workflowApplication.GetUndefinedRollCallsByDate(_workshopId, date);
|
||||
var resultData = await _workflowApplication.GetUndefinedRollCallsByDate(_workshopId, date);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
@@ -196,9 +196,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetOverlappingLeaves()
|
||||
public async Task<IActionResult> OnGetOverlappingLeaves()
|
||||
{
|
||||
var resultData = _workflowApplication.GetRollCallsOverlappingLeaves(_workshopId);
|
||||
var resultData = await _workflowApplication.GetRollCallsOverlappingLeaves(_workshopId);
|
||||
foreach (var item in resultData)
|
||||
{
|
||||
item.EmployeesListCount = item.EmployeesList.Count;
|
||||
@@ -211,9 +211,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeeListByOverlappingLeaveByDate(DateTime date)
|
||||
public async Task<IActionResult> OnGetEmployeeListByOverlappingLeaveByDate(DateTime date)
|
||||
{
|
||||
var resultData = _workflowApplication.GetRollCallsOverlappingLeaveByDate(_workshopId, date);
|
||||
var resultData = await _workflowApplication.GetRollCallsOverlappingLeaveByDate(_workshopId, date);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
@@ -227,7 +227,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
return Partial("LeaveCreate", command);
|
||||
}
|
||||
|
||||
public IActionResult OnPostConfirmedAbsence(long employeeId, string absenceDate)
|
||||
public async Task<IActionResult> OnPostConfirmedAbsence(long employeeId, string absenceDate)
|
||||
{
|
||||
long accountId = _authHelper.CurrentAccountId();
|
||||
|
||||
@@ -239,7 +239,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
AbsenceDate = absenceDate
|
||||
};
|
||||
|
||||
var result = _workflowApplication.CreateRollCallConfirmedAbsence(command);
|
||||
var result = await _workflowApplication.CreateRollCallConfirmedAbsence(command);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
@@ -249,7 +249,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
|
||||
public IActionResult OnPostConfirmCutByBgService(long rollCallId)
|
||||
{
|
||||
var result = _rollCallApplication.SetModifyTypeToEditByEmployer(rollCallId);
|
||||
var result = _rollCallApplication.SetModifyTypeToEditByEmployer(rollCallId);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
@@ -258,13 +258,13 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostConfirmedWithoutLunchBreak(long rollCallId)
|
||||
public async Task<IActionResult> OnPostConfirmedWithoutLunchBreak(long rollCallId)
|
||||
{
|
||||
var command = new CreateRollCallConfirmedWithoutLunchBreak()
|
||||
{
|
||||
RollCallId = rollCallId
|
||||
};
|
||||
var result = _workflowApplication.CreateRollCallConfirmedWithoutLunchBreak(command);
|
||||
var result = await _workflowApplication.CreateRollCallConfirmedWithoutLunchBreak(command);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
long workshopId = currentAccount.WorkshopList.First(x => x.Slug == currentAccount.WorkshopSlug).Id;
|
||||
|
||||
int countWorkFlow = WorkFlowApplication.GetCountAllWorkFlows(workshopId);
|
||||
int countWorkFlow =await WorkFlowApplication.GetCountAllWorkFlows(workshopId);
|
||||
|
||||
var viewData = new ViewDataDictionary(new EmptyModelMetadataProvider(), new ModelStateDictionary()) { { "countWorkFlow", countWorkFlow } };
|
||||
}
|
||||
|
||||
@@ -91,6 +91,9 @@
|
||||
<None Include="Areas\AdminNew\Pages\Company\FileBackup\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Partial\_EmptySection.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\RollCall\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\RollCall\_ModalWorkTimePartials\ConfirmReplaceGroupAndEmployee.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\RollCall\_ModalWorkTimePartials\WorkTimeSetting.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\RollCall\_Partials\ConfirmEmployeeChangeModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\Create.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\CreateCRUDTaskSubjectModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\CreateModal.cshtml" />
|
||||
|
||||
339
ServiceHost/wwwroot/AssetsAdminNew/RollCall/css/Index.css
Normal file
339
ServiceHost/wwwroot/AssetsAdminNew/RollCall/css/Index.css
Normal file
@@ -0,0 +1,339 @@
|
||||
.table-rollcall .width1,
|
||||
.table-rollcall .rollcall-list .width1 {
|
||||
width: 5% !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width2,
|
||||
.table-rollcall .rollcall-list .width2 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width3,
|
||||
.table-rollcall .rollcall-list .width3 {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width4,
|
||||
.table-rollcall .rollcall-list .width4 {
|
||||
width: 12% !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width5,
|
||||
.table-rollcall .rollcall-list .width5 {
|
||||
width: 12% !important;
|
||||
/*text-align: center !important;*/
|
||||
}
|
||||
|
||||
.table-rollcall .width6,
|
||||
.table-rollcall .rollcall-list .width6 {
|
||||
width: 16% !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width7,
|
||||
.table-rollcall .rollcall-list .width7 {
|
||||
width: 14% !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width8,
|
||||
.table-rollcall .rollcall-list .width8 {
|
||||
width: 6% !important;
|
||||
}
|
||||
|
||||
.table-rollcall .rollcall-list .width3 .Rtable-cell--content,
|
||||
.table-rollcall .rollcall-list .width7 .Rtable-cell--content {
|
||||
text-align: center;
|
||||
text-align: -webkit-center;
|
||||
}
|
||||
|
||||
.table-rollcall .ticket-list .green {
|
||||
background-color: #C4FFC2;
|
||||
}
|
||||
|
||||
.badget-inprogress {
|
||||
color: #ffffff;
|
||||
background-color: #EAB308;
|
||||
width: 60%;
|
||||
text-align: center;
|
||||
padding: 3px 6px;
|
||||
border-radius: 30px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.badget-open {
|
||||
color: #353535;
|
||||
background-color: #E2E8F0;
|
||||
width: 60%;
|
||||
text-align: center;
|
||||
padding: 3px 6px;
|
||||
border-radius: 30px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.badget-answer {
|
||||
color: #ffffff;
|
||||
background-color: #60A5FA;
|
||||
width: 60%;
|
||||
text-align: center;
|
||||
padding: 3px 6px;
|
||||
border-radius: 30px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.badget-closed {
|
||||
color: #ffffff;
|
||||
background-color: #84CC16;
|
||||
width: 60%;
|
||||
text-align: center;
|
||||
padding: 3px 6px;
|
||||
border-radius: 30px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
.btn-ticket-detail {
|
||||
background: rgba(93, 209, 52, 0.3);
|
||||
border: 0.5px solid #2E8F2F54;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-ticket-task {
|
||||
background: #C9EEFE;
|
||||
border: 0.5px solid #FFFFFF;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
||||
.btn-ticket-edit {
|
||||
background: rgba(52, 209, 209, 0.3);
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #009EE2;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-ticket-delete {
|
||||
background: rgba(209, 50, 50, 0.15);
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #BF3737;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-ticket-detail:hover {
|
||||
background: rgba(93, 209, 52, 0.4);
|
||||
}
|
||||
|
||||
.btn-ticket-edit:hover {
|
||||
background: rgba(52, 209, 209, 0.5);
|
||||
}
|
||||
|
||||
.btn-ticket-delete:hover {
|
||||
background: rgba(209, 50, 50, 0.3);
|
||||
}
|
||||
|
||||
|
||||
.btn-ticket-more {
|
||||
background: #C7F8F8;
|
||||
border: 1px solid #0B5959;
|
||||
border-radius: 7px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #0B5959;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-ticket-more:hover {
|
||||
background: #ACD2D2;
|
||||
}
|
||||
|
||||
.table-rollcall .Rtable .Rtable-row .Rtable-cell .Rtable-cell--content > span {
|
||||
border-radius: 5px;
|
||||
background: rgba(87, 227, 227, 0.25);
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
display: inline-block;
|
||||
padding: 0 10px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.operations-btns .span1 {
|
||||
color: #0B5959;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.operations-btns .span2 {
|
||||
color: #0B5959;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.black-background {
|
||||
background-color: #E3E3E3 !important;
|
||||
}
|
||||
|
||||
.status {
|
||||
display: inline-block;
|
||||
padding: 6px;
|
||||
width: 60px;
|
||||
border-radius: 20px;
|
||||
color: #ffffff;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.status-green {
|
||||
background-color: #84cc16;
|
||||
}
|
||||
|
||||
.status-red {
|
||||
background-color: #ef4444;
|
||||
}
|
||||
|
||||
@media (max-width: 1380px) {
|
||||
.badget-inprogress,
|
||||
.badget-answer,
|
||||
.badget-closed,
|
||||
.badget-open {
|
||||
width: 110px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell .Rtable-cell--content {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.table-rollcall .Rtable-cell.column-heading {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width1,
|
||||
.table-rollcall .ticket-list .width1 {
|
||||
width: 5% !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width2,
|
||||
.table-rollcall .ticket-list .width2 {
|
||||
width: 8% !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width3,
|
||||
.table-rollcall .ticket-list .width3 {
|
||||
width: 17% !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width4,
|
||||
.table-rollcall .ticket-list .width4 {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width5,
|
||||
.table-rollcall .ticket-list .width5 {
|
||||
width: 15% !important;
|
||||
/*text-align: center !important;*/
|
||||
}
|
||||
|
||||
.table-rollcall .ticket-list .width3 .Rtable-cell--content {
|
||||
text-align: center;
|
||||
text-align: -webkit-center;
|
||||
}
|
||||
|
||||
.table-rollcall .ticket-list .Rtable-cell--content {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.table-rollcall .width6,
|
||||
.table-rollcall .ticket-list .width6 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width7,
|
||||
.table-rollcall .ticket-list .width7 {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width8,
|
||||
.table-rollcall .ticket-list .width8 {
|
||||
width: 10% !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.Rtable--collapse .Rtable-row {
|
||||
outline: 0;
|
||||
border: 1px solid #ECFFFF;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell.width3 .Rtable-cell--content {
|
||||
justify-content: right;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell.width8 {
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell.width8 .Rtable-cell--content {
|
||||
justify-content: end;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.badget-inprogress,
|
||||
.badget-answer,
|
||||
.badget-closed {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.btn-ticket-detail {
|
||||
border: 1px solid #248826;
|
||||
border-radius: 8px;
|
||||
color: #248826;
|
||||
background-color: #B7EABA;
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ function loadDataCameraAccountAjax() {
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell d-md-flex justify-content-end width6">
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-flex justify-content-end">
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-flex justify-content-end gap-2">
|
||||
<button class="btn-pass ChangePassword d-none d-md-block" onclick="showModalCameraAccountChangePassword(${item.id})" id="CameraAccountChangePassword_${item.id}" type="button">
|
||||
<span class="spanTxt d-none">تغییر گذرواژه</span>
|
||||
<span class="spanSvg">
|
||||
@@ -77,29 +77,13 @@ function loadDataCameraAccountAjax() {
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn-more position-relative d-md-none d-flex" style="width: 36px;padding: 0;height: 36px;align-items: center;justify-content: center;position: relative !important;">
|
||||
<span class="mx-1 align-items-center d-flex justify-content-center"></span>
|
||||
<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>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell d-md-flex justify-content-end width6">
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-flex justify-content-end">
|
||||
<a class="btn-pass ChangePassword d-none d-md-block" href="${directLoginUrl}&id=${item.id}" id="directLogin_${item.id}" type="button">
|
||||
<a class="btn-pass ChangePassword d-none d-md-flex" href="${directLoginUrl}&id=${item.id}" id="directLogin_${item.id}">
|
||||
<span class="spanTxt d-none"> ورود مستقیم </span>
|
||||
<span class="spanSvg">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z" />
|
||||
</svg>
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <circle cx="12" cy="13" r="3" stroke="#1C274C" stroke-width="1.5"></circle> <path d="M10.0001 19.9999H14.0001C16.809 19.9999 18.2135 19.9999 19.2224 19.3258C19.6591 19.0339 20.0341 18.6589 20.326 18.2222C21.0001 17.2133 21.0001 15.8088 21.0001 12.9999C21.0001 10.191 21 8.78673 20.3258 7.77783C20.034 7.34107 19.659 6.96607 19.2222 6.67423C18.2133 6.00011 16.8089 6.00011 14 6.00011H9.99995C7.19103 6.00011 5.78656 6.00011 4.77767 6.67423C4.34091 6.96607 3.96591 7.34107 3.67407 7.77783C3.0001 8.7865 3.0001 10.1903 3.0001 12.998L3.0001 12.9999C3.0001 15.8088 3.0001 17.2133 3.67422 18.2222C3.96605 18.6589 4.34106 19.0339 4.77782 19.3258C5.78671 19.9999 7.19117 19.9999 10.0001 19.9999Z" stroke="#1C274C" stroke-width="1.5"></path> <path d="M18 10H17.5" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"></path> <path d="M14.5 3.5H9.5" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"></path> </g></svg>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<button type="button" class="btn-more position-relative d-md-none d-flex" style="width: 36px;padding: 0;height: 36px;align-items: center;justify-content: center;position: relative !important;">
|
||||
<button type="button" class="btn-more position-relative d-md-none d-flex" style="width: 30px;padding: 0;height: 30px;align-items: center;justify-content: center;position: relative !important;">
|
||||
<span class="mx-1 align-items-center d-flex justify-content-center"></span>
|
||||
<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)"/>
|
||||
@@ -110,6 +94,7 @@ function loadDataCameraAccountAjax() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -146,7 +131,7 @@ function loadDataCameraAccountAjax() {
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<button class="btn-pass ChangePassword w-100" onclick="showModalCameraAccountChangePassword(${item.id})" id="ChangePassword_${item.id}" type="button">
|
||||
<button class="btn-pass ChangePassword w-100" onclick="showModalCameraAccountChangePassword(${item.id})" id="ChangePassword_${item.id}" type="button" style="margin: 0 0 10px 0;">
|
||||
<span class="spanTxt">تغییر گذرواژه</span>
|
||||
<span class="spanSvg">
|
||||
<svg width="24" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
@@ -155,6 +140,13 @@ function loadDataCameraAccountAjax() {
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<a class="btn-pass ChangePassword d-flex align-items-center justify-content-center w-100" href="${directLoginUrl}&id=${item.id}" id="directLogin_${item.id}">
|
||||
<span class="spanTxt">ورود به اکانت حساب کاربری</span>
|
||||
<span class="spanSvg">
|
||||
<svg width="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <circle cx="12" cy="13" r="3" stroke="#1C274C" stroke-width="1.5"></circle> <path d="M10.0001 19.9999H14.0001C16.809 19.9999 18.2135 19.9999 19.2224 19.3258C19.6591 19.0339 20.0341 18.6589 20.326 18.2222C21.0001 17.2133 21.0001 15.8088 21.0001 12.9999C21.0001 10.191 21 8.78673 20.3258 7.77783C20.034 7.34107 19.659 6.96607 19.2222 6.67423C18.2133 6.00011 16.8089 6.00011 14 6.00011H9.99995C7.19103 6.00011 5.78656 6.00011 4.77767 6.67423C4.34091 6.96607 3.96591 7.34107 3.67407 7.77783C3.0001 8.7865 3.0001 10.1903 3.0001 12.998L3.0001 12.9999C3.0001 15.8088 3.0001 17.2133 3.67422 18.2222C3.96605 18.6589 4.34106 19.0339 4.77782 19.3258C5.78671 19.9999 7.19117 19.9999 10.0001 19.9999Z" stroke="#1C274C" stroke-width="1.5"></path> <path d="M18 10H17.5" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"></path> <path d="M14.5 3.5H9.5" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"></path> </g></svg>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -400,7 +400,7 @@ function fetchAndDisplayRollCallData(employeeId, dateFa) {
|
||||
|
||||
if (response.hasLeave) {
|
||||
htmlElement = `
|
||||
<div class="text-center"> برای این پرسنل مرخصی ثبت شده است </div>
|
||||
<div class="text-center">این پرسنل مرخصی ثبت شده است.</div>
|
||||
`;
|
||||
$('#appendChildTimeWorkHtml').html(htmlElement);
|
||||
$('.btn-register').addClass('disable');
|
||||
|
||||
@@ -28,15 +28,19 @@
|
||||
}
|
||||
|
||||
.table-rollcall-group2 .width3 {
|
||||
width: 32% !important;
|
||||
width: 30% !important;
|
||||
}
|
||||
|
||||
.table-rollcall-group2 .width4 {
|
||||
width: 25% !important;
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.table-rollcall-group2 .width5 {
|
||||
width: 20% !important;
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
.table-rollcall-group2 .width6 {
|
||||
width: 8% !important;
|
||||
}
|
||||
|
||||
.infoGroupBox {
|
||||
@@ -66,9 +70,17 @@
|
||||
color: #EF4444;
|
||||
}
|
||||
|
||||
#ajaxDataMain {
|
||||
height: 700px;
|
||||
border-radius: 10px;
|
||||
padding: 3px;
|
||||
overflow-y: auto;
|
||||
/*outline: 1px solid #55D1D1;*/
|
||||
}
|
||||
|
||||
|
||||
#loadAccountItems {
|
||||
height: 620px;
|
||||
height: 700px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10px;
|
||||
padding: 1px 6px;
|
||||
@@ -106,14 +118,14 @@
|
||||
}
|
||||
|
||||
.title-group1 {
|
||||
font-size: 15px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
color: #696969;
|
||||
}
|
||||
|
||||
.title-group2 {
|
||||
font-size: 15px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
color: #716969;
|
||||
@@ -181,7 +193,7 @@
|
||||
cursor: pointer;
|
||||
margin: 0 0 6px 0;
|
||||
transition: ease .3s;
|
||||
height: 76px;
|
||||
height: 75px;
|
||||
}
|
||||
|
||||
.btnPosition:hover {
|
||||
@@ -284,12 +296,19 @@
|
||||
|
||||
@media(max-width: 1366px) {
|
||||
#loadAccountItems {
|
||||
height: 310px;
|
||||
height: 410px;
|
||||
}
|
||||
#ajaxDataMain {
|
||||
height: 410px;
|
||||
border-radius: 10px;
|
||||
padding: 3px;
|
||||
overflow-y: auto;
|
||||
/*outline: 1px solid #55D1D1;*/
|
||||
}
|
||||
|
||||
.title-group1,
|
||||
.title-group2 {
|
||||
font-size: 15px;
|
||||
font-size: 13px;
|
||||
color: #353232;
|
||||
}
|
||||
|
||||
@@ -322,6 +341,11 @@
|
||||
.title-group h4 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.time-set-title {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width:768px) {
|
||||
@@ -333,6 +357,7 @@
|
||||
background-color: #FFFFFF;
|
||||
outline: 0;
|
||||
box-shadow: 0px 2px 9px rgba(0, 0, 0, 0.1);
|
||||
margin: 0 0 15px 0;
|
||||
}
|
||||
|
||||
.btnPosition.active {
|
||||
@@ -348,15 +373,15 @@
|
||||
}
|
||||
|
||||
.widthMobile1 {
|
||||
width: 15% !important;
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.widthMobile2 {
|
||||
width: 45% !important;
|
||||
width: 40% !important;
|
||||
}
|
||||
|
||||
.widthMobile3 {
|
||||
width: 40% !important;
|
||||
width: 30% !important;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row {
|
||||
@@ -385,9 +410,10 @@
|
||||
font-size: 12px;
|
||||
padding: 10px 30px;
|
||||
}
|
||||
|
||||
#ajaxDataMain,
|
||||
#loadAccountItems {
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
|
||||
@@ -35,7 +35,6 @@ function loadDataAjax() {
|
||||
html += `
|
||||
<div class="p-2 rounded-3 d-flex align-items-center justify-content-between w-100 btnPosition openAction ${
|
||||
indexItem === 0 ? 'active' : ''}" data-index="${item.id}">
|
||||
|
||||
<div class="width1">
|
||||
<span class="d-none" id="groupSettingsId">${item.id}</span>
|
||||
<span class="row-index1">${index}</span>
|
||||
@@ -47,15 +46,30 @@ function loadDataAjax() {
|
||||
</div>
|
||||
<div class="title-group1 text-center d-none d-md-block width3">`;
|
||||
|
||||
item.rollCallWorkshopShifts.forEach(function(itemShifts) {
|
||||
html += `
|
||||
<p class="m-0 time-set-title">
|
||||
<span style="width: 46px;display: inline-block;">${itemShifts.startTime}</span>
|
||||
الی
|
||||
<span style="width: 46px;display: inline-block;">${itemShifts.endTime}</span>
|
||||
</p>
|
||||
`;
|
||||
});
|
||||
if (item.workshopShiftStatus === 0) {
|
||||
item.rollCallWorkshopShifts.forEach(function (itemShifts) {
|
||||
html += `
|
||||
<p class="m-0 time-set-title">
|
||||
<span style="width: 46px;display: inline-block;">${itemShifts.startTime}</span>
|
||||
الی
|
||||
<span style="width: 46px;display: inline-block;">${itemShifts.endTime}</span>
|
||||
</p>
|
||||
`;
|
||||
});
|
||||
} else {
|
||||
html += `<p class="m-0 time-set-title">`;
|
||||
if (item.irregularShift.workshopIrregularShifts === 1) {
|
||||
html += `<span>12-24</span>`;
|
||||
} else if (item.irregularShift.workshopIrregularShifts === 2) {
|
||||
html += `<span>24-24</span>`;
|
||||
} else if (item.irregularShift.workshopIrregularShifts === 3) {
|
||||
html += `<span>12-36</span>`;
|
||||
} else if (item.irregularShift.workshopIrregularShifts === 4) {
|
||||
html += `<span>24-48</span>`;
|
||||
}
|
||||
|
||||
html += `</p>`;
|
||||
}
|
||||
|
||||
html += `</div>
|
||||
<div class="title-group1 text-center d-none d-md-block width4">
|
||||
@@ -156,14 +170,30 @@ function loadEmployeeAjax(groupSettingId) {
|
||||
<div class="Rtable-cell--content d-flex text-center">
|
||||
<div class="d-flex d-md-none mx-1">ساعت کاری: </div>
|
||||
<div class="w-100">`;
|
||||
itemEmployee.rollCallWorkshopShifts.forEach(function (itemEmployeeShifts) {
|
||||
htmlEmployee += `
|
||||
<p class="m-0 time-set-title">
|
||||
<span style="width: 46px;display: inline-block;text-align: center;">${itemEmployeeShifts.startTime}</span>
|
||||
الی
|
||||
<span style="width: 46px;display: inline-block;text-align: center;">${itemEmployeeShifts.endTime}</span>
|
||||
</p>`;
|
||||
});
|
||||
if (itemEmployee.workshopShiftStatus === 0) {
|
||||
itemEmployee.rollCallWorkshopShifts.forEach(function (itemEmployeeShifts) {
|
||||
htmlEmployee += `
|
||||
<p class="m-0 time-set-title">
|
||||
<span style="width: 46px;display: inline-block;text-align: center;">${itemEmployeeShifts.startTime}</span>
|
||||
الی
|
||||
<span style="width: 46px;display: inline-block;text-align: center;">${itemEmployeeShifts.endTime}</span>
|
||||
</p>`;
|
||||
});
|
||||
} else {
|
||||
htmlEmployee += `<p class="m-0 time-set-title">`;
|
||||
if (itemEmployee.irregularShift.workshopIrregularShifts === 1) {
|
||||
htmlEmployee += `<span>12-24</span>`;
|
||||
} else if (itemEmployee.irregularShift.workshopIrregularShifts === 2) {
|
||||
htmlEmployee += `<span>24-24</span>`;
|
||||
} else if (itemEmployee.irregularShift.workshopIrregularShifts === 3) {
|
||||
htmlEmployee += `<span>12-36</span>`;
|
||||
} else if (itemEmployee.irregularShift.workshopIrregularShifts === 4) {
|
||||
htmlEmployee += `<span>24-48</span>`;
|
||||
}
|
||||
|
||||
htmlEmployee += `</p>`;
|
||||
}
|
||||
|
||||
htmlEmployee += `</div></div>
|
||||
</div>
|
||||
|
||||
@@ -174,7 +204,14 @@ function loadEmployeeAjax(groupSettingId) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-end gap-1 width5 widthMobile3">
|
||||
<div class="Rtable-cell width5 d-md-block d-none">
|
||||
<div class="Rtable-cell--heading">مرخصی مجاز</div>
|
||||
<div class="Rtable-cell--content text-center">
|
||||
${itemEmployee.leavePermittedDays}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-end gap-1 width6 widthMobile3">
|
||||
<button type="button" class="btn-setting" onclick="showModalGroupEmployeeSetting(${itemEmployee.id}, ${itemEmployee.employeeId})">
|
||||
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke="#475569" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
|
||||
|
||||
@@ -66,9 +66,16 @@
|
||||
color: #EF4444;
|
||||
}
|
||||
|
||||
#ajaxDataMain {
|
||||
height: 700px;
|
||||
border-radius: 10px;
|
||||
padding: 3px;
|
||||
overflow-y: auto;
|
||||
/*outline: 1px solid #55D1D1;*/
|
||||
}
|
||||
|
||||
#loadAccountItems {
|
||||
height: 620px;
|
||||
height: 700px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10px;
|
||||
padding: 1px 6px;
|
||||
@@ -175,13 +182,21 @@
|
||||
grid-column: span 8 / span 7;
|
||||
}
|
||||
|
||||
.widthBtn {
|
||||
width: 100px !important;
|
||||
padding: 0 !important;
|
||||
font-weight: 600 !important;
|
||||
font-size: 12px !important;
|
||||
margin: 2px auto !important;
|
||||
}
|
||||
|
||||
.btnPosition {
|
||||
background-color: #E5FCFC;
|
||||
outline: 1px solid #CAD4D4;
|
||||
cursor: pointer;
|
||||
margin: 0 0 6px 0;
|
||||
transition: ease .3s;
|
||||
height: 105px;
|
||||
/*height: 105px;*/
|
||||
}
|
||||
|
||||
.btnPosition:hover {
|
||||
@@ -326,12 +341,20 @@ button.btn-edit:hover {
|
||||
|
||||
@media(max-width: 1366px) {
|
||||
#loadAccountItems {
|
||||
height: 310px;
|
||||
height: 400px;
|
||||
}
|
||||
#ajaxDataMain {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.widthBtn {
|
||||
font-size: 10px !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.title-group1,
|
||||
.title-group2 {
|
||||
font-size: 15px;
|
||||
font-size: 14px;
|
||||
color: #353232;
|
||||
}
|
||||
|
||||
@@ -386,6 +409,7 @@ button.btn-edit:hover {
|
||||
background-color: #FFFFFF;
|
||||
outline: 0;
|
||||
box-shadow: 0px 2px 9px rgba(0, 0, 0, 0.1);
|
||||
margin: 0 0 15px;
|
||||
}
|
||||
|
||||
.btnPosition.active {
|
||||
@@ -440,8 +464,10 @@ button.btn-edit:hover {
|
||||
padding: 10px 30px;
|
||||
}
|
||||
|
||||
#ajaxDataMain,
|
||||
#loadAccountItems {
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.btn-add {
|
||||
|
||||
@@ -80,7 +80,7 @@ function loadDataAjax() {
|
||||
|
||||
html += `</div>
|
||||
<div class="text-end d-block width5">
|
||||
<button type="button" class="btn-add" onclick="AddToGroupModal(${responseData.id}, ${item.id}, '${item.groupName}')" style="padding: 0 6px;font-weight: 600;color: #65a30d;width: 110px;">
|
||||
<button type="button" class="btn-add widthBtn" onclick="AddToGroupModal(${responseData.id}, ${item.id}, '${item.groupName}')">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="9" cy="9" r="4" fill="#65a30d"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.864 18.8128C14.8851 18.9183 14.9742 19 15.0819 19H16.8672C17.4687 19 17.9213 18.471 17.7202 17.9042C17.3002 16.7199 16.2951 15 14 15C13.8744 15 13.7527 15.0052 13.6347 15.0151C13.2591 15.0467 13.1629 15.5087 13.415 15.7889C14.3198 16.7941 14.6998 17.9918 14.864 18.8128ZM13.5276 17.8332C13.7713 18.4159 13.2918 19 12.6602 19H11.1328C10.5313 19 10.0787 18.4711 10.2798 17.9042C10.4699 17.3683 10.7798 16.7226 11.2749 16.1763C11.5534 15.869 12.022 15.8468 12.3326 16.1214C12.9049 16.6274 13.2808 17.2429 13.5276 17.8332Z" fill="#65a30d"/>
|
||||
@@ -91,14 +91,14 @@ function loadDataAjax() {
|
||||
</svg>
|
||||
افزودن پرسنل
|
||||
</button>
|
||||
<button onclick="editGroup(${item.id})" class="btn-edit position-relative" style="width: 110px;margin: 2px 0;padding: 0;font-weight: 600;font-size: 12px;">
|
||||
<button onclick="editGroup(${item.id})" class="btn-edit position-relative widthBtn">
|
||||
<svg width="24" height="24" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.6027 6.838L5.85304 13.5876C5.84201 13.5987 5.83107 13.6096 5.8202 13.6204C5.65773 13.7825 5.5139 13.9261 5.41254 14.1051C5.31117 14.2841 5.2621 14.4813 5.20667 14.704C5.20296 14.7189 5.19923 14.7339 5.19545 14.7491L4.5813 17.2057C4.57908 17.2145 4.57686 17.2234 4.57462 17.2323C4.53537 17.389 4.49347 17.5564 4.47972 17.6969C4.46458 17.8516 4.46811 18.1127 4.67752 18.3221L5.03035 17.9693L4.67752 18.3221C4.88693 18.5315 5.14799 18.535 5.30272 18.5199C5.44326 18.5062 5.6106 18.4643 5.76728 18.425C5.77622 18.4228 5.78512 18.4205 5.79398 18.4183L8.25057 17.8042C8.26569 17.8004 8.28069 17.7967 8.29558 17.793C8.51832 17.7375 8.71549 17.6885 8.89452 17.5871C9.07356 17.4857 9.21708 17.3419 9.37921 17.1794C9.39005 17.1686 9.40097 17.1576 9.412 17.1466L16.1616 10.397L16.1849 10.3737C16.4983 10.0603 16.7684 9.79025 16.9556 9.54492C17.1562 9.282 17.3081 8.98958 17.3081 8.6292C17.3081 8.26759 17.1541 7.97384 16.9522 7.71001C16.7633 7.46303 16.4905 7.1903 16.1731 6.87292L16.1499 6.84972L16.1267 6.82652C15.8093 6.5091 15.5366 6.23634 15.2896 6.04738C15.0258 5.84553 14.732 5.69156 14.3704 5.69156C14.01 5.69156 13.7176 5.84345 13.4547 6.04405C13.2094 6.23123 12.9393 6.5013 12.6259 6.81474L12.6027 6.838Z" stroke-width="1.5" stroke="#4DA9D1"></path>
|
||||
<path d="M11.9939 7.20397L14.8457 5.30273L17.6976 8.15459L15.7964 11.0064L11.9939 7.20397Z" fill="#4DA9D1"></path>
|
||||
</svg>
|
||||
ویرایش
|
||||
</button>
|
||||
<button type="button" class="btn-delete2" onclick="removeGroupConfirm(${item.id})" style="width: 110px;padding: 0;font-weight: 600;font-size: 12px;">
|
||||
<button type="button" class="btn-delete2 widthBtn" onclick="removeGroupConfirm(${item.id})">
|
||||
<svg width="24" height="24" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.26733 12.4805L8.26733 10.036" stroke="#F63D3D" stroke-linecap="round" />
|
||||
<path d="M12.2865 12.4805L12.2865 10.036" stroke="#F63D3D" stroke-linecap="round" />
|
||||
|
||||
@@ -345,11 +345,11 @@ $(document).on('keyup', ".dateTime, .form-control-date", function () {
|
||||
}
|
||||
}
|
||||
|
||||
if (startDate.length >= 10 && endDate.length >= 10) {
|
||||
if (!validateDates(startDate, endDate)) {
|
||||
showAlert('حضور غیاب در حال ویرایش را نمیتوانید بیشتر از یک روز از ثبت حضور غیاب عقب تر یا جلو تر ببرید', $input);
|
||||
}
|
||||
}
|
||||
//if (startDate.length >= 10 && endDate.length >= 10) {
|
||||
// if (!validateDates(startDate, endDate)) {
|
||||
// showAlert('حضور غیاب در حال ویرایش را نمیتوانید بیشتر از یک روز از ثبت حضور غیاب عقب تر یا جلو تر ببرید', $input);
|
||||
// }
|
||||
//}
|
||||
|
||||
if (startDate.length >= 10 && startTime.length >= 5 && endDate.length >= 10 && endTime.length >= 5) {
|
||||
totalWorkingDataLoad(startDate, startTime, endDate, endTime, $groupBox);
|
||||
@@ -358,9 +358,9 @@ $(document).on('keyup', ".dateTime, .form-control-date", function () {
|
||||
updateAddButtonText(currentCount);
|
||||
});
|
||||
|
||||
function validateDates(startDate, endDate) {
|
||||
return itemsEditableDatesData.some(entry => entry.startFa === startDate && entry.endFa === endDate);
|
||||
}
|
||||
//function validateDates(startDate, endDate) {
|
||||
// return itemsEditableDatesData.some(entry => entry.startFa === startDate && entry.endFa === endDate);
|
||||
//}
|
||||
|
||||
|
||||
function dayOfWeekLoad(input, value) {
|
||||
@@ -525,7 +525,7 @@ function toggleHeightControl() {
|
||||
|
||||
|
||||
|
||||
var itemsEditableDatesData = [];
|
||||
//var itemsEditableDatesData = [];
|
||||
// Function to handle the AJAX request and generate HTML for roll call data
|
||||
function fetchAndDisplayRollCallData(employeeId, dateFa) {
|
||||
let htmlElement = '';
|
||||
@@ -540,7 +540,7 @@ function fetchAndDisplayRollCallData(employeeId, dateFa) {
|
||||
data: { 'employeeId': employeeId, 'date': dateFa },
|
||||
success: function (response) {
|
||||
const rollCallData = response.data;
|
||||
itemsEditableDatesData = response.editableDates;
|
||||
//itemsEditableDatesData = response.editableDates;
|
||||
|
||||
// console.log(response);
|
||||
|
||||
|
||||
@@ -374,11 +374,11 @@ $(document).on('keyup', ".dateTime, .form-control-date", function () {
|
||||
}
|
||||
}
|
||||
|
||||
if (startDate.length >= 10 && endDate.length >= 10) {
|
||||
if (!validateDates(startDate, endDate)) {
|
||||
showAlert('حضور غیاب در حال ویرایش را نمیتوانید بیشتر از یک روز از ثبت حضور غیاب عقب تر یا جلو تر ببرید', $input);
|
||||
}
|
||||
}
|
||||
//if (startDate.length >= 10 && endDate.length >= 10) {
|
||||
// if (!validateDates(startDate, endDate)) {
|
||||
// showAlert('حضور غیاب در حال ویرایش را نمیتوانید بیشتر از یک روز از ثبت حضور غیاب عقب تر یا جلو تر ببرید', $input);
|
||||
// }
|
||||
//}
|
||||
|
||||
if (startDate.length >= 10 && startTime.length >= 5 && endDate.length >= 10 && endTime.length >= 5) {
|
||||
totalWorkingDataLoad(startDate, startTime, endDate, endTime, $groupBox);
|
||||
@@ -387,9 +387,9 @@ $(document).on('keyup', ".dateTime, .form-control-date", function () {
|
||||
updateAddButtonText(currentCount);
|
||||
});
|
||||
|
||||
function validateDates(startDate, endDate) {
|
||||
return itemsEditableDatesData.some(entry => entry.startFa === startDate && entry.endFa === endDate);
|
||||
}
|
||||
//function validateDates(startDate, endDate) {
|
||||
// return itemsEditableDatesData.some(entry => entry.startFa === startDate && entry.endFa === endDate);
|
||||
//}
|
||||
|
||||
function dayOfWeekLoad(input, value) {
|
||||
$.ajax({
|
||||
@@ -488,11 +488,33 @@ $('.btn-register').click(function () {
|
||||
if (urlPathname.indexOf('/Client/Company/WorkFlow/RollCall') > -1) {
|
||||
_RefreshCountMenu();
|
||||
CountWorkFlowOfAbsentAndCut();
|
||||
LoadWorkFlowsCutList();
|
||||
loadWorkFlowsAbsentsList();
|
||||
loadWorkFlowEmployeesWithoutLunchBreakList();
|
||||
loadUndefinedRollCallsList();
|
||||
loadOverlappingLeavesList();
|
||||
//LoadWorkFlowsCutList();
|
||||
//loadWorkFlowsAbsentsList();
|
||||
//loadWorkFlowEmployeesWithoutLunchBreakList();
|
||||
//loadUndefinedRollCallsList();
|
||||
//loadOverlappingLeavesList();
|
||||
|
||||
var menuActive = $('#navbar-animmenu li.active').data('menu');
|
||||
switch (menuActive) {
|
||||
case "absent":
|
||||
loadWorkFlowsAbsentsList();
|
||||
break;
|
||||
case "cut":
|
||||
LoadWorkFlowsCutList();
|
||||
break;
|
||||
case "lunchBreak":
|
||||
loadWorkFlowEmployeesWithoutLunchBreakList();
|
||||
break;
|
||||
case "undefined":
|
||||
loadUndefinedRollCallsList();
|
||||
break;
|
||||
case "overlappingLeave":
|
||||
loadOverlappingLeavesList();
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
|
||||
$('#MainModal').modal('hide');
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,6 @@
|
||||
setTimeout(function () {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
|
||||
}, 1500);
|
||||
|
||||
$('#printSingleID').val(response.printID);
|
||||
@@ -145,8 +144,26 @@
|
||||
//$('#MainModal').modal('hide');
|
||||
_RefreshCountMenu();
|
||||
CountWorkFlowOfAbsentAndCut();
|
||||
loadWorkFlowsAbsentsList();
|
||||
LoadWorkFlowsCutList();
|
||||
|
||||
var menuActive = $('#navbar-animmenu li.active').data('menu');
|
||||
switch (menuActive) {
|
||||
case "absent":
|
||||
loadWorkFlowsAbsentsList();
|
||||
break;
|
||||
case "cut":
|
||||
LoadWorkFlowsCutList();
|
||||
break;
|
||||
case "lunchBreak":
|
||||
loadWorkFlowEmployeesWithoutLunchBreakList();
|
||||
break;
|
||||
case "undefined":
|
||||
loadUndefinedRollCallsList();
|
||||
break;
|
||||
case "overlappingLeave":
|
||||
loadOverlappingLeavesList();
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
|
||||
@@ -1,42 +1,63 @@
|
||||
var lengthMenu = 0;
|
||||
var loadFunctionAbsent = true;
|
||||
var loadFunctionCut = true;
|
||||
var loadFunctionLunchBreak = true;
|
||||
var loadFunctionUndefined = true;
|
||||
var loadFunctionOverlappingLeaves = true;
|
||||
|
||||
loadMenuAnime();
|
||||
$(document).ready(function () {
|
||||
LoadWorkFlowsCutList();
|
||||
CountWorkFlowOfAbsentAndCut();
|
||||
loadWorkFlowsAbsentsList();
|
||||
loadWorkFlowEmployeesWithoutLunchBreakList();
|
||||
loadUndefinedRollCallsList();
|
||||
loadOverlappingLeavesList();
|
||||
loadMenuAnime();
|
||||
//LoadWorkFlowsCutList();
|
||||
//loadWorkFlowEmployeesWithoutLunchBreakList();
|
||||
//loadUndefinedRollCallsList();
|
||||
//loadOverlappingLeavesList();
|
||||
|
||||
$("#clickAbsentTab").click(function () {
|
||||
$('.cutWorkFlowLists, .lunchBreakWorkFlowLists, .undefinedWorkFlowLists, .overlappingLeavesLists').fadeOut(200, function () {
|
||||
$('.absentWorkFlowLists').fadeIn(200);
|
||||
});
|
||||
if (loadFunctionAbsent) {
|
||||
loadWorkFlowsAbsentsList();
|
||||
}
|
||||
});
|
||||
|
||||
$("#clickCutTab").click(function () {
|
||||
$('.absentWorkFlowLists, .lunchBreakWorkFlowLists, .undefinedWorkFlowLists, .overlappingLeavesLists').fadeOut(200, function () {
|
||||
$('.cutWorkFlowLists').fadeIn(200);
|
||||
});
|
||||
if (loadFunctionCut) {
|
||||
LoadWorkFlowsCutList();
|
||||
}
|
||||
});
|
||||
|
||||
$("#clickLunchBreakTab").click(function () {
|
||||
$('.absentWorkFlowLists, .cutWorkFlowLists, .undefinedWorkFlowLists, .overlappingLeavesLists').fadeOut(200, function () {
|
||||
$('.lunchBreakWorkFlowLists').fadeIn(200);
|
||||
});
|
||||
if (loadFunctionLunchBreak) {
|
||||
loadWorkFlowEmployeesWithoutLunchBreakList();
|
||||
}
|
||||
});
|
||||
|
||||
$("#clickUndefinedTab").click(function () {
|
||||
$('.absentWorkFlowLists, .cutWorkFlowLists, .lunchBreakWorkFlowLists, .overlappingLeavesLists').fadeOut(200, function () {
|
||||
$('.undefinedWorkFlowLists').fadeIn(200);
|
||||
});
|
||||
if (loadFunctionUndefined) {
|
||||
loadUndefinedRollCallsList();
|
||||
}
|
||||
});
|
||||
|
||||
$("#clickOverlappingLeavesTab").click(function () {
|
||||
$('.absentWorkFlowLists, .cutWorkFlowLists, .lunchBreakWorkFlowLists, .undefinedWorkFlowLists').fadeOut(200, function () {
|
||||
$('.overlappingLeavesLists').fadeIn(200);
|
||||
});
|
||||
});
|
||||
//$("#clickOverlappingLeavesTab").click(function () {
|
||||
// $('.absentWorkFlowLists, .cutWorkFlowLists, .lunchBreakWorkFlowLists, .undefinedWorkFlowLists').fadeOut(200, function () {
|
||||
// $('.overlappingLeavesLists').fadeIn(200);
|
||||
// });
|
||||
// if (loadFunctionOverlappingLeaves) {
|
||||
// loadOverlappingLeavesList();
|
||||
// }
|
||||
//});
|
||||
});
|
||||
|
||||
function loadMenuAnime() {
|
||||
@@ -88,8 +109,24 @@ function loadMenuAnime() {
|
||||
$('.accountListHead').text($(this).find('a').text());
|
||||
var targetForm = $(this).data('target');
|
||||
$('#' + targetForm).show();
|
||||
|
||||
});
|
||||
|
||||
//$("#navbar-animmenu").on("click", "li", function (e) {
|
||||
// var targetForm = $(this).data('target');
|
||||
// $('#navbar-animmenu ul li').removeClass("active");
|
||||
// $(this).addClass('active');
|
||||
|
||||
// var activeHeightNewAnimHeight = $(this).innerHeight();
|
||||
// var itemPosNewAnimTop = $(this).position();
|
||||
|
||||
// $(".verti-selector").stop(true, true).animate({
|
||||
// "top": itemPosNewAnimTop.top + "px",
|
||||
// "height": activeHeightNewAnimHeight + "px"
|
||||
// }, 300); // انیمیشن با مدت زمان 300 میلیثانیه
|
||||
|
||||
// $('.form-section').fadeOut(200);
|
||||
// $('#' + targetForm).fadeIn(300); // انیمیشن تغییر صفحه
|
||||
//});
|
||||
}
|
||||
|
||||
$(document).on('click', ".openActionMain", function () {
|
||||
@@ -109,21 +146,23 @@ $(document).on('click', ".openAction", function () {
|
||||
});
|
||||
|
||||
function loadWorkFlowsAbsentsList() {
|
||||
$('#loadingSkeletonAbsent').show();
|
||||
var mainIndexNum = 1;
|
||||
|
||||
var html = ``;
|
||||
$.ajax({
|
||||
async: false,
|
||||
//async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadWorkFlowsAbsentsListUrl,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
beforeSend: function () {
|
||||
this.startTime = new Date().getTime();
|
||||
},
|
||||
//beforeSend: function () {
|
||||
// this.startTime = new Date().getTime();
|
||||
//},
|
||||
success: function (response) {
|
||||
var data = response.data;
|
||||
$('#loadingSkeletonAbsent').hide();
|
||||
|
||||
if (response.success) {
|
||||
if (data.length > 0) {
|
||||
@@ -185,16 +224,17 @@ function loadWorkFlowsAbsentsList() {
|
||||
|
||||
$('#loadRollCallAbsentWorkFlow').html(html);
|
||||
$('#loadRollCallAbsentWorkFlowMobile').html(html);
|
||||
loadFunctionAbsent = false;
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
},
|
||||
complete: function () {
|
||||
const endTime = new Date().getTime();
|
||||
const timeTaken = endTime - this.startTime;
|
||||
console.log(`loadWorkFlowsAbsentsList AJAX request completed in ${timeTaken} ms`);
|
||||
}
|
||||
//complete: function () {
|
||||
// const endTime = new Date().getTime();
|
||||
// const timeTaken = endTime - this.startTime;
|
||||
// console.log(`loadWorkFlowsAbsentsList AJAX request completed in ${timeTaken} ms`);
|
||||
//}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -287,22 +327,21 @@ function loadEmployeeListByWorkFlowsAbsents(date) {
|
||||
});
|
||||
}
|
||||
|
||||
function LoadWorkFlowsCutList() {
|
||||
async function LoadWorkFlowsCutList() {
|
||||
$('#loadingSkeletonCut').show();
|
||||
var mainIndexNumCutBySystem = 1;
|
||||
|
||||
var htmlCutList = ``;
|
||||
$.ajax({
|
||||
async: false,
|
||||
//async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadWorkFlowsCutListUrl,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
beforeSend: function () {
|
||||
this.startTime = new Date().getTime();
|
||||
},
|
||||
success: function (response) {
|
||||
var data = response.data;
|
||||
$('#loadingSkeletonCut').hide();
|
||||
|
||||
if (response.success) {
|
||||
if (data.length > 0) {
|
||||
@@ -362,15 +401,11 @@ function LoadWorkFlowsCutList() {
|
||||
}
|
||||
$('#loadRollCallCutWorkFlow').html(htmlCutList);
|
||||
$('#loadRollCallCutWorkFlowMobile').html(htmlCutList);
|
||||
loadFunctionCut = false;
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
},
|
||||
complete: function () {
|
||||
const endTime = new Date().getTime();
|
||||
const timeTaken = endTime - this.startTime;
|
||||
console.log(`LoadWorkFlowsCutList AJAX request completed in ${timeTaken} ms`);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -461,12 +496,13 @@ function loadEmployeeListByWorkFlowsCut(date) {
|
||||
});
|
||||
}
|
||||
|
||||
function loadWorkFlowEmployeesWithoutLunchBreakList() {
|
||||
async function loadWorkFlowEmployeesWithoutLunchBreakList() {
|
||||
var mainIndexNumLunchBreak = 1;
|
||||
$('#loadingSkeletonLunchBreak').show();
|
||||
|
||||
var htmlLunchBreakList = ``;
|
||||
$.ajax({
|
||||
async: false,
|
||||
//async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
@@ -474,6 +510,7 @@ function loadWorkFlowEmployeesWithoutLunchBreakList() {
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
var data = response.data;
|
||||
$('#loadingSkeletonLunchBreak').hide();
|
||||
|
||||
if (response.success) {
|
||||
if (data.length > 0) {
|
||||
@@ -533,6 +570,7 @@ function loadWorkFlowEmployeesWithoutLunchBreakList() {
|
||||
}
|
||||
$('#loadRollCallLunchBreakWorkFlow').html(htmlLunchBreakList);
|
||||
$('#loadRollCallLunchBreakWorkFlowMobile').html(htmlLunchBreakList);
|
||||
loadFunctionLunchBreak = false;
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
@@ -628,12 +666,13 @@ function loadEmployeeListByWorkFlowsEmployeesWithoutLunchBreak(date) {
|
||||
});
|
||||
}
|
||||
|
||||
function loadUndefinedRollCallsList() {
|
||||
async function loadUndefinedRollCallsList() {
|
||||
var mainIndexNumUndefined = 1;
|
||||
$('#loadingSkeletonUndefined').show();
|
||||
|
||||
var htmlUndefinedList = ``;
|
||||
$.ajax({
|
||||
async: false,
|
||||
//async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
@@ -641,6 +680,7 @@ function loadUndefinedRollCallsList() {
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
var data = response.data;
|
||||
$('#loadingSkeletonUndefined').hide();
|
||||
|
||||
if (response.success) {
|
||||
if (data.length > 0) {
|
||||
@@ -701,6 +741,7 @@ function loadUndefinedRollCallsList() {
|
||||
|
||||
$('#loadRollCallUndefinedWorkFlow').html(htmlUndefinedList);
|
||||
$('#loadRollCallUndefinedWorkFlowMobile').html(htmlUndefinedList);
|
||||
loadFunctionUndefined = false;
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
@@ -792,12 +833,13 @@ function loadEmployeeListByUndefinedRollCalls(date) {
|
||||
});
|
||||
}
|
||||
|
||||
function loadOverlappingLeavesList() {
|
||||
async function loadOverlappingLeavesList() {
|
||||
var mainIndexNumOverlappingLeaves = 1;
|
||||
$('#loadingSkeletonOverlappingLeaves').show();
|
||||
|
||||
var htmlOverlappingLeavesList = ``;
|
||||
$.ajax({
|
||||
async: false,
|
||||
//async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
@@ -805,6 +847,7 @@ function loadOverlappingLeavesList() {
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
var data = response.data;
|
||||
$('#loadingSkeletonOverlappingLeaves').hide();
|
||||
|
||||
if (response.success) {
|
||||
if (data.length > 0) {
|
||||
@@ -864,6 +907,7 @@ function loadOverlappingLeavesList() {
|
||||
}
|
||||
$('#loadOverlappingLeaves').html(htmlOverlappingLeavesList);
|
||||
$('#loadOverlappingLeavesMobile').html(htmlOverlappingLeavesList);
|
||||
loadFunctionOverlappingLeaves = false;
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
@@ -1142,15 +1186,16 @@ function confirmWithoutLunchBreak(rollCallId) {
|
||||
});
|
||||
}
|
||||
|
||||
function CountWorkFlowOfAbsentAndCut() {
|
||||
async function CountWorkFlowOfAbsentAndCut() {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'Get',
|
||||
url: loadCountWorkFlowOfAbsentAndCut,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('.spinner-grow').hide();
|
||||
|
||||
if (response.dataAbsent === 0) {
|
||||
$('#CountAbsent').hide();
|
||||
$('#CountAbsentMobile').hide();
|
||||
@@ -1181,8 +1226,7 @@ function CountWorkFlowOfAbsentAndCut() {
|
||||
$('#CountLunchBreakMobile').text(response.dataLunchBreak);
|
||||
}
|
||||
|
||||
|
||||
if (response.dataUndefined === 0) {
|
||||
if (response.dataUndefined === 0) {
|
||||
$('#CountUndefined').hide();
|
||||
$('#CountUndefinedMobile').hide();
|
||||
} else {
|
||||
|
||||
@@ -7,31 +7,32 @@ namespace WorkFlow.Application.Contracts.WorkFlow;
|
||||
|
||||
public interface IWorkFlowApplication
|
||||
{
|
||||
OperationResult CreateRollCallConfirmedAbsence(CreateRollCallConfirmedAbsence command);
|
||||
OperationResult CreateRollCallConfirmedWithoutLunchBreak(CreateRollCallConfirmedWithoutLunchBreak command);
|
||||
Task<OperationResult> CreateRollCallConfirmedAbsence(CreateRollCallConfirmedAbsence command);
|
||||
Task<OperationResult> CreateRollCallConfirmedWithoutLunchBreak(CreateRollCallConfirmedWithoutLunchBreak command);
|
||||
|
||||
|
||||
int GetCountAllWorkFlows(long workshopId);
|
||||
int GetRollCallAbsentsWorkFlows(long workshopId);
|
||||
int GetCountCutRollCallByBgService(long workshopId);
|
||||
int GetAllWorkFlowCount(long workshopId);
|
||||
Task<int> GetCountAllWorkFlows(long workshopId);
|
||||
Task<int> GetRollCallAbsentsWorkFlows(long workshopId);
|
||||
Task<int> GetCountCutRollCallByBgService(long workshopId);
|
||||
Task<int> GetAllWorkFlowCount(long workshopId);
|
||||
Task<int> GetAllWorkFlowCountAsync(long workshopId);
|
||||
|
||||
DailyRollCallWorkFlowViewModel GetAbsentRollCallWorkFlowsByDate(long workshopId, DateTime date);
|
||||
DailyRollCallConfirmedWithoutLunchBreakViewModel GetEmployeesWithoutLunchBreakByDate(long workshopId, DateTime date);
|
||||
DailyRollCallWorkFlowViewModel GetRollCallWorkFlowsCutByBgServiceByDate(long workshopId, DateTime date);
|
||||
DailyRollCallWorkFlowViewModel GetUndefinedRollCallsByDate(long workshopId, DateTime date);
|
||||
Task<DailyRollCallWorkFlowViewModel> GetAbsentRollCallWorkFlowsByDate(long workshopId, DateTime date);
|
||||
Task<DailyRollCallConfirmedWithoutLunchBreakViewModel> GetEmployeesWithoutLunchBreakByDate(long workshopId, DateTime date);
|
||||
Task<DailyRollCallWorkFlowViewModel> GetRollCallWorkFlowsCutByBgServiceByDate(long workshopId, DateTime date);
|
||||
Task<DailyRollCallWorkFlowViewModel> GetUndefinedRollCallsByDate(long workshopId, DateTime date);
|
||||
|
||||
DailyWorkFlowEmployeesWithRollCallOnLeaveViewModel GetRollCallsOverlappingLeaveByDate(long workshopId,
|
||||
DateTime date);
|
||||
Task<DailyWorkFlowEmployeesWithRollCallOnLeaveViewModel> GetRollCallsOverlappingLeaveByDate(long workshopId,
|
||||
DateTime date);
|
||||
|
||||
List<RollCallConfirmAbsenceViewModel> GetConfirmAbsencesBy(long workshopId, DateTime start, DateTime end);
|
||||
List<DailyWorkFlowEmployeesWithRollCallOnLeaveViewModel> GetRollCallsOverlappingLeaves(long workshopId);
|
||||
List<DailyRollCallWorkFlowViewModel> GetRollCallWorkFlowsCutByBgService(long workshopId);
|
||||
List<DailyRollCallWorkFlowViewModel> GetAbsentRollCallWorkFlows(long workshopId);
|
||||
List<DailyRollCallWorkFlowViewModel> GetUndefinedRollCalls(long workshopId);
|
||||
Task<List<RollCallConfirmAbsenceViewModel>> GetConfirmAbsencesBy(long workshopId, DateTime start, DateTime end);
|
||||
Task<List<DailyWorkFlowEmployeesWithRollCallOnLeaveViewModel>> GetRollCallsOverlappingLeaves(long workshopId);
|
||||
Task<List<DailyRollCallWorkFlowViewModel>> GetRollCallWorkFlowsCutByBgService(long workshopId);
|
||||
Task<List<DailyRollCallWorkFlowViewModel>> GetAbsentRollCallWorkFlows(long workshopId);
|
||||
Task<List<DailyRollCallWorkFlowViewModel>> GetUndefinedRollCalls(long workshopId);
|
||||
|
||||
|
||||
|
||||
List<DailyRollCallConfirmedWithoutLunchBreakViewModel> GetEmployeesWithoutLunchBreak(long workshopId);
|
||||
List<(long Id, string Name)> GetEmployeesWithoutGroup(long workshopId);
|
||||
Task<List<DailyRollCallConfirmedWithoutLunchBreakViewModel>> GetEmployeesWithoutLunchBreak(long workshopId);
|
||||
Task<List<(long Id, string Name)>> GetEmployeesWithoutGroup(long workshopId);
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
_rollCallConfirmedWithoutLunchBreakRepository = rollCallConfirmedWithoutLunchBreakRepository;
|
||||
}
|
||||
|
||||
public OperationResult CreateRollCallConfirmedAbsence(CreateRollCallConfirmedAbsence command)
|
||||
public async Task<OperationResult> CreateRollCallConfirmedAbsence(CreateRollCallConfirmedAbsence command)
|
||||
{
|
||||
OperationResult op = new OperationResult();
|
||||
if (!command.AbsenceDate.TryToGeorgianDateTime(out var absenceDateGe))
|
||||
@@ -39,11 +39,11 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
command.ConfirmedByAccountId);
|
||||
|
||||
_absenceRepository.Create(entity);
|
||||
_absenceRepository.SaveChanges();
|
||||
await _absenceRepository.SaveChangesAsync();
|
||||
|
||||
return op.Succcedded();
|
||||
}
|
||||
public OperationResult CreateRollCallConfirmedWithoutLunchBreak(CreateRollCallConfirmedWithoutLunchBreak command)
|
||||
public async Task<OperationResult> CreateRollCallConfirmedWithoutLunchBreak(CreateRollCallConfirmedWithoutLunchBreak command)
|
||||
{
|
||||
OperationResult op = new();
|
||||
var entity = _rollCallACL.GetDetails(command.RollCallId);
|
||||
@@ -54,30 +54,30 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
var newEntity = new RollCallConfirmedWithoutLunchBreak(command.RollCallId, entity.EmployeeId, entity.WorkshopId, entity.RollCallDate);
|
||||
|
||||
_rollCallConfirmedWithoutLunchBreakRepository.Create(newEntity);
|
||||
_rollCallConfirmedWithoutLunchBreakRepository.SaveChanges();
|
||||
await _rollCallConfirmedWithoutLunchBreakRepository.SaveChangesAsync();
|
||||
|
||||
return op.Succcedded();
|
||||
}
|
||||
|
||||
public int GetCountAllWorkFlows(long workshopId)
|
||||
public async Task<int> GetCountAllWorkFlows(long workshopId)
|
||||
{
|
||||
int count = 0;
|
||||
count += GetAllWorkFlowCount(workshopId);
|
||||
count += await GetAllWorkFlowCount(workshopId);
|
||||
return count;
|
||||
}
|
||||
public int GetRollCallAbsentsWorkFlows(long workshopId)
|
||||
public Task<int> GetRollCallAbsentsWorkFlows(long workshopId)
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
|
||||
DateTime.Now.Date.AddMonthsFa(-2, out var twoMonthsAgo);
|
||||
|
||||
return _rollCallACL.GetRollCallAbsentsWorkFlowsCount(workshopId, now, twoMonthsAgo);
|
||||
return Task.FromResult(_rollCallACL.GetRollCallAbsentsWorkFlowsCount(workshopId, now, twoMonthsAgo));
|
||||
}
|
||||
public int GetCountCutRollCallByBgService(long workshopId)
|
||||
public async Task<int> GetCountCutRollCallByBgService(long workshopId)
|
||||
{
|
||||
return GetRollCallWorkFlowsCutByBgService(workshopId).Count;
|
||||
return (await GetRollCallWorkFlowsCutByBgService(workshopId)).Count;
|
||||
}
|
||||
public int GetAllWorkFlowCount(long workshopId)
|
||||
public async Task<int> GetAllWorkFlowCount(long workshopId)
|
||||
{
|
||||
var count = 0;
|
||||
var activeServiceByWorkshopId = _rollCallACL.GetActiveServiceByWorkshopId(workshopId);
|
||||
@@ -86,17 +86,22 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
return count;
|
||||
}
|
||||
//count += _rollCallACL.GetRollCallAbsentsWorkFlows(accId, workshopId);
|
||||
count += GetAbsentRollCallWorkFlows(workshopId)?.Count ?? 0;
|
||||
count += GetRollCallWorkFlowsCutByBgService(workshopId)?.Count ?? 0;
|
||||
count += GetEmployeesWithoutLunchBreak(workshopId)?.Count ?? 0;
|
||||
count += GetRollCallsOverlappingLeaves(workshopId)?.Count ?? 0;
|
||||
count += GetUndefinedRollCalls(workshopId)?.Count ?? 0;
|
||||
count += (await GetAbsentRollCallWorkFlows(workshopId))?.Count ?? 0;
|
||||
count += (await GetRollCallWorkFlowsCutByBgService(workshopId))?.Count ?? 0;
|
||||
count += (await GetEmployeesWithoutLunchBreak(workshopId))?.Count ?? 0;
|
||||
count += (await GetRollCallsOverlappingLeaves(workshopId))?.Count ?? 0;
|
||||
count += (await GetUndefinedRollCalls(workshopId))?.Count ?? 0;
|
||||
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
public DailyRollCallWorkFlowViewModel GetAbsentRollCallWorkFlowsByDate(long workshopId, DateTime date)
|
||||
public Task<int> GetAllWorkFlowCountAsync(long workshopId)
|
||||
{
|
||||
return Task.FromResult(20);
|
||||
}
|
||||
|
||||
public async Task<DailyRollCallWorkFlowViewModel> GetAbsentRollCallWorkFlowsByDate(long workshopId, DateTime date)
|
||||
{
|
||||
|
||||
var startOfDay = date.Date;
|
||||
@@ -110,7 +115,7 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
|
||||
var activeEmployees = _rollCallACL.GetActiveWorkshopRollCallEmployees(workshopId, startOfDay, endOfDay);
|
||||
|
||||
var confirmedAbssences = GetConfirmAbsencesBy(workshopId, startOfDay, endOfDay);
|
||||
var confirmedAbssences = await GetConfirmAbsencesBy(workshopId, startOfDay, endOfDay);
|
||||
|
||||
|
||||
//var groupedConfirmedAbssencesByDate = confirmedAbssences.GroupBy(x => x.AbsenceDate.Date).ToList();
|
||||
@@ -124,7 +129,7 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
|
||||
var allAbsencesInDate = absences.FirstOrDefault();
|
||||
if (allAbsencesInDate == null)
|
||||
return new();
|
||||
return await Task.FromResult(new DailyRollCallWorkFlowViewModel());
|
||||
|
||||
|
||||
var newItem = new DailyRollCallWorkFlowViewModel()
|
||||
@@ -173,7 +178,7 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
|
||||
return newItem;
|
||||
}
|
||||
public DailyRollCallConfirmedWithoutLunchBreakViewModel GetEmployeesWithoutLunchBreakByDate(long workshopId, DateTime date)
|
||||
public async Task<DailyRollCallConfirmedWithoutLunchBreakViewModel> GetEmployeesWithoutLunchBreakByDate(long workshopId, DateTime date)
|
||||
{
|
||||
var startOfDay = date.Date;
|
||||
var endOfDay = startOfDay.AddDays(1).Date.AddTicks(-1);
|
||||
@@ -209,7 +214,7 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
};
|
||||
|
||||
}
|
||||
public DailyRollCallWorkFlowViewModel GetRollCallWorkFlowsCutByBgServiceByDate(long workshopId, DateTime date)
|
||||
public async Task<DailyRollCallWorkFlowViewModel> GetRollCallWorkFlowsCutByBgServiceByDate(long workshopId, DateTime date)
|
||||
{
|
||||
var startOfDay = date.Date;
|
||||
var endOfDay = startOfDay.AddDays(1).Date.AddTicks(-1);
|
||||
@@ -241,7 +246,7 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
};
|
||||
return result;
|
||||
}
|
||||
public DailyRollCallWorkFlowViewModel GetUndefinedRollCallsByDate(long workshopId, DateTime date)
|
||||
public async Task<DailyRollCallWorkFlowViewModel> GetUndefinedRollCallsByDate(long workshopId, DateTime date)
|
||||
{
|
||||
var startOfDay = date.Date;
|
||||
var endOfDay = startOfDay.AddDays(1).Date.AddTicks(-1);
|
||||
@@ -275,7 +280,8 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
}
|
||||
|
||||
|
||||
public DailyWorkFlowEmployeesWithRollCallOnLeaveViewModel GetRollCallsOverlappingLeaveByDate(long workshopId, DateTime date)
|
||||
public async Task<DailyWorkFlowEmployeesWithRollCallOnLeaveViewModel> GetRollCallsOverlappingLeaveByDate(long workshopId,
|
||||
DateTime date)
|
||||
{
|
||||
var startOfDay = date.Date;
|
||||
var endOfDay = startOfDay.AddDays(1).Date.AddTicks(-1);
|
||||
@@ -315,50 +321,50 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
};
|
||||
return result;
|
||||
}
|
||||
public List<DailyWorkFlowEmployeesWithRollCallOnLeaveViewModel> GetRollCallsOverlappingLeaves(long workshopId)
|
||||
public async Task<List<DailyWorkFlowEmployeesWithRollCallOnLeaveViewModel>> GetRollCallsOverlappingLeaves(long workshopId)
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
DateTime.Now.Date.AddMonthsFa(-2, out var twoMonthsAgo);
|
||||
var lastCheckouts = _checkoutACL.GetLastCheckoutsByWorkshopIdForWorkFlow(workshopId, twoMonthsAgo, now);
|
||||
var activeEmployees = _rollCallACL.GetActiveWorkshopRollCallEmployees(workshopId, twoMonthsAgo, now);
|
||||
var rollCalls = _rollCallACL.GetRollCallsOverlappingLeaves(workshopId, twoMonthsAgo, now);
|
||||
return rollCalls
|
||||
.Select(x=> new DailyWorkFlowEmployeesWithRollCallOnLeaveViewModel()
|
||||
{
|
||||
Date = x.Date,
|
||||
DateFa = x.DateFa,
|
||||
EmployeesList = x.EmployeesList
|
||||
.Where(y => !lastCheckouts.Any(z => z.EmployeeId == y.EmployeeId &&
|
||||
z.CheckoutStart.Date <= x.Date.Date &&
|
||||
z.CheckoutEnd.Date >= x.Date.Date ) && activeEmployees.Any(z => y.EmployeeId == z.EmployeeId))
|
||||
.Select(e => new WorkFlowEmployeeWithRollCallOnLeaveViewModel()
|
||||
{
|
||||
EmployeeId = e.EmployeeId,
|
||||
EmployeeFullName = e.EmployeeFullName,
|
||||
LeaveId = e.LeaveId,
|
||||
EndOfOverlapTime = e.EndOfOverlapTime,
|
||||
StartOfOverlapTime = e.StartOfOverlapTime,
|
||||
RollCallId = e.RollCallId,
|
||||
EndOfOverlapDateFa = e.EndOfOverlapDateFa,
|
||||
EndOfOverlapDateTime = e.EndOfOverlapDateTime,
|
||||
StartOfOverlapDateFa = e.StartOfOverlapDateFa,
|
||||
StartOfOverlapDateTime = e.StartOfOverlapDateTime
|
||||
}).ToList(),
|
||||
DayOfWeek = x.DayOfWeek
|
||||
})
|
||||
.Where(y => y.EmployeesList != null && y.EmployeesList.Any())
|
||||
.OrderBy(x => x.Date).ToList();
|
||||
var now = DateTime.Now;
|
||||
DateTime.Now.Date.AddMonthsFa(-2, out var twoMonthsAgo);
|
||||
var lastCheckouts = _checkoutACL.GetLastCheckoutsByWorkshopIdForWorkFlow(workshopId, twoMonthsAgo, now);
|
||||
var activeEmployees = _rollCallACL.GetActiveWorkshopRollCallEmployees(workshopId, twoMonthsAgo, now);
|
||||
var rollCalls = _rollCallACL.GetRollCallsOverlappingLeaves(workshopId, twoMonthsAgo, now);
|
||||
return rollCalls
|
||||
.Select(x => new DailyWorkFlowEmployeesWithRollCallOnLeaveViewModel()
|
||||
{
|
||||
Date = x.Date,
|
||||
DateFa = x.DateFa,
|
||||
EmployeesList = x.EmployeesList
|
||||
.Where(y => !lastCheckouts.Any(z => z.EmployeeId == y.EmployeeId &&
|
||||
z.CheckoutStart.Date <= x.Date.Date &&
|
||||
z.CheckoutEnd.Date >= x.Date.Date) && activeEmployees.Any(z => y.EmployeeId == z.EmployeeId))
|
||||
.Select(e => new WorkFlowEmployeeWithRollCallOnLeaveViewModel()
|
||||
{
|
||||
EmployeeId = e.EmployeeId,
|
||||
EmployeeFullName = e.EmployeeFullName,
|
||||
LeaveId = e.LeaveId,
|
||||
EndOfOverlapTime = e.EndOfOverlapTime,
|
||||
StartOfOverlapTime = e.StartOfOverlapTime,
|
||||
RollCallId = e.RollCallId,
|
||||
EndOfOverlapDateFa = e.EndOfOverlapDateFa,
|
||||
EndOfOverlapDateTime = e.EndOfOverlapDateTime,
|
||||
StartOfOverlapDateFa = e.StartOfOverlapDateFa,
|
||||
StartOfOverlapDateTime = e.StartOfOverlapDateTime
|
||||
}).ToList(),
|
||||
DayOfWeek = x.DayOfWeek
|
||||
})
|
||||
.Where(y => y.EmployeesList != null && y.EmployeesList.Any())
|
||||
.OrderBy(x => x.Date).ToList();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<RollCallConfirmAbsenceViewModel> GetConfirmAbsencesBy(long workshopId, DateTime start, DateTime end)
|
||||
public async Task<List<RollCallConfirmAbsenceViewModel>> GetConfirmAbsencesBy(long workshopId, DateTime start, DateTime end)
|
||||
{
|
||||
return _absenceRepository.GetConfirmAbsencesBy(workshopId, start, end);
|
||||
}
|
||||
|
||||
public List<DailyRollCallWorkFlowViewModel> GetUndefinedRollCalls(long workshopId)
|
||||
public async Task<List<DailyRollCallWorkFlowViewModel>> GetUndefinedRollCalls(long workshopId)
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
|
||||
@@ -388,14 +394,14 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
}).Where(y => y.RollCallWorkFlowPerDayViewModels != null && y.RollCallWorkFlowPerDayViewModels.Any()).OrderBy(x => x.DateTime).ToList();
|
||||
}
|
||||
|
||||
public List<DailyRollCallWorkFlowViewModel> GetRollCallWorkFlowsCutByBgService(long workshopId)
|
||||
public async Task<List<DailyRollCallWorkFlowViewModel>> GetRollCallWorkFlowsCutByBgService(long workshopId)
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
var yesterday = now.AddDays(-1).Date;
|
||||
|
||||
DateTime.Now.Date.AddMonthsFa(-2, out var twoMonthsAgo);
|
||||
|
||||
var lastCheckouts = _checkoutACL.GetLastCheckoutsByWorkshopIdForWorkFlow(workshopId, twoMonthsAgo, now);
|
||||
var rollCalls = _rollCallACL.GetRollCallWorkFlowsCutByBgService(workshopId, twoMonthsAgo, yesterday);
|
||||
var rollCalls = _rollCallACL.GetRollCallWorkFlowsCutByBgService(workshopId, twoMonthsAgo, now.AddDays(-1).Date);
|
||||
var activeEmployees = _rollCallACL.GetActiveWorkshopRollCallEmployees(workshopId, twoMonthsAgo, now);
|
||||
return rollCalls.Select(x => new DailyRollCallWorkFlowViewModel()
|
||||
{
|
||||
@@ -413,9 +419,10 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
RollCallId = e.RollCallId
|
||||
}).ToList(),
|
||||
DayOfWeekFa = x.DateTime.DayOfWeek.DayOfWeeKToPersian()
|
||||
}).Where(y => y.RollCallWorkFlowPerDayViewModels != null && y.RollCallWorkFlowPerDayViewModels.Any()).OrderBy(x => x.DateTime).ToList();
|
||||
}).Where(y => y.RollCallWorkFlowPerDayViewModels != null && y.RollCallWorkFlowPerDayViewModels.Any())
|
||||
.OrderBy(x => x.DateTime).ToList();
|
||||
}
|
||||
public List<DailyRollCallWorkFlowViewModel> GetAbsentRollCallWorkFlows(long workshopId)
|
||||
public async Task<List<DailyRollCallWorkFlowViewModel>> GetAbsentRollCallWorkFlows(long workshopId)
|
||||
{
|
||||
|
||||
var now = DateTime.Now;
|
||||
@@ -428,7 +435,7 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
var absences = _rollCallACL.GetAbsentRollCallWorkFlows(workshopId, twoMonthsAgo, now.AddDays(-1).Date);
|
||||
var activeEmployees = _rollCallACL.GetActiveWorkshopRollCallEmployees(workshopId, twoMonthsAgo, now);
|
||||
|
||||
var confirmedAbssences = GetConfirmAbsencesBy(workshopId, twoMonthsAgo,
|
||||
var confirmedAbssences = await GetConfirmAbsencesBy(workshopId, twoMonthsAgo,
|
||||
now);
|
||||
|
||||
|
||||
@@ -484,7 +491,7 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
}
|
||||
return result.OrderBy(x => x.DateTime).ToList();
|
||||
}
|
||||
public List<DailyRollCallConfirmedWithoutLunchBreakViewModel> GetEmployeesWithoutLunchBreak(long workshopId)
|
||||
public async Task<List<DailyRollCallConfirmedWithoutLunchBreakViewModel>> GetEmployeesWithoutLunchBreak(long workshopId)
|
||||
{
|
||||
var now = DateTime.Now.Date;
|
||||
|
||||
@@ -518,7 +525,7 @@ public class WorkFlowApplication : IWorkFlowApplication
|
||||
}).ToList();
|
||||
|
||||
}
|
||||
public List<(long Id, string Name)> GetEmployeesWithoutGroup(long workshopId)
|
||||
public async Task<List<(long Id, string Name)>> GetEmployeesWithoutGroup(long workshopId)
|
||||
{
|
||||
return _customizedWorkshopSettingsACL.GetEmployeesWithoutGroup(workshopId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user