From 8d9cf99e5f73f23878002944366a59b50d28214c Mon Sep 17 00:00:00 2001 From: SamSys Date: Sun, 8 Sep 2024 20:33:16 +0330 Subject: [PATCH] rollcall poya version 0 --- 0_Framework/Application/Version.cs | 6 +- .../RollCallAgg/IRollCallRepository.cs | 4 +- .../RollCall/AbsentEmployeeViewModel.cs | 1 + .../CheckoutDailyRollCallViewModel.cs | 4 +- .../EmployeeRollCallsByMonthViewModel.cs | 17 + .../RollCall/IRollCallApplication.cs | 8 +- .../RollCall/RollCallViewModel.cs | 35 +- .../RollCall/RollCallsByDateViewModel.cs | 2 + .../RollCallApplication.cs | 62 +- .../Repository/RollCallRepository.cs | 596 ++- .../Repository/YearlySalaryRepository.cs | 2 +- .../Company/Checkouts/CheckoutPrintAll.cshtml | 9 +- .../Pages/Company/Checkouts/Index.cshtml.cs | 4 +- .../Pages/Company/Checkouts/PrintAll.cshtml | 4158 ++++++++++------- .../Pages/Company/Checkouts/PrintOne.cshtml | 159 +- .../Company/Checkouts/PrintOneRollCall.cshtml | 74 +- .../_Partials/PrintDetailsRollCallRaw.cshtml | 445 ++ .../Employees/ContractCheckoutStatus.cshtml | 14 +- .../Company/Partial/_EmptySection.cshtml | 2 +- .../Company/Profile/ChangePassword.cshtml | 176 +- .../Pages/Company/RollCall/CaseHistory.cshtml | 199 +- .../Company/RollCall/CaseHistory.cshtml.cs | 54 +- .../Pages/Company/RollCall/CurrentDay.cshtml | 349 +- .../Company/RollCall/CurrentDay.cshtml.cs | 131 +- .../RollCall/EmployeeUploadPicture.cshtml.cs | 11 +- .../Pages/Company/RollCall/Index.cshtml | 63 +- .../RollCall/ModalCameraAccount.cshtml | 2 +- .../Company/RollCall/ModalOTPAction.cshtml | 2 +- .../Pages/Company/RollCall/Plans.cshtml | 229 +- .../Pages/Company/RollCall/Plans.cshtml.cs | 45 +- .../Company/Ticket/DetailTicketModal.cshtml | 4 +- ServiceHost/Areas/Client/Pages/Index.cshtml | 44 +- .../Areas/Client/Pages/LeaveCreate.cshtml | 659 +-- .../Areas/Client/Pages/LeaveList.cshtml | 499 +- ServiceHost/ServiceHost.csproj | 35 +- ServiceHost/wwwroot/AssetsClient/css/card.css | 4 + .../AssetsClient/css/rollcall-list-table.css | 262 +- .../AssetsClient/css/rollcall-package.css | 20 + .../wwwroot/AssetsClient/css/style.css | 6 +- .../ticket-global/ticket-create-global.css | 1 + .../wwwroot/AssetsClient/images/addUser.png | Bin 0 -> 1655 bytes .../AssetsClient/images/changePlan.png | Bin 0 -> 918 bytes .../AssetsClient/images/extensionPlan.png | Bin 0 -> 1954 bytes .../AssetsClient/images/icons/boxes.png | Bin 0 -> 6828 bytes .../images/icons/image-rollcall.png | Bin 0 -> 20160 bytes .../js/Ticket/detailTicketModal.js | 6 +- .../pages/Checkouts/css/PrintOneRollCall.css | 313 ++ .../pages/Checkouts/js/PrintOneRollCall.js | 20 + .../pages/Index/css/LeaveList.css | 95 + .../pages/Index/js/LeaveCreate.js | 630 +++ .../AssetsClient/pages/Index/js/LeaveList.js | 368 ++ .../pages/Profile/js/ChangePassword.js | 163 + .../pages/RollCall/js/CaseHistory.js | 457 +- .../pages/RollCall/js/CurrentDay.js | 192 +- .../AssetsClient/pages/RollCall/js/Index.js | 4 + .../AssetsClient/pages/RollCall/js/Plans.js | 56 +- 56 files changed, 6671 insertions(+), 4030 deletions(-) create mode 100644 CompanyManagment.App.Contracts/RollCall/EmployeeRollCallsByMonthViewModel.cs create mode 100644 ServiceHost/Areas/Client/Pages/Company/Checkouts/_Partials/PrintDetailsRollCallRaw.cshtml create mode 100644 ServiceHost/wwwroot/AssetsClient/images/addUser.png create mode 100644 ServiceHost/wwwroot/AssetsClient/images/changePlan.png create mode 100644 ServiceHost/wwwroot/AssetsClient/images/extensionPlan.png create mode 100644 ServiceHost/wwwroot/AssetsClient/images/icons/boxes.png create mode 100644 ServiceHost/wwwroot/AssetsClient/images/icons/image-rollcall.png create mode 100644 ServiceHost/wwwroot/AssetsClient/pages/Checkouts/css/PrintOneRollCall.css create mode 100644 ServiceHost/wwwroot/AssetsClient/pages/Checkouts/js/PrintOneRollCall.js create mode 100644 ServiceHost/wwwroot/AssetsClient/pages/Index/css/LeaveList.css create mode 100644 ServiceHost/wwwroot/AssetsClient/pages/Index/js/LeaveCreate.js create mode 100644 ServiceHost/wwwroot/AssetsClient/pages/Index/js/LeaveList.js create mode 100644 ServiceHost/wwwroot/AssetsClient/pages/Profile/js/ChangePassword.js diff --git a/0_Framework/Application/Version.cs b/0_Framework/Application/Version.cs index 8a29490d..96c34de0 100644 --- a/0_Framework/Application/Version.cs +++ b/0_Framework/Application/Version.cs @@ -10,9 +10,9 @@ public static class Version { static Version() { - StyleVersion = "2.12.05"; - AdminVersion = "2.5.25"; - CameraVersion = "1.0.3"; + StyleVersion = "2.12.06"; + AdminVersion = "2.5.26"; + CameraVersion = "1.0.4"; } public static string StyleVersion { get; set; } diff --git a/Company.Domain/RollCallAgg/IRollCallRepository.cs b/Company.Domain/RollCallAgg/IRollCallRepository.cs index 68a8551e..a95d44df 100644 --- a/Company.Domain/RollCallAgg/IRollCallRepository.cs +++ b/Company.Domain/RollCallAgg/IRollCallRepository.cs @@ -18,7 +18,9 @@ namespace Company.Domain.RollCallAgg List Search(RollCallSearchModel searchModel); CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId); List GetEmployeeRollCallsForMonth(long employeeId, long workshopId, DateTime startDate, DateTime endDate); - long Flag(long employeeId, long workshopId); + EmployeeRollCallsByMonthViewModel GetEmployeeRollCallsHistory(long employeeId, long workshopId, + DateTime? startDateTime, DateTime? endDateTime, DateTime? exactDateTime, DateTime? monthIndex); + long Flag(long employeeId, long workshopId); } diff --git a/CompanyManagment.App.Contracts/RollCall/AbsentEmployeeViewModel.cs b/CompanyManagment.App.Contracts/RollCall/AbsentEmployeeViewModel.cs index 227976ac..47a27594 100644 --- a/CompanyManagment.App.Contracts/RollCall/AbsentEmployeeViewModel.cs +++ b/CompanyManagment.App.Contracts/RollCall/AbsentEmployeeViewModel.cs @@ -5,6 +5,7 @@ public class AbsentEmployeeViewModel public long EmployeeId { get; set; } public string EmployeeFullName { get; set; } public string PersonnelCode { get; set; } + public bool HasLeave { get; set; } public string Reason { get; set; } } \ No newline at end of file diff --git a/CompanyManagment.App.Contracts/RollCall/CheckoutDailyRollCallViewModel.cs b/CompanyManagment.App.Contracts/RollCall/CheckoutDailyRollCallViewModel.cs index 1d50c1a2..5f0e18e9 100644 --- a/CompanyManagment.App.Contracts/RollCall/CheckoutDailyRollCallViewModel.cs +++ b/CompanyManagment.App.Contracts/RollCall/CheckoutDailyRollCallViewModel.cs @@ -13,8 +13,8 @@ namespace CompanyManagment.App.Contracts.RollCall public DateTime DateTimeGr { get; set; } //منقطع بودن شیفت کاری public bool IsSliced { get; set; } - public TimeSpan TotalhourseSpan{ get; set; } - public string TotalWorkingHours { get; set; } + public TimeSpan TotalhourseSpan { get; set; } + public string TotalWorkingHours { get; set; } public string DayOfWeek { get; set; } diff --git a/CompanyManagment.App.Contracts/RollCall/EmployeeRollCallsByMonthViewModel.cs b/CompanyManagment.App.Contracts/RollCall/EmployeeRollCallsByMonthViewModel.cs new file mode 100644 index 00000000..ff650aa4 --- /dev/null +++ b/CompanyManagment.App.Contracts/RollCall/EmployeeRollCallsByMonthViewModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CompanyManagment.App.Contracts.RollCall +{ + public class EmployeeRollCallsByMonthViewModel + { + public DateTime DateGr { get; set; } + public string PersianYear { get; set; } + public string PersianMonthName { get; set; } + + public IEnumerable RollCalls { get; set; } + } +} diff --git a/CompanyManagment.App.Contracts/RollCall/IRollCallApplication.cs b/CompanyManagment.App.Contracts/RollCall/IRollCallApplication.cs index f428ab47..9ed7c80e 100644 --- a/CompanyManagment.App.Contracts/RollCall/IRollCallApplication.cs +++ b/CompanyManagment.App.Contracts/RollCall/IRollCallApplication.cs @@ -13,10 +13,12 @@ namespace CompanyManagment.App.Contracts.RollCall OperationResult Edit(long id); EditRollCall GetByEmployeeIdAndWorkshopId(long employeeId, long workshopId); - List GetEmployeeRollCallsForMonth(long employeeId, long workshopId, - DateTime startDate, DateTime endDate); + List GetActiveEmployeeRollCallsForDuration(long employeeId, long workshopId, + string startDate, string endDate); + EmployeeRollCallsByMonthViewModel GetEmployeeRollCallsHistory(long employeeId, long workshopId, + string startDateTime, string endDateTime, string exactDateTime, string dateIndex); - EditRollCall GetById(long id); + EditRollCall GetById(long id); List Search(RollCallSearchModel searchModel); List GetCurrentDay(RollCallSearchModel searchModel); List GetHistoryCase(RollCallSearchModel searchModel); diff --git a/CompanyManagment.App.Contracts/RollCall/RollCallViewModel.cs b/CompanyManagment.App.Contracts/RollCall/RollCallViewModel.cs index ee1b87b2..2a695d35 100644 --- a/CompanyManagment.App.Contracts/RollCall/RollCallViewModel.cs +++ b/CompanyManagment.App.Contracts/RollCall/RollCallViewModel.cs @@ -5,23 +5,30 @@ namespace CompanyManagment.App.Contracts.RollCall; public class RollCallViewModel { - public long Id { get; set; } - public long WorkshopId { get; set; } - public string Reason { get; set; } - public long EmployeeId { get; set; } - public string PersonnelCode { get; set; } - public string EmployeeFullName { get; set; } - public DateTime? StartDate { get; set; } + public long Id { get; set; } + public long WorkshopId { get; set; } + public string Reason { get; set; } + public long EmployeeId { get; set; } + public string PersonnelCode { get; set; } + public string EmployeeFullName { get; set; } + public string DateFa { get; set; } + public DateTime DateGr { get; set; } + public DateTime? StartDate { get; set; } public DateTime? EndDate { get; set; } - public string DateFa { get; set; } - public DateTime DateGr { get; set; } - public int Year { get; set; } - public int Month { get; set; } public TimeSpan ShiftSpan { get; set; } public DateTime CreationDate { get; set; } - - public string StartDateFa { get; set; } + public string StartDateFa { get; set; } public string EndDateFa { get; set; } public IEnumerable RollCallTimesList { get; set; } - public double TotalWorkingHours { get; set; } + public TimeSpan TotalWorkingHoursSpan { get; set; } + public string TotalWorkingHours { get; set; } + + + public int Year { get; set; } + public int Month { get; set; } + public bool IsAbsent { get; set; } + public bool HasLeave { get; set; } + public DateTime? DateIndex { get; set; } + public string DayOfWeekFa { get; set; } + public bool IsHoliday { get; set; } } \ No newline at end of file diff --git a/CompanyManagment.App.Contracts/RollCall/RollCallsByDateViewModel.cs b/CompanyManagment.App.Contracts/RollCall/RollCallsByDateViewModel.cs index bb1355b1..6f9c54e6 100644 --- a/CompanyManagment.App.Contracts/RollCall/RollCallsByDateViewModel.cs +++ b/CompanyManagment.App.Contracts/RollCall/RollCallsByDateViewModel.cs @@ -8,5 +8,7 @@ namespace CompanyManagment.App.Contracts.RollCall public string DateFa { get; set; } public DateTime DateGr { get; set; } public IEnumerable ActiveEmployees { get; set; } + public string DayOfWeekFa { get; set; } + public bool IsHoliday { get; set; } } } diff --git a/CompanyManagment.Application/RollCallApplication.cs b/CompanyManagment.Application/RollCallApplication.cs index a780edbc..c9a126d6 100644 --- a/CompanyManagment.Application/RollCallApplication.cs +++ b/CompanyManagment.Application/RollCallApplication.cs @@ -5,6 +5,7 @@ using System.Text; using System.Threading.Tasks; using _0_Framework.Application; using Company.Domain.RollCallAgg; +using Company.Domain.RollCallEmployeeAgg; using CompanyManagment.App.Contracts.Employee; using CompanyManagment.App.Contracts.RollCall; @@ -14,11 +15,12 @@ public class RollCallApplication : IRollCallApplication { private readonly IRollCallRepository _rollCallRepository; private readonly IEmployeeApplication _employeeApplication; - - public RollCallApplication(IRollCallRepository rollCallRepository, IEmployeeApplication employeeApplication) + private readonly IRollCallEmployeeRepository _rollCallEmployeeRepository; + public RollCallApplication(IRollCallRepository rollCallRepository, IEmployeeApplication employeeApplication, IRollCallEmployeeRepository rollCallEmployeeRepository) { _rollCallRepository = rollCallRepository; _employeeApplication = employeeApplication; + _rollCallEmployeeRepository = rollCallEmployeeRepository; } public OperationResult Create(CreateRollCall command) @@ -52,16 +54,33 @@ public class RollCallApplication : IRollCallApplication { return _rollCallRepository.GetByEmployeeIdAndWorkshopId(employeeId, workshopId); } - - public List GetEmployeeRollCallsForMonth(long employeeId, long workshopId, DateTime startDate, DateTime endDate) + public EmployeeRollCallsByMonthViewModel GetEmployeeRollCallsHistory(long employeeId, long workshopId, string startDateTime, string endDateTime, string exactDateTime, + string dateIndex) { + DateTime? startDateTimeGr = null; + DateTime? endDateTimeGr = null; + if (!string.IsNullOrWhiteSpace(startDateTime) && !string.IsNullOrWhiteSpace(endDateTime)) + { + startDateTimeGr = startDateTime.ToGeorgianDateTime(); + endDateTimeGr = endDateTime.ToGeorgianDateTime(); + } - if (startDate >= endDate) - return new(); - - return _rollCallRepository.GetEmployeeRollCallsForMonth(employeeId, workshopId, startDate, endDate); + DateTime? exactDateTimeGr = + !string.IsNullOrWhiteSpace(exactDateTime) ? exactDateTime.ToGeorgianDateTime() : null; + DateTime? index; + try + { + index = DateTime.Parse(dateIndex); + } + catch + { + index = null; + } + return _rollCallRepository.GetEmployeeRollCallsHistory(employeeId, workshopId, startDateTimeGr, endDateTimeGr, exactDateTimeGr, index); } + + public EditRollCall GetById(long id) { return _rollCallRepository.GetById(id); @@ -82,17 +101,34 @@ public class RollCallApplication : IRollCallApplication return _rollCallRepository.GetCurrentDay(searchModel); } - public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId) - { - return _rollCallRepository.GetWorkshopCurrentDayRollCalls(workshopId); - } + public RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel) { return _rollCallRepository.GetWorkshopRollCallHistory(searchModel); } + public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId) + { + return _rollCallRepository.GetWorkshopCurrentDayRollCalls(workshopId); + } + public List GetActiveEmployeeRollCallsForDuration(long employeeId, long workshopId, string startDate, + string endDate) + { + if (!string.IsNullOrWhiteSpace(startDate) || !string.IsNullOrWhiteSpace(endDate)) + return new(); - public long Flag(long employeeId, long workshopId) + var startDateGr = startDate.ToGeorgianDateTime(); + var endDateGr = endDate.ToGeorgianDateTime(); + + if (startDateGr >= endDateGr) + return new(); + + //if (!_rollCallEmployeeRepository.Exists(x => x.EmployeeId == employeeId && + // x.WorkshopId == workshopId && x.IsActiveString == "true")) + // return new(); + return _rollCallRepository.GetEmployeeRollCallsForMonth(employeeId, workshopId, startDateGr, endDateGr); + } + public long Flag(long employeeId, long workshopId) { return _rollCallRepository.Flag(employeeId, workshopId); } diff --git a/CompanyManagment.EFCore/Repository/RollCallRepository.cs b/CompanyManagment.EFCore/Repository/RollCallRepository.cs index 1890c3aa..8ca1acaf 100644 --- a/CompanyManagment.EFCore/Repository/RollCallRepository.cs +++ b/CompanyManagment.EFCore/Repository/RollCallRepository.cs @@ -5,7 +5,9 @@ using System.Linq; using _0_Framework.Application; using _0_Framework.InfraStructure; using Company.Domain.RollCallAgg; +using CompanyManagment.App.Contracts.HolidayItem; using CompanyManagment.App.Contracts.RollCall; +using MD.PersianDateTime.Standard; using Microsoft.EntityFrameworkCore; namespace CompanyManagment.EFCore.Repository; @@ -13,10 +15,12 @@ namespace CompanyManagment.EFCore.Repository; public class RollCallRepository : RepositoryBase, IRollCallRepository { private readonly CompanyContext _context; - public RollCallRepository(CompanyContext context) : base(context) - { - _context = context; - } + private readonly IHolidayItemApplication _holidayItemApplication; + public RollCallRepository(CompanyContext context, IHolidayItemApplication holidayItemApplication) : base(context) + { + _context = context; + _holidayItemApplication = holidayItemApplication; + } public EditRollCall GetByEmployeeIdAndWorkshopId(long employeeId, long workshopId) { @@ -83,277 +87,439 @@ public class RollCallRepository : RepositoryBase, IRollCallRepos { throw new NotImplementedException(); } - #region Pooya - //حضور غیاب فیش حقوقی - public List GetEmployeeRollCallsForMonth(long employeeId, long workshopId, DateTime startMonthDay, DateTime endMonthDay) - { + #region Pooya + //حضور غیاب فیش حقوقی + public List GetEmployeeRollCallsForMonth(long employeeId, long workshopId, DateTime startMonthDay, DateTime endMonthDay) + { - var rollCalls = _context.RollCalls.Where(x => - x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate != null && x.EndDate != null && - x.StartDate.Value.Date >= startMonthDay && x.StartDate.Value.Date <= endMonthDay).ToList(); + var rollCalls = _context.RollCalls.Where(x => + x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate != null && x.EndDate != null && + x.StartDate.Value.Date >= startMonthDay && x.StartDate.Value.Date <= endMonthDay).ToList(); - var year = Convert.ToInt32(startMonthDay.ToFarsi().Substring(0, 4)); - var month = Convert.ToInt32(startMonthDay.ToFarsi().Substring(5, 2)); - var firstDayOfCurrentMonth = new DateTime(year, month, 1, new PersianCalendar()); + var year = Convert.ToInt32(startMonthDay.ToFarsi().Substring(0, 4)); + var month = Convert.ToInt32(startMonthDay.ToFarsi().Substring(5, 2)); + var firstDayOfCurrentMonth = new DateTime(year, month, 1, new PersianCalendar()); - if (month == 12) - { - year += 1; - month = 1; - } - else - month += 1; + if (month == 12) + { + year += 1; + month = 1; + } + else + month += 1; + + var nextMonthDate = new DateTime(year, month, 1, new PersianCalendar()); + + var lastDayOfCurrentMonth = nextMonthDate.AddDays(-1); + + int dateRange = (int)(lastDayOfCurrentMonth - firstDayOfCurrentMonth).TotalDays + 1; + + //all the dates from start to end, to be compared with present days to get absent dates + var completeDaysList = Enumerable.Range(0, dateRange).Select(offset => startMonthDay.AddDays(offset).Date); + + var absentRecords = completeDaysList + .ExceptBy(rollCalls.Select(x => x.StartDate!.Value.Date), y => y.Date.Date) + .Select(x => new CheckoutDailyRollCallViewModel() + { + StartDate = null, + EndDate = null, + DateTimeGr = x.Date.Date, + DayOfWeek = x.Date.DayOfWeek.ToString(), + RollCallDateFa = x.Date.ToFarsi() + }); + + var presentDays = rollCalls.GroupBy(x => x.StartDate!.Value.Date).Select(x => new CheckoutDailyRollCallViewModel() + { + StartDate = x.Min(y => y.StartDate)!.Value.ToString("HH:mm"), + EndDate = x.Max(y => y.EndDate)!.Value.ToString("HH:mm"), + TotalhourseSpan = new TimeSpan(x.Where(y => y.EndDate != null).Sum(y => (y.EndDate - y.StartDate)!.Value.Ticks)), + DayOfWeek = x.Key.DayOfWeek.DayOfWeeKToPersian(), + RollCallDateFa = x.Key.Date.ToFarsi(), + DateTimeGr = x.Key.Date, + IsSliced = x.Count() > 1 + }); + + presentDays = presentDays.Select(x => new CheckoutDailyRollCallViewModel + { + StartDate = x.StartDate, + EndDate = x.EndDate, + TotalWorkingHours = $"{Convert.ToInt32(x.TotalhourseSpan.TotalHours)}:{x.TotalhourseSpan.Minutes.ToString("00")}", + DayOfWeek = x.DayOfWeek, + RollCallDateFa = x.RollCallDateFa, + DateTimeGr = x.DateTimeGr, + IsSliced = x.IsSliced, - var nextMonthDate = new DateTime(year, month, 1, new PersianCalendar()); + }); - var lastDayOfCurrentMonth = nextMonthDate.AddDays(-1); + return presentDays.Concat(absentRecords).OrderBy(x => x.DateTimeGr).ToList(); - int dateRange = (int)(lastDayOfCurrentMonth - firstDayOfCurrentMonth).TotalDays + 1; + } - //all the dates from start to end, to be compared with present days to get absent dates - var completeDaysList = Enumerable.Range(0, dateRange).Select(offset => startMonthDay.AddDays(offset).Date); + //جستجوی سوابق حضور غیاب بر اساس کارمند + public EmployeeRollCallsByMonthViewModel GetEmployeeRollCallsHistory(long employeeId, long workshopId, + DateTime? startDateTime, DateTime? endDateTime, DateTime? exactDateTime, DateTime? dateIndex) + { - var absentRecords = completeDaysList - .ExceptBy(rollCalls.Select(x => x.StartDate!.Value.Date), y => y.Date.Date) - .Select(x => new CheckoutDailyRollCallViewModel() - { - StartDate = null, - EndDate = null, - DateTimeGr = x.Date.Date, - DayOfWeek = x.Date.DayOfWeek.ToString(), - - RollCallDateFa = x.Date.ToFarsi() - }); - var presentDays = rollCalls.GroupBy(x => x.StartDate!.Value.Date).Select(x => new CheckoutDailyRollCallViewModel() - { - StartDate = x.Min(y => y.StartDate)!.Value.ToString("HH:mm"), - EndDate = x.Max(y => y.EndDate)!.Value.ToString("HH:mm"), - TotalhourseSpan = new TimeSpan(x.Where(y => y.EndDate != null).Sum(y => (y.EndDate - y.StartDate)!.Value.Ticks)), - DayOfWeek = x.Key.DayOfWeek.DayOfWeeKToPersian(), - RollCallDateFa = x.Key.Date.ToFarsi(), - DateTimeGr = x.Key.Date, - IsSliced = x.Count() > 1 - }); + var employeeRollCallStatuses = _context.RollCallEmployees.Include(x => x.EmployeesStatus) + .FirstOrDefault(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId); + + if (employeeRollCallStatuses == null) + return new(); + + var activeMonths = new List(); + + foreach (var status in employeeRollCallStatuses.EmployeesStatus) + { + var persianEndDayOfMonth = new PersianDateTime(status.EndDate.Date); + var persianStartDayOfMonth = new PersianDateTime(status.StartDate.Date); + + //var persianEndFirstDayOfMonth = + // new PersianDateTime(persianEndDayOfMonth.Year, persianEndDayOfMonth.Month, 1); + var persianStartFirstDayOfMonth = new PersianDateTime(persianStartDayOfMonth.Year, persianStartDayOfMonth.Month, 1); + for (PersianDateTime start = persianStartFirstDayOfMonth; start <= persianEndDayOfMonth; start = start.AddMonths(1)) + { + activeMonths.Add(start); + + } + } + var activeMonthsList = activeMonths.Distinct().ToList(); + + PersianDateTime startSearch; + PersianDateTime endSearch; + + if (startDateTime.HasValue && endDateTime.HasValue) + { + startSearch = new PersianDateTime(startDateTime.Value); + endSearch = new PersianDateTime(endDateTime.Value); + + activeMonthsList = activeMonthsList.Where(x => x.Date >= startSearch && x.Date <= endSearch).ToList(); + } + + if (exactDateTime.HasValue) + { + startSearch = new PersianDateTime(exactDateTime.Value); + endSearch = startSearch; + } + //else + //{ + // startSearch = employeeRollCallStatuses.EmployeesStatus.Max(x => x.StartDate.Date).To; + // endSearch = employeeRollCallStatuses.EmployeesStatus.Min(x => x.EndDate.Date); + //} + + + //var statusesByMonth = + // employeeRollCallStatuses.EmployeesStatus + // .GroupBy(x => new DateTime(Convert.ToInt32(x.StartDate.ToFarsi().Substring(0, 4)), Convert.ToInt32(x.StartDate.ToFarsi().Substring(5, 2)), 1, new PersianCalendar()).Date) + // .OrderByDescending(x => x.Key); + if (dateIndex != null) + { + var persianDateIndex = new PersianDateTime(dateIndex.Value); + var dateIndexFirstOfMonth = persianDateIndex.AddDays(-(persianDateIndex.Day - 1)); + activeMonthsList = activeMonthsList.Where(x => dateIndexFirstOfMonth == x).OrderByDescending(x => x).ToList(); + } + + if (!activeMonthsList.Any()) return new(); + + + //get the last month which user was active in + PersianDateTime selectedMonthPersian = activeMonthsList.First(); + + DateTime selectedMonthFirstDay = selectedMonthPersian; + DateTime nextMonthFirstDay = selectedMonthPersian.AddMonths(1); + + var statusesOfMonth = employeeRollCallStatuses.EmployeesStatus.Where(x => x.EndDate >= selectedMonthFirstDay && + x.StartDate < nextMonthFirstDay); - presentDays = presentDays.Select(x => new CheckoutDailyRollCallViewModel - { - StartDate = x.StartDate, - EndDate = x.EndDate, - TotalWorkingHours = $"{Convert.ToInt32(x.TotalhourseSpan.TotalHours)}:{x.TotalhourseSpan.Minutes.ToString("00")}", - DayOfWeek = x.DayOfWeek, - RollCallDateFa = x.RollCallDateFa, - DateTimeGr = x.DateTimeGr, - IsSliced = x.IsSliced, - }); - return presentDays.Concat(absentRecords).OrderBy(x => x.DateTimeGr).ToList(); + var leavesQuery = + _context.LeaveList.Where(x => (x.LeaveType == "استعلاجی" || (x.LeaveType == "استحقاقی" && x.PaidLeaveType == "روزانه")) && + x.IsAccepted && + x.EndLeave >= selectedMonthFirstDay && x.StartLeave < nextMonthFirstDay && x.WorkshopId == workshopId); - } + var rollCalls = _context.RollCalls.Where(x => + !leavesQuery.Any(y => + y.StartLeave.Date <= x.StartDate.Value.Date && y.EndLeave.Date >= x.StartDate.Value.Date) && + x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate != null && x.EndDate != null && + x.StartDate >= selectedMonthFirstDay && x.StartDate < nextMonthFirstDay); - //سوابق حضور غیاب کارگاه - public RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel) - { + var rollCallsList = rollCalls.ToList(); + var leavesList = leavesQuery.ToList(); - //initialize + int dateRange = (int)(nextMonthFirstDay - selectedMonthFirstDay).TotalDays; - DateTime searchDurationStart = DateTime.Now.AddDays(-1).Date; - DateTime searchDurationEnd = searchDurationStart.AddDays(-16); + //all the dates from start to end, to be compared with present days to get absent dates + var completeDaysList = Enumerable.Range(0, dateRange).Select(offset => selectedMonthFirstDay.AddDays(offset).Date); + var result = completeDaysList.Where(x => statusesOfMonth.Any(y => x >= y.StartDate.Date && x <= y.EndDate.Date)) + .Select(x => new RollCallViewModel() + { + DateGr = x.Date.Date, + DateFa = x.Date.Date.ToFarsi(), + RollCallTimesList = rollCallsList.Where(y => x.Date.Date == y.StartDate!.Value.Date).Select(y => + new RollCallTimeViewModel() + { + StartDate = y.StartDate.Value.ToString("HH:mm"), + EndDate = y.EndDate!.Value.ToString("HH:mm") + }), + TotalWorkingHoursSpan = new TimeSpan(rollCallsList.Where(y => x.Date.Date == y.StartDate!.Value.Date) + .Sum(y => (y.EndDate!.Value - y.StartDate.Value).Ticks)), + Reason = leavesList.FirstOrDefault(y => y.EndLeave >= x.Date.Date && y.StartLeave <= x.Date.Date)?.LeaveType ?? "" + }); + result = result.Select(x => new RollCallViewModel() + { + DateGr = x.DateGr, + DateFa = x.DateFa, + DayOfWeekFa = x.DateGr.DayOfWeek.DayOfWeeKToPersian(), + IsHoliday = _holidayItemApplication.IsHoliday(x.DateGr), + RollCallTimesList = x.RollCallTimesList, + TotalWorkingHours = $"{Convert.ToInt32(x.TotalWorkingHoursSpan.TotalHours)}:{x.TotalWorkingHoursSpan.Minutes.ToString("00")}", + DateIndex = activeMonthsList.Count > 2 ? activeMonthsList.Skip(1).First().ToDateTime() : null + }).ToList(); + return new EmployeeRollCallsByMonthViewModel() + { + PersianMonthName = selectedMonthPersian.ToString("MMMM"), + PersianYear = selectedMonthPersian.ToString("yyyy"), + DateGr = selectedMonthFirstDay, + RollCalls = result + }; + } + + //سوابق حضور غیاب کارگاه + //dateIndex starts at 0 + public RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel) + { + + //initialize + + DateTime searchDurationEnd = DateTime.Now.AddDays(-1).Date; + DateTime searchDurationStart = searchDurationEnd.AddDays(-16); + + + + //override if user has entered inputs (dates must be validated in the application layer) + if (!string.IsNullOrWhiteSpace(searchModel.StarDateFa) && !string.IsNullOrWhiteSpace(searchModel.StarDateFa)) + { + searchDurationEnd = searchModel.EndDateFa.ToGeorgianDateTime().Date; + searchDurationStart = searchModel.StarDateFa.ToGeorgianDateTime().AddDays(-1).Date; + } + + + + else + if (!string.IsNullOrWhiteSpace(searchModel.ExactDateFa)) + { + searchDurationEnd = searchModel.ExactDateFa.ToGeorgianDateTime().Date; + searchDurationStart = searchModel.ExactDateFa.ToGeorgianDateTime().AddDays(-1).Date; + } + + + if (searchDurationEnd < searchDurationStart) + return new(); - //override if user has entered inputs (dates must be validated in the application layer) - if (!string.IsNullOrWhiteSpace(searchModel.StarDateFa) && !string.IsNullOrWhiteSpace(searchModel.StarDateFa)) - { - searchDurationStart = searchModel.StarDateFa.ToGeorgianDateTime().Date; - searchDurationEnd = searchModel.EndDateFa.ToGeorgianDateTime().AddDays(-1).Date; - } + DateTime dateIndex = searchDurationEnd.AddDays(-1 * (searchModel.DateIndex)).Date; + + if (dateIndex <= searchDurationStart) + return new(); - else - if (!string.IsNullOrWhiteSpace(searchModel.ExactDateFa)) - { - searchDurationStart = searchModel.ExactDateFa.ToGeorgianDateTime().Date; - searchDurationEnd = searchModel.ExactDateFa.ToGeorgianDateTime().AddDays(-1).Date; - } + //get leaves for workshop that have been activated in dateIndex date + var leavesQuery = _context.LeaveList.Where(x => x.WorkshopId == searchModel.WorkshopId && + x.IsAccepted && (x.LeaveType == "استعلاجی" || (x.LeaveType == "استحقاقی" && x.PaidLeaveType == "روزانه")) && + x.EndLeave.Date >= dateIndex && x.StartLeave.Date <= dateIndex); + + //roll calls for current workshop where shift start is in dateIndex date (filters today's shifts) + var rollCallsQuery = _context.RollCalls + .Where(x => x.WorkshopId == searchModel.WorkshopId && x.StartDate.HasValue && x.EndDate.HasValue && x.StartDate < DateTime.Now.Date && + x.StartDate.Value.Date == dateIndex.Date); + + + //get active employees of workshop in dateIndex date + var activeEmployeesQuery = + _context.RollCallEmployees.Include(x => x.EmployeesStatus) + .Where(x => x.WorkshopId == searchModel.WorkshopId && x.EmployeesStatus.Any(y => y.EndDate.Date >= dateIndex && y.StartDate.Date <= dateIndex)); - if (searchDurationStart < searchDurationEnd) - return new(); - DateTime dateIndex = searchDurationStart.AddDays(-1 * (searchModel.DateIndex)).Date; - if (dateIndex <= searchDurationEnd) - return new(); + if (searchModel.EmployeeId > 0) + { + rollCallsQuery = rollCallsQuery.Where(x => x.EmployeeId == searchModel.EmployeeId); + activeEmployeesQuery = activeEmployeesQuery.Where(x => x.EmployeeId == searchModel.EmployeeId); + leavesQuery = leavesQuery.Where(x => x.EmployeeId == searchModel.EmployeeId); + } - //get leaves for workshop that have been activated in dateIndex date - var leavesQuery = _context.LeaveList.Where(x => x.WorkshopId == searchModel.WorkshopId && - x.IsAccepted && (x.LeaveType == "استعلاجی" || (x.LeaveType == "استحقاقی" && x.PaidLeaveType == "روزانه")) && - x.EndLeave.Date >= dateIndex && x.StartLeave.Date <= dateIndex); + var personnelCodeList = + _context.PersonnelCodeSet.Where(x => activeEmployeesQuery.Any(y => y.EmployeeId == x.EmployeeId)); + var rollCallsList = rollCallsQuery.ToList(); + var activatedEmployeesList = activeEmployeesQuery.ToList(); + var leavesList = leavesQuery.ToList(); - //roll calls for current workshop where shift start is in dateIndex date (filters today's shifts) - var rollCallsQuery = _context.RollCalls - .Where(x => x.WorkshopId == searchModel.WorkshopId && x.StartDate.HasValue && x.EndDate.HasValue && x.StartDate < DateTime.Now.Date && - x.StartDate.Value.Date == dateIndex.Date); + rollCallsList = rollCallsList.Where(x => leavesList.All(y => y.EmployeeId != x.EmployeeId)).ToList(); + var result = new RollCallsByDateViewModel() + { + DateGr = dateIndex, + DayOfWeekFa = dateIndex.DayOfWeek.DayOfWeeKToPersian(), + IsHoliday = _holidayItemApplication.IsHoliday(dateIndex), + DateFa = dateIndex.ToFarsi(), + ActiveEmployees = activatedEmployeesList.Select(x => + { + var leave = leavesList.FirstOrDefault(y => y.EmployeeId == x.EmployeeId); + var employeeRollCallsForDate = rollCallsList.Where(y => y.EmployeeId == x.EmployeeId).ToList(); + return new RollCallViewModel() + { + EmployeeFullName = x.EmployeeFullName, + EmployeeId = x.EmployeeId, + Reason = leave == null ? "" : $"{leave.LeaveType}-{leave.PaidLeaveType}", + RollCallTimesList = employeeRollCallsForDate.Select(y => new RollCallTimeViewModel() + { + EndDate = y.EndDate!.Value.ToString("HH:mm"), + StartDate = y.StartDate!.Value.ToString("HH:mm") + }), + HasLeave = leave != null, + IsAbsent = !employeeRollCallsForDate.Any(), + TotalWorkingHoursSpan = new TimeSpan(employeeRollCallsForDate.Sum(y => (y.EndDate!.Value - y.StartDate!.Value).Ticks)), + PersonnelCode = personnelCodeList.FirstOrDefault(y => y.EmployeeId == x.EmployeeId)?.PersonnelCode.ToString() + }; + }) + }; + result.ActiveEmployees = result.ActiveEmployees.Select(x => new RollCallViewModel() + { + EmployeeFullName = x.EmployeeFullName, + EmployeeId = x.EmployeeId, + Reason = x.Reason, + RollCallTimesList = x.RollCallTimesList, + HasLeave = x.HasLeave, + IsAbsent = x.IsAbsent, + PersonnelCode = x.PersonnelCode, + TotalWorkingHours = $"{Convert.ToInt32(x.TotalWorkingHoursSpan.TotalHours)}:{x.TotalWorkingHoursSpan.Minutes.ToString("00")}" + }); + return result; + } - //get active employees of workshop in dateIndex date - var activeEmployeesQuery = - _context.RollCallEmployees.Include(x => x.EmployeesStatus) - .Where(x => x.WorkshopId == searchModel.WorkshopId && x.EmployeesStatus.Any(y => y.EndDate.Date >= dateIndex && y.StartDate.Date <= dateIndex)); + //گزارش آنلاین حضور غیاب کارگاه + public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId) + { + var date = DateTime.Now.Date; + //get active leaves for workshop which are active today and accepted and are either روزانه and استحقاقی or استعلاجی + var leaves = _context.LeaveList.Where(x => x.WorkshopId == workshopId && x.EndLeave.Date >= date && x.StartLeave.Date <= date && + x.IsAccepted && (x.LeaveType == "استعلاجی" || (x.LeaveType == "استحقاقی" && x.PaidLeaveType == "روزانه"))); + var personnelCodes = _context.PersonnelCodeSet.Where(x => x.WorkshopId == workshopId).ToList(); - if (searchModel.EmployeeId > 0) - { - rollCallsQuery = rollCallsQuery.Where(x => x.EmployeeId == searchModel.EmployeeId); - activeEmployeesQuery = activeEmployeesQuery.Where(x => x.EmployeeId == searchModel.EmployeeId); - leavesQuery = leavesQuery.Where(x => x.EmployeeId == searchModel.EmployeeId); - } + //get currently working employees with leftWork table + //var workingEmployees = + // _context.LeftWorkList.Where(x => x.WorkshopId == workshopId && x.StartWorkDate < date && x.LeftWorkDate.Date > date); - var personnelCodeList = - _context.PersonnelCodeSet.Where(x => activeEmployeesQuery.Any(y => y.EmployeeId == x.EmployeeId)); - var rollCallsList = rollCallsQuery.ToList(); - var activatedEmployeesList = activeEmployeesQuery.ToList(); - var leavesList = leavesQuery.ToList(); - rollCallsList = rollCallsList.Where(x => leavesList.All(y => y.EmployeeId != x.EmployeeId)).ToList(); - var result = new RollCallsByDateViewModel() - { - DateGr = dateIndex, - DateFa = dateIndex.ToFarsi(), - ActiveEmployees = activatedEmployeesList.Select(x => - { - var leave = leavesList.FirstOrDefault(y => y.EmployeeId == x.EmployeeId); - var employeeRollCallsForDate = rollCallsList.Where(y => y.EmployeeId == x.EmployeeId).ToList(); + //get activated employees + var activeEmployees = + _context.RollCallEmployees.Include(x => x.EmployeesStatus) + .Where(x => x.WorkshopId == workshopId && x.EmployeesStatus.Any(y => + y.StartDate.Date <= date && + y.EndDate.Date >= date)); - return new RollCallViewModel() - { - EmployeeFullName = x.EmployeeFullName, - EmployeeId = x.EmployeeId, - Reason = leave == null ? "" : $"{leave.LeaveType}-{leave.PaidLeaveType}", - RollCallTimesList = employeeRollCallsForDate.Select(y => new RollCallTimeViewModel() - { - EndDate = y.EndDate!.Value.ToString("HH:mm:ss"), - StartDate = y.StartDate!.Value.ToString("HH:mm:ss") - }), - TotalWorkingHours = employeeRollCallsForDate.Sum(y => (y.EndDate!.Value - y.StartDate!.Value).TotalHours), - PersonnelCode = personnelCodeList.FirstOrDefault(y => y.EmployeeId == x.EmployeeId)?.PersonnelCode.ToString() - }; - }) - }; + //get today's roll calls + var rollCallsQuery = _context.RollCalls.Where(x => + x.WorkshopId == workshopId && x.StartDate.Value.Date == date); - return result; - } + //var mustBePresent = activeEmployees.Where(x => !leaves.Any(y => y.EmployeeId == x.EmployeeId) && + // workingEmployees.Any(y => y.EmployeeId == x.EmployeeId)); - //گزارش آنلاین حضور غیاب کارگاه - public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId) - { - //get today's roll calls - var rollCallsQuery = _context.RollCalls.Where(x => - x.WorkshopId == workshopId && x.StartDate.Value.Date == DateTime.Now.Date); - //get active leaves for workshop which are active today and accepted and are either روزانه and استحقاقی or استعلاجی - var leaves = _context.LeaveList.Where(x => x.WorkshopId == workshopId && x.EndLeave.Date >= DateTime.Now.Date && x.StartLeave.Date <= DateTime.Now.Date && - x.IsAccepted && (x.LeaveType == "استعلاجی" || (x.LeaveType == "استحقاقی" && x.PaidLeaveType == "روزانه"))); + var mustBePresent = activeEmployees.Where(x => !leaves.Any(y => y.EmployeeId == x.EmployeeId)); + + + //filter roll calls for active and currently working employees only + // var filteredRollCallQuery = rollCallsQuery.Where(x => mustBePresent + // .Any(y => x.EmployeeId == y.EmployeeId)) + //.Where(x => workingEmployees.Any(y => y.EmployeeId == x.EmployeeId)).ToList(); + + var filteredRollCallQuery = rollCallsQuery.Where(x => mustBePresent + .Any(y => x.EmployeeId == y.EmployeeId)).ToList(); + + + + //presents list is ready + var presentEmployees = filteredRollCallQuery.GroupBy(x => x.EmployeeId).Select(x => new RollCallViewModel() + { + PersonnelCode = personnelCodes + .FirstOrDefault(y => y.EmployeeId == x.Key)? + .PersonnelCode.ToString(), + EmployeeFullName = x.FirstOrDefault()!.EmployeeFullName, + EmployeeId = x.FirstOrDefault()!.EmployeeId, + + TotalWorkingHoursSpan = new TimeSpan(x.Where(y => y.EndDate != null).Sum(y => (y.EndDate!.Value - y.StartDate!.Value).Ticks)), + RollCallTimesList = x.Select(y => new RollCallTimeViewModel() + { + StartDate = y.StartDate!.Value.ToString("HH:mm"), + EndDate = y.EndDate?.ToString("HH:mm") + }).ToList() + + + }); + + presentEmployees = presentEmployees.Select(x => new RollCallViewModel() + { + PersonnelCode = x.PersonnelCode, + EmployeeFullName = x.EmployeeFullName, + EmployeeId = x.EmployeeId, + TotalWorkingHours = + $"{Convert.ToInt32(x.TotalWorkingHoursSpan.TotalHours)}:{x.TotalWorkingHoursSpan.Minutes.ToString("00")}", + RollCallTimesList = x.RollCallTimesList + }).ToList(); - //get currently working employees with leftWork table - var workingEmployees = - _context.LeftWorkList.Where(x => x.WorkshopId == workshopId && x.StartWorkDate < DateTime.Now.Date && x.LeftWorkDate.Date > DateTime.Now.Date); + //absent ones are those who are active and not on the roll call list + var absentsQuery = activeEmployees.AsEnumerable() + .ExceptBy(presentEmployees.Select(x => x.EmployeeId), e => e.EmployeeId).ToList(); - //get activated employees - var activeEmployees = - _context.RollCallEmployees.Include(x => x.EmployeesStatus) - .Where(x => x.WorkshopId == workshopId && x.EmployeesStatus.Any(y => - y.StartDate.Date <= DateTime.Now.Date && - y.EndDate.Date >= DateTime.Now.Date)); + //get today's active leaves + var employeesWithLeave = leaves.AsEnumerable() + .Where(x => absentsQuery.Any(y => y.EmployeeId == x.EmployeeId)) + .Select(x => new { x.EmployeeId, x.LeaveType }).ToList(); + //join leave and absents + var absentsViewModel = absentsQuery.Select(x => new AbsentEmployeeViewModel() + { + PersonnelCode = personnelCodes + .FirstOrDefault(y => y.EmployeeId == x.EmployeeId)? + .PersonnelCode.ToString(), + EmployeeId = x.EmployeeId, + EmployeeFullName = x.EmployeeFullName, + HasLeave = employeesWithLeave.Any(y => y.EmployeeId == x.EmployeeId), + Reason = employeesWithLeave.FirstOrDefault(y => y.EmployeeId == x.EmployeeId)?.LeaveType + }).ToList(); + return new CurrentDayRollCall() + { + AbsentEmployees = absentsViewModel.ToList(), + PresentEmployees = presentEmployees.ToList() + }; + } - var mustBePresent = activeEmployees.Where(x => !leaves.Any(y => y.EmployeeId == x.EmployeeId) && - workingEmployees.Any(y => y.EmployeeId == x.EmployeeId)); - - - - - //filter roll calls for active and currently working employees only - var filteredRollCallQuery = rollCallsQuery.Where(x => mustBePresent - .Any(y => x.EmployeeId == y.EmployeeId)) - .Where(x => workingEmployees.Any(y => y.EmployeeId == x.EmployeeId)).ToList(); - - - - - //presents list is ready - var presentEmployees = filteredRollCallQuery.GroupBy(x => x.EmployeeId).Select(x => new RollCallViewModel() - { - EmployeeFullName = x.FirstOrDefault()!.EmployeeFullName, - EmployeeId = x.FirstOrDefault()!.EmployeeId, - - TotalWorkingHours = x.Where(y => y.EndDate != null).Sum(y => (y.EndDate!.Value - y.StartDate!.Value).TotalHours), - RollCallTimesList = x.Select(y => new RollCallTimeViewModel() - { - StartDate = y.StartDate!.Value.ToString("HH:mm:ss"), - EndDate = y.EndDate?.ToString("HH:mm:ss") - }).ToList() - - - }).ToList(); - - //absent ones are those who are active and not on the roll call list - var absentsQuery = activeEmployees.AsEnumerable() - .ExceptBy(presentEmployees.Select(x => x.EmployeeId), e => e.EmployeeId).ToList(); - - - - //get today's active leaves - var employeesWithLeave = _context.LeaveList.Where(x => - x.EndLeave.Date >= DateTime.Now.Date && x.StartLeave.Date <= DateTime.Now.Date && - x.WorkshopId == workshopId && (x.LeaveType == "استعلاجی" || (x.LeaveType == "استحقاقی" && x.PaidLeaveType == "روزانه"))) - .AsEnumerable() - .Where(x => absentsQuery.Any(y => y.EmployeeId == x.EmployeeId)) - .Select(x => new { x.EmployeeId, x.LeaveType }).ToList(); - - //join leave and absents - var absentsViewModel = absentsQuery.Select(x => new AbsentEmployeeViewModel() - { - PersonnelCode = _context.PersonnelCodeSet - .FirstOrDefault(y => y.EmployeeId == x.EmployeeId && y.WorkshopId == workshopId) - !.PersonnelCode.ToString(), - EmployeeId = x.EmployeeId, - EmployeeFullName = x.EmployeeFullName, - Reason = employeesWithLeave.Any(y => y.EmployeeId == x.EmployeeId) - ? employeesWithLeave.FirstOrDefault(y => y.EmployeeId == x.EmployeeId)!.LeaveType - : "" - }).ToList(); - - return new CurrentDayRollCall() - { - AbsentEmployees = absentsViewModel.ToList(), - PresentEmployees = presentEmployees.ToList() - }; - } - - #endregion - public long Flag(long employeeId, long workshopId) + #endregion + public long Flag(long employeeId, long workshopId) { var checkDate = DateTime.Now.AddDays(-3); var query = _context.RollCalls diff --git a/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs b/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs index 6c9b47f2..0537e382 100644 --- a/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs +++ b/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs @@ -687,7 +687,7 @@ public class YearlySalaryRepository : RepositoryBase, IYearl if (step2.Count > 1)// اگر تعدادشون بیش از 1 بود { - var stDate = step2.FirstOrDefault(); // آخریی + var stDate = step2.FirstOrDefault(); // آخری if (DayCounter < Max365) { diff --git a/ServiceHost/Areas/Client/Pages/Company/Checkouts/CheckoutPrintAll.cshtml b/ServiceHost/Areas/Client/Pages/Company/Checkouts/CheckoutPrintAll.cshtml index cf23a0b6..37b9a55b 100644 --- a/ServiceHost/Areas/Client/Pages/Company/Checkouts/CheckoutPrintAll.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/Checkouts/CheckoutPrintAll.cshtml @@ -457,7 +457,13 @@ @foreach (var items in @Model.GroupPrintList) { -
+ @if (items.HasRollCall) + { + + } + else + { +
- - }else{ - -
-
- -
- - -
+ + + - - - - + + + font-size: 11px !important;" class="time" id="EndComplex" type="text" asp-for="@items.CreateWorkingHoursTemp.EndComplex"> - -
- -
+ +
+ +
- - - } + + + } -
-
-
-
-
-
- @{ - if (items.IsLeft) - { - - طبق تصفیه حساب نهایی تنظیمی فوق، آخرین روز اشتغال بکار اینجانب  - @items.LastDayOfWork  - بوده و قطع همکاری با کارفرما و کارگاه از تاریخ  - @items.LeftWorkDate  - می باشد - - } - } - -
-
-
- @*
اینجانب     @Model.EmployeeFullName
-
نام پدر:     @Model.FathersName
-
به کد ملی:  @Model.NationalCode
-
متولد:     @Model.DateOfBirth
*@ +
-
-
- @* پـرسنل شـرکت  @Model.WorkshopName -   - به کارفرمایی   آقای/خانم/شرکت    - @{ - foreach (var item in @Model.EmployerList) - { - @item.EmployerFullName ، - } +
+
+
+
+ @{ + if (items.IsLeft) + { + + طبق تصفیه حساب نهایی تنظیمی فوق، آخرین روز اشتغال بکار اینجانب  + @items.LastDayOfWork  + بوده و قطع همکاری با کارفرما و کارگاه از تاریخ  + @items.LeftWorkDate  + می باشد + } -    - مبلغ ............. ریال را بصورت نقدی از کارفرما دریافت نمودم. *@ + } + +
+
+
+ @*
اینجانب     @Model.EmployeeFullName
+
نام پدر:     @Model.FathersName
+
به کد ملی:  @Model.NationalCode
+
متولد:     @Model.DateOfBirth
*@ +
+
+
+ @* پـرسنل شـرکت  @Model.WorkshopName +   + به کارفرمایی   آقای/خانم/شرکت    + @{ + foreach (var item in @Model.EmployerList) + { + @item.EmployerFullName ، + } + } +    + مبلغ ............. ریال را بصورت نقدی از کارفرما دریافت نمودم. *@ -
+
-
+
-
-
- امضاء و اثر انگشت +
+
+ امضاء و اثر انگشت +
+
+ +
+
- - - + - - - + } + } diff --git a/ServiceHost/Areas/Client/Pages/Company/Checkouts/PrintOne.cshtml b/ServiceHost/Areas/Client/Pages/Company/Checkouts/PrintOne.cshtml index 226635df..3110ce0d 100644 --- a/ServiceHost/Areas/Client/Pages/Company/Checkouts/PrintOne.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/Checkouts/PrintOne.cshtml @@ -2,7 +2,6 @@ @using System.Security.Cryptography.X509Certificates @model CompanyManagment.App.Contracts.Checkout.CheckoutViewModel @{ - } @section Styles { @@ -26,7 +58,7 @@
-

سوابق حضور و غیاب

+

تاریخچه حضور و غیاب

@Model.WorkshopFullName
@@ -51,14 +83,14 @@
-
+
الی
@@ -70,10 +102,10 @@
@@ -86,7 +118,7 @@ - + حذف جستجو
@@ -97,166 +129,49 @@
-
+
- @if (@Model.RollCallViewModels.Any()) + @if (@Model.RollCallViewModels.ActiveEmployees.Any()) {
-
+
ردیف
نام پرسنل
شماره پرسنلی
-
تاریخ
-
ساعت ورود
-
ساعت خروج
-
- - @*
تاخیر در ورود
-
تعجیل در خروج
*@ +
تاخیر در ورود
+
ورود
+
خروج
+
تجمیع در خروج
+
مجموع ساعات کاری
+
+ +
+
- - @foreach (var item in Model.RollCallViewModels) - { -
-
-
- ردیف -
-
-
- @(index++) -
-
-
- -
-
نام پرسنل
-
- @item.EmployeeFullName -
-
- -
-
-
شماره پرسنلی:
-
@item.PersonnelCode
-
-
- -
-
تاریخ
-
- @item.DateFa -
-
- -
- @foreach (var itemTime in item.RollCallTimesList) - { -
ساعت ورود
-
-
@itemTime.StartDate
-
- } -
- -
- @foreach (var itemTime in item.RollCallTimesList) - { -
ساعت خروج
-
-
@itemTime.EndDate
-
- } -
- -
- - @*
*@ -
-
- - - -
-
-
-
-
-
ساعت ورود
- @foreach (var itemTime in item.RollCallTimesList) - { -
-
@itemTime.StartDate
-
- } -
-
-
-
-
ساعت خروج
- @foreach (var itemTime in item.RollCallTimesList) - { -
-
@itemTime.EndDate
-
- } -
-
- @*
-
-
تاخیر در ورود
- @foreach (var itemTime in item.RollCallTimesList) - { -
-
@itemTime.StartDate
-
- } -
-
-
-
-
تعجیل در خروج
- @foreach (var itemTime in item.RollCallTimesList) - { -
-
@itemTime.StartDate
-
- } -
-
*@ -
-
-
- } -
} else { -
-
- -
اطلاعاتی وجود ندارد.
-
-
+ }
+
@section Script { + } \ No newline at end of file diff --git a/ServiceHost/Areas/Client/Pages/Company/RollCall/CaseHistory.cshtml.cs b/ServiceHost/Areas/Client/Pages/Company/RollCall/CaseHistory.cshtml.cs index 6bba3145..d4f2bf55 100644 --- a/ServiceHost/Areas/Client/Pages/Company/RollCall/CaseHistory.cshtml.cs +++ b/ServiceHost/Areas/Client/Pages/Company/RollCall/CaseHistory.cshtml.cs @@ -1,4 +1,4 @@ -using _0_Framework.Application; +using _0_Framework.Application; using CompanyManagment.App.Contracts.RollCall; using CompanyManagment.App.Contracts.RollCallEmployee; using CompanyManagment.App.Contracts.Workshop; @@ -18,7 +18,8 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall private readonly IRollCallEmployeeApplication _rollCallEmployeeApplication; private readonly IRollCallApplication _rollCallApplication; - public List RollCallViewModels { get; set; } + public RollCallsByDateViewModel RollCallViewModels { get; set; } + public EmployeeRollCallsByMonthViewModel RollCallEmployeeViewModels { get; set; } public string WorkshopFullName { get; set; } public List RollCallEmployeeList; @@ -42,20 +43,20 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall { if (_rollCallEmployeeApplication.GetByWorkshopId(workshopId).Any()) { - RollCallEmployeeList = _rollCallEmployeeApplication.GetPersonnelRollCallList(workshopId); + RollCallEmployeeList = _rollCallEmployeeApplication.GetPersonnelRollCallList(workshopId); WorkshopFullName = _workshopApplication.GetDetails(workshopId).WorkshopFullName; var searchModel = new RollCallSearchModel() { - WorkshopId = workshopId, - }; + WorkshopId = workshopId + }; - RollCallViewModels = _rollCallApplication.GetHistoryCase(searchModel); + RollCallViewModels = _rollCallApplication.GetWorkshopRollCallHistory(searchModel); return Page(); } else { - return NotFound(); + return Redirect("/Client/Company/RollCall"); } } else @@ -64,6 +65,45 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall } } + public IActionResult OnGetCaseHistoryRollCallAjax(int dateIndex, string exactDateFa, string startDate, string endDate, long employeeId, string dateEmployeeIndex) + { + var workshopHash = User.FindFirstValue("WorkshopSlug"); + var workshopId = _passwordHasher.SlugDecrypt(workshopHash); + if (workshopId > 0) + { + if (employeeId > 0) + { + RollCallEmployeeViewModels = _rollCallApplication.GetEmployeeRollCallsHistory(employeeId, workshopId, startDate, endDate, exactDateFa, dateEmployeeIndex); + } + 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 + { + IsSuccedded = true, + data = RollCallViewModels, + dataEmployee = RollCallEmployeeViewModels, + }); + } + else + { + return new JsonResult(new + { + IsSuccedded = false, + message = "داده ای یافت نشد!", + }); + } + } } } diff --git a/ServiceHost/Areas/Client/Pages/Company/RollCall/CurrentDay.cshtml b/ServiceHost/Areas/Client/Pages/Company/RollCall/CurrentDay.cshtml index 64cbde07..6fbe76c0 100644 --- a/ServiceHost/Areas/Client/Pages/Company/RollCall/CurrentDay.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/RollCall/CurrentDay.cshtml @@ -5,6 +5,8 @@ @{ ViewData["Title"] = " - " + "لیست حضور و غیاب جاری"; int index = 1; + int indexAbsent = 1; + int indexLeave = 1; int i = 0; } @@ -28,7 +30,7 @@

ساعات حضور و غیاب جاری

-
@Model.WorkshopFullName تاریخ امروز @Model.NowDate
+
@Model.WorkshopFullName تاریخ امروز @Model.NowDate
+
تاریخ امروز @Model.NowDate
- -
- @if (@Model.RollCallViewModels.Any()) - { +
+
@@ -53,145 +54,265 @@
ردیف
نام پرسنل
شماره پرسنلی
-
ساعت ورود
-
ساعت خروج
-
- - @*
تاخیر در ورود
-
تعجیل در خروج
*@ +
تاخیر در ورود
+
ورود
+
خروج
+
تجمیع در خروج
+
مجموع ساعات کاری
- @foreach (var item in Model.RollCallViewModels) + @if (@Model.RollCallViewModels.PresentEmployees.Any()) { -
-
-
- ردیف -
-
-
- @(index++) + @foreach (var item in Model.RollCallViewModels.PresentEmployees) + { +
+
+
+ ردیف +
+
+
+ @(index++) +
-
-
-
نام پرسنل
-
- @item.EmployeeFullName -
-
- -
-
-
شماره پرسنلی:
-
@item.PersonnelCode
-
-
- -
- @foreach (var itemTime in item.RollCallTimesList) - { -
ساعت ورود
-
-
@itemTime.StartDate
+
+
نام پرسنل
+
+ @item.EmployeeFullName
- } -
+
-
- @foreach (var itemTime in item.RollCallTimesList) - { -
ساعت خروج
-
-
@itemTime.EndDate
+
+
+
شماره پرسنلی:
+
@item.PersonnelCode
- } -
+
-
- - @*
*@ -
-
+
+
+
تاخیر در ورود:
+
-
+
+
+
+ @foreach (var itemTime in item.RollCallTimesList) + { +
ساعت ورود
+
+
@(itemTime.StartDate ?? "-")
+
+ } +
+
+ @foreach (var itemTime in item.RollCallTimesList) + { +
ساعت خروج
+
+
@(itemTime.EndDate ?? "-")
+
+ } +
-
-
-
-
-
-
ساعت ورود
- @foreach (var itemTime in item.RollCallTimesList) +
+
+
تجمیع در خروج:
+
-
+
+
+ +
+
+
مجموع ساعات کاری:
+
+ @if (item.RollCallTimesList.Last().EndDate == null) { -
-
@itemTime.StartDate
-
+ + + + + + + } + else + { + @item.TotalWorkingHours }
-
-
-
ساعت خروج
- @foreach (var itemTime in item.RollCallTimesList) - { -
-
@itemTime.EndDate
-
- } -
-
- @*
-
-
تاخیر در ورود
- @foreach (var itemTime in item.RollCallTimesList) - { -
-
@itemTime.StartDate
-
- } -
-
-
-
-
تعجیل در خروج
- @foreach (var itemTime in item.RollCallTimesList) - { -
-
@itemTime.StartDate
-
- } -
-
*@
+
-
+ } + } + else + { + } - -
- } - else - { -
-
- -
اطلاعاتی وجود ندارد.
+
+
+
+
+
+
+
+
+ +
+
غیبت
+
+
ردیف
+
نام پرسنل
+
شماره پرسنلی
+
+
+ + @if (@Model.RollCallViewModels.AbsentEmployees.Any(x => !x.HasLeave)) + { + @foreach (var item in Model.RollCallViewModels.AbsentEmployees) + { + if (!item.HasLeave) + { +
+
+
+ ردیف +
+
+
+ @(indexAbsent++) +
+
+
+ +
+
نام پرسنل
+
+ @item.EmployeeFullName +
+
+ +
+
+
شماره پرسنلی:
+
@item.PersonnelCode
+
+
+
+ } + } + } + else + { + + } +
+
- } +
+
+
+
+ +
+
مرخصی
+
+
ردیف
+
نام پرسنل
+
شماره پرسنلی
+
نوع مرخصی
+
+
+ + @if (@Model.RollCallViewModels.AbsentEmployees.Any(x => x.HasLeave)) + { + @foreach (var item in Model.RollCallViewModels.AbsentEmployees) + { + if (item.HasLeave) + { +
+
+
+ ردیف +
+
+
+ @(indexLeave++) +
+
+
+ +
+
نام پرسنل
+
+ @item.EmployeeFullName +
+
+ +
+
+
شماره پرسنلی:
+
@item.PersonnelCode
+
+
+ +
+
+
+
@item.Reason
+
+
+
+ } + } + } + else + { + + } +
+
+
+
+
+ +
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
@section Script { + } diff --git a/ServiceHost/Areas/Client/Pages/Company/RollCall/CurrentDay.cshtml.cs b/ServiceHost/Areas/Client/Pages/Company/RollCall/CurrentDay.cshtml.cs index 3d33ab74..855a58cb 100644 --- a/ServiceHost/Areas/Client/Pages/Company/RollCall/CurrentDay.cshtml.cs +++ b/ServiceHost/Areas/Client/Pages/Company/RollCall/CurrentDay.cshtml.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.Security.Claims; using _0_Framework.Application; using AccountManagement.Application.Contracts.Account; @@ -7,15 +8,17 @@ using CompanyManagment.App.Contracts.RollCallEmployee; using CompanyManagment.App.Contracts.RollCallPlan; using CompanyManagment.App.Contracts.RollCallService; using CompanyManagment.App.Contracts.Workshop; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; namespace ServiceHost.Areas.Client.Pages.Company.RollCall { + [Authorize] public class CurrentDayModel : PageModel { - public List RollCallViewModels; + public CurrentDayRollCall RollCallViewModels; public string WorkshopFullName; public string NowDate; @@ -34,41 +37,34 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall public IActionResult OnGet() { - if (User.Identity.IsAuthenticated) - { - var workshopHash = User.FindFirstValue("WorkshopSlug"); - var workshopId = _passwordHasher.SlugDecrypt(workshopHash); - if (workshopId > 0) - { - if (_rollCallEmployeeApplication.GetByWorkshopId(workshopId).Any()) - { - WorkshopFullName = _workshopApplication.GetDetails(workshopId).WorkshopFullName; - - var now = DateTime.Now.ToFarsi(); - NowDate = now; + var workshopHash = User.FindFirstValue("WorkshopSlug"); + var workshopId = _passwordHasher.SlugDecrypt(workshopHash); + if (workshopId > 0) + { + if (_rollCallEmployeeApplication.GetByWorkshopId(workshopId).Any()) + { + WorkshopFullName = _workshopApplication.GetDetails(workshopId).WorkshopFullName; + + var now = DateTime.Now.ToFarsi(); + NowDate = now; - var searchModel = new RollCallSearchModel() - { - WorkshopId = workshopId, - }; + var searchModel = new RollCallSearchModel() + { + WorkshopId = workshopId, + }; - RollCallViewModels = _rollCallApplication.GetCurrentDay(searchModel); - return Page(); - } - else - { - return NotFound(); - } + RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId); + return Page(); + } + else + { + return Redirect("/Client/Company/RollCall"); } - else - { - return NotFound(); - } - } - else - { - return Forbid(); - } + } + else + { + return NotFound(); + } } public IActionResult OnGetCurrentDayPagination() @@ -87,5 +83,74 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall list }); } + + + public IActionResult OnGetCurrentDayAjax(string type) + { + var workshopHash = User.FindFirstValue("WorkshopSlug"); + var workshopId = _passwordHasher.SlugDecrypt(workshopHash); + if (workshopId > 0) + { + RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId); + + List data = new(); + switch (type) + { + case "all": + data.AddRange(RollCallViewModels.PresentEmployees); + break; + case "absent": + data.AddRange(RollCallViewModels.AbsentEmployees.Where(x => !x.HasLeave)); + break; + case "leave": + data.AddRange(RollCallViewModels.AbsentEmployees.Where(x => x.HasLeave)); + break; + default: + break; + } + + return new JsonResult(new + { + isSuccess = true, + data = data + }); + } + else + { + return new JsonResult(new + { + isSuccess = false, + message = "داده ای یافت نشده!" + }); + } + } + + public IActionResult OnGetCurrentAjaxCount() + { + var workshopHash = User.FindFirstValue("WorkshopSlug"); + var workshopId = _passwordHasher.SlugDecrypt(workshopHash); + if (workshopId > 0) + { + RollCallViewModels = _rollCallApplication.GetWorkshopCurrentDayRollCalls(workshopId); + + var absentEmployeesCount = RollCallViewModels.AbsentEmployees.Count(x => !x.HasLeave); + var leaveEmployeesCount = RollCallViewModels.AbsentEmployees.Count(x => x.HasLeave); + + return new JsonResult(new + { + isSuccess = true, + absentEmployeesCount = absentEmployeesCount, + leaveEmployeesCount = leaveEmployeesCount + }); + } + else + { + return new JsonResult(new + { + isSuccess = false, + message = "داده ای یافت نشده!" + }); + } + } } } diff --git a/ServiceHost/Areas/Client/Pages/Company/RollCall/EmployeeUploadPicture.cshtml.cs b/ServiceHost/Areas/Client/Pages/Company/RollCall/EmployeeUploadPicture.cshtml.cs index 5491d393..fb5ae650 100644 --- a/ServiceHost/Areas/Client/Pages/Company/RollCall/EmployeeUploadPicture.cshtml.cs +++ b/ServiceHost/Areas/Client/Pages/Company/RollCall/EmployeeUploadPicture.cshtml.cs @@ -3,6 +3,7 @@ using _0_Framework.Application; using CompanyManagment.App.Contracts.Employee; using CompanyManagment.App.Contracts.Error; using CompanyManagment.App.Contracts.RollCallEmployee; +using CompanyManagment.App.Contracts.RollCallEmployeeStatus; using CompanyManagment.App.Contracts.RollCallService; using CompanyManagment.App.Contracts.Workshop; using Microsoft.AspNetCore.Authorization; @@ -26,8 +27,8 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall private readonly IRollCallServiceApplication _rollCallServiceApplication; private readonly IWebHostEnvironment _webHostEnvironment; private readonly IPasswordHasher _passwordHasher; - - public EmployeeUploadPictureModel(IWorkshopApplication workshopApplication, IPasswordHasher passwordHasher, IRollCallEmployeeApplication rollCallEmployeeApplication, IRollCallServiceApplication rollCallServiceApplication, IWebHostEnvironment webHostEnvironment, IEmployeeApplication employeeApplication) + private readonly IRollCallEmployeeStatusApplication _rollCallEmployeeStatusApplication; + public EmployeeUploadPictureModel(IWorkshopApplication workshopApplication, IPasswordHasher passwordHasher, IRollCallEmployeeApplication rollCallEmployeeApplication, IRollCallServiceApplication rollCallServiceApplication, IWebHostEnvironment webHostEnvironment, IEmployeeApplication employeeApplication, IRollCallEmployeeStatusApplication rollCallEmployeeStatusApplication) { _workshopApplication = workshopApplication; _passwordHasher = passwordHasher; @@ -35,6 +36,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall _rollCallServiceApplication = rollCallServiceApplication; _webHostEnvironment = webHostEnvironment; _employeeApplication = employeeApplication; + _rollCallEmployeeStatusApplication = rollCallEmployeeStatusApplication; } public IActionResult OnGet() @@ -182,6 +184,8 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall HasUploadedImage = "true", }; result = _rollCallEmployeeApplication.Create(createCommand); + + } else { @@ -191,7 +195,8 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall Message = "عملیات با موفقیت انجام شده است" }; } - + _rollCallEmployeeStatusApplication.Create(new CreateRollCallEmployeeStatus() + { RollCallEmployeeId = result.SendId }); if (result.IsSuccedded) { return new JsonResult(new diff --git a/ServiceHost/Areas/Client/Pages/Company/RollCall/Index.cshtml b/ServiceHost/Areas/Client/Pages/Company/RollCall/Index.cshtml index 487d5c17..d8bd25a5 100644 --- a/ServiceHost/Areas/Client/Pages/Company/RollCall/Index.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/RollCall/Index.cshtml @@ -179,45 +179,35 @@
-
- @if (Model.HasCameraAccount == "false") - { - - } +
- @if (!Model.CheckRollCallService) - { -
- -
- -
- +
آپلود عکس پرسنل
@@ -247,7 +237,7 @@
-
سوابق حضور و غیاب
+
تاریخچه حضور و غیاب
@* مودال حساب کاربری *@ + + @section Script { -} +} \ No newline at end of file diff --git a/ServiceHost/Areas/Client/Pages/Company/RollCall/ModalCameraAccount.cshtml b/ServiceHost/Areas/Client/Pages/Company/RollCall/ModalCameraAccount.cshtml index 55e47047..cc2197a0 100644 --- a/ServiceHost/Areas/Client/Pages/Company/RollCall/ModalCameraAccount.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/RollCall/ModalCameraAccount.cshtml @@ -155,4 +155,4 @@ var checkAccountAjax = `@Url.Page("./Index", "CheckAccount")`; var saveCameraAccountAjax = `@Url.Page("./Index", "SaveCameraAccount")`; - \ No newline at end of file + \ No newline at end of file diff --git a/ServiceHost/Areas/Client/Pages/Company/RollCall/ModalOTPAction.cshtml b/ServiceHost/Areas/Client/Pages/Company/RollCall/ModalOTPAction.cshtml index 2824b0ff..10317098 100644 --- a/ServiceHost/Areas/Client/Pages/Company/RollCall/ModalOTPAction.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/RollCall/ModalOTPAction.cshtml @@ -180,7 +180,7 @@ + - \ No newline at end of file + diff --git a/ServiceHost/Areas/Client/Pages/LeaveList.cshtml b/ServiceHost/Areas/Client/Pages/LeaveList.cshtml index d1b15d48..bf0f4c30 100644 --- a/ServiceHost/Areas/Client/Pages/LeaveList.cshtml +++ b/ServiceHost/Areas/Client/Pages/LeaveList.cshtml @@ -1,11 +1,6 @@ @using Version = _0_Framework.Application.Version @model CompanyManagment.App.Contracts.Leave.CreateLeave -@section Styles -{ - -} - @{ @@ -13,129 +8,22 @@ - + } -