This commit is contained in:
2025-04-24 14:49:09 +03:30
44 changed files with 2602 additions and 929 deletions

View File

@@ -182,7 +182,7 @@ public class RollCallDomainService : IRollCallDomainService
return shiftDetails.shiftType switch
{
WorkshopShiftStatus.Regular => CalculateRegularShiftDate(rollCallStartDate, offset),
WorkshopShiftStatus.Rotating => FindRotatingShift(rollCallEndDate,rollCallEndDate,shiftDetails.rotatingShifts).start.Date,
WorkshopShiftStatus.Rotating => FindRotatingShift(rollCallStartDate,rollCallEndDate,shiftDetails.rotatingShifts).start.Date,
WorkshopShiftStatus.Irregular => rollCallStartDate.Date,
_ => throw new ArgumentOutOfRangeException()
};

View File

@@ -336,15 +336,19 @@ public class RollCallApplication : IRollCallApplication
public OperationResult ManualEdit(CreateOrEditEmployeeRollCall command)
{
var operation = new OperationResult();
var now = DateTime.Now;
DateTime date = command.DateFa.ToGeorgianDateTime();
if (date == Tools.GetUndefinedDateTime())
return operation.Failed("فرمت تاریخ وارد شده صحیح نمی باشد");
if (date >= DateTime.Now.Date)
{
return operation.Failed("امکان اضافه کردن حضور غیاب برای روز جاری و روز های آینده وجود ندارد");
}
//if (date >= DateTime.Now.Date)
//{
// return operation.Failed("امکان اضافه کردن حضور غیاب برای روز جاری و روز های آینده وجود ندارد");
//}
var twoDaysEarlier = date.AddDays(-2).Date;
var twoDaysLater = date.AddDays(2).Date >= DateTime.Today
@@ -407,8 +411,8 @@ public class RollCallApplication : IRollCallApplication
if (startDateTime >= endDateTime)
return operation.Failed("زمان ورود نمی تواند بعد یا مساوی زمان خروج باشد");
if (endDateTime.Date >= DateTime.Today)
return operation.Failed("نمی توانید برای روز جاری یا روز های آینده حضور غیاب ثبت کنید");
//if (endDateTime.Date >= DateTime.Today)
// return operation.Failed("نمی توانید برای روز جاری یا روز های آینده حضور غیاب ثبت کنید");
var rollCall = new EditRollCall
{
@@ -420,7 +424,10 @@ public class RollCallApplication : IRollCallApplication
}
if (newRollCallDates.Any(x => x.StartDate >= now || x.EndDate >= now))
{
return operation.Failed("حضورغیاب وارد شده نمیتواند در آینده باشد");
}
if (newRollCallDates.Any(x => newRollCallDates.Any(y => x != y && x.EndDate >= y.StartDate && x.StartDate <= y.EndDate)))
return operation.Failed("بازه های وارد شده با هم تداخل دارند");
@@ -447,7 +454,7 @@ public class RollCallApplication : IRollCallApplication
{
x.ShiftDate =
_rollCallDomainService.GetEmployeeShiftDateByRollCallStartDate(command.WorkshopId, command.EmployeeId,
x.StartDate!.Value,x.EndDate!.Value);
x.StartDate!.Value,x.EndDate.Value);
});
if (newRollCallDates.Any(x => x.ShiftDate.Date != date.Date))
@@ -455,14 +462,13 @@ public class RollCallApplication : IRollCallApplication
return operation.Failed("حضور غیاب در حال ویرایش را نمیتوانید از تاریخ شیفت عقب تر یا جلو تر ببرید");
}
if (new TimeSpan(newRollCallDates.Sum(x => (x.EndDate.Value - x.StartDate.Value).Ticks)) > TimeSpan.FromHours(26))
{
return operation.Failed("بازه حضور پرسنل نمی تواند بیشتر از 26 ساعت باشد");
}
if (new TimeSpan(newRollCallDates.Sum(x => (x.EndDate.Value - x.StartDate.Value).Ticks)) > TimeSpan.FromHours(26))
{
return operation.Failed("بازه حضور پرسنل نمی تواند بیشتر از 26 ساعت باشد");
}
if (newRollCallDates.Any(x => employeeRollCalls.Any(y =>
if (newRollCallDates.Any(x => employeeRollCalls.Any(y =>
y.StartDate.Value.Date != command.DateFa.ToGeorgianDateTime().Date &&
x.EndDate >= y.StartDate.Value && x.StartDate <= y.EndDate.Value)))
return operation.Failed("بازه های وارد شده با حضور غیاب های مربوط به روز های قبل و بعد تداخل زمانی دارد");
@@ -496,26 +502,27 @@ public class RollCallApplication : IRollCallApplication
_rollCallRepository.AddRange(rollCallsAsEntityModels);
_rollCallRepository.SaveChanges();
foreach (var rollCallsAsEntityModel in rollCallsAsEntityModels)
{
rollCallsAsEntityModel.Edit(rollCallsAsEntityModel.StartDate.Value, rollCallsAsEntityModel.EndDate.Value, _rollCallDomainService);
}
_rollCallRepository.SaveChanges();
return operation.Succcedded();
}
public OperationResult ManualEditForUndefined(CreateOrEditEmployeeRollCall command)
{
var operation = new OperationResult();
var now = DateTime.Now;
DateTime date = command.DateFa.ToGeorgianDateTime();
if (date == Tools.GetUndefinedDateTime())
return operation.Failed("فرمت تاریخ وارد شده صحیح نمی باشد");
if (date >= DateTime.Now.Date)
{
return operation.Failed("امکان اضافه کردن حضور غیاب برای روز جاری و روز های آینده وجود ندارد");
}
//if (date >= DateTime.Now.Date)
//{
// return operation.Failed("امکان اضافه کردن حضور غیاب برای روز جاری و روز های آینده وجود ندارد");
//}
var twoDaysEarlier = date.AddDays(-2).Date;
var twoDaysLater = date.AddDays(2).Date >= DateTime.Today
@@ -578,8 +585,8 @@ public class RollCallApplication : IRollCallApplication
if (startDateTime >= endDateTime)
return operation.Failed("زمان ورود نمی تواند بعد یا مساوی زمان خروج باشد");
if (endDateTime.Date >= DateTime.Today)
return operation.Failed("نمی توانید برای روز جاری یا روز های آینده حضور غیاب ثبت کنید");
//if (endDateTime.Date >= DateTime.Today)
// return operation.Failed("نمی توانید برای روز جاری یا روز های آینده حضور غیاب ثبت کنید");
var rollCall = new EditRollCall
{
@@ -594,6 +601,12 @@ public class RollCallApplication : IRollCallApplication
{
});
if (newRollCallDates.Any(x => x.StartDate >= now || x.EndDate >= now))
{
return operation.Failed("حضورغیاب وارد شده نمیتواند در آینده باشد");
}
if (newRollCallDates.Any(x => newRollCallDates.Any(y => x != y && x.EndDate >= y.StartDate && x.StartDate <= y.EndDate)))
return operation.Failed("بازه های وارد شده با هم تداخل دارند");
@@ -618,7 +631,7 @@ public class RollCallApplication : IRollCallApplication
{
x.ShiftDate =
_rollCallDomainService.GetEmployeeShiftDateByRollCallStartDate(command.WorkshopId, command.EmployeeId,
x.StartDate!.Value,x.EndDate!.Value);
x.StartDate!.Value,x.EndDate.Value);
});
if (newRollCallDates.Any(x => x.ShiftDate.Date != date.Date))
{
@@ -626,10 +639,10 @@ public class RollCallApplication : IRollCallApplication
}
if (new TimeSpan(newRollCallDates.Sum(x => (x.EndDate.Value - x.StartDate.Value).Ticks)) > TimeSpan.FromHours(26))
{
return operation.Failed("بازه حضور پرسنل نمی تواند بیشتر از 26 ساعت باشد");
return operation.Failed("بازه حضور پرسنل نمی تواند بیشتر از 26 ساعت باشد");
}
if (newRollCallDates.Any(x => employeeRollCalls.Any(y =>
if (newRollCallDates.Any(x => employeeRollCalls.Any(y =>
y.StartDate.Value.Date != command.DateFa.ToGeorgianDateTime().Date &&
x.EndDate >= y.StartDate.Value && x.StartDate <= y.EndDate.Value)))
return operation.Failed("بازه های وارد شده با حضور غیاب های مربوط به روز های قبل و بعد تداخل زمانی دارد");

View File

@@ -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;
}
@@ -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);

View File

@@ -84,7 +84,7 @@ namespace CompanyManagment.EFCore.Repository
//var year = pc.GetYear(monthStart);
//var month = pc.GetMonth(monthStart);
IQueryable<CustomizeCheckout> customizeCheckoutsQuery = _companyContext.CustomizeCheckouts
IQueryable<CustomizeCheckout> customizeCheckoutsQuery = _companyContext.CustomizeCheckouts.AsSplitQuery()
.Where(x => customizeCheckoutIds.Contains(x.id)).Include(x => x.CheckoutFines);
IQueryable<Workshop> workshopsQuery = _companyContext.Workshops.Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.id));

View File

@@ -226,7 +226,8 @@ namespace CompanyManagment.EFCore.Repository
//var year = pc.GetYear(monthStart);
//var month = pc.GetMonth(monthStart);
IQueryable<CustomizeCheckoutTemp> customizeCheckoutsQuery = _companyContext.CustomizeCheckoutTemps.Where(x => customizeCheckoutIds.Contains(x.id));
IQueryable<CustomizeCheckoutTemp> customizeCheckoutsQuery = _companyContext.CustomizeCheckoutTemps.AsSplitQuery()
.Where(x => customizeCheckoutIds.Contains(x.id));
IQueryable<Workshop> workshopsQuery = _companyContext.Workshops.Where(x => customizeCheckoutsQuery.Any(y => y.WorkshopId == x.id));

View File

@@ -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<LeaveViewModel> 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<LeaveViewModel> 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<LeaveViewModel> 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<LeaveViewModel> 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<LeaveViewModel> 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<LeaveViewModel> 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);
@@ -790,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)

View File

@@ -2389,13 +2389,18 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, 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<long, YearlySalary>, 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<long, YearlySalary>, 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<long, YearlySalary>, 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<long, YearlySalary>, 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<long, YearlySalary>, 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<long, YearlySalary>, 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<long, YearlySalary>, 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);

View File

@@ -712,6 +712,36 @@
</label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 parent"> <input type="checkbox" value="800" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> بیمه </span>&nbsp;</label>
@*صفحه اصلی*@
<div class="child-check level2">
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn" />
</label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="802" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> صفحه اصلی </span> </label>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80210" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> ایجاد </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80211" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> حذف </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80212" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> تایید ارسال </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80213" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> ویرایش </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80214" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> پرینت </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80215" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> پرینت تایید کارفرما </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80216" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> دانلود فایل بیمه </span> </label>
</div>
</div>
@*لیست مشاغل مقطوع*@
<div class="child-check level2">
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">

View File

@@ -709,23 +709,53 @@
</div>
</div>
@* بیمه *@
<div class="parent-check">
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn"/>
</label>
@* بیمه *@
<div class="parent-check">
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn" />
</label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 parent"> <input type="checkbox" value="800" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> بیمه </span>&nbsp;</label>
@*لیست مشاغل مقطوع*@
<div class="child-check level2">
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn"/>
</label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="801" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> لیست مشاغل مقطوع </span> </label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 parent"> <input type="checkbox" value="800" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> بیمه </span>&nbsp;</label>
@*صفحه اصلی*@
<div class="child-check level2">
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn" />
</label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="802" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> صفحه اصلی </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80210" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> ایجاد </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80211" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> حذف </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80212" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> تایید ارسال </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80213" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> ویرایش </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80214" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> پرینت </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80215" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> پرینت تایید کارفرما </span> </label>
</div>
<div class="child-check level3">
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80216" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> دانلود فایل بیمه </span> </label>
</div>
</div>
</div>
@*لیست مشاغل مقطوع*@
<div class="child-check level2">
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn" />
</label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="801" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> لیست مشاغل مقطوع </span> </label>
</div>
</div>
@* کارپوشه *@
<div class="parent-check">

View File

@@ -7123,6 +7123,36 @@ public class IndexModel : PageModel
familyAllowance = familyAllowanceStep4.ToMoney();
}
}
else
{
var HousingAllowonceNumberType = HousingAllowance.MoneyToDouble();
var ConsumableItemsNumberType = ConsumableItems.MoneyToDouble();
var familyAllowanceNumberType = familyAllowance.MoneyToDouble();
var HousingStep1 = HousingAllowonceNumberType / 30;
var HousingStep4 = HousingStep1 * AllDaysCountWithOutSickLive;
HousingAllowance = HousingStep4.ToMoney();
var consumableItemsStep1 = ConsumableItemsNumberType / 30;
var consumableItemsStep4 = consumableItemsStep1 * AllDaysCountWithOutSickLive;
ConsumableItems = consumableItemsStep4.ToMoney();
//حق تاهل
if (MarriedAllowance > 0)
{
var MarriedStep1 = MarriedAllowance / 30;
var MarriedStep4 = MarriedStep1 * AllDaysCountWithOutSickLive;
MarriedAllowanceStr = MarriedStep4.ToMoney();
}
if (familyAllowance != "0")
{
var familyAllowanceStep1 = familyAllowanceNumberType / 30;
var familyAllowanceStep4 = familyAllowanceStep1 * AllDaysCount;
familyAllowance = familyAllowanceStep4.ToMoney();
}
}
}
#endregion

View File

@@ -91,7 +91,7 @@
</div>
<p class="">
@* pull-right *@
<a id="btnPopModal" href="#showmodal=@Url.Page("/Company/InsuranceList/Index", "Create")" class="btn btn-success btn-rounded waves-effect waves-light m-b-5 " style=" background-color: #f5f5f5; border-color: #0f9500; font-family: 'Web_Yekan' !important; color: #0f9500 !important; margin-right: 10px "> <i class="fa fa-user-plus" style="padding-left: 3px; font-size: 14px; color: #0f9500 !important "></i> ایجاد لیست بیمه </a>
<a permission="80210" id="btnPopModal" href="#showmodal=@Url.Page("/Company/InsuranceList/Index", "Create")" class="btn btn-success btn-rounded waves-effect waves-light m-b-5 " style=" background-color: #f5f5f5; border-color: #0f9500; font-family: 'Web_Yekan' !important; color: #0f9500 !important; margin-right: 10px "> <i class="fa fa-user-plus" style="padding-left: 3px; font-size: 14px; color: #0f9500 !important "></i> ایجاد لیست بیمه </a>
</p>
</div>
<div class="col-sm-12">

View File

@@ -78,13 +78,13 @@
@if ((currentAccout.RoleId == 1 && item.ConfirmSentlist) || !item.ConfirmSentlist)
{
<a class="@(item.IsBlockCantracingParty == "true" ? "disabled" : "") btn btn-danger ionRad pull-left op-btn rad" onclick="removeInsuranceList(@item.Id, '@pathDSKKAR00.Replace("\\", "-")', '@pathDSKWOR00.Replace("\\", "-")')">
<a permission="80211" class="@(item.IsBlockCantracingParty == "true" ? "disabled" : "") btn btn-danger ionRad pull-left op-btn rad" onclick="removeInsuranceList(@item.Id, '@pathDSKKAR00.Replace("\\", "-")', '@pathDSKWOR00.Replace("\\", "-")')">
<i class="fa fa-trash faSize"></i>
</a>
<a class="@(item.IsBlockCantracingParty == "true" ? "disabled" : "") btn btn-info ionRad pull-left op-btn rad" onclick="confirmInsuranceList(@item.Id)">
<a permission="80212" class="@(item.IsBlockCantracingParty == "true" ? "disabled" : "") btn btn-info ionRad pull-left op-btn rad" onclick="confirmInsuranceList(@item.Id)">
<i class="fa fa-send faSize"></i>
</a>
<a class="@(item.IsBlockCantracingParty == "true" ? "disabled" : "") btn btn-warning pull-left op-btn rad"
<a permission="80213" class="@(item.IsBlockCantracingParty == "true" ? "disabled" : "") btn btn-warning pull-left op-btn rad"
href="#showmodal=@Url.Page("./Index", "Edit", new { item.Id })">
<i class="fa fa-edit faSize"></i>
</a>
@@ -93,10 +93,10 @@
href="#">
<i class="fa fa-edit faSize"></i>
</a>*@
<a class="btn btn-info pull-left op-btn rad printModal" style="background-color: #1088be;" href="#showmodal=@Url.Page("./Index", "InsuranceSummary", new { item.Id })">
<a permission="80214" class="btn btn-info pull-left op-btn rad printModal" style="background-color: #1088be;" href="#showmodal=@Url.Page("./Index", "InsuranceSummary", new { item.Id })">
<i class="fa fa-file-text-o faSize"></i>
</a>
<a class="btn btn-info pull-left op-btn rad printModal" href="#showmodal=@Url.Page("./Index", "InsuranceConfirm", new { item.Id })">
<a permission="80215" class="btn btn-info pull-left op-btn rad printModal" href="#showmodal=@Url.Page("./Index", "InsuranceConfirm", new { item.Id })">
<i class="fa fa-print faSize"></i>
</a>
@* <a class="btn btn-info pull-left op-btn rad printModal" href="#showmodal=@Url.Page("./Index", "InspectionReport", new { Id = item.Id })">
@@ -106,10 +106,10 @@
@* <a href="@Url.Page("/Company/InsuranceList/Index", "DownloadFile",new {path=path_,fileName="DSKKAR00.dbf"})">Download DBF File</a>*@
<a class="@(item.IsBlockCantracingParty == "true" ? "disabled" : "") btn btn-inverse pull-left op-btn rad download-link" download title="DSKWOR00" href="@Url.Page("/Company/InsuranceList/Index", "DownloadFile", new { path = pathDSKWOR00, fileName = "DSKWOR00.dbf" })">
<a permission="80216" class="@(item.IsBlockCantracingParty == "true" ? "disabled" : "") btn btn-inverse pull-left op-btn rad download-link" download title="DSKWOR00" href="@Url.Page("/Company/InsuranceList/Index", "DownloadFile", new { path = pathDSKWOR00, fileName = "DSKWOR00.dbf" })">
<i class="fa fa-download faSize"></i>
</a>
<a class="@(item.IsBlockCantracingParty == "true" ? "disabled" : "") btn btn-info pull-left op-btn rad download-link" download title="DSKKAR00" href="@Url.Page("/Company/InsuranceList/Index", "DownloadFile", new { path = pathDSKKAR00, fileName = "DSKKAR00.dbf" })">
<a permission="80216" class="@(item.IsBlockCantracingParty == "true" ? "disabled" : "") btn btn-info pull-left op-btn rad download-link" download title="DSKKAR00" href="@Url.Page("/Company/InsuranceList/Index", "DownloadFile", new { path = pathDSKKAR00, fileName = "DSKKAR00.dbf" })">
<i class="fa fa-download faSize"></i>
</a>

View File

@@ -1,4 +1,5 @@
@page
@page
@using _0_Framework.Application
@using AccountManagement.Application.Contracts.TicketAccessAccount
@using Microsoft.AspNetCore.Mvc.TagHelpers
@@ -17,12 +18,7 @@
<style>
.gwb-container {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 10px;
margin: 9px 0 0 0;
}
@@ -132,17 +128,61 @@
.card-amount-warn {
color: #ED412E;
}
.gwb-container {
display: grid;
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: 10px;
margin: 9px 0 0 0;
}
.remain-number {
font-size: 10px;
}
.btnSms {
padding: 5px 10px;
background-color: #0ba3a3;
color: white;
border: none;
outline: none;
border-radius: 4px;
font-size: 14px;
white-space: nowrap;
transition: all ease-in-out .3s
}
.btnSms:hover {
background-color: #1d8585;
}
.btn-sms-red {
background-color: #ed412e;
}
.btn-sms-green {
background-color: #0ba3a3;
}
@@media only screen and (max-width : 1550px) {
.gwb-container {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
@@media (max-width: 1366px) {
.gwb-container {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.remain-number {
font-size: 17px
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@@media only screen and (max-width : 992px) {
.gwb-container {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@@media (max-width: 768px) {
.gwb-container {
@@ -150,9 +190,12 @@
}
.remain-number {
font-size: 14px
font-size: 12px;
}
}
</style>
@@ -197,25 +240,34 @@
<div class="row">
<div class="gwb-container">
<div permission="2" id="smsDiv" class="gwb-card" style="padding: 0 1px">
<a type="button" class="click p-1 loadingButton">
<div permission="2" id="smsDiv" class="gwb-card">
<div type="button" class="click p-1 loadingButton" style="padding: 0 5px">
<div class="gwb-card-flex" style="justify-content: space-between;width: 100%;">
<div class="gwb-card-flex p-1">
<img src="~/AssetsClient/images/sms-icon.png" alt="" class="img-fluid mx-1" width="50px"/>
<div class="text-start ms-1">
<div class="card-title">مقدار اعتبار فعلی</div>
@* <div class="card-title">مقدار اعتبار فعلی</div> *@
<div class="card-title">sms.ir</div>
</div>
</div>
<div id="amountSms" class="card-amount">
<span class="remain-number">باقی مانده</span>
<span>@Model.SmsRemaining</span>
<div style="display: flex;flex-direction: column;align-items: end;">
<div class="card-amount">
<span class="remain-number" style="color: #6D6D6D">پیامک باقیمانده</span>
<span id="amountSms">@Model.SmsRemaining</span>
</div>
<div style="">
<a href="https://sms.ir/" target="_blank" rel="noopener noreferrer">
<button id="btnSMS" class="btnSms">
ورود به سامانه
</button>
</a>
</div>
</div>
</div>
</a>
</div>
</div>
</div>
@@ -256,7 +308,7 @@
</div>
<div class="card p-0">
<div class="card-section-btn">
<a class="btn loadingButton @(authHelper.GetPermissions().Any(x => x == 801) ? "" : "disable")" asp-area="Admin" asp-page="/Company/InsuranceList/Index">
<a class="btn loadingButton @(authHelper.GetPermissions().Any(x => x == 802) ? "" : "disable")" asp-area="Admin" asp-page="/Company/InsuranceList/Index">
<svg width="50" height="50" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23.63 4.22001L18.63 0.220009C18.4514 0.0767046 18.229 -0.000955084 18 8.86676e-06H5C4.73478 8.86676e-06 4.48043 0.105366 4.29289 0.292902C4.10536 0.480438 4 0.734792 4 1.00001V14C4 14.2652 4.10536 14.5196 4.29289 14.7071C4.48043 14.8947 4.73478 15 5 15H13V17C13 17.2652 13.1054 17.5196 13.2929 17.7071C13.4804 17.8947 13.7348 18 14 18H23C23.2652 18 23.5196 17.8947 23.7071 17.7071C23.8946 17.5196 24 17.2652 24 17V5.00001C24.0005 4.85061 23.9675 4.703 23.9035 4.56802C23.8395 4.43305 23.746 4.31413 23.63 4.22001Z" fill="#23A8A8"/>
<path d="M27 15.9992H15V13.9992C15 13.734 14.8946 13.4796 14.7071 13.2921C14.5196 13.1045 14.2652 12.9992 14 12.9992H3C2.6427 12.9618 2.28154 12.9953 1.93723 13.0978C1.59292 13.2003 1.27221 13.3698 0.993513 13.5964C0.714811 13.8231 0.483589 14.1026 0.313102 14.4188C0.142614 14.735 0.0362137 15.0818 0 15.4392V24.8292C0 26.6092 1.76 27.9992 4 27.9992H24C26.24 27.9992 28 26.6092 28 24.8292V16.9992C28 16.734 27.8946 16.4796 27.7071 16.2921C27.5196 16.1045 27.2652 15.9992 27 15.9992Z" fill="#C4E8E8"/>
@@ -365,21 +417,21 @@
</a>
</div>
</div>
<div class="card p-0">
<div class="card-section-btn">
<div class="card p-0">
<div class="card-section-btn">
<a class="btn loadingButton @(authHelper.GetPermissions().Any(x => x == 2) || authHelper.CurrentAccountId() == 322 ? "" : "disable")" asp-area="AdminNew" asp-page="/Company/FileBackup/Index">
<svg width="50" height="50" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M42.75 7.875H11.25C10.0125 7.875 9 8.8875 9 10.125V16.875C9 18.1125 10.0125 19.125 11.25 19.125H42.75C43.9875 19.125 45 18.1125 45 16.875V10.125C45 8.8875 43.9875 7.875 42.75 7.875ZM42.75 21.375H11.25C10.0125 21.375 9 22.3875 9 23.625V30.375C9 31.6125 10.0125 32.625 11.25 32.625H42.75C43.9875 32.625 45 31.6125 45 30.375V23.625C45 22.3875 43.9875 21.375 42.75 21.375ZM42.75 34.875H11.25C10.0125 34.875 9 35.8875 9 37.125V43.875C9 45.1125 10.0125 46.125 11.25 46.125H42.75C43.9875 46.125 45 45.1125 45 43.875V37.125C45 35.8875 43.9875 34.875 42.75 34.875Z" fill="#C4E8E8"/>
<path d="M34.875 33.7492L42.75 40.0492V27.4492L34.875 33.7492Z" fill="#23A8A8"/>
<path d="M42.75 31.5C42.4125 31.5 41.9625 31.5 41.625 31.6125V36.1125C41.9625 36 42.4125 36 42.75 36C46.4625 36 49.5 39.0375 49.5 42.75C49.5 46.4625 46.4625 49.5 42.75 49.5C39.0375 49.5 36 46.4625 36 42.75C36 42.4125 36 42.075 36.1125 41.7375L32.2875 38.7C31.8375 39.9375 31.5 41.2875 31.5 42.75C31.5 48.9375 36.5625 54 42.75 54C48.9375 54 54 48.9375 54 42.75C54 36.5625 48.9375 31.5 42.75 31.5Z" fill="#23A8A8"/>
</svg>
<p class="btn-title text-nowrap" style="margin: 0 5px 0 0">بکاپ</p>
<div class="spinner-loading loading rounded-0" style="display: none;">
<div class="spinner"></div>
</div>
</a>
</div>
</div>
<svg width="50" height="50" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M42.75 7.875H11.25C10.0125 7.875 9 8.8875 9 10.125V16.875C9 18.1125 10.0125 19.125 11.25 19.125H42.75C43.9875 19.125 45 18.1125 45 16.875V10.125C45 8.8875 43.9875 7.875 42.75 7.875ZM42.75 21.375H11.25C10.0125 21.375 9 22.3875 9 23.625V30.375C9 31.6125 10.0125 32.625 11.25 32.625H42.75C43.9875 32.625 45 31.6125 45 30.375V23.625C45 22.3875 43.9875 21.375 42.75 21.375ZM42.75 34.875H11.25C10.0125 34.875 9 35.8875 9 37.125V43.875C9 45.1125 10.0125 46.125 11.25 46.125H42.75C43.9875 46.125 45 45.1125 45 43.875V37.125C45 35.8875 43.9875 34.875 42.75 34.875Z" fill="#C4E8E8"/>
<path d="M34.875 33.7492L42.75 40.0492V27.4492L34.875 33.7492Z" fill="#23A8A8"/>
<path d="M42.75 31.5C42.4125 31.5 41.9625 31.5 41.625 31.6125V36.1125C41.9625 36 42.4125 36 42.75 36C46.4625 36 49.5 39.0375 49.5 42.75C49.5 46.4625 46.4625 49.5 42.75 49.5C39.0375 49.5 36 46.4625 36 42.75C36 42.4125 36 42.075 36.1125 41.7375L32.2875 38.7C31.8375 39.9375 31.5 41.2875 31.5 42.75C31.5 48.9375 36.5625 54 42.75 54C48.9375 54 54 48.9375 54 42.75C54 36.5625 48.9375 31.5 42.75 31.5Z" fill="#23A8A8"/>
</svg>
<p class="btn-title text-nowrap" style="margin: 0 5px 0 0">بکاپ</p>
<div class="spinner-loading loading rounded-0" style="display: none;">
<div class="spinner"></div>
</div>
</a>
</div>
</div>
<div class="card p-0">
<div class="card-section-btn">
<a class="btn loadingButton @(authHelper.GetPermissions().Any(x => x == 2) || authHelper.CurrentAccountId() == 14 ? "" : "disable")" asp-area="AdminNew" asp-page="/Company/Test/Index">

View File

@@ -221,10 +221,18 @@
لیست مشاغل </a>
</li>
<li permission="304"><a class="clik3" asp-page="/Company/Holidays/Index">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
<circle cx="6.5" cy="6.5" r="6.5" fill="white"/>
</svg>
تعطیلات رسمی </a>
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
<circle cx="6.5" cy="6.5" r="6.5" fill="white"/>
</svg>
تعطیلات رسمی </a>
</li>
<li permission="305">
<a class="clik3" asp-area="AdminNew" asp-page="/Company/ServiceAmountsManagement/Index">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
<circle cx="6.5" cy="6.5" r="6.5" fill="white"/>
</svg>
مبالغ سرویس‌ها
</a>
</li>
<li permission="305"><a class="clik3" asp-page="/Company/MandatoryHours/Index">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
@@ -392,7 +400,7 @@
</span>
</a>
<ul class="list-unstyled sdf8">
<li permission="801"><a class="clik8 " asp-page="/Company/InsuranceList/Index">
<li permission="802"><a class="clik8 " asp-page="/Company/InsuranceList/Index">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
<circle cx="6.5" cy="6.5" r="6.5" fill="white"/>
</svg>

View File

@@ -0,0 +1,126 @@
@model CompanyManagment.App.Contracts.InstitutionPlan.EditInstitutionPlanPercentage
@{
string clientVersion = _0_Framework.Application.Version.StyleVersion;
<link href="~/AssetsAdminNew/serviceamountsmanagement/css/CreateServiceModal.css?ver=@clientVersion" rel="stylesheet" />
}
<form role="form" method="post" name="create-form" id="create-form" autocomplete="off">
<div class="modal-content">
<div class="modal-header pb-0 d-flex align-items-center justify-content-center text-center">
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
<div>
<p class="m-0 pdHeaderTitle1">سرویس جدید</p>
</div>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-12 col-md-6 my-1 d-none">
<div class="d-flex align-items-center justify-content-between">
<span class="titleInput">رکب برای نال</span>
<div class="position-relative">
<input type="text" class="form-control numeric-only text-center ms-2" asp-for="@Model.ContractAndCheckoutPercent" style="direction: ltr;width: 70px;" pattern="[0-9]*" inputmode="numeric" />
<span class="position-absolute percentageInput">٪</span>
</div>
</div>
</div>
<div class="col-12 col-md-6 my-1">
<div class="d-flex align-items-center justify-content-between">
<span class="titleInput">درصد مبلغ قرداد و تصفیه</span>
<div class="position-relative">
<input type="text" class="form-control numeric-only text-center ms-2" asp-for="@Model.ContractAndCheckoutPercentStr" style="direction: ltr;width: 70px;" pattern="[0-9]*" inputmode="numeric" />
<span class="position-absolute percentageInput">٪</span>
</div>
</div>
</div>
<div class="col-12 col-md-6 my-1">
<div class="d-flex align-items-center justify-content-between">
<span class="titleInput">درصد خدمات بیمه</span>
<div class="position-relative">
<input type="text" class="form-control numeric-only text-center ms-2" asp-for="@Model.InsurancePercentStr" style="direction: ltr;width: 70px;" pattern="[0-9]*" inputmode="numeric" />
<span class="position-absolute percentageInput">٪</span>
</div>
</div>
</div>
<div class="col-12 col-md-6 my-1">
<div class="d-flex align-items-center justify-content-between">
<span class="titleInput">درصد خدمات خصور و غیاب</span>
<div class="position-relative">
<input type="text" class="form-control numeric-only text-center ms-2" asp-for="@Model.RollCallPercentStr" style="direction: ltr;width: 70px;" pattern="[0-9]*" inputmode="numeric" />
<span class="position-absolute percentageInput">٪</span>
</div>
</div>
</div>
<div class="col-12 col-md-6 my-1">
<div class="d-flex align-items-center justify-content-between">
<span class="titleInput">درصد خدمات فیش حقوقی غیر رسمی</span>
<div class="position-relative">
<input type="text" class="form-control numeric-only text-center ms-2" asp-for="@Model.CustomizeCheckoutPercentStr" style="direction: ltr;width: 70px;" pattern="[0-9]*" inputmode="numeric" />
<span class="position-absolute percentageInput">٪</span>
</div>
</div>
</div>
<div class="col-12 col-md-6 my-1">
<div class="d-flex align-items-center justify-content-between">
<span class="titleInput">درصد خدمات حضوری قرارداد و تصفیه</span>
<div class="position-relative">
<input type="text" class="form-control numeric-only text-center ms-2" asp-for="@Model.ContractAndCheckoutInPersonPercentStr" style="direction: ltr;width: 70px;" pattern="[0-9]*" inputmode="numeric" />
<span class="position-absolute percentageInput">٪</span>
</div>
</div>
</div>
<div class="col-12 col-md-6 my-1">
<div class="d-flex align-items-center justify-content-between">
<span class="titleInput">درصد خدمات حضور بیمه</span>
<div class="position-relative">
<input type="text" class="form-control numeric-only text-center ms-2" asp-for="@Model.InsuranceInPersonPercentStr" style="direction: ltr;width: 70px;" pattern="[0-9]*" inputmode="numeric" />
<span class="position-absolute percentageInput">٪</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer d-block">
<div class="container p-0 m-0">
<div class="row">
<div class="col-6 d-flex justify-content-end">
<button type="button" class="btn-cancel d-flex justify-content-center" data-bs-dismiss="modal" aria-label="Close">انصراف</button>
</div>
<div class="col-6 d-flex justify-content-start">
<button type="button" class="btn-save position-relative" onclick="SaveDataAjax()">
<span class="text-nowrap">ثبت</span>
<div class="spinner-loading loading" style="display: none;">
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
</div>
</button>
</div>
</div>
</div>
</div>
</div>
</form>
<script src="~/assetsclient/js/site.js?ver=@clientVersion"></script>
<script src="~/assetsclient/libs/jalaali-js/jalaali.js"></script>
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
<script src="~/assetsclient/libs/wordifyfa/wordifyfa.min.js"></script>
<script>
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
var createInstitutionPlanUrl = `@Url.Page("./Index", "CreateInstitutionPlan")`;
</script>
<script src="~/AssetsAdminNew/serviceamountsmanagement/js/CreateServiceModal.js?ver=@clientVersion"></script>

View File

@@ -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 {
<link href="~/AssetsClient/css/table-style.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/table-responsive.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/assetsclient/css/table-grid.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/assetsclient/css/operation-button.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/AssetsAdminNew/serviceamountsmanagement/css/index.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/select2.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/datetimepicker.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/dropdown.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/filter-search.css?ver=@adminVersion" rel="stylesheet" />
<style>
.errored {
animation: shake 300ms;
color: #eb3434 !important;
background-color: #fef2f2 !important;
border: 1px solid #eb3434 !important;
border-radius: 7px;
}
@@media (max-width: 767px) {
.sticky {
position: sticky;
top: 3px;
z-index: 60;
}
}
</style>
}
<div class="row pb-2">
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
<div class="col d-flex align-items-center">
<img src="~/AssetsClient/images/icons/workshop.png" alt="" class="img-fluid me-2" style="width: 45px;object-fit: cover;" />
<div>
<h4 class="title d-flex align-items-center">مدیریت مبالغ سرویس‌ها</h4>
</div>
</div>
<div>
<a asp-area="Admin" asp-page="/Index" class="back-btn" type="button">
<span>بازگشت</span>
</a>
</div>
</div>
</div>
<button type="button" class="btn btn-rounded mb-5 goToTop" style="display: none"> <i class="fa fa-chevron-up" style="font-size: 20px"></i> برو بالا</button>
@* <input type="hidden" asp-for="SearchModel.PageIndex" id="pageIndex" value="@Model.SearchModel.PageIndex" /> *@
<!-- List Items -->
<div class="row">
<div class="col-12 mb-2">
<div class="d-flex w-100 section-btns-task">
@*Search Box *@
</div>
<div class=" d-none d-md-block">
<div class="row px-2">
<div class="search-box card border-0">
<form role="form" method="get" name="search-theme-form1" id="search-theme-form1" autocomplete="off">
<div class="row">
<div class="col-12">
<div class="d-grid search-section gap-2" data-title="جستجو لیست قرارداد" data-intro="شما در این لیست قرارداد میتوانید جستجو کنید.">
<div class="d-grid grid-cols-2 gap-2 col-span-2">
<div class="col-span-2">
<input type="text" class="form-control" id="countPersonInput" placeholder="تعداد پرسنل" pattern="[0-9]*" inputmode="numeric" />
</div>
</div>
<div class="d-flex gap-2 col-span-2">
<button class="btn-search btn-w-size btn-search-click text-nowrap d-flex align-items-center justify-content-center" type="button">
<span>جستجو</span>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="20" height="20" class="ms-1">
<path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
</svg>
</button>
<a href="/AdminNew/Company/ServiceAmountsManagement" class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center disable" id="filterRemove">
<span>حذف جستجو</span>
</a>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="d-block d-md-none">
<div class="row d-flex align-items-center justify-content-between">
<div>
<div class="col text-center">
<button class="btn-search w-100" type="button" data-bs-toggle="modal" data-bs-target="#searchModal">
<span>جستجو پیشرفته</span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<circle cx="11" cy="11" r="6" stroke="white" />
<path d="M20 20L17 17" stroke="white" stroke-linecap="round" />
</svg>
</button>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row p-lg-2 p-auto">
<div class="card">
<div class="wrapper list-box table-service">
<div class="row align-items-center">
<div class="col-6 col-md-4">
<button class="btn-create mb-1" onclick="openCreateModal()">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="11" cy="11" r="8.25" stroke-width="1.5" stroke="white"/>
<path d="M11 13.75L11 8.25" stroke-width="1.5" stroke="white" stroke-linecap="round"/>
<path d="M13.75 11L8.25 11" stroke-width="1.5" stroke="white" stroke-linecap="round"/>
</svg>
ایجاد سرویس
</button>
</div>
<div class="d-none d-md-block col-4 text-center">
<span>
لیست سرویس ها
</span>
</div>
<div class="col-6 col-md-4 text-end">
<div class="d-flex align-items-center justify-content-end my-1">
</div>
</div>
</div>
<div class="Rtable Rtable--collapse">
<div class="Rtable-row Rtable-row--head align-items-center d-none d-lg-flex sticky p-0">
<div class="Rtable-cell column-heading d-md-flex d-none width1 text-center">تعداد پرسنل</div>
<div class="Rtable-cell column-heading d-md-flex d-none width2 text-center" style="background: #16b797;">مبلغ قرداد و تصفیه</div>
<div class="Rtable-cell column-heading d-flex width3 text-center" style="background: #16b797;">خدمات بیمه</div>
<div class="Rtable-cell column-heading d-flex width4 text-center" style="background: #16b797;">خدمات خصور و غیاب</div>
<div class="Rtable-cell column-heading d-md-flex d-none width5 text-center" style="background: #16b797;">خدمات فیش حقوقی غیر رسمی</div>
<div class="Rtable-cell column-heading d-md-flex d-none width6 text-center" style="background: #17b0d0;">خدمات حضوری قرارداد و تصفیه</div>
<div class="Rtable-cell column-heading d-md-flex d-none width7 text-center" style="background: #17b0d0;">خدمات حضور بیمه</div>
<div class="Rtable-cell column-heading d-flex width8 text-center" style="background: #ccc90a;">خدمات حضوری موسسه</div>
<div class="Rtable-cell column-heading d-flex width9 text-center" style="background: #ccc90a;">مبلغ کل خدمات سامانه بدون خدمات خصوری</div>
<div class="Rtable-cell column-heading d-flex width10 text-center" style="background: #ccc90a;">مبلغ کل خدمات سامانه + خدمات خصوری</div>
</div>
<div class="w-100" id="LoadDataOfServices">
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="searchModal" tabindex="-1" data-bs-backdrop="static" aria-labelledby="searchModalModalLabel" aria-hidden="true">
<div class="modal-dialog modal-fullscreen">
<div class="modal-content">
<form role="form" method="get" name="search-theme-form2" id="search-theme-form2" autocomplete="off">
<div class="modal-header d-block text-center pb-0">
<div class="iphone-line mx-auto mb-3"></div>
<h5 class="modal-title mb-4 text-start" id="searchModalLabel">جستجوی پیشرفته</h5>
</div>
<div class="modal-body pt-0 mb-3">
<div class="container-fluid search-box">
<div id="overlaySearchAdvance" class=""></div>
<div class="row">
<div>
<div class="d-grid grid-cols-2 gap-2 col-span-2 mb-2">
<div class="col-span-2">
<input type="text" class="form-control" id="countPersonInputMobile" placeholder="تعداد پرسنل" pattern="[0-9]*" inputmode="numeric" />
</div>
</div>
</div>
<div class="d-flex justify-content-center gap-4 col-span-2 mt-2 w-100">
<button class="btn-search btn-w-size btn-search-click text-nowrap d-flex align-items-center justify-content-center w-100" id="searchBtn" type="button">
<span>جستجو</span>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="20" height="20" class="ms-1">
<path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
</svg>
</button>
<a href="/AdminNew/Company/ServiceAmountsManagement" class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center w-100 disable" id="filterRemove">
<span>حذف جستجو</span>
</a>
</div>
</div>
</div>
</div>
<div class="modal-footer justify-content-center align-items-center">
<div class="container-fluid">
<div class="row">
<div class="col-12 text-center">
<button type="button" class="btn-cancel w-100" data-bs-dismiss="modal">انصراف</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="MainModal" class="modal fade" aria-labelledby="myModalLabel" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-hidden="true" style="display: none;">
<div class="modal-dialog ServiceModal-width modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content" id="ModalContent">
</div>
</div>
</div>
@section Script {
<script src="~/assetsclient/js/site.js"></script>
<script>
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
var loadInstitutionPlanListUrl = `@Url.Page("./Index", "InstitutionPlanList")`;
var showModalNewServiceUrl = `@Url.Page("./Index", "CreateInstitutionPlan")`;
</script>
<script src="~/assetsadminnew/serviceamountsmanagement/js/index.js?ver=@adminVersion"></script>
}

View File

@@ -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
});
}
}
}

View File

@@ -60,7 +60,9 @@
<script src="~/AdminTheme/assets/notifications/notify-metro.js"></script>
<script src="~/AdminTheme/assets/notifications/notifications.js"></script>
<script src="~/assetsadminnew/sidbar_adminnew/sidebar_admin.js"></script>
<script src="~/assetsadminnew/sidbar_adminnew/sidebar_admin.js"></script>
<script src="~/assetsclient/js/services/ajax-service.js"></script>
@* <script src="~/assetsclient/js/smooth-scrollbar.js"></script> *@

View File

@@ -304,6 +304,14 @@
تعطیلات رسمی
</a>
</li>
<li permission="305">
<a class="clik3" asp-area="AdminNew" asp-page="/Company/ServiceAmountsManagement/Index">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
<circle cx="6.5" cy="6.5" r="6.5" fill="white" />
</svg>
مبالغ سرویس‌ها
</a>
</li>
<li permission="305">
<a class="clik3" asp-area="Admin" asp-page="/Company/MandatoryHours/Index">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
@@ -592,7 +600,7 @@
</span>
</a>
<ul class="list-unstyled sdf8">
<li permission="801">
<li permission="802">
<a class="clik8 " asp-area="Admin" asp-page="/Company/InsuranceList/Index">
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
<circle cx="6.5" cy="6.5" r="6.5" fill="white" />

View File

@@ -257,7 +257,7 @@
<span>پرینت گروهی</span>
</button>
<button onclick="showExcelAllModal()" class="btn-excel text-nowrap me-1" type="button" Permission="@SubAccountPermissionHelper.ExcelCustomizeCheckoutPermissionCode">
<button onclick="downloadExcelAll()" class="btn-excel text-nowrap me-1" type="button" Permission="@SubAccountPermissionHelper.ExcelCustomizeCheckoutPermissionCode">
<svg width="20" height="20" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg" fill="#000000">
<g id="SVGRepo_bgCarrier" stroke-width="1"></g>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>

View File

@@ -55,28 +55,29 @@
<div id="cardSectionLeave" class="card px-2 border blur">
<div class="row my-3">
<div class="col-12 col-md-8 d-block d-sm-flex">
<div class="d-flex align-items-center mb-2">
<label class="d-flex justify-content-center align-items-center">نوع مرخصی:</label>
<div class="inputGroup-morakhasi-type d-flex flex-sm-column">
<div class="d-flex align-items-center my-1">
<div class="d-flex align-items-center">
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="paid" value="استحقاقی" checked>
<label class="form-check-label" for="paid">
استحقاقی
<div class="col-12 col-md-8">
<label class="d-flex justify-content-start align-items-center">نوع مرخصی:</label>
<div class="d-block d-sm-flex">
<div class="d-flex align-items-center mb-2">
<div class="inputGroup-morakhasi-type d-flex flex-sm-column">
<div class="d-flex align-items-center my-1">
<div class="d-flex align-items-center">
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="paid" value="استحقاقی" checked>
<label class="form-check-label" for="paid">
استحقاقی
</label>
</div>
</div>
<div class="my-1">
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="sick" value="استعلاجی">
<label class="form-check-label" for="sick">
استعلاجی
</label>
</div>
</div>
<div class="my-1">
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="sick" value="استعلاجی">
<label class="form-check-label" for="sick">
استعلاجی
</label>
</div>
</div>
</div>
<div class="ms-sm-4" id="dailyType">
<div class="ms-sm-4" id="dailyType">
<div class="d-flex align-items-center">
<label class="d-block d-sm-flex justify-content-center align-items-center" for="inputGroup-morakhasi-time">مدت مرخصی:</label>
<div class="inputGroup-morakhasi-time d-flex align-items-center">
@@ -92,8 +93,9 @@
</div>
</div>
</div>
</div>
</div>
<div class="col-12 col-md-4 mt-2 mt-md-0" id="rotatingShiftSection" style="display: none">
<div class="col-12 col-md-4 mt-2 mt-md-0 disable" id="rotatingShiftSection">
<div>
<input type="hidden" asp-for="HasRollCall" id="HasRollCall">
<input type="hidden" name="SelectedShift.StartTime" id="SelectedShift_StartTime" />

View File

@@ -45,28 +45,29 @@
<div id="cardSectionLeave" class="card border p-1">
<div class="row my-3">
<div class="col-12 col-md-8 d-block d-sm-flex">
<div class="d-flex align-items-center">
<label class="d-flex justify-content-center align-items-center">نوع مرخصی:</label>
<div class="inputGroup-morakhasi-type d-flex flex-sm-column">
<div class="d-flex align-items-center mb-2">
<div class="col-12 col-md-8">
<label class="d-flex justify-content-start align-items-center">نوع مرخصی:</label>
<div class="d-block d-sm-flex">
<div class="d-flex align-items-center mb-2">
<div class="inputGroup-morakhasi-type d-flex flex-sm-column">
<div class="d-flex align-items-center mb-2">
<div>
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="paid" value="استحقاقی" checked>
<label class="form-check-label" for="paid">
استحقاقی
</label>
</div>
</div>
<div>
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="paid" value="استحقاقی" checked>
<label class="form-check-label" for="paid">
استحقاقی
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="sick" value="استعلاجی">
<label class="form-check-label" for="sick">
استعلاجی
</label>
</div>
</div>
<div>
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="sick" value="استعلاجی">
<label class="form-check-label" for="sick">
استعلاجی
</label>
</div>
</div>
</div>
<div class="ms-sm-4" id="dailyType">
<div class="ms-sm-4" id="dailyType">
<div class="d-flex align-items-center">
<label class="d-block d-sm-flex justify-content-center align-items-center" for="inputGroup-morakhasi-time">مدت مرخصی:</label>
<div class="inputGroup-morakhasi-time d-flex align-items-center">
@@ -82,8 +83,9 @@
</div>
</div>
</div>
</div>
<div class="col-12 col-md-4 mt-2 mt-md-0" id="rotatingShiftSection" style="display: none">
</div>
</div>
<div class="col-12 col-md-4 mt-2 mt-md-0 dis" id="rotatingShiftSection">
<div>
<input type="hidden" asp-for="HasRollCall" id="HasRollCall">
<input type="hidden" name="SelectedShift.StartTime" id="SelectedShift_StartTime" />
@@ -217,7 +219,7 @@
});
$('#employeeSelect').on('change', function () {
$('#rotatingShiftSection').hide();
$('#rotatingShiftSection').addClass('disable');
$('#HasRollCall').val(false);
previousStartDate = "";
$('#SelectedShift_StartTime').val('');
@@ -237,9 +239,9 @@
const dateRegex = /^\d{4}\/\d{2}\/\d{2}$/;
if (dateRegex.test(startDateValue) && startDateValue !== previousStartDate) {
previousStartDate = startDateValue;
rotatingShift(startDateValue);
}
}
rotatingShift();
});
$('#rotatingShift').on('change', function () {
@@ -253,6 +255,7 @@
$(document).on("change", ".LeaveType", function () {
if ($('#paid').is(':checked')) {
$('#dailyType').css('visibility', 'visible');
rotatingShift();
}
if ($('#sick').is(':checked')) {
@@ -262,6 +265,7 @@
$('#end_date_estehghaghi').show();
$('.time_paid').hide();
}
rotatingShift();
}
});
@@ -270,11 +274,13 @@
if ($('#daily').is(':checked')) {
$('#end_date_estehghaghi').show();
$('.time_paid').hide();
rotatingShift();
}
if ($('#hourly').is(':checked')) {
$('#end_date_estehghaghi').hide();
$('.time_paid').show();
rotatingShift();
}
});
//******************** شرط استحقاقی و استعلاجی ********************
@@ -871,36 +877,46 @@
}
});
function rotatingShift(startDateValue) {
ajaxService.get(hasRotatingShiftAjax, { employeeId: currentEmployeeId, startDateTime: startDateValue })
.then(response => {
$('#HasRollCall').val(response.hasRollCall);
function rotatingShift() {
var startDateValue = $('#StartLeave').val();
$('#rotatingShiftSection').addClass('disable');
if (response.hasRollCall) {
$('#rotatingShiftSection').show();
if ($('#paid').is(':checked') && $('#daily').is(':checked') && startDateValue.length === 10) {
var shiftsList = response.shifts;
var shiftsOptionsHtml = '<option selected disabled>انتخاب شیفت ...</option>';
ajaxService.get(hasRotatingShiftAjax, { employeeId: currentEmployeeId, startDateTime: startDateValue })
.then(response => {
$('#HasRollCall').val(response.hasRollCall);
shiftsList.forEach(function (item) {
shiftsOptionsHtml += `<option value="${item.startTime}|${item.endTime}">${item.startTime} الی ${item.endTime}</option>`;
});
$('#rotatingShift').html(shiftsOptionsHtml);
} else {
$('#rotatingShiftSection').hide();
if (response.hasRollCall) {
$('#rotatingShiftSection').removeClass('disable');
if (response.message) {
$('#StartLeave').addClass('errored');
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text("");
$('#StartLeave').removeClass("errored");
}, 3500);
var shiftsList = response.shifts;
var shiftsOptionsHtml = '<option selected disabled>انتخاب شیفت ...</option>';
shiftsList.forEach(function (item) {
shiftsOptionsHtml += `<option value="${item.startTime}|${item.endTime}">${item.startTime} الی ${item.endTime}</option>`;
});
$('#rotatingShift').html(shiftsOptionsHtml);
} else {
$('#rotatingShiftSection').addClass('disable');
if (response.message) {
$('#StartLeave').addClass('errored');
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text("");
$('#StartLeave').removeClass("errored");
},
3500);
}
}
}
});
});
} else {
$('#rotatingShiftSection').addClass('disable');
}
}
</script>

View File

@@ -47,7 +47,7 @@
<input type="radio" value="Regular" name="Command.workshopShiftStatus" id="organized" class="radio-workTimeOption">
<label for="organized" class="radio-label-workTimeOption w-100">منظم</label>
<input type="radio" value="Rotating" name="Command.workshopShiftStatus" id="rotating_shift" class="radio-workTimeOption">
<input type="radio" value="Rotating" name="Command.workshopShiftStatus" id="rotating_shift" class="radio-workTimeOption">
<label for="rotating_shift" class="radio-label-workTimeOption w-100">گردشی</label>
<input type="radio" value="Irregular" name="Command.workshopShiftStatus" id="disorganized" class="radio-workTimeOption">
@@ -210,7 +210,7 @@
else
{
<div class="col-1 d-flex align-items-center justify-content-end">
<button type="button" class="btnRemoveTimeWork">
<button type="button" class="btnRemoveTimeWorkRS">
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="11" cy="11" r="8.25" stroke="white" />
<path d="M6.875 11H15.125" stroke="white" />

View File

@@ -46,28 +46,29 @@
<div id="cardSectionLeave" class="card border p-1">
<div class="row my-3">
<div class="col-12 col-md-8 d-block d-sm-flex">
<div class="d-flex align-items-center">
<label class="d-flex justify-content-center align-items-center">نوع مرخصی:</label>
<div class="inputGroup-morakhasi-type d-flex flex-sm-column">
<div class="d-flex align-items-center mb-2">
<div class="col-12 col-md-8">
<label class="d-flex justify-content-start align-items-center">نوع مرخصی:</label>
<div class="d-block d-sm-flex">
<div class="d-flex align-items-center mb-2">
<div class="inputGroup-morakhasi-type d-flex flex-sm-column">
<div class="d-flex align-items-center mb-2">
<div>
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="paid" value="استحقاقی" checked>
<label class="form-check-label" for="paid">
استحقاقی
</label>
</div>
</div>
<div>
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="paid" value="استحقاقی" checked>
<label class="form-check-label" for="paid">
استحقاقی
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="sick" value="استعلاجی">
<label class="form-check-label" for="sick">
استعلاجی
</label>
</div>
</div>
<div>
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="sick" value="استعلاجی">
<label class="form-check-label" for="sick">
استعلاجی
</label>
</div>
</div>
</div>
<div class="ms-sm-4" id="dailyType">
<div class="ms-sm-4" id="dailyType">
<div class="d-flex align-items-center">
<label class="d-block d-sm-flex justify-content-center align-items-center" for="inputGroup-morakhasi-time">مدت مرخصی:</label>
<div class="inputGroup-morakhasi-time d-flex align-items-center">
@@ -83,8 +84,9 @@
</div>
</div>
</div>
</div>
</div>
<div class="col-12 col-md-4 mt-2 mt-md-0" id="rotatingShiftSection" style="display: none">
<div class="col-12 col-md-4 mt-2 mt-md-0 disable" id="rotatingShiftSection">
<div>
<input type="hidden" asp-for="HasRollCall" id="HasRollCall">
<input type="hidden" name="SelectedShift.StartTime" id="SelectedShift_StartTime" asp-for="SelectedShift.StartTime" />

View File

@@ -37,45 +37,47 @@
<div id="cardSectionLeave" class="card border p-1 blur">
<div class="row my-3">
<div class="col-12 col-md-8 d-block d-sm-flex">
<div class="d-flex align-items-center">
<label class="d-flex justify-content-center align-items-center">نوع مرخصی:</label>
<div class="inputGroup-morakhasi-type d-flex flex-sm-column">
<div class="d-flex align-items-center mb-2">
<div class="col-12 col-md-8">
<label class="d-flex justify-content-start align-items-center mb-2">نوع مرخصی:</label>
<div class="d-block d-sm-flex">
<div class="d-flex align-items-center">
<div class="inputGroup-morakhasi-type d-flex flex-sm-column">
<div class="d-flex align-items-center mb-2">
<div>
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="paid" value="استحقاقی" checked>
<label class="form-check-label" for="paid">
استحقاقی
</label>
</div>
</div>
<div>
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="paid" value="استحقاقی" checked>
<label class="form-check-label" for="paid">
استحقاقی
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="sick" value="استعلاجی">
<label class="form-check-label" for="sick">
استعلاجی
</label>
</div>
</div>
<div>
<input class="form-check-input LeaveType" type="radio" asp-for="LeaveType" id="sick" value="استعلاجی">
<label class="form-check-label" for="sick">
استعلاجی
</label>
</div>
</div>
</div>
<div class="ms-sm-4" id="dailyType">
<div class="d-flex align-items-center">
<label class="d-block d-sm-flex justify-content-center align-items-center" for="inputGroup-morakhasi-time">مدت مرخصی:</label>
<div class="inputGroup-morakhasi-time d-flex align-items-center">
<input class="form-check-input LeaveTime" type="radio" asp-for="PaidLeaveType" id="daily" value="روزانه" checked>
<label class="form-check-label" for="daily">
روزانه
</label>
<div class="ms-sm-4" id="dailyType">
<div class="d-flex align-items-center">
<label class="d-block d-sm-flex justify-content-center align-items-center" for="inputGroup-morakhasi-time">مدت مرخصی:</label>
<div class="inputGroup-morakhasi-time d-flex align-items-center">
<input class="form-check-input LeaveTime" type="radio" asp-for="PaidLeaveType" id="daily" value="روزانه" checked>
<label class="form-check-label" for="daily">
روزانه
</label>
<input class="form-check-input LeaveTime" type="radio" asp-for="PaidLeaveType" id="hourly" value="ساعتی">
<label class="form-check-label" for="hourly">
ساعتی
</label>
<input class="form-check-input LeaveTime" type="radio" asp-for="PaidLeaveType" id="hourly" value="ساعتی">
<label class="form-check-label" for="hourly">
ساعتی
</label>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 col-md-4 mt-2 mt-md-0" id="rotatingShiftSection" style="display: none">
<div class="col-12 col-md-4 mt-2 mt-md-0 disable" id="rotatingShiftSection">
<div>
<input type="hidden" asp-for="HasRollCall" id="HasRollCall">
<input type="hidden" name="SelectedShift.StartTime" id="SelectedShift_StartTime" />

View File

@@ -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 } };
}

View File

@@ -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;
}
<!-- Menu Navigation -->

View File

@@ -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");
}
}

View File

@@ -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%);
}

View File

@@ -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;
}
}

View File

@@ -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('<div></div>');
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();
}
});
}

View File

@@ -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('<div></div>');
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 += `
<div class="service-list Rtable-row align-items-center position-relative openAction p-0">
<div class="Rtable-cell d-block width1">
<div class="Rtable-cell--content text-center">${item.countPerson}</div>
</div>
<div class="Rtable-cell d-md-block d-none width2">
<div class="Rtable-cell--content text-center">${item.contractAndCheckout}</div>
</div>
<div class="Rtable-cell d-md-block d-none width3">
<div class="Rtable-cell--content text-center">${item.insurance}</div>
</div>
<div class="Rtable-cell d-md-block d-none width4">
<div class="Rtable-cell--content text-center">${item.rollCall}</div>
</div>
<div class="Rtable-cell d-md-block d-none width5">
<div class="Rtable-cell--content text-center">${item.customizeCheckout}</div>
</div>
<div class="Rtable-cell d-md-block d-none width6">
<div class="Rtable-cell--content text-center">${item.contractAndCheckoutInPerson}</div>
</div>
<div class="Rtable-cell d-md-block d-none width7">
<div class="Rtable-cell--content text-center">${item.insuranceInPerson}</div>
</div>
<div class="Rtable-cell d-md-block d-none width8">
<div class="Rtable-cell--content text-center">${item.inPersonSumAmountStr}</div>
</div>
<div class="Rtable-cell d-md-block d-none width9">
<div class="Rtable-cell--content text-center">${item.onlineOnlySumAmountStr}</div>
</div>
<div class="Rtable-cell d-md-block d-none width10">
<div class="Rtable-cell--content text-center">${item.onlineAndInPersonSumAmountStr}</div>
</div>
<div class="Rtable-cell d-md-none d-block width11">
<div class="Rtable-cell--content text-end">
<div class="my-1">
<span style="background-color: #B6F2E1;padding: 5px;border-radius: 4px;">عملیات بیشتر</span>
</div>
</div>
</div>
</div>
<div class="operation-div w-100">
<div class="operations-btns">
<div class="row p-0">
<div class="d-flex align-items-center justify-content-between">
<span class="span1">تعداد پرسنل</span>
<span class="span1">${item.countPerson}</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span2">مبلغ قرداد و تصفیه</span>
<span class="span2">${item.contractAndCheckout} ریال</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span2">خدمات بیمه</span>
<span class="span2">${item.insurance} ریال</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span2">خدمات خصور و غیاب</span>
<span class="span2">${item.rollCall} ریال</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span2">خدمات فیش حقوقی غیر رسمی</span>
<span class="span2">${item.customizeCheckout} ریال</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span2">خدمات حضوری قرارداد و تصفیه</span>
<span class="span2">${item.contractAndCheckoutInPerson} ریال</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span2">خدمات حضور بیمه</span>
<span class="span2">${item.insuranceInPerson} ریال</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span2">خدمات حضوری موسسه</span>
<span class="span2">${item.inPersonSumAmountStr} ریال</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span2">مبلغ کل خدمات سامانه بدون خدمات خصوری</span>
<span class="span2">${item.onlineOnlySumAmountStr} ریال</span>
</div>
<div class="d-flex align-items-center justify-content-between">
<span class="span2">مبلغ کل خدمات سامانه + خدمات خصوری</span>
<span class="span2">${item.onlineAndInPersonSumAmountStr} ریال</span>
</div>
</div>
</div>
</div>
`;
});
$('#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") || ""
};
}

View File

@@ -6,7 +6,7 @@
border-radius: 7px;
}
.modal-content {
height: 890px;
height: 720px;
}
.modal-body {

View File

@@ -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 {

View File

@@ -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");
});

View File

@@ -1697,6 +1697,32 @@ function showExcelAllModal() {
}
function downloadExcelAll() {
var year = $('#Year').val();
var month = $('#Month').val();
if (year === '0' || month === '0') {
$('#dropdown-year').addClass("errored");
$('#dropdown-month').addClass("errored");
$('.alert-msg').show();
$('.alert-msg p').text('لطفا سال و ماه را انتخاب نموده و جستجو نمایید');
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
$('#dropdown-year').removeClass("errored");
$('#dropdown-month').removeClass("errored");
}, 3500);
return
}
if (!($('.foo:checkbox').is(":checked"))) {
$('.alert-msg').show();
$('.alert-msg p').text('هیچ موردی انتخاب نشده است.');
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
return
}
var idlist = "";
$('.foo').each(function () {
if ($(this).is(":checked")) {

View File

@@ -1681,6 +1681,33 @@ function showExcelAllModal() {
}
function downloadExcelAll() {
var year = $('#Year').val();
var month = $('#Month').val();
if (year === '0' || month === '0') {
$('#dropdown-year').addClass("errored");
$('#dropdown-month').addClass("errored");
$('.alert-msg').show();
$('.alert-msg p').text('لطفا سال و ماه را انتخاب نموده و جستجو نمایید');
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
$('#dropdown-year').removeClass("errored");
$('#dropdown-month').removeClass("errored");
}, 3500);
return
}
if (!($('.foo:checkbox').is(":checked"))) {
$('.alert-msg').show();
$('.alert-msg p').text('هیچ موردی انتخاب نشده است.');
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
return
}
var idlist = "";
$('.foo').each(function () {
if ($(this).is(":checked")) {

View File

@@ -33,7 +33,7 @@ $(document).ready(function () {
document.getElementById("MainModal").style.visibility = "visible";
$('#employeeSelectList').on('change', function () {
$('#rotatingShiftSection').hide();
$('#rotatingShiftSection').addClass('disable');
$('#HasRollCall').val(false);
previousStartDate = "";
$('#SelectedShift_StartTime').val('');
@@ -53,9 +53,9 @@ $(document).ready(function () {
const dateRegex = /^\d{4}\/\d{2}\/\d{2}$/;
if (dateRegex.test(startDateValue) && startDateValue !== previousStartDate) {
previousStartDate = startDateValue;
rotatingShift(startDateValue);
}
}
rotatingShift();
});
$('#rotatingShift').on('change', function () {
@@ -82,6 +82,7 @@ $(document).ready(function () {
$(document).on("change", ".LeaveType", function () {
if ($('#paid').is(':checked')) {
$('#dailyType').css('visibility', 'visible');
rotatingShift();
}
if ($('#sick').is(':checked')) {
@@ -91,6 +92,7 @@ $(document).ready(function () {
$('#end_date_estehghaghi').show();
$('.time_paid').hide();
}
rotatingShift();
}
});
@@ -99,11 +101,13 @@ $(document).ready(function () {
if ($('#daily').is(':checked')) {
$('#end_date_estehghaghi').show();
$('.time_paid').hide();
rotatingShift();
}
if ($('#hourly').is(':checked')) {
$('#end_date_estehghaghi').hide();
$('.time_paid').show();
rotatingShift();
}
});
//******************** شرط استحقاقی و استعلاجی ********************
@@ -643,36 +647,46 @@ function ajaxPersonals() {
});
}
function rotatingShift(startDateValue) {
ajaxService.get(hasRotatingShiftAjax, { employeeId: currentEmployeeId, startDateTime: startDateValue })
.then(response => {
$('#HasRollCall').val(response.hasRollCall);
if (response.hasRollCall) {
$('#rotatingShiftSection').show();
var shiftsList = response.shifts;
var shiftsOptionsHtml = '<option selected disabled>انتخاب شیفت ...</option>';
function rotatingShift() {
var startDateValue = $('#StartLeave').val();
$('#rotatingShiftSection').addClass('disable');
shiftsList.forEach(function (item) {
shiftsOptionsHtml += `<option value="${item.startTime}|${item.endTime}">${item.startTime} الی ${item.endTime}</option>`;
});
$('#rotatingShift').html(shiftsOptionsHtml);
} else {
$('#rotatingShiftSection').hide();
if ($('#paid').is(':checked') && $('#daily').is(':checked') && startDateValue.length === 10) {
if (response.message) {
$('#StartLeave').addClass('errored');
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text("");
$('#StartLeave').removeClass("errored");
}, 3500);
ajaxService.get(hasRotatingShiftAjax, { employeeId: currentEmployeeId, startDateTime: startDateValue })
.then(response => {
$('#HasRollCall').val(response.hasRollCall);
if (response.hasRollCall) {
$('#rotatingShiftSection').removeClass('disable');
var shiftsList = response.shifts;
var shiftsOptionsHtml = '<option selected disabled>انتخاب شیفت ...</option>';
shiftsList.forEach(function (item) {
shiftsOptionsHtml += `<option value="${item.startTime}|${item.endTime}">${item.startTime} الی ${item.endTime}</option>`;
});
$('#rotatingShift').html(shiftsOptionsHtml);
} else {
$('#rotatingShiftSection').addClass('disable');
if (response.message) {
$('#StartLeave').addClass('errored');
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text("");
$('#StartLeave').removeClass("errored");
},
3500);
}
}
}
});
});
} else {
$('#rotatingShiftSection').addClass('disable');
}
}

View File

@@ -23,7 +23,7 @@ $(document).ready(function () {
});
$('#employeeSelect').on('change', function () {
$('#rotatingShiftSection').hide();
$('#rotatingShiftSection').addClass('disable');
$('#HasRollCall').val(false);
previousStartDate = "";
$('#SelectedShift_StartTime').val('');
@@ -43,9 +43,9 @@ $(document).ready(function () {
const dateRegex = /^\d{4}\/\d{2}\/\d{2}$/;
if (dateRegex.test(startDateValue) && startDateValue !== previousStartDate) {
previousStartDate = startDateValue;
rotatingShift(startDateValue);
}
}
rotatingShift();
});
$('#rotatingShift').on('change', function () {
@@ -59,6 +59,7 @@ $(document).ready(function () {
$(document).on("change", ".LeaveType", function () {
if ($('#paid').is(':checked')) {
$('#dailyType').css('visibility', 'visible');
rotatingShift();
}
if ($('#sick').is(':checked')) {
@@ -68,6 +69,7 @@ $(document).ready(function () {
$('#end_date_estehghaghi').show();
$('.time_paid').hide();
}
rotatingShift();
}
});
@@ -76,11 +78,13 @@ $(document).ready(function () {
if ($('#daily').is(':checked')) {
$('#end_date_estehghaghi').show();
$('.time_paid').hide();
rotatingShift();
}
if ($('#hourly').is(':checked')) {
$('#end_date_estehghaghi').hide();
$('.time_paid').show();
rotatingShift();
}
});
//******************** شرط استحقاقی و استعلاجی ********************
@@ -736,36 +740,45 @@ function ajaxPersonals() {
});
}
function rotatingShift(startDateValue) {
function rotatingShift() {
var startDateValue = $('#StartLeave').val();
$('#rotatingShiftSection').addClass('disable');
if ($('#paid').is(':checked') && $('#daily').is(':checked') && startDateValue.length === 10) {
ajaxService.get(hasRotatingShiftAjax, { employeeId: currentEmployeeId, startDateTime: startDateValue })
.then(response => {
$('#HasRollCall').val(response.hasRollCall);
ajaxService.get(hasRotatingShiftAjax, { employeeId: currentEmployeeId, startDateTime: startDateValue })
.then(response => {
$('#HasRollCall').val(response.hasRollCall);
if (response.hasRollCall) {
$('#rotatingShiftSection').show();
if (response.hasRollCall) {
$('#rotatingShiftSection').removeClass('disable');
var shiftsList = response.shifts;
var shiftsOptionsHtml = '<option selected disabled>انتخاب شیفت ...</option>';
var shiftsList = response.shifts;
var shiftsOptionsHtml = '<option selected disabled>انتخاب شیفت ...</option>';
shiftsList.forEach(function (item) {
shiftsOptionsHtml += `<option value="${item.startTime}|${item.endTime}">${item.startTime} الی ${item.endTime}</option>`;
});
$('#rotatingShift').html(shiftsOptionsHtml);
} else {
$('#rotatingShiftSection').hide();
shiftsList.forEach(function(item) {
shiftsOptionsHtml += `<option value="${item.startTime}|${item.endTime}">${item.startTime} الی ${
item.endTime}</option>`;
});
$('#rotatingShift').html(shiftsOptionsHtml);
} else {
$('#rotatingShiftSection').addClass('disable');
if (response.message) {
$('#StartLeave').addClass('errored');
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text("");
$('#StartLeave').removeClass("errored");
}, 3500);
if (response.message) {
$('#StartLeave').addClass('errored');
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function() {
$('.alert-msg').hide();
$('.alert-msg p').text("");
$('#StartLeave').removeClass("errored");
},
3500);
}
}
}
});
});
} else {
$('#rotatingShiftSection').addClass('disable');
}
}

View File

@@ -74,6 +74,19 @@
$('input[name="Command.IrregularShift.WorkshopIrregularShifts"]').prop('checked', false);
$('#irregularShiftsDateTime').addClass('disable');
$('.dateTimeIrregular').val('');
var currentCount = $('.groupBox').length;
if (currentCount >= 2) {
$('#BreakTime').prop('checked', false);
$('#BreakTimeFirst').prop('checked', false);
$('#computeTimeText').text('');
$("#hour").val("0");
$("#min").val("00");
$('#computeTime').addClass('disable');
$("#TimeOnly").val('');
} else {
$('#computeTime').removeClass('disable');
}
});
$("#rotating_shift").on("click", function () {
@@ -97,8 +110,7 @@
$('#step_workTimeOptionRotatingShift').hide();
$('#step_workTimeOptionIrregular').show();
});
switch (IsRegularWorkshop) {
case 0:
//radio btn
@@ -111,6 +123,20 @@
$('#step_workTimeOptionIrregular').hide();
// این مرحله هنگام چک کردن تعداد نوبت هستش
updateAddButtonText(indexShiftViewModel);
var currentCount = $('.groupBox').length;
if (currentCount >= 2) {
$('#BreakTime').prop('checked', false);
$('#BreakTimeFirst').prop('checked', false);
$('#computeTimeText').text('');
$("#hour").val("0");
$("#min").val("00");
$('#computeTime').addClass('disable');
$("#TimeOnly").val('');
} else {
$('#computeTime').removeClass('disable');
}
break;
case 1:
@@ -163,18 +189,17 @@
});
$('#BreakTime, #BreakTimeFirst').on('change', function () {
$('#BreakTime, #BreakTimeFirst').not(this).prop('checked', false);
var currentCount = 0;
if ($("#organized").is(":Checked")) {
var currentCount = $('.groupBox').length;
} else if ($("#rotating_shift").is(":Checked")) {
var currentCount = $('.groupBoxRS').length;
currentCount = $('.groupBox').length;
}
//else if ($("#rotating_shift").is(":Checked")) {
// var currentCount = $('.groupBoxRS').length;
//}
if (currentCount >= 2) {
showAlert('به دلیل داشتن 2 یا 3 نوبت، امکان فعال سازی ساعت استراحت ندارید', $(this));
showAlert('به دلیل داشتن 2 یا 3 نوبت، امکان فعال سازی ساعت استراحت ندارید', $('.break-time'));
$(this).prop('checked', false);
$("#hour").val("0");
$("#min").val("00");
@@ -342,17 +367,17 @@
return false;
}
if (currentCount >= 1) {
$('#BreakTime').prop('checked', false);
$('#BreakTimeFirst').prop('checked', false);
$('#computeTimeText').text('');
$("#hour").val("0");
$("#min").val("00");
$('#computeTime').addClass('disable');
$("#TimeOnly").val('');
} else {
$('#computeTime').removeClass('disable');
}
//if (currentCount >= 1) {
// $('#BreakTime').prop('checked', false);
// $('#BreakTimeFirst').prop('checked', false);
// $('#computeTimeText').text('');
// $("#hour").val("0");
// $("#min").val("00");
// $('#computeTime').addClass('disable');
// $("#TimeOnly").val('');
//} else {
// $('#computeTime').removeClass('disable');
//}
if (currentCount < 5) {

View File

@@ -78,6 +78,19 @@
$('input[name="IrregularShift.WorkshopIrregularShifts"]').prop('checked', false);
$('#irregularShiftsDateTime').addClass('disable');
$('.dateTimeIrregular').val('');
var currentCount = $('.groupBox').length;
if (currentCount >= 2) {
$('#BreakTime').prop('checked', false);
$('#BreakTimeFirst').prop('checked', false);
$('#computeTimeText').text('');
$("#hour").val("0");
$("#min").val("00");
$('#computeTime').addClass('disable');
$("#TimeOnly").val('');
} else {
$('#computeTime').removeClass('disable');
}
});
$("#rotating_shift").on("click", function () {
@@ -114,6 +127,20 @@
$('#step_workTimeOptionIrregular').hide();
// این مرحله هنگام چک کردن تعداد نوبت هستش
updateAddButtonText(indexShiftViewModel);
var currentCount = $('.groupBox').length;
if (currentCount >= 2) {
$('#BreakTime').prop('checked', false);
$('#BreakTimeFirst').prop('checked', false);
$('#computeTimeText').text('');
$("#hour").val("0");
$("#min").val("00");
$('#computeTime').addClass('disable');
$("#TimeOnly").val('');
} else {
$('#computeTime').removeClass('disable');
}
break;
case 1:
@@ -166,18 +193,17 @@
});
$('#BreakTime, #BreakTimeFirst').on('change', function () {
$('#BreakTime, #BreakTimeFirst').not(this).prop('checked', false);
var currentCount = 0;
if ($("#organized").is(":Checked")) {
var currentCount = $('.groupBox').length;
} else if ($("#rotating_shift").is(":Checked")) {
var currentCount = $('.groupBoxRS').length;
currentCount = $('.groupBox').length;
}
//else if ($("#rotating_shift").is(":Checked")) {
// var currentCount = $('.groupBoxRS').length;
//}
if (currentCount >= 2) {
showAlert('به دلیل داشتن 2 یا 3 نوبت، امکان فعال سازی ساعت استراحت ندارید', $(this));
showAlert('به دلیل داشتن 2 یا 3 نوبت، امکان فعال سازی ساعت استراحت ندارید', $('.break-time'));
$(this).prop('checked', false);
$("#hour").val("0");
$("#min").val("00");
@@ -347,17 +373,17 @@
return false;
}
if (currentCount >= 1) {
$('#BreakTime').prop('checked', false);
$('#BreakTimeFirst').prop('checked', false);
$('#computeTimeText').text('');
$("#hour").val("0");
$("#min").val("00");
$('#computeTime').addClass('disable');
$("#TimeOnly").val('');
} else {
$('#computeTime').removeClass('disable');
}
//if (currentCount >= 1) {
// $('#BreakTime').prop('checked', false);
// $('#BreakTimeFirst').prop('checked', false);
// $('#computeTimeText').text('');
// $("#hour").val("0");
// $("#min").val("00");
// $('#computeTime').addClass('disable');
// $("#TimeOnly").val('');
//} else {
// $('#computeTime').removeClass('disable');
//}
if (currentCount < 5) {

View File

@@ -73,6 +73,19 @@
$('input[name="IrregularShift.WorkshopIrregularShifts"]').prop('checked', false);
$('#irregularShiftsDateTime').addClass('disable');
$('.dateTimeIrregular').val('');
var currentCount = $('.groupBox').length;
if (currentCount >= 2) {
$('#BreakTime').prop('checked', false);
$('#BreakTimeFirst').prop('checked', false);
$('#computeTimeText').text('');
$("#hour").val("0");
$("#min").val("00");
$('#computeTime').addClass('disable');
$("#TimeOnly").val('');
} else {
$('#computeTime').removeClass('disable');
}
});
$("#rotating_shift").on("click", function () {
@@ -111,18 +124,17 @@
});
$('#BreakTime, #BreakTimeFirst').on('change', function () {
$('#BreakTime, #BreakTimeFirst').not(this).prop('checked', false);
var currentCount = 0;
if ($("#organized").is(":Checked")) {
var currentCount = $('.groupBox').length;
} else if ($("#rotating_shift").is(":Checked")) {
var currentCount = $('.groupBoxRS').length;
currentCount = $('.groupBox').length;
}
//else if ($("#rotating_shift").is(":Checked")) {
// var currentCount = $('.groupBoxRS').length;
//}
if (currentCount >= 2) {
showAlert('به دلیل داشتن 2 یا 3 نوبت، امکان فعال سازی ساعت استراحت ندارید', $(this));
showAlert('به دلیل داشتن 2 یا 3 نوبت، امکان فعال سازی ساعت استراحت ندارید', $('.break-time'));
$(this).prop('checked', false);
$("#hour").val("0");
$("#min").val("00");
@@ -290,17 +302,17 @@
return false;
}
if (currentCount >= 1) {
$('#BreakTime').prop('checked', false);
$('#BreakTimeFirst').prop('checked', false);
$('#computeTimeText').text('');
$("#hour").val("0");
$("#min").val("00");
$('#computeTime').addClass('disable');
$("#TimeOnly").val('');
} else {
$('#computeTime').removeClass('disable');
}
//if (currentCount >= 1) {
// $('#BreakTime').prop('checked', false);
// $('#BreakTimeFirst').prop('checked', false);
// $('#computeTimeText').text('');
// $("#hour").val("0");
// $("#min").val("00");
// $('#computeTime').addClass('disable');
// $("#TimeOnly").val('');
//} else {
// $('#computeTime').removeClass('disable');
//}
if (currentCount < 5) {

View File

@@ -5,10 +5,21 @@ $(document).ready(function () {
$('.loading').hide();
document.getElementById("MainModal").style.visibility = "visible";
$(".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.getElementById("MainModal").style.visibility = "visible";
rotatingShift();
var startLeaveInput = $('#StartLeave').val();
rotatingShift(startLeaveInput);
$('#StartLeave').on('keyup', function () {
const startDateValue = $(this).val();
@@ -16,9 +27,9 @@ $(document).ready(function () {
const dateRegex = /^\d{4}\/\d{2}\/\d{2}$/;
if (dateRegex.test(startDateValue) && startDateValue !== previousStartDate) {
previousStartDate = startDateValue;
rotatingShift(startDateValue);
}
}
rotatingShift();
});
$('#rotatingShift').on('change', function () {
@@ -32,6 +43,7 @@ $(document).ready(function () {
$(document).on("change", ".LeaveType", function () {
if ($('#paid').is(':checked')) {
$('#dailyType').css('visibility', 'visible');
rotatingShift();
}
if ($('#sick').is(':checked')) {
@@ -41,6 +53,7 @@ $(document).ready(function () {
$('#end_date_estehghaghi').show();
$('.time_paid').hide();
}
rotatingShift();
}
});
@@ -49,11 +62,13 @@ $(document).ready(function () {
if ($('#daily').is(':checked')) {
$('#end_date_estehghaghi').show();
$('.time_paid').hide();
rotatingShift();
}
if ($('#hourly').is(':checked')) {
$('#end_date_estehghaghi').hide();
$('.time_paid').show();
rotatingShift();
}
});
//******************** شرط استحقاقی و استعلاجی ********************
@@ -701,36 +716,47 @@ $(document).ready(function () {
});
});
function rotatingShift(startDateValue) {
function rotatingShift() {
var currentEmployeeId = $('#employeeId').val();
ajaxService.get(hasRotatingShiftAjax, { employeeId: currentEmployeeId, startDateTime: startDateValue })
.then(response => {
$('#HasRollCall').val(response.hasRollCall);
console.log(response);
if (response.hasRollCall) {
$('#rotatingShiftSection').show();
var startDateValue = $('#StartLeave').val();
$('#rotatingShiftSection').addClass('disable');
var shiftsList = response.shifts;
var shiftsOptionsHtml = '<option selected disabled>انتخاب شیفت ...</option>';
if ($('#paid').is(':checked') && $('#daily').is(':checked') && startDateValue.length === 10) {
shiftsList.forEach(function (item) {
shiftsOptionsHtml += `<option value="${item.startTime}|${item.endTime}">${item.startTime} الی ${item.endTime}</option>`;
});
$('#rotatingShift').html(shiftsOptionsHtml);
} else {
$('#rotatingShiftSection').hide();
ajaxService.get(hasRotatingShiftAjax, { employeeId: currentEmployeeId, startDateTime: startDateValue })
.then(response => {
console.log(response)
$('#HasRollCall').val(response.hasRollCall);
if (response.message) {
$('#StartLeave').addClass('errored');
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text("");
$('#StartLeave').removeClass("errored");
}, 3500);
if (response.hasRollCall) {
$('#rotatingShiftSection').removeClass('disable');
var shiftsList = response.shifts;
var shiftsOptionsHtml = '<option selected disabled>انتخاب شیفت ...</option>';
shiftsList.forEach(function (item) {
shiftsOptionsHtml += `<option value="${item.startTime}|${item.endTime}">${item.startTime} الی ${item.endTime}</option>`;
});
$('#rotatingShift').html(shiftsOptionsHtml);
} else {
$('#rotatingShiftSection').addClass('disable');
if (response.message) {
$('#StartLeave').addClass('errored');
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text("");
$('#StartLeave').removeClass("errored");
},
3500);
}
}
}
});
});
} else {
$('#rotatingShiftSection').addClass('disable');
}
}