From 2166e7c5ee0ddc510faf8478cc0f0f9721ca3060 Mon Sep 17 00:00:00 2001 From: SamSys Date: Mon, 21 Apr 2025 23:38:44 +0330 Subject: [PATCH 01/14] Leave Compute On Checkout Add ShiftDuration --- .../RollCallEmployeeStatusApplication.cs | 2 +- .../Repository/RollCallMandatoryRepository.cs | 159 ++++++++++++------ .../Repository/YearlySalaryRepository.cs | 59 ++++++- 3 files changed, 159 insertions(+), 61 deletions(-) diff --git a/CompanyManagment.Application/RollCallEmployeeStatusApplication.cs b/CompanyManagment.Application/RollCallEmployeeStatusApplication.cs index 93f5aef3..6d5b1dc0 100644 --- a/CompanyManagment.Application/RollCallEmployeeStatusApplication.cs +++ b/CompanyManagment.Application/RollCallEmployeeStatusApplication.cs @@ -106,7 +106,7 @@ namespace CompanyManagment.Application } else { - skipRollCallByWorkshopId = workshopId is 585 or 604 or 605 or 368 or 367 or 286; + skipRollCallByWorkshopId = workshopId is 368 or 367; } diff --git a/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs b/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs index 8c795eec..e4cac8e7 100644 --- a/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs +++ b/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs @@ -29,6 +29,7 @@ using CompanyManagment.App.Contracts.Reward; using CompanyManagment.App.Contracts.SalaryAid; using Company.Domain.RewardAgg; using CompanyManagment.App.Contracts.Reward.Enums; +using static System.Runtime.InteropServices.JavaScript.JSType; namespace CompanyManagment.EFCore.Repository; @@ -68,7 +69,24 @@ CreateWorkingHoursTemp command, bool holidayWorking) int numberOfFridays = 0; #endregion - + int TotalContractDays = (int)(contractEnd - contractStart).TotalDays + 1; + int fridays = 0; + int holiday = _context.HolidayItems.Count(x => x.Holidaydate >= contractStart && x.Holidaydate <= contractEnd); + ; + for (var gDate = contractStart; gDate <= contractEnd; gDate = gDate.AddDays(1)) + { + if (gDate.DayOfWeek == DayOfWeek.Friday) + { + fridays += 1; + } + } + int TotalDaysNoFriday = TotalContractDays - fridays; + int mandatorDays = TotalContractDays - (fridays + holiday); + //if (holidayWorking) + // mandatorDays = TotalContractDays - fridays; + //***********************************// + //This Time Mandatory Hourse + double mandatoryHours = Math.Round((mandatorDays * 7.33), 2); //گرفتن ساعت استراحت پرسنل از تنظیمات #region breakTime @@ -127,50 +145,103 @@ CreateWorkingHoursTemp command, bool holidayWorking) IsAccepted = true, }; var leaveSearchResult = _leaveRepository.search(leaveSearch); + // {مقدار ساعت مجاز مرخصی در برای یک روز{کامل + var leaveHoursesPerDay = 190.58 / 365; + + // {مقدار ساعت مجاز مرخصی در مدت این فیش حقوقی{کامل + var starndardHoursesPerTotalDays = leaveHoursesPerDay * TotalContractDays; + // جدا کردن ساعت و دقیقه + int hours = (int)starndardHoursesPerTotalDays; + double minutesDecimal = (starndardHoursesPerTotalDays - hours) * 60; + int minutes = (int)minutesDecimal; + + + TimeSpan starndardHoursesPerTotalDaysSapn = new TimeSpan(hours, minutes, 0); if (leaveSearchResult.Count > 0) { - //if (leaveSearchResult.Any(x => x.HasShiftDuration)) - //{ - // TimeSpan totalLeave = new TimeSpan(leaveSearchResult.Sum(x => x.ShiftDuration.Ticks)); - //} - - int leavingDayCout = 0; - //مرخصی های مابین - List beatweenCheckout = leaveSearchResult.Where(x => x.StartLeaveGr >= contractStart && x.EndLeaveGr <= contractEnd).Select(x => new LeaveViewModel() + if (leaveSearchResult.Any(x => x.HasShiftDuration)) { - DayCounter = Convert.ToInt32(x.LeaveHourses), + + + + + var sumSpansDouble = (sumSpans.TotalMinutes) / 60; + if (sumSpansDouble < mandatoryHours) + { + starndardHoursesPerTotalDays = (sumSpansDouble * starndardHoursesPerTotalDays) / mandatoryHours; + // جدا کردن ساعت و دقیقه + hours = (int)starndardHoursesPerTotalDays; + minutesDecimal = (starndardHoursesPerTotalDays - hours) * 60; + minutes = (int)minutesDecimal; + + + starndardHoursesPerTotalDaysSapn = new TimeSpan(hours, minutes, 0); + } + + TimeSpan totalLeave = new TimeSpan(leaveSearchResult.Sum(x => x.ShiftDuration.Ticks)); + var totalLeaveDouble = (totalLeave.TotalMinutes) / 60; + if(totalLeaveDouble > starndardHoursesPerTotalDays) + { + + sumSpans = sumSpans.Add(starndardHoursesPerTotalDaysSapn); + } + else + { + sumSpans = sumSpans.Add(totalLeave); + } - }).ToList(); - leavingDayCout += beatweenCheckout.Sum(x => x.DayCounter); - // مرخصی که شروعش قبل از شروع تصفیه حساب است - List beforeCheckout = leaveSearchResult.Where(x => x.StartLeaveGr < contractStart).Select(x => new LeaveViewModel() - { - DayCounter = (int)(contractStart - x.EndLeaveGr).TotalDays + 1, - - }).ToList(); - leavingDayCout += beforeCheckout.Sum(x => x.DayCounter); - // مرخصی که پایانش بعد از پایان تصفیه حساب است - List afterCheckout = leaveSearchResult.Where(x => x.EndLeaveGr > contractEnd).Select(x => new LeaveViewModel() - { - DayCounter = (int)(x.StartLeaveGr - contractEnd).TotalDays + 1, - - }).ToList(); - leavingDayCout += afterCheckout.Sum(x => x.DayCounter); - Console.WriteLine(leavingDayCout); - TimeSpan workingPerDayAve = sumSpans / groupedRollCall.Count;//میانگین ساعت کار در روز - TimeSpan sumLeave = new TimeSpan(); - if (workingPerDayAve <= new TimeSpan(7, 20, 0)) - { - sumLeave = leavingDayCout * workingPerDayAve; } else { - sumLeave = leavingDayCout * new TimeSpan(7, 20, 0); + int leavingDayCout = 0; + //مرخصی های مابین + List beatweenCheckout = leaveSearchResult.Where(x => x.StartLeaveGr >= contractStart && x.EndLeaveGr <= contractEnd).Select(x => new LeaveViewModel() + { + DayCounter = Convert.ToInt32(x.LeaveHourses), + + }).ToList(); + leavingDayCout += beatweenCheckout.Sum(x => x.DayCounter); + // مرخصی که شروعش قبل از شروع تصفیه حساب است + List beforeCheckout = leaveSearchResult.Where(x => x.StartLeaveGr < contractStart).Select(x => new LeaveViewModel() + { + DayCounter = (int)(contractStart - x.EndLeaveGr).TotalDays + 1, + + }).ToList(); + leavingDayCout += beforeCheckout.Sum(x => x.DayCounter); + // مرخصی که پایانش بعد از پایان تصفیه حساب است + List afterCheckout = leaveSearchResult.Where(x => x.EndLeaveGr > contractEnd).Select(x => new LeaveViewModel() + { + DayCounter = (int)(x.StartLeaveGr - contractEnd).TotalDays + 1, + + }).ToList(); + leavingDayCout += afterCheckout.Sum(x => x.DayCounter); + Console.WriteLine(leavingDayCout); + + + TimeSpan workingPerDayAve = sumSpans / groupedRollCall.Count;//میانگین ساعت کار در روز + TimeSpan sumLeave = new TimeSpan(); + if (workingPerDayAve <= new TimeSpan(7, 20, 0)) + { + sumLeave = leavingDayCout * workingPerDayAve; + } + else + { + sumLeave = leavingDayCout * new TimeSpan(7, 20, 0); + } + + if (sumLeave > starndardHoursesPerTotalDaysSapn) + { + sumSpans = sumSpans.Add(starndardHoursesPerTotalDaysSapn); + } + else + { + sumSpans = sumSpans.Add(sumLeave); + } } - sumSpans = sumSpans.Add(sumLeave); + } Console.WriteLine(sumSpans); @@ -186,24 +257,8 @@ CreateWorkingHoursTemp command, bool holidayWorking) //********** محاسبه مدت اضافه کاری ***********// #region ComputeMandatoryAtThisTime - int TotalContractDays = (int)(contractEnd - contractStart).TotalDays + 1; - int fridays = 0; - int holiday = _context.HolidayItems.Count(x => x.Holidaydate >= contractStart && x.Holidaydate <= contractEnd); - ; - for (var gDate = contractStart; gDate <= contractEnd; gDate = gDate.AddDays(1)) - { - if (gDate.DayOfWeek == DayOfWeek.Friday) - { - fridays += 1; - } - } - int TotalDaysNoFriday = TotalContractDays - fridays; - int mandatorDays = TotalContractDays - (fridays + holiday); - //if (holidayWorking) - // mandatorDays = TotalContractDays - fridays; - //***********************************// - //This Time Mandatory Hourse - double mandatoryHours = Math.Round((mandatorDays * 7.33), 2); + + //***********************************// var dailyFix = TimeSpan.Parse("07:20"); TimeSpan mandatoryHoursTimeSpan = new TimeSpan(7, 20, 0).Multiply(mandatorDays); diff --git a/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs b/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs index 27dae631..109075dd 100644 --- a/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs +++ b/CompanyManagment.EFCore/Repository/YearlySalaryRepository.cs @@ -2389,13 +2389,18 @@ public class YearlySalaryRepository : RepositoryBase, IYearl var end = new DateTime(); start = item.StartLeave < startDate ? startDate : item.StartLeave; end = item.EndLeave > endDate ? endDate : item.EndLeave; - if (item.PaidLeaveType == "روزانه") + if (item.PaidLeaveType == "روزانه" && !item.HasShiftDuration) { var leaveSpan = (end - start).TotalDays + 1; var usedLeave = leaveSpan * workingHoursePerDay; usedLeaves += usedLeave; } + else if (item.PaidLeaveType == "روزانه" && item.HasShiftDuration) + { + var usedLeave = (item.ShiftDuration.TotalMinutes) / 60; + usedLeaves += usedLeave; + } else { @@ -2474,13 +2479,18 @@ public class YearlySalaryRepository : RepositoryBase, IYearl var end = new DateTime(); start = item.StartLeave < startDate ? startDate : item.StartLeave; end = item.EndLeave > endDate ? endDate : item.EndLeave; - if (item.PaidLeaveType == "روزانه") + if (item.PaidLeaveType == "روزانه" && !item.HasShiftDuration) { var leaveSpan = (end - start).TotalDays + 1; var usedLeave = leaveSpan * workingHoursePerDay; usedLeaves += usedLeave; } + else if (item.PaidLeaveType == "روزانه" && item.HasShiftDuration) + { + var usedLeave = (item.ShiftDuration.TotalMinutes) / 60; + usedLeaves += usedLeave; + } else { var leavingHourses = TimeSpan.Parse(item.LeaveHourses); @@ -2521,13 +2531,18 @@ public class YearlySalaryRepository : RepositoryBase, IYearl var end = new DateTime(); start = item.StartLeave < startSerach ? startSerach : item.StartLeave; end = item.EndLeave > leftWorkDate ? leftWorkDate : item.EndLeave; - if (item.PaidLeaveType == "روزانه") + if (item.PaidLeaveType == "روزانه" && !item.HasShiftDuration) { var leaveSpan = (end - start).TotalDays + 1; var usedLeave = leaveSpan * workingHoursePerDay; usedLeaves += usedLeave; } + else if (item.PaidLeaveType == "روزانه" && item.HasShiftDuration) + { + var usedLeave = (item.ShiftDuration.TotalMinutes) / 60; + usedLeaves += usedLeave; + } else { var leavingHourses = TimeSpan.Parse(item.LeaveHourses); @@ -2865,17 +2880,23 @@ public class YearlySalaryRepository : RepositoryBase, IYearl { foreach (var item in leaveList) { + var start = new DateTime(); var end = new DateTime(); start = item.StartLeave < startDate ? startDate : item.StartLeave; end = item.EndLeave > endDate ? endDate : item.EndLeave; - if (item.PaidLeaveType == "روزانه") + if (item.PaidLeaveType == "روزانه" && !item.HasShiftDuration) { var leaveSpan = (end - start).TotalDays + 1; var usedLeave = leaveSpan * workingHoursePerDay; usedLeaves += usedLeave; } + else if (item.PaidLeaveType == "روزانه" && item.HasShiftDuration) + { + var usedLeave = (item.ShiftDuration.TotalMinutes) / 60; + usedLeaves += usedLeave; + } else { @@ -2944,13 +2965,18 @@ public class YearlySalaryRepository : RepositoryBase, IYearl var end = new DateTime(); start = item.StartLeave < startAfter365 ? startAfter365 : item.StartLeave; end = item.EndLeave > leftWorkDate ? leftWorkDate : item.EndLeave; - if (item.PaidLeaveType == "روزانه") + if (item.PaidLeaveType == "روزانه" && !item.HasShiftDuration) { var leaveSpan = (end - start).TotalDays + 1; var usedLeave = leaveSpan * workingHoursePerDay; usedLeaves += usedLeave; } + else if (item.PaidLeaveType == "روزانه" && item.HasShiftDuration) + { + var usedLeave = (item.ShiftDuration.TotalMinutes) / 60; + usedLeaves += usedLeave; + } else { var leavingHourses = TimeSpan.Parse(item.LeaveHourses); @@ -3009,13 +3035,18 @@ public class YearlySalaryRepository : RepositoryBase, IYearl var end = new DateTime(); start = item.StartLeave < contract.ContarctStart ? contract.ContarctStart : item.StartLeave; end = item.EndLeave > leftWorkDate ? leftWorkDate : item.EndLeave; - if (item.PaidLeaveType == "روزانه") + if (item.PaidLeaveType == "روزانه" && !item.HasShiftDuration) { var leaveSpan = (end - start).TotalDays + 1; var usedLeave = leaveSpan * workingHoursePerDay; usedLeaves += usedLeave; } + else if (item.PaidLeaveType == "روزانه" && item.HasShiftDuration) + { + var usedLeave = (item.ShiftDuration.TotalMinutes) / 60; + usedLeaves += usedLeave; + } else { var leavingHourses = TimeSpan.Parse(item.LeaveHourses); @@ -3052,17 +3083,23 @@ public class YearlySalaryRepository : RepositoryBase, IYearl { foreach (var item in leaveList) { + var start = new DateTime(); var end = new DateTime(); start = item.StartLeave < startSerach ? startSerach : item.StartLeave; end = item.EndLeave > leftWorkDate ? leftWorkDate : item.EndLeave; - if (item.PaidLeaveType == "روزانه") + if (item.PaidLeaveType == "روزانه" && !item.HasShiftDuration) { var leaveSpan = (end - start).TotalDays + 1; var usedLeave = leaveSpan * workingHoursePerDay; usedLeaves += usedLeave; } + else if (item.PaidLeaveType == "روزانه" && item.HasShiftDuration) + { + var usedLeave = (item.ShiftDuration.TotalMinutes) / 60; + usedLeaves += usedLeave; + } else { var leavingHourses = TimeSpan.Parse(item.LeaveHourses); @@ -3198,12 +3235,18 @@ public class YearlySalaryRepository : RepositoryBase, IYearl var end = new DateTime(); start = item.StartLeave < startDate ? startDate : item.StartLeave; end = item.EndLeave > endDate ? endDate : item.EndLeave; - if (item.PaidLeaveType == "روزانه") + + if (item.PaidLeaveType == "روزانه" && !item.HasShiftDuration) { var leaveSpan = (end - start).TotalDays + 1; var usedLeave = leaveSpan * hoursePerDay; usedLeavesChekout += usedLeave; } + else if (item.PaidLeaveType == "روزانه" && item.HasShiftDuration) + { + var usedLeave = (item.ShiftDuration.TotalMinutes) / 60; + usedLeavesChekout += usedLeave; + } else { var leavingHourses = TimeSpan.Parse(item.LeaveHourses); From 70558395388eedb266e20499923d7be06ebe0b55 Mon Sep 17 00:00:00 2001 From: MahanCh Date: Tue, 22 Apr 2025 13:35:15 +0330 Subject: [PATCH 02/14] fix excel bugs --- .../CustomizeCheckoutTempRepository.cs | 3 +- .../CheckoutTemporary.cshtml | 1010 ++++++++--------- .../CheckoutUnofficial.cshtml | 2 +- .../CustomizeCheckout/js/CheckoutTemporary.js | 26 + .../js/CheckoutUnofficial.js | 27 + 5 files changed, 561 insertions(+), 507 deletions(-) diff --git a/CompanyManagment.EFCore/Repository/CustomizeCheckoutTempRepository.cs b/CompanyManagment.EFCore/Repository/CustomizeCheckoutTempRepository.cs index 82721bdb..fbee660a 100644 --- a/CompanyManagment.EFCore/Repository/CustomizeCheckoutTempRepository.cs +++ b/CompanyManagment.EFCore/Repository/CustomizeCheckoutTempRepository.cs @@ -226,7 +226,8 @@ namespace CompanyManagment.EFCore.Repository //var year = pc.GetYear(monthStart); //var month = pc.GetMonth(monthStart); - IQueryable customizeCheckoutsQuery = _companyContext.CustomizeCheckoutTemps.Where(x => customizeCheckoutIds.Contains(x.id)); + IQueryable customizeCheckoutsQuery = _companyContext.CustomizeCheckoutTemps.AsSplitQuery() + .Where(x => customizeCheckoutIds.Contains(x.id)); IQueryable workshopsQuery = _companyContext.Workshops.Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.id)); diff --git a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/CheckoutTemporary.cshtml b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/CheckoutTemporary.cshtml index b0058daf..3c858e2d 100644 --- a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/CheckoutTemporary.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/CheckoutTemporary.cshtml @@ -18,73 +18,73 @@ @section Styles { - - - - - - - - + + + + + + + + - + - + .btn-excel span, .btn-print-all span { + display: none; + } + } + } @@ -99,464 +99,464 @@
-
-
-
-
- -
-

اطلاعات فیش حقوقی موقت

-
@Model.WorkshopFullName
-
-
- -
-
-
- -
+
+
+
+
+ +
+

اطلاعات فیش حقوقی موقت

+
@Model.WorkshopFullName
+
+
+ +
+
+
+ + -
-
- +
+
+ - - - -
-
+ + + +
+
-
+
-
-
- -
-
- - لیست فیش حقوقی موقت - -
-
-
- - +
+
+ +
+
+ + لیست فیش حقوقی موقت + +
+
+
+ + - -
-
+ +
+
-
+
- -
-
- -
-
- -@if (@Model.CustomizeCheckouts.Count > 0) -{ -
-
- - -
-
- - - -
-
+ +
+
+ +
+
+ + @if (@Model.CustomizeCheckouts.Count > 0) + { +
+
+ + +
+
+ + + +
+
-
-
-
- - - - -
-
شماره پرسنلی
-
سال
-
ماه
- @*
شماره قرارداد
*@ -
نام پرسنل
-
آغاز قرارداد
-
پایان قرارداد
-
روزهای کارکرد
-
تاخیر در ورود
-
غیبت
-
مساعده
-
مبلغ قابل پرداخت
-
عملیات
-
+
+
+
+ + + + +
+
شماره پرسنلی
+
سال
+
ماه
+ @*
شماره قرارداد
*@ +
نام پرسنل
+
آغاز قرارداد
+
پایان قرارداد
+
روزهای کارکرد
+
تاخیر در ورود
+
غیبت
+
مساعده
+
مبلغ قابل پرداخت
+
عملیات
+
- @foreach (var item in @Model.CustomizeCheckouts) - { -
-
-
- ردیف -
- -
-
-
شماره پرسنلی
-
@item.PersonnelCode
-
-
-
سال
-
@item.Year
-
-
-
ماه
-
@item.Month
-
-@*
+ @foreach (var item in @Model.CustomizeCheckouts) + { +
+
+
+ ردیف +
+ +
+
+
شماره پرسنلی
+
@item.PersonnelCode
+
+
+
سال
+
@item.Year
+
+
+
ماه
+
@item.Month
+
+ @*
شماره قرارداد
@item.ContractNo
*@ -
-
نام پرسنل
-
@item.EmployeeFullName
-
-
-
آغاز قرارداد
-
@item.ContractStartFa
-
-
-
پایان قرارداد
-
@item.ContractEndFa
-
-
-
روزهای کارکرد
-
@item.SumOfWorkingDays
-
-
-
تاخیر در ورود
-
@item.TotalLateToWorkDeduction
-
-
-
غیبت
-
@item.AbsenceDeduction
-
-
-
مساعده
-
@item.SalaryAidDeduction
-
-
-
-
مبلغ قابل پرداخت
-
@(item.TotalPayment + " ریال")
-
-
-
-
- - +
+
نام پرسنل
+
@item.EmployeeFullName
+
+
+
آغاز قرارداد
+
@item.ContractStartFa
+
+
+
پایان قرارداد
+
@item.ContractEndFa
+
+
+
روزهای کارکرد
+
@item.SumOfWorkingDays
+
+
+
تاخیر در ورود
+
@item.TotalLateToWorkDeduction
+
+
+
غیبت
+
@item.AbsenceDeduction
+
+
+
مساعده
+
@item.SalaryAidDeduction
+
+
+
+
مبلغ قابل پرداخت
+
@(item.TotalPayment + " ریال")
+
+
+
+
+ + - -
-
+ +
+
- -
+ +
-
-
- - @(i) -
+
+
+ + @(i) +
-
- - @item.EmployeeFullName - -
-
+
+ + @item.EmployeeFullName + +
+
-
+
-
- آغاز قرارداد - @item.ContractStartFa -
-
- پایان قرارداد - @item.ContractEndFa -
-
- - -
-
-
- +
+ آغاز قرارداد + @item.ContractStartFa +
+
+ پایان قرارداد + @item.ContractEndFa +
+
+ + +
+
+
+ -
- } -
-} -else -{ -
-
-
-
- -
اطلاعاتی وجود ندارد.
-
-
-
-
-} +
+ } +
+ } + else + { +
+
+
+
+ +
اطلاعاتی وجود ندارد.
+
+
+
+
+ } -
+
-
-
-
- -
+
+
+
+ +
@@ -587,37 +587,37 @@ else
-
-
- -
-
- تاریخ شروع - -
-
- تاریخ پایان - -
+
+
+ +
+
+ تاریخ شروع + +
+
+ تاریخ پایان + +
-
- - -
+
+ + +
-
- -
-
+
+ +
+
-
+

جستجو بر اساس سال و ماه

diff --git a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/CheckoutUnofficial.cshtml b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/CheckoutUnofficial.cshtml index 34d1a236..fcc7bdbf 100644 --- a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/CheckoutUnofficial.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/CheckoutUnofficial.cshtml @@ -257,7 +257,7 @@ پرینت گروهی - +
+

سرویس جدید

+
+
+ + + + + +
+ + + + + + + + + \ No newline at end of file diff --git a/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml b/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml new file mode 100644 index 00000000..2f184282 --- /dev/null +++ b/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml @@ -0,0 +1,251 @@ +@page +@model ServiceHost.Areas.AdminNew.Pages.Company.ServiceAmountsManagement.IndexModel + +@{ + string adminVersion = _0_Framework.Application.Version.AdminVersion; + var index = 1; +} + + +@section Styles { + + + + + + + + + + + + + +} + + + + + + +@* *@ + + +
+
+
+ @*Search Box *@ + +
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+ + + +
+ +
+
+
+ +
+ +
+
+ +
+
+ + لیست سرویس ها + +
+
+
+
+
+
+ +
+ +
+
تعداد پرسنل
+
مبلغ قرداد و تصفیه
+
خدمات بیمه
+
خدمات خصور و غیاب
+
خدمات فیش حقوقی غیر رسمی
+
خدمات حضوری قرارداد و تصفیه
+
خدمات حضور بیمه
+
خدمات حضوری موسسه
+
مبلغ کل خدمات سامانه بدون خدمات خصوری
+
مبلغ کل خدمات سامانه + خدمات خصوری
+
+ +
+
+
+
+ +
+
+
+
+
+ + + + + +@section Script { + + + + +} \ No newline at end of file diff --git a/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml.cs b/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml.cs new file mode 100644 index 00000000..f12dd9c7 --- /dev/null +++ b/ServiceHost/Areas/AdminNew/Pages/Company/ServiceAmountsManagement/Index.cshtml.cs @@ -0,0 +1,50 @@ +using CompanyManagment.App.Contracts.InstitutionPlan; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace ServiceHost.Areas.AdminNew.Pages.Company.ServiceAmountsManagement +{ + [Authorize] + public class IndexModel : PageModel + { + private readonly IInstitutionPlanApplication _institutionPlanApplication; + + public IndexModel(IInstitutionPlanApplication institutionPlanApplication) + { + _institutionPlanApplication = institutionPlanApplication; + } + + public void OnGet() + { + } + + public IActionResult OnGetInstitutionPlanList(int pageIndex, int countPeron) + { + var resultData = _institutionPlanApplication.GetInstitutionPlanList(pageIndex, countPeron); + return new JsonResult(new + { + success = true, + data = resultData, + pageIndex = resultData.Count() + }); + } + + public IActionResult OnGetCreateInstitutionPlan() + { + var command = _institutionPlanApplication.GetByFirst(); + return Partial("CreateServiceModal", command); + } + + public IActionResult OnPostCreateInstitutionPlan(CreateInstitutionPlanPercentage command) + { + var result = _institutionPlanApplication.CreateInstitutionPlanPercentage(command); + + return new JsonResult(new + { + success = result.IsSuccedded, + message = result.Message + }); + } + } +} diff --git a/ServiceHost/Areas/AdminNew/Pages/Shared/_Layout.cshtml b/ServiceHost/Areas/AdminNew/Pages/Shared/_Layout.cshtml index a32ad9c5..c41df2fe 100644 --- a/ServiceHost/Areas/AdminNew/Pages/Shared/_Layout.cshtml +++ b/ServiceHost/Areas/AdminNew/Pages/Shared/_Layout.cshtml @@ -60,7 +60,9 @@ - + + + @* *@ diff --git a/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml b/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml index 3e407686..0a2349ab 100644 --- a/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml +++ b/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml @@ -304,6 +304,14 @@ تعطیلات رسمی +
  • + + + + + مبالغ سرویس‌ها + +
  • diff --git a/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/CreateServiceModal.css b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/CreateServiceModal.css new file mode 100644 index 00000000..275d9513 --- /dev/null +++ b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/CreateServiceModal.css @@ -0,0 +1,32 @@ +.modal-body { + user-select: none; +} + +.titleInput { + font-size: 14px; + color: #4E4E4E; +} + +.btn-cancel { + padding: 6px 10px; + width: 190px; +} + +.btn-save { + padding: 6px 10px; + width: 190px; + background-color: #84CC16; + border-radius: 5px; + color: #ffffff; + font-size: 14px; + font-style: normal; + font-weight: 600; + line-height: 24px; +} + +.percentageInput { + top: 50%; + left: 8px; + color: #8B8B8B; + transform: translate(0, -50%); +} \ No newline at end of file diff --git a/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/Index.css b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/Index.css new file mode 100644 index 00000000..2358fdce --- /dev/null +++ b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/css/Index.css @@ -0,0 +1,469 @@ +.ServiceModal-width { + max-width: 710px; +} + +.sticky { + position: sticky; + top: 5px; + z-index: 10; +} + +.goToTop { + position: fixed; + bottom: -10px; + margin-right: 100px; + z-index: 100; + color: #fff; + background-color: #25acacd6; +} + +.goToTop:hover { + color: #fff; + background-color: #2ca4a4; +} + +.btn-create { + background-color: #84CC16; + border-radius: 7px; + color: #ffffff; + padding: 3px 12px; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 24px; +} + +.Rtable .Rtable-row .Rtable-cell.column-heading { + height: 100%; + align-items: center; + justify-content: center; +} + +.service-list .Rtable-cell.width2, +.service-list .Rtable-cell.width3, +.service-list .Rtable-cell.width4, +.service-list .Rtable-cell.width5 { + background: #16b7971f; + padding: 8px 0; +} + +.service-list .Rtable-cell.width6, +.service-list .Rtable-cell.width7 { + background: #359bb130; + padding: 8px 0; +} + +.service-list .Rtable-cell.width8, +.service-list .Rtable-cell.width9, +.service-list .Rtable-cell.width10 { + background: #d3d00836; + padding: 8px 0; +} + +.table-service .width1, +.table-service .service-list .width1 { + width: 5% !important; +} + +.table-service .width2, +.table-service .service-list .width2 { + width: 10% !important; +} + +.table-service .width3, +.table-service .service-list .width3 { + width: 10% !important; +} + +.table-service .width4, +.table-service .service-list .width4 { + width: 10% !important; +} + +.table-service .width5, +.table-service .service-list .width5 { + width: 10% !important; +} + +.table-service .width6, +.table-service .service-list .width6 { + width: 11% !important; +} + +.table-service .width7, +.table-service .service-list .width7 { + width: 11% !important; +} + +.table-service .width8, +.table-service .service-list .width8 { + width: 11% !important; +} + +.table-service .width9, +.table-service .service-list .width9 { + width: 11% !important; +} + +.table-service .width10, +.table-service .service-list .width10 { + width: 11% !important; +} + +.table-service .width11, +.table-service .service-list .width11 { + width: 95% !important; +} + +.table-service .service-list .width3 .Rtable-cell--content, +.table-service .service-list .width7 .Rtable-cell--content { + text-align: center; + text-align: -webkit-center; +} + +.table-service .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-service .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-service .Rtable-cell.column-heading { + font-size: 12px !important; + } + + /*.table-service .width1, + .table-service .ticket-list .width1 { + width: 5% !important; + }*/ + + .table-service .Rtable-cell.column-heading.width2 { + width: 18% !important; + } + + .table-service .width2, + .table-service .ticket-list .width2 { + width: 12% !important; + } + + /* .table-service .width3, + .table-service .ticket-list .width3 { + width: 5% !important; + }*/ + + /*/*.table-service .width3, + .table-service .ticket-list .width3 { + width: 17% !important; + text-align: center !important; + } + + .table-service .width4, + .table-service .ticket-list .width4 { + width: 15% !important; + } + + .table-service .width5, + .table-service .ticket-list .width5 { + width: 15% !important;*/ + /*text-align: center !important;*/ + /*}*/ + + .table-service .ticket-list .width3 .Rtable-cell--content { + text-align: center; + text-align: -webkit-center; + } + + .table-service .ticket-list .Rtable-cell--content { + font-size: 11px; + } + + .table-service .width6, + .table-service .ticket-list .width6 { + width: 16% !important; + } + + .table-service .width7, + .table-service .ticket-list .width7 { + width: 8% !important; + text-align: center !important; + } + + .table-service .width8, + .table-service .ticket-list .width8 { + width: 5% !important; + } +} + + + +@media (max-width: 992px) { + .table-service .width1 { + width: 4% !important; + } + + .table-service .width7, .table-service .ticket-list .width7 { + width: 4% !important; + text-align: end !important; + } +} + +@media (max-width: 767px) { + .goToTop { + position: fixed; + bottom: 54px; + margin-right: 39%; + z-index: 100; + color: #fff; + background-color: #25acac70; + } + + .Rtable--collapse .Rtable-row { + outline: 0; + border: 1px solid #ECFFFF; + padding: 0; + margin: 5px 0px 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 { + justify-content: end; + } + + .Rtable--collapse .Rtable-row .Rtable-cell.width5 { + justify-content: center; + } + + .Rtable--collapse .Rtable-row .Rtable-cell.width4 { + justify-content: center; + } + + .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; + } + + .table-service .width1, + .table-service .service-list .width1 { + width: 10% !important; + } + + .table-service .width11, + .table-service .service-list .width11 { + width: 90% !important; + } +} diff --git a/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/CreateServiceModal.js b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/CreateServiceModal.js new file mode 100644 index 00000000..c2c5c686 --- /dev/null +++ b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/CreateServiceModal.js @@ -0,0 +1,62 @@ +var ajax = new AjaxService(antiForgeryToken); +$(document).ready(function () { + $(".select2Option").select2({ + language: "fa", + dir: "rtl", + dropdownParent: $('#MainModal'), + templateResult: function (data, container) { + if (data.element) { + $(container).addClass($(data.element).attr("class")); + } + return data.text; + } + }); + + $(document).ready(function () { + $('.numeric-only').on('input', function () { + let element = $(this); + let value = convertPersianNumbersToEnglish(element.val()); + + value = value.replace(/[^0-9]/g, ''); + + element.val(value); + }); + }); + +}); + +function SaveDataAjax() { + var loading = $('#createData .spinner-loading'); + + var data = $('#create-form').serialize(); + + ajax.post(createInstitutionPlanUrl, data, false) + .then(response => { + if (response.success) { + loading.show(); + $('.alert-success-msg').show(); + $('.alert-success-msg p').text(response.message); + setTimeout(function () { + $('.alert-success-msg').hide(); + $('.alert-success-msg p').text(''); + }, 2000); + + pageIndexMain = 0; + $('#LoadDataOfServices').html('
    '); + ajaxDataService(); + + loading.hide(); + $('#MainModal').modal('hide'); + + } else { + $('.alert-msg').show(); + $('.alert-msg p').text(response.message); + setTimeout(function () { + $('.alert-msg').hide(); + $('.alert-msg p').text(''); + }, 3500); + + loading.hide(); + } + }); +} \ No newline at end of file diff --git a/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/Index.js b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/Index.js new file mode 100644 index 00000000..2083fee6 --- /dev/null +++ b/ServiceHost/wwwroot/AssetsAdminNew/ServiceAmountsManagement/js/Index.js @@ -0,0 +1,211 @@ +var ajax = new AjaxService(antiForgeryToken); +var pageIndexMain = 0; + +$(document).on('click', ".openAction", function () { + if (window.matchMedia('(max-width: 767px)').matches) { + $(this).next().find(".operations-btns").slideToggle(500); + $(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500); + } +}); + +$(document).ready(function () { + ajaxDataService(); + + const { countPerson } = getSearchParamsFromUrl(); + $('#countPersonInput').val(countPerson); + $('#countPersonInputMobile').val(countPerson); + + if (countPerson !== "") { + $('.btn-clear-filter').removeClass('disable'); + } else { + $('.btn-clear-filter').addClass('disable'); + } + + $(window).scroll(function () { + if ($(window).scrollTop() + $(window).height() > $(document).height() - 600) { + ajaxDataService(); + } + + if ($(this).scrollTop() > 100) { + $('.goToTop').show().fadeIn(); + } else { + $('.goToTop').fadeOut().hide(); + } + }); + + $('.goToTop').on('click', function () { + $('html, body').animate({ scrollTop: 0 }, 360); + return false; + }); + + $('.btn-search-click').click(function () { + var isMobile = window.matchMedia('(max-width: 767px)').matches; + var inputCountPerson = isMobile ? $('#countPersonInputMobile') : $('#countPersonInput'); + + if (inputCountPerson.val().trim() === '') { + inputCountPerson.addClass('errored'); + $('.alert-msg').show(); + $('.alert-msg p').text('لطفا تعداد پرسنل وارد کنید.'); + + setTimeout(function () { + $('.alert-msg').hide(); + $('.alert-msg p').text(''); + inputCountPerson.removeClass('errored'); + }, 3500); + + return; + } + + const { countPerson } = getSearchParamsFromUrl(); + var countPersonParams = countPerson; + + if (countPersonParams !== '') { + $('.btn-clear-filter').removeClass('disable'); + } else { + $('.btn-clear-filter').addClass('disable'); + } + + paramsUrl(inputCountPerson.val()); + + pageIndexMain = 0; + $('#LoadDataOfServices').html('
    '); + ajaxDataService(); + + if (isMobile) { + $('#searchModal').modal('hide'); + } + + }); +}); + +function ajaxDataService() { + var htmlContent = ''; + const { countPerson } = getSearchParamsFromUrl(); + ajax.get(loadInstitutionPlanListUrl, { pageIndex: pageIndexMain, countPeron: countPerson }, false) + .then(response => { + pageIndexMain = pageIndexMain + response.pageIndex; + var data = response.data; + + if (data.length > 0) { + data.forEach(function (item, index) { + htmlContent += ` +
    +
    +
    ${item.countPerson}
    +
    +
    +
    ${item.contractAndCheckout}
    +
    +
    +
    ${item.insurance}
    +
    +
    +
    ${item.rollCall}
    +
    +
    +
    ${item.customizeCheckout}
    +
    +
    +
    ${item.contractAndCheckoutInPerson}
    +
    +
    +
    ${item.insuranceInPerson}
    +
    +
    +
    ${item.inPersonSumAmountStr}
    +
    +
    +
    ${item.onlineOnlySumAmountStr}
    +
    +
    +
    ${item.onlineAndInPersonSumAmountStr}
    +
    + +
    +
    +
    + عملیات بیشتر +
    +
    +
    +
    +
    +
    +
    +
    + تعداد پرسنل + ${item.countPerson} +
    +
    + مبلغ قرداد و تصفیه + ${item.contractAndCheckout} ریال +
    +
    + خدمات بیمه + ${item.insurance} ریال +
    +
    + خدمات خصور و غیاب + ${item.rollCall} ریال +
    +
    + خدمات فیش حقوقی غیر رسمی + ${item.customizeCheckout} ریال +
    +
    + خدمات حضوری قرارداد و تصفیه + ${item.contractAndCheckoutInPerson} ریال +
    +
    + خدمات حضور بیمه + ${item.insuranceInPerson} ریال +
    +
    + خدمات حضوری موسسه + ${item.inPersonSumAmountStr} ریال +
    +
    + مبلغ کل خدمات سامانه بدون خدمات خصوری + ${item.onlineOnlySumAmountStr} ریال +
    +
    + مبلغ کل خدمات سامانه + خدمات خصوری + ${item.onlineAndInPersonSumAmountStr} ریال +
    +
    +
    +
    + `; + }); + $('#LoadDataOfServices').append(htmlContent); + } + }); +} + +function openCreateModal() { + AjaxUrlContentModal(showModalNewServiceUrl); +} + +function paramsUrl(countPerson) { + const params = new URLSearchParams(); + let hasAnyFilter = false; + + if (countPerson !== '') { + params.set("count-person", countPerson); + hasAnyFilter = true; + } + + const newUrl = hasAnyFilter + ? `${window.location.origin}/AdminNew/Company/ServiceAmountsManagement?${params.toString()}` + : `${window.location.origin}/AdminNew/Company/ServiceAmountsManagement`; + + window.history.pushState({}, '', newUrl); +} + +function getSearchParamsFromUrl() { + const urlParams = new URLSearchParams(window.location.search); + + return { + countPerson : urlParams.get("count-person") || "" + }; +} \ No newline at end of file From d816e73fed2d8f0b341854c2ada7bda6c7c86cdf Mon Sep 17 00:00:00 2001 From: MahanCh Date: Tue, 22 Apr 2025 19:13:15 +0330 Subject: [PATCH 07/14] delete useless workshopId --- ServiceHost/Areas/Client/Pages/Shared/_ClientLayout.cshtml | 1 - ServiceHost/Areas/Client/Pages/Shared/_Menu.cshtml | 1 - 2 files changed, 2 deletions(-) diff --git a/ServiceHost/Areas/Client/Pages/Shared/_ClientLayout.cshtml b/ServiceHost/Areas/Client/Pages/Shared/_ClientLayout.cshtml index 647d9b6b..48210f47 100644 --- a/ServiceHost/Areas/Client/Pages/Shared/_ClientLayout.cshtml +++ b/ServiceHost/Areas/Client/Pages/Shared/_ClientLayout.cshtml @@ -10,7 +10,6 @@ @{ string clientVersion = _0_Framework.Application.Version.StyleVersion; var currentAccount = AuthHelper.CurrentAccountInfo(); - long workshopId = currentAccount.WorkshopList.First(x => x.Slug == currentAccount.WorkshopSlug).Id; int countWorkFlow = 0;/* await WorkFlowApplication.GetCountAllWorkFlows(workshopId); */ var viewData = new ViewDataDictionary(new EmptyModelMetadataProvider(), new ModelStateDictionary()) { { "countWorkFlow", countWorkFlow } }; } diff --git a/ServiceHost/Areas/Client/Pages/Shared/_Menu.cshtml b/ServiceHost/Areas/Client/Pages/Shared/_Menu.cshtml index b1c2007f..bb014ee4 100644 --- a/ServiceHost/Areas/Client/Pages/Shared/_Menu.cshtml +++ b/ServiceHost/Areas/Client/Pages/Shared/_Menu.cshtml @@ -15,7 +15,6 @@ @{ var currentAccount = AuthHelper.CurrentAccountInfo(); var statementInfo = ContractingPartyApp.GetContractingpartyIdByAccountId(currentAccount.Id); - long workshopId = currentAccount.WorkshopList.First(x => x.Slug == currentAccount.WorkshopSlug).Id; } From 57930aae4f99a8d44c39d5143f9721d01610d075 Mon Sep 17 00:00:00 2001 From: SamSys Date: Tue, 22 Apr 2025 19:14:26 +0330 Subject: [PATCH 08/14] rotatingShift Compute on Rollcall Bug Fixed --- .../RollCallEmployeeStatusApplication.cs | 5 ++++- .../Repository/RollCallMandatoryRepository.cs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CompanyManagment.Application/RollCallEmployeeStatusApplication.cs b/CompanyManagment.Application/RollCallEmployeeStatusApplication.cs index 6d5b1dc0..8b95f3a0 100644 --- a/CompanyManagment.Application/RollCallEmployeeStatusApplication.cs +++ b/CompanyManagment.Application/RollCallEmployeeStatusApplication.cs @@ -123,7 +123,10 @@ namespace CompanyManagment.Application bool skipRollCallByEmployeeId = employeeId is 42550; if (skipRollCallByEmployeeId) return false; - + + //9211 محسا تازه + if (employeeId == 9211 && contractStart >= start1404) + return false; var service = _rollCallServiceRepository.GetAllServiceByWorkshopId(workshopId); diff --git a/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs b/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs index e4cac8e7..24ff10d8 100644 --- a/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs +++ b/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs @@ -845,7 +845,7 @@ CreateWorkingHoursTemp command, bool holidayWorking) if (shift.Start >= eveningStart // 22<---<14 && shift.End <= eveningEnd) { - eveningWorkingTime = morningWorkingTime.Add(eveningEnd - eveningStart); + eveningWorkingTime = eveningWorkingTime.Add(shift.End - shift.Start); } else if (shift.Start >= eveningStart && shift.Start < eveningEnd // 6<---22---14 && shift.End > nightStart && shift.End <= nightEndNextday) From 5da9d2387581425fc57f2a88965ed5d66ce9dab7 Mon Sep 17 00:00:00 2001 From: MahanCh Date: Tue, 22 Apr 2025 19:26:08 +0330 Subject: [PATCH 09/14] add sms and task fix --- ServiceHost/Areas/Admin/Pages/Index.cshtml | 111 ++++++++++++------ .../AssetsAdmin/page/Index/js/Index.js | 10 +- .../Tasks/css/createScheduleModal.css | 2 +- .../Tasks/css/task-manager-create.css | 3 +- .../Tasks/js/CreateScheduleModal.js | 7 +- 5 files changed, 92 insertions(+), 41 deletions(-) diff --git a/ServiceHost/Areas/Admin/Pages/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Index.cshtml index c59f1adf..7fa9404b 100644 --- a/ServiceHost/Areas/Admin/Pages/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Index.cshtml @@ -1,4 +1,5 @@ -@page +permission="2" +@page @using _0_Framework.Application @using AccountManagement.Application.Contracts.TicketAccessAccount @using Microsoft.AspNetCore.Mvc.TagHelpers @@ -17,12 +18,7 @@ @@ -197,25 +231,34 @@
    -
    -
    + + + + + + +

    بکاپ

    + + +
    +
    diff --git a/ServiceHost/wwwroot/AssetsAdmin/page/Index/js/Index.js b/ServiceHost/wwwroot/AssetsAdmin/page/Index/js/Index.js index 138ce2e1..2e3e24f0 100644 --- a/ServiceHost/wwwroot/AssetsAdmin/page/Index/js/Index.js +++ b/ServiceHost/wwwroot/AssetsAdmin/page/Index/js/Index.js @@ -14,9 +14,11 @@ function updateAmountColor() { const amountDiv = document.querySelector("#amountSms"); const smsDiv = document.getElementById('smsDiv'); + const stnSmsDiv = document.getElementById('btnSMS'); if (!amountDiv) return; - - const rawText = amountDiv.textContent.replace(/[, ]/g, '').replace('ریال', ''); + + //const rawText = amountDiv.textContent.replace(/[, ]/g, '').replace('ریال', ''); + const rawText = amountDiv.textContent.replace(/[, ]/g, ''); const amount = parseInt(rawText); @@ -25,12 +27,16 @@ function updateAmountColor() { amountDiv.classList.add("card-amount-warn"); smsDiv.classList.remove("gwb-card-blue"); smsDiv.classList.add("gwb-card-red"); + stnSmsDiv.classList.add("btn-sms-red"); + stnSmsDiv.classList.remove("btn-sms-green"); } else { amountDiv.classList.remove("card-amount-warn"); amountDiv.classList.remove("gbt-card-red"); amountDiv.classList.add("card-amount-success"); smsDiv.classList.add("gwb-card-blue"); smsDiv.classList.remove("gwb-card-red"); + stnSmsDiv.classList.add("btn-sms-green"); + stnSmsDiv.classList.remove("btn-sms-red"); } } diff --git a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/createScheduleModal.css b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/createScheduleModal.css index 0b3787f5..e678c7d0 100644 --- a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/createScheduleModal.css +++ b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/createScheduleModal.css @@ -6,7 +6,7 @@ border-radius: 7px; } .modal-content { - height: 890px; + height: 720px; } .modal-body { diff --git a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/task-manager-create.css b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/task-manager-create.css index 22061773..d0bed06c 100644 --- a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/task-manager-create.css +++ b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/task-manager-create.css @@ -48,7 +48,8 @@ background-color: #F6F6F6; font-size: 13px; font-weight: 500; - height: 140px; + /* height: 150px !important;*/ + /* height: 53px !important;*/ } .tm-create .upload-voice-container { diff --git a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/js/CreateScheduleModal.js b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/js/CreateScheduleModal.js index 41201173..34a7b00b 100644 --- a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/js/CreateScheduleModal.js +++ b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/js/CreateScheduleModal.js @@ -153,7 +153,7 @@ $(document).ready(function () { $("#normalTask").prop("checked", true); $(".scheduleTask").hide(); - $(".tm-create .tm-textarea").css("height", "335px"); + $(".tm-create .tm-textarea").css("height", "160px"); $(".tm-create .upload-voice-container").css("height", "335px"); @@ -163,7 +163,8 @@ $(document).ready(function () { $("#normalTask").prop("checked", true); $(".scheduleTask").hide(); - $(".tm-create .tm-textarea").css("height", "335px"); + $(".tm-create .tm-textarea").css("height", "160px"); + $(".tm-create .upload-voice-container").css("height", "335px"); }); $("#scheduleTask").click(function () { @@ -171,7 +172,7 @@ $(document).ready(function () { $("#scheduleTask").prop("checked", true); $(".scheduleTask").show(); - $(".tm-create .tm-textarea").css("height", "227px"); + $(".tm-create .tm-textarea").css("height", "53px"); $(".tm-create .upload-voice-container").css("height", "227px"); }); From 08913d38f215f34e8edb1731437a269033abcbe1 Mon Sep 17 00:00:00 2001 From: SamSys Date: Tue, 22 Apr 2025 19:29:33 +0330 Subject: [PATCH 10/14] mahan --- ServiceHost/Areas/Admin/Pages/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ServiceHost/Areas/Admin/Pages/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Index.cshtml index 7fa9404b..84910572 100644 --- a/ServiceHost/Areas/Admin/Pages/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Index.cshtml @@ -1,4 +1,4 @@ -permission="2" + @page @using _0_Framework.Application @using AccountManagement.Application.Contracts.TicketAccessAccount From f901f8a682b2f9875b6dfe05af7825e62432544e Mon Sep 17 00:00:00 2001 From: MahanCh Date: Tue, 22 Apr 2025 19:57:45 +0330 Subject: [PATCH 11/14] change the create leave modal --- .../Company/Employees/CreateLeave.cshtml | 40 ++++--- .../Company/Employees/LeaveCreateModal.cshtml | 108 ++++++++++-------- .../Pages/Company/WorkFlow/LeaveCreate.cshtml | 38 +++--- .../Areas/Client/Pages/LeaveCreate.cshtml | 60 +++++----- .../pages/Employees/js/createleave.js | 70 +++++++----- .../pages/Index/js/LeaveCreate.js | 67 ++++++----- .../pages/WorkFlow/js/LeaveCreate.js | 88 +++++++++----- 7 files changed, 273 insertions(+), 198 deletions(-) diff --git a/ServiceHost/Areas/Client/Pages/Company/Employees/CreateLeave.cshtml b/ServiceHost/Areas/Client/Pages/Company/Employees/CreateLeave.cshtml index c98843fe..036ad632 100644 --- a/ServiceHost/Areas/Client/Pages/Company/Employees/CreateLeave.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/Employees/CreateLeave.cshtml @@ -55,28 +55,29 @@
    -
    -
    - -
    -
    -
    - -