ManualEdit with Dates and bank on admin side and employee searc at RollCall Grouping

This commit is contained in:
SamSys
2025-02-04 19:51:52 +03:30
parent f49b69be13
commit fb6667a0de
85 changed files with 4864 additions and 1258 deletions

View File

@@ -128,6 +128,8 @@ namespace AccountManagement.Application
public MediaViewModel Get(long id)
{
var media = _mediaRepository.Get(id);
if (media == null)
return new();
return new MediaViewModel()
{
Category = media.Category,

View File

@@ -7,138 +7,172 @@ using System.Collections.Generic;
using System;
using System.Linq;
using _0_Framework.Application;
using OfficeOpenXml;
using OfficeOpenXml.Drawing.Chart;
namespace Company.Domain.RollCallAgg.DomainService;
public interface IRollCallDomainService
{
(WorkshopShiftStatus shiftType, IrregularShift irregularShift, ICollection<CustomizeSifts> regularShifts, ICollection<CustomizeRotatingShift> rotatingShifts, TimeSpan BreakTime) GetEmployeeShiftDetails(long employeeId, long workshopId);
TimeOnly GetEmployeeOffSetForRegularSettings(long employeeId, long workshopId);
(WorkshopShiftStatus shiftType, IrregularShift irregularShift, ICollection<CustomizeSifts> regularShifts, ICollection<CustomizeRotatingShift> rotatingShifts, TimeSpan BreakTime) GetEmployeeShiftDetails(long employeeId, long workshopId);
TimeOnly GetEmployeeOffSetForRegularSettings(long employeeId, long workshopId);
DateTime GetEmployeeShiftDateByRollCallStartDate(long workshopId, long employeeId, DateTime rollCallStartDate);
}
public class RollCallDomainService : IRollCallDomainService
{
private readonly IRollCallRepository _rollCallRepository;
private readonly IRollCallRepository _rollCallRepository;
private readonly ICustomizeWorkshopEmployeeSettingsRepository _customizeWorkshopEmployeeSettingsRepository;
private readonly ICustomizeWorkshopSettingsRepository _customizeWorkshopSettingsRepository;
public RollCallDomainService(IRollCallRepository rollCallRepository, ICustomizeWorkshopEmployeeSettingsRepository customizeWorkshopEmployeeSettingsRepository, ICustomizeWorkshopSettingsRepository customizeWorkshopSettingsRepository)
{
_rollCallRepository = rollCallRepository;
_customizeWorkshopEmployeeSettingsRepository = customizeWorkshopEmployeeSettingsRepository;
_customizeWorkshopSettingsRepository = customizeWorkshopSettingsRepository;
}
private readonly ICustomizeWorkshopEmployeeSettingsRepository _customizeWorkshopEmployeeSettingsRepository;
private readonly ICustomizeWorkshopSettingsRepository _customizeWorkshopSettingsRepository;
public RollCallDomainService(IRollCallRepository rollCallRepository, ICustomizeWorkshopEmployeeSettingsRepository customizeWorkshopEmployeeSettingsRepository, ICustomizeWorkshopSettingsRepository customizeWorkshopSettingsRepository)
{
_rollCallRepository = rollCallRepository;
_customizeWorkshopEmployeeSettingsRepository = customizeWorkshopEmployeeSettingsRepository;
_customizeWorkshopSettingsRepository = customizeWorkshopSettingsRepository;
}
public (WorkshopShiftStatus shiftType, IrregularShift irregularShift, ICollection<CustomizeSifts> regularShifts, ICollection<CustomizeRotatingShift> rotatingShifts, TimeSpan BreakTime) GetEmployeeShiftDetails(long employeeId,
long workshopId)
{
var employeeSettings = _customizeWorkshopEmployeeSettingsRepository.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(workshopId, employeeId);
public (WorkshopShiftStatus shiftType, IrregularShift irregularShift, ICollection<CustomizeSifts> regularShifts, ICollection<CustomizeRotatingShift> rotatingShifts, TimeSpan BreakTime) GetEmployeeShiftDetails(long employeeId,
long workshopId)
{
var employeeSettings = _customizeWorkshopEmployeeSettingsRepository.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(workshopId, employeeId);
var offset = TimeOnly.MinValue;
WorkshopShiftStatus shiftType;
var offset = TimeOnly.MinValue;
WorkshopShiftStatus shiftType;
if (employeeSettings == null)
{
if (employeeSettings == null)
{
var workshopSettings = _customizeWorkshopSettingsRepository.GetBy(workshopId);
shiftType = workshopSettings.WorkshopShiftStatus;
var workshopSettings = _customizeWorkshopSettingsRepository.GetBy(workshopId);
shiftType = workshopSettings.WorkshopShiftStatus;
return (shiftType, null,
workshopSettings.CustomizeWorkshopSettingsShifts.Select(x => (CustomizeSifts)x).ToList(),
null, TimeSpan.Zero);
return (shiftType, null,
workshopSettings.CustomizeWorkshopSettingsShifts.Select(x => (CustomizeSifts)x).ToList(),
null, TimeSpan.Zero);
}
else
{
}
else
{
shiftType = employeeSettings.WorkshopShiftStatus;
shiftType = employeeSettings.WorkshopShiftStatus;
var breakTimeSpan = employeeSettings.BreakTime.BreakTimeType == BreakTimeType.WithTime
? employeeSettings.BreakTime.BreakTimeValue.ToTimeSpan()
: TimeSpan.Zero;
var breakTimeSpan = employeeSettings.BreakTime.BreakTimeType == BreakTimeType.WithTime
? employeeSettings.BreakTime.BreakTimeValue.ToTimeSpan()
: TimeSpan.Zero;
return (shiftType, employeeSettings.IrregularShift,
employeeSettings.CustomizeWorkshopEmployeeSettingsShifts.Select(x => (CustomizeSifts)x).ToList(),
employeeSettings.CustomizeRotatingShifts, breakTimeSpan);
return (shiftType, employeeSettings.IrregularShift,
employeeSettings.CustomizeWorkshopEmployeeSettingsShifts.Select(x => (CustomizeSifts)x).ToList(),
employeeSettings.CustomizeRotatingShifts, breakTimeSpan);
}
}
}
}
public TimeOnly GetEmployeeOffSetForRegularSettings(long employeeId, long workshopId)
{
var workshopSettings = _customizeWorkshopSettingsRepository.GetBy(workshopId);
var employeeSettings = _customizeWorkshopEmployeeSettingsRepository.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(workshopId, employeeId);
public TimeOnly GetEmployeeOffSetForRegularSettings(long employeeId, long workshopId)
{
var workshopSettings = _customizeWorkshopSettingsRepository.GetBy(workshopId);
var employeeSettings = _customizeWorkshopEmployeeSettingsRepository.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(workshopId, employeeId);
if (workshopSettings == null)
return TimeOnly.MinValue;
if (workshopSettings == null)
return TimeOnly.MinValue;
if (employeeSettings == null && workshopSettings.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
return Tools.CalculateOffset(workshopSettings.CustomizeWorkshopSettingsShifts
.Select(x => (CustomizeSifts)x).ToList());
if (employeeSettings == null && workshopSettings.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
return Tools.CalculateOffset(workshopSettings.CustomizeWorkshopSettingsShifts
.Select(x => (CustomizeSifts)x).ToList());
if (employeeSettings == null)
return Tools.CalculateOffset(workshopSettings.CustomizeWorkshopSettingsShifts.Select(x => (CustomizeSifts)x).ToList());
if (employeeSettings == null)
return Tools.CalculateOffset(workshopSettings.CustomizeWorkshopSettingsShifts.Select(x => (CustomizeSifts)x).ToList());
if (workshopSettings.WorkshopShiftStatus == WorkshopShiftStatus.Regular && employeeSettings.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
{
// تعریف بازه‌های زمانی
var workshopStartTime = workshopSettings.CustomizeWorkshopSettingsShifts.MinBy(x => x.Placement).StartTime; // شروع کارگاه
var workshopEndTime = workshopSettings.CustomizeWorkshopSettingsShifts.MaxBy(x => x.Placement).EndTime; // پایان کارگاه
if (workshopSettings.WorkshopShiftStatus == WorkshopShiftStatus.Regular && employeeSettings.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
{
// تعریف بازه‌های زمانی
var workshopStartTime = workshopSettings.CustomizeWorkshopSettingsShifts.MinBy(x => x.Placement).StartTime; // شروع کارگاه
var workshopEndTime = workshopSettings.CustomizeWorkshopSettingsShifts.MaxBy(x => x.Placement).EndTime; // پایان کارگاه
var employeeStartTime = employeeSettings.CustomizeWorkshopEmployeeSettingsShifts.MinBy(x => x.Placement).StartTime; // شروع بازه پرسنل
var employeeEndTime = employeeSettings.CustomizeWorkshopEmployeeSettingsShifts.MaxBy(x => x.Placement).EndTime; // پایان پرسنل
var employeeStartTime = employeeSettings.CustomizeWorkshopEmployeeSettingsShifts.MinBy(x => x.Placement).StartTime; // شروع بازه پرسنل
var employeeEndTime = employeeSettings.CustomizeWorkshopEmployeeSettingsShifts.MaxBy(x => x.Placement).EndTime; // پایان پرسنل
// تبدیل زمان‌ها به TimeSpan برای مقایسه
var workshopStartTimeSpan = workshopStartTime.ToTimeSpan();
var workshopEndTimeSpan = workshopEndTime.ToTimeSpan();
var employeeStartTimeSpan = employeeStartTime.ToTimeSpan();
var employeeEndTimeSpan = employeeEndTime.ToTimeSpan();
// تبدیل زمان‌ها به TimeSpan برای مقایسه
var workshopStartTimeSpan = workshopStartTime.ToTimeSpan();
var workshopEndTimeSpan = workshopEndTime.ToTimeSpan();
var employeeStartTimeSpan = employeeStartTime.ToTimeSpan();
var employeeEndTimeSpan = employeeEndTime.ToTimeSpan();
// مدیریت زمان‌های بعد از نیمه شب
if (workshopEndTimeSpan < workshopStartTimeSpan)
workshopEndTimeSpan = workshopEndTimeSpan.Add(TimeSpan.FromDays(1)); // افزودن یک روز به پایان بازه اول
// مدیریت زمان‌های بعد از نیمه شب
if (workshopEndTimeSpan < workshopStartTimeSpan)
workshopEndTimeSpan = workshopEndTimeSpan.Add(TimeSpan.FromDays(1)); // افزودن یک روز به پایان بازه اول
if (employeeEndTimeSpan < employeeStartTimeSpan)
employeeEndTimeSpan = employeeEndTimeSpan.Add(TimeSpan.FromDays(1)); // افزودن یک روز به پایان بازه دوم
if (employeeEndTimeSpan < employeeStartTimeSpan)
employeeEndTimeSpan = employeeEndTimeSpan.Add(TimeSpan.FromDays(1)); // افزودن یک روز به پایان بازه دوم
// محاسبه بزرگ‌ترین زمان شروع و کوچک‌ترین زمان پایان
var overlapStart = workshopStartTimeSpan > employeeStartTimeSpan ? workshopStartTimeSpan : employeeStartTimeSpan;
var overlapEnd = workshopEndTimeSpan < employeeEndTimeSpan ? workshopEndTimeSpan : employeeEndTimeSpan;
// محاسبه بزرگ‌ترین زمان شروع و کوچک‌ترین زمان پایان
var overlapStart = workshopStartTimeSpan > employeeStartTimeSpan ? workshopStartTimeSpan : employeeStartTimeSpan;
var overlapEnd = workshopEndTimeSpan < employeeEndTimeSpan ? workshopEndTimeSpan : employeeEndTimeSpan;
if (overlapStart >= overlapEnd) // اگر بازه هم‌پوشانی وجود ندارد
return Tools.CalculateOffset(employeeSettings.CustomizeWorkshopEmployeeSettingsShifts
.Select(x => (CustomizeSifts)x).ToList());
if (overlapStart >= overlapEnd) // اگر بازه هم‌پوشانی وجود ندارد
return Tools.CalculateOffset(employeeSettings.CustomizeWorkshopEmployeeSettingsShifts
.Select(x => (CustomizeSifts)x).ToList());
var overlapDuration = (overlapEnd - overlapStart).TotalMinutes; // مدت زمان هم‌پوشانی بر حسب دقیقه
var duration2 = (employeeEndTime - employeeStartTime).TotalMinutes; // مدت زمان بازه دوم
var overlapDuration = (overlapEnd - overlapStart).TotalMinutes; // مدت زمان هم‌پوشانی بر حسب دقیقه
var duration2 = (employeeEndTime - employeeStartTime).TotalMinutes; // مدت زمان بازه دوم
var overlapPercentage = (overlapDuration / duration2) * 100; // درصد هم‌پوشانی
var overlapPercentage = (overlapDuration / duration2) * 100; // درصد هم‌پوشانی
if (overlapPercentage < 40)
{
return Tools.CalculateOffset(employeeSettings.CustomizeWorkshopEmployeeSettingsShifts
.Select(x => (CustomizeSifts)x).ToList());
}
if (overlapPercentage < 40)
{
return Tools.CalculateOffset(employeeSettings.CustomizeWorkshopEmployeeSettingsShifts
.Select(x => (CustomizeSifts)x).ToList());
}
return Tools.CalculateOffset(workshopSettings.CustomizeWorkshopSettingsShifts
.Select(x => (CustomizeSifts)x).ToList());
}
return Tools.CalculateOffset(workshopSettings.CustomizeWorkshopSettingsShifts
.Select(x => (CustomizeSifts)x).ToList());
}
else if (employeeSettings.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
{
return Tools.CalculateOffset(employeeSettings.CustomizeWorkshopEmployeeSettingsShifts
.Select(x => (CustomizeSifts)x).ToList());
}
else if (employeeSettings.WorkshopShiftStatus == WorkshopShiftStatus.Regular)
{
return Tools.CalculateOffset(employeeSettings.CustomizeWorkshopEmployeeSettingsShifts
.Select(x => (CustomizeSifts)x).ToList());
}
else
{
return TimeOnly.MinValue;
}
}
else
{
return TimeOnly.MinValue;
}
}
public DateTime GetEmployeeShiftDateByRollCallStartDate(long workshopId, long employeeId, DateTime rollCallStartDate)
{
var shiftDetails = GetEmployeeShiftDetails(employeeId, workshopId);
var offset = GetEmployeeOffSetForRegularSettings(employeeId, workshopId);
return shiftDetails.shiftType switch
{
WorkshopShiftStatus.Regular => CalculateRegularShiftDate(rollCallStartDate, offset),
WorkshopShiftStatus.Rotating => rollCallStartDate.Date,
WorkshopShiftStatus.Irregular => rollCallStartDate.Date,
_ => throw new ArgumentOutOfRangeException()
};
}
private DateTime CalculateRegularShiftDate(DateTime startDate, TimeOnly offset)
{
DateTime nextOffSetDateTime;
if (startDate.TimeOfDay >= offset.ToTimeSpan())
{
nextOffSetDateTime = startDate.AddDays(1).Date + offset.ToTimeSpan();
}
else
nextOffSetDateTime = startDate.Date + offset.ToTimeSpan();
if (nextOffSetDateTime.TimeOfDay >= TimeSpan.FromHours(12))
return nextOffSetDateTime.Date;
return nextOffSetDateTime.AddDays(-1).Date;
}
}

View File

@@ -61,34 +61,9 @@ namespace Company.Domain.RollCallAgg
public void SetShiftDate(IRollCallDomainService service)
{
var shiftDetails = service.GetEmployeeShiftDetails(EmployeeId, WorkshopId);
var offset = service.GetEmployeeOffSetForRegularSettings(EmployeeId, WorkshopId);
ShiftDate = shiftDetails.shiftType switch
{
WorkshopShiftStatus.Regular => CalculateRegularShiftDate(StartDate!.Value, offset),
WorkshopShiftStatus.Rotating => StartDate!.Value.Date,
WorkshopShiftStatus.Irregular => StartDate!.Value.Date,
_ => throw new ArgumentOutOfRangeException()
};
ShiftDate = service.GetEmployeeShiftDateByRollCallStartDate(WorkshopId, EmployeeId, StartDate!.Value);
}
private DateTime CalculateRegularShiftDate(DateTime startDate, TimeOnly offset)
{
DateTime nextOffSetDateTime;
if (startDate.TimeOfDay >= offset.ToTimeSpan())
{
nextOffSetDateTime = startDate.AddDays(1).Date + offset.ToTimeSpan();
}
else
nextOffSetDateTime = startDate.Date + offset.ToTimeSpan();
if (nextOffSetDateTime.TimeOfDay >= TimeSpan.FromHours(12))
return nextOffSetDateTime.Date;
return nextOffSetDateTime.AddDays(-1).Date;
}
}

View File

@@ -1,6 +1,9 @@
namespace CompanyManagment.App.Contracts.RollCall;
using System;
namespace CompanyManagment.App.Contracts.RollCall;
public class EditRollCall : CreateRollCall
{
public long Id { get; set; }
public DateTime ShiftDate { get; set; }
}

View File

@@ -11,5 +11,6 @@ namespace CompanyManagment.App.Contracts.RollCall
public string DateFa { get; set; }
public List<RollCallViewModel> RollCalls { get; set; }
public List<RollCallEditableDatesForManualEditViewModel> EditableDates { get; set; }
}
public string TotalRollCallsDuration { get; set; }
}
}

View File

@@ -55,7 +55,7 @@ namespace CompanyManagment.Application
if(command.BankLogoPictureFile != null && command.BankLogoPictureFile.Length >0 )
{
var uploadResult = _mediaApplication.UploadFile(command.BankLogoPictureFile, command.BankName,
_basePath, 10, [".jpg", ".jpeg", ".png"]);
_basePath, 10, [".jpg", ".jpeg", ".png",".svg"]);
if (uploadResult.IsSuccedded == false)
return uploadResult;
mediaId = uploadResult.SendId;
@@ -81,7 +81,7 @@ namespace CompanyManagment.Application
if (command.BankLogoPictureFile != null && command.BankLogoPictureFile.Length > 0)
{
var uploadResult = _mediaApplication.UploadFile(command.BankLogoPictureFile, command.BankName,
_basePath, 10, [".jpg", ".jpeg", ".png"]);
_basePath, 10, [".jpg", ".jpeg", ".png",".svg"]);
if (uploadResult.IsSuccedded == false)
return uploadResult;
_mediaApplication.DeleteFile(entity.BankLogoMediaId);
@@ -93,11 +93,10 @@ namespace CompanyManagment.Application
return op.Succcedded();
}
public List<BankViewModel> Search(string name)
{
var banks = _bankRepository.Search(name);
var medias = _mediaApplication.GetRange(banks.Select(x => x.Id));
var medias = _mediaApplication.GetRange(banks.Select(x => x.BankLogoPictureMediaId));
return banks.Select(x=> new BankViewModel()
{
BankLogoPicturePath = medias.FirstOrDefault(y=>y.Id == x.BankLogoPictureMediaId)?.Path ??"",

View File

@@ -199,613 +199,465 @@ public class RollCallApplication : IRollCallApplication
}
/// <summary>
/// افزودن حضور غیاب به صورت دستی. اگر آیدی رکورد صفر باشد رکورد جدید، در غیر این صورت ویرایش می کند
/// </summary>
///
/// <summary>
/// افزودن حضور غیاب به صورت دستی. اگر آیدی رکورد صفر باشد رکورد جدید، در غیر این صورت ویرایش می کند
/// </summary>
///
#region ManualEditWithDates
//public OperationResult ManualEdit(CreateOrEditEmployeeRollCall command)
//{
// var operation = new OperationResult();
#region ManualEditWithDates
//public OperationResult ManualEdit(CreateOrEditEmployeeRollCall command)
//{
// var operation = new OperationResult();
// DateTime date = command.DateFa.ToGeorgianDateTime();
// if (date == Tools.GetUndefinedDateTime())
// return operation.Failed("فرمت تاریخ وارد شده صحیح نمی باشد");
// 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
// ? (date.AddDays(1).Date >= DateTime.Today ? DateTime.Today : date.AddDays(1).Date)
// : date.AddDays(2).Date;
// var twoDaysEarlier = date.AddDays(-2).Date;
// var twoDaysLater = date.AddDays(2).Date >= DateTime.Today
// ? (date.AddDays(1).Date >= DateTime.Today ? DateTime.Today : date.AddDays(1).Date)
// : date.AddDays(2).Date;
// if (command.WorkshopId < 1)
// {
// return operation.Failed("خطای سیستمی");
// }
// if (command.WorkshopId < 1)
// {
// return operation.Failed("خطای سیستمی");
// }
// if (command.RollCallRecords == null || command.RollCallRecords.Count == 0)
// return operation.Failed("خطای سیستمی");
// if (command.RollCallRecords == null || command.RollCallRecords.Count == 0)
// return operation.Failed("خطای سیستمی");
// if (_leaveRepository.HasDailyLeave(command.EmployeeId, command.WorkshopId, date))
// return operation.Failed("در روز مرخصی کارمند نمی توانید حضور غیاب ثبت کنید");
// if (_leaveRepository.HasDailyLeave(command.EmployeeId, command.WorkshopId, date))
// return operation.Failed("در روز مرخصی کارمند نمی توانید حضور غیاب ثبت کنید");
// var employeeStatuses = _rollCallEmployeeRepository.GetByEmployeeIdWithStatuses(command.EmployeeId)
// .FirstOrDefault(x => x.WorkshopId == command.WorkshopId)?.Statuses;
// var employeeStatuses = _rollCallEmployeeRepository.GetByEmployeeIdWithStatuses(command.EmployeeId)
// .FirstOrDefault(x => x.WorkshopId == command.WorkshopId)?.Statuses;
// var employeeRollCalls = _rollCallRepository.GetEmployeeRollCallsHistoryAllInDates(command.WorkshopId, command.EmployeeId, twoDaysEarlier, twoDaysLater);
// var employeeRollCalls = _rollCallRepository.GetEmployeeRollCallsHistoryAllInDates(command.WorkshopId, command.EmployeeId, twoDaysEarlier, twoDaysLater);
// //if (employeeRollCalls.Any(x => x.StartDate.Value.Date== x.EndDate == null))
// // return operation.Failed("به دلیل عدم ثبت خروج پرسنل در این تاریخ، شما قادر به افزودن رکورد جدید نمی باشید");
// //if (employeeRollCalls.Any(x => x.StartDate.Value.Date== x.EndDate == null))
// // return operation.Failed("به دلیل عدم ثبت خروج پرسنل در این تاریخ، شما قادر به افزودن رکورد جدید نمی باشید");
// if (command.RollCallRecords.Any(x => string.IsNullOrWhiteSpace(x.StartTime) || string.IsNullOrWhiteSpace(x.EndTime)))
// return operation.Failed("ساعات شروع و پایان نمیتوانند خالی باشد");
// if (command.RollCallRecords.Any(x => string.IsNullOrWhiteSpace(x.StartTime) || string.IsNullOrWhiteSpace(x.EndTime)))
// return operation.Failed("ساعات شروع و پایان نمیتوانند خالی باشد");
// DateTime day = command.DateFa.ToGeorgianDateTime();
// if (day == Tools.GetUndefinedDateTime())
// return operation.Failed("خطای سیستمی");
// DateTime day = command.DateFa.ToGeorgianDateTime();
// if (day == Tools.GetUndefinedDateTime())
// return operation.Failed("خطای سیستمی");
// List<EditRollCall> newRollCallDates = new();
// List<EditRollCall> newRollCallDates = new();
// foreach (var record in command.RollCallRecords)
// {
// if (record.StartDate.TryToGeorgianDateTime(out var startDateGr) == false || record.EndDate.TryToGeorgianDateTime(out var endDateGr) == false)
// return operation.Failed("فرمت تاریخ صحیح نمی باشد");
// foreach (var record in command.RollCallRecords)
// {
// if (record.StartDate.TryToGeorgianDateTime(out var startDateGr) == false || record.EndDate.TryToGeorgianDateTime(out var endDateGr) == false)
// return operation.Failed("فرمت تاریخ صحیح نمی باشد");
// if (TimeOnly.TryParse(record.StartTime, out var startTimeOnly) == false || TimeOnly.TryParse(record.EndTime, out var endTimeOnly) == false)
// return operation.Failed("فرمت ساعت صحیح نمی باشد");
// DateTime startDateTime = startDateGr + startTimeOnly.ToTimeSpan();
// DateTime endDateTime = endDateGr + endTimeOnly.ToTimeSpan();
// if (TimeOnly.TryParse(record.StartTime, out var startTimeOnly) == false || TimeOnly.TryParse(record.EndTime, out var endTimeOnly) == false)
// return operation.Failed("فرمت ساعت صحیح نمی باشد");
// DateTime startDateTime = startDateGr + startTimeOnly.ToTimeSpan();
// DateTime endDateTime = endDateGr + endTimeOnly.ToTimeSpan();
// if (startDateTime >= endDateTime)
// return operation.Failed("زمان ورود نمی تواند بعد یا مساوی زمان خروج باشد");
// 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
// {
// StartDate = startDateTime,
// EndDate = endDateTime,
// Id = record.RollCallId
// };
// newRollCallDates.Add(rollCall);
// }
// var rollCall = new EditRollCall
// {
// StartDate = startDateTime,
// EndDate = endDateTime,
// Id = record.RollCallId
// };
// newRollCallDates.Add(rollCall);
// }
// if (newRollCallDates.Any(x => newRollCallDates.Any(y => x != y && x.EndDate >= y.StartDate && x.StartDate <= y.EndDate)))
// return operation.Failed("بازه های وارد شده با هم تداخل دارند");
// if (newRollCallDates.Any(x => newRollCallDates.Any(y => x != y && x.EndDate >= y.StartDate && x.StartDate <= y.EndDate)))
// return operation.Failed("بازه های وارد شده با هم تداخل دارند");
// foreach (var activity in newRollCallDates)
// {
// foreach (var activity in newRollCallDates)
// {
// //مرخصی روزانه در بالا چک شده است
// var leave = _leaveRepository.GetByWorkshopIdEmployeeIdInDates(command.WorkshopId, command.EmployeeId, activity.StartDate.Value, activity.EndDate.Value)
// .Where(x => x.PaidLeaveType == "ساعتی");
// if (leave.Any())
// return operation.Failed("کارمند در بازه انتخاب شده مرخصی ساعتی دارد");
// }
// //مرخصی روزانه در بالا چک شده است
// var leave = _leaveRepository.GetByWorkshopIdEmployeeIdInDates(command.WorkshopId, command.EmployeeId, activity.StartDate.Value, activity.EndDate.Value)
// .Where(x => x.PaidLeaveType == "ساعتی");
// if (leave.Any())
// return operation.Failed("کارمند در بازه انتخاب شده مرخصی ساعتی دارد");
// }
// if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate >= y.StartDateGr && x.EndDate <= y.EndDateGr)))
// return operation.Failed("کارمند در بازه وارد شده غیر فعال است");
// if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate >= y.StartDateGr && x.EndDate <= y.EndDateGr)))
// return operation.Failed("کارمند در بازه وارد شده غیر فعال است");
// if (newRollCallDates.Any(x =>
// x.StartDate.Value.Date < date.Date.AddDays(-1) ||
// x.EndDate.Value.Date > date.Date.AddDays(1)))
// {
// return operation.Failed("حضور غیاب در حال ویرایش را نمیتوانید بیشتر از یک روز از ثبت حضور غیاب عقب تر یا جلو تر ببرید");
// }
// if (newRollCallDates.Any(x =>
// x.StartDate.Value.Date < date.Date.AddDays(-1) ||
// x.EndDate.Value.Date > date.Date.AddDays(1)))
// {
// return operation.Failed("حضور غیاب در حال ویرایش را نمیتوانید بیشتر از یک روز از ثبت حضور غیاب عقب تر یا جلو تر ببرید");
// }
// 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("بازه های وارد شده با حضور غیاب های مربوط به روز های قبل و بعد تداخل زمانی دارد");
// 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("بازه های وارد شده با حضور غیاب های مربوط به روز های قبل و بعد تداخل زمانی دارد");
// var checkoutViewModels = _checkoutRepository.SimpleSearch(new CheckoutSearchModel() { WorkshopId = command.WorkshopId, EmployeeId = command.EmployeeId });
// var checkoutViewModels = _checkoutRepository.SimpleSearch(new CheckoutSearchModel() { WorkshopId = command.WorkshopId, EmployeeId = command.EmployeeId });
// if (checkoutViewModels.Any(x => x.HasRollCall && x.WorkshopId == command.WorkshopId && x.EmployeeId == command.EmployeeId &&
// newRollCallDates.Any(y => (y.StartDate.Value.Date >= x.ContractStartGr.Date)
// && (y.StartDate.Value.Date <= x.ContractEndGr.Date))))
// return operation.Failed("برای بازه های وارد شده فیش حقوقی ثبت شده است");
// if (checkoutViewModels.Any(x => x.HasRollCall && x.WorkshopId == command.WorkshopId && x.EmployeeId == command.EmployeeId &&
// newRollCallDates.Any(y => (y.StartDate.Value.Date >= x.ContractStartGr.Date)
// && (y.StartDate.Value.Date <= x.ContractEndGr.Date))))
// return operation.Failed("برای بازه های وارد شده فیش حقوقی ثبت شده است");
// var name = _rollCallEmployeeRepository.GetByEmployeeIdAndWorkshopId(command.EmployeeId, command.WorkshopId).EmployeeFullName;
// var rollCallsAsEntityModels = newRollCallDates.Select(x => new RollCall(command.WorkshopId, command.EmployeeId, name, x.StartDate, x.EndDate,
// Convert.ToInt32(x.StartDate.Value.ToFarsi().Substring(0, 4)), Convert.ToInt32(x.StartDate.ToFarsi().Substring(5, 2)), RollCallModifyType.EditByEmployer)).ToList();
// _rollCallRepository.RemoveEmployeeRollCallsInDate(command.WorkshopId, command.EmployeeId, date);
// var name = _rollCallEmployeeRepository.GetByEmployeeIdAndWorkshopId(command.EmployeeId, command.WorkshopId).EmployeeFullName;
// var rollCallsAsEntityModels = newRollCallDates.Select(x => new RollCall(command.WorkshopId, command.EmployeeId, name, x.StartDate, x.EndDate,
// Convert.ToInt32(x.StartDate.Value.ToFarsi().Substring(0, 4)), Convert.ToInt32(x.StartDate.ToFarsi().Substring(5, 2)), RollCallModifyType.EditByEmployer)).ToList();
// _rollCallRepository.RemoveEmployeeRollCallsInDate(command.WorkshopId, command.EmployeeId, date);
// _rollCallRepository.AddRange(rollCallsAsEntityModels);
// _rollCallRepository.SaveChanges();
// return operation.Succcedded();
//}
#endregion
// _rollCallRepository.AddRange(rollCallsAsEntityModels);
// _rollCallRepository.SaveChanges();
// return operation.Succcedded();
//}
#endregion
#region ManualEditWithoutDates_Old
#region ManualEditWithDates
public OperationResult ManualEdit(CreateOrEditEmployeeRollCall command)
{
var operation = new OperationResult();
public OperationResult ManualEdit(CreateOrEditEmployeeRollCall command)
{
var operation = new OperationResult();
DateTime date = command.DateFa.ToGeorgianDateTime();
if (date == Tools.GetUndefinedDateTime())
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
? (date.AddDays(1).Date >= DateTime.Today ? DateTime.Today : date.AddDays(1).Date)
: date.AddDays(2).Date;
if (command.WorkshopId < 1)
{
return operation.Failed("خطای سیستمی");
}
if (command.RollCallRecords == null || command.RollCallRecords.Count == 0)
return operation.Failed("خطای سیستمی");
DateTime date = command.DateFa.ToGeorgianDateTime();
if (date == Tools.GetUndefinedDateTime())
return operation.Failed("فرمت تاریخ وارد شده صحیح نمی باشد");
if (_leaveRepository.HasDailyLeave(command.EmployeeId, command.WorkshopId, date))
return operation.Failed("در روز مرخصی کارمند نمی توانید حضور غیاب ثبت کنید");
if (date >= DateTime.Now.Date)
var employeeStatuses = _rollCallEmployeeRepository.GetByEmployeeIdWithStatuses(command.EmployeeId)
.FirstOrDefault(x => x.WorkshopId == command.WorkshopId)?.Statuses;
var employeeRollCalls = _rollCallRepository.GetEmployeeRollCallsHistoryAllInDates(command.WorkshopId, command.EmployeeId, twoDaysEarlier, twoDaysLater);
//if (employeeRollCalls.Any(x => x.StartDate.Value.Date== x.EndDate == null))
// return operation.Failed("به دلیل عدم ثبت خروج پرسنل در این تاریخ، شما قادر به افزودن رکورد جدید نمی باشید");
if (command.RollCallRecords.Any(x => string.IsNullOrWhiteSpace(x.StartTime) || string.IsNullOrWhiteSpace(x.EndTime)))
return operation.Failed("ساعات شروع و پایان نمیتوانند خالی باشد");
DateTime day = command.DateFa.ToGeorgianDateTime();
var workshopSettings = _customizeWorkshopSettingsRepository.GetBy(command.WorkshopId);
var employeeSettings =
_customizeWorkshopEmployeeSettingsRepository.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(
command.WorkshopId, command.EmployeeId)?.WorkshopShiftStatus;
if (employeeSettings == null && workshopSettings.WorkshopShiftStatus != WorkshopShiftStatus.Regular)
{
return operation.Failed("لطفا ابتدا برای این پرسنل گروهبندی انجام دهید ");
}
if (day == Tools.GetUndefinedDateTime())
return operation.Failed("خطای سیستمی");
List<EditRollCall> newRollCallDates = new();
foreach (var record in command.RollCallRecords)
{
if (record.StartDate.TryToGeorgianDateTime(out var startDateGr) == false || record.EndDate.TryToGeorgianDateTime(out var endDateGr) == false)
return operation.Failed("فرمت تاریخ صحیح نمی باشد");
if (TimeOnly.TryParse(record.StartTime, out var startTimeOnly) == false || TimeOnly.TryParse(record.EndTime, out var endTimeOnly) == false)
return operation.Failed("فرمت ساعت صحیح نمی باشد");
DateTime startDateTime = startDateGr + startTimeOnly.ToTimeSpan();
DateTime endDateTime = endDateGr + endTimeOnly.ToTimeSpan();
if (startDateTime >= endDateTime)
return operation.Failed("زمان ورود نمی تواند بعد یا مساوی زمان خروج باشد");
if (endDateTime.Date >= DateTime.Today)
return operation.Failed("نمی توانید برای روز جاری یا روز های آینده حضور غیاب ثبت کنید");
var rollCall = new EditRollCall
{
StartDate = startDateTime,
EndDate = endDateTime,
Id = record.RollCallId
};
newRollCallDates.Add(rollCall);
}
if (newRollCallDates.Any(x => newRollCallDates.Any(y => x != y && x.EndDate >= y.StartDate && x.StartDate <= y.EndDate)))
return operation.Failed("بازه های وارد شده با هم تداخل دارند");
foreach (var activity in newRollCallDates)
{
//مرخصی روزانه در بالا چک شده است
var leave = _leaveRepository.GetByWorkshopIdEmployeeIdInDates(command.WorkshopId, command.EmployeeId, activity.StartDate.Value, activity.EndDate.Value)
.Where(x => x.PaidLeaveType == "ساعتی");
if (leave.Any())
return operation.Failed("کارمند در بازه انتخاب شده مرخصی ساعتی دارد");
}
if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate >= y.StartDateGr && x.EndDate <= y.EndDateGr)))
return operation.Failed("کارمند در بازه وارد شده غیر فعال است");
newRollCallDates.ForEach(x =>
{
x.ShiftDate =
_rollCallDomainService.GetEmployeeShiftDateByRollCallStartDate(command.WorkshopId, command.EmployeeId,
x.StartDate!.Value);
});
if (newRollCallDates.Any(x => x.ShiftDate.Date != date.Date))
{
return operation.Failed("حضور غیاب در حال ویرایش را نمیتوانید از تاریخ شیفت عقب تر یا جلو تر ببرید");
}
if (new TimeSpan(newRollCallDates.Sum(x => (x.EndDate.Value - x.StartDate.Value).Ticks)) > TimeSpan.FromHours(26))
{
return operation.Failed("امکان اضافه کردن حضور غیاب برای روز جاری و روز های آینده وجود ندارد");
}
//from new
var twoDaysEarlier = date.AddDays(-2).Date;
var twoDaysLater = date.AddDays(2).Date >= DateTime.Today
? (date.AddDays(1).Date >= DateTime.Today ? DateTime.Today : date.AddDays(1).Date)
: date.AddDays(2).Date;
//---
if (command.WorkshopId < 1)
{
return operation.Failed("خطای سیستمی");
}
if (command.RollCallRecords == null || command.RollCallRecords.Count == 0)
return operation.Failed("خطای سیستمی");
if (_leaveRepository.HasDailyLeave(command.EmployeeId, command.WorkshopId, date))
return operation.Failed("در روز مرخصی کارمند نمی توانید حضور غیاب ثبت کنید");
var employeeStatuses = _rollCallEmployeeRepository.GetByEmployeeIdWithStatuses(command.EmployeeId)
.FirstOrDefault(x => x.WorkshopId == command.WorkshopId)?.Statuses;
var employeeRollCalls = _rollCallRepository.GetEmployeeRollCallsHistoryAllInDates(command.WorkshopId, command.EmployeeId, twoDaysEarlier, twoDaysLater);
//comented from new
//var employeeRollCalls = _rollCallRepository.GetWorkshopEmployeeRollCallsForDate(command.WorkshopId, command.EmployeeId, date);
//comented from new
//if (employeeRollCalls.Any(x => x.EndDate == null))
// return operation.Failed("به دلیل عدم ثبت خروج پرسنل در این تاریخ، شما قادر به افزودن رکورد جدید نمی باشید");
if (command.RollCallRecords.Any(x => string.IsNullOrWhiteSpace(x.StartTime) || string.IsNullOrWhiteSpace(x.EndTime)))
return operation.Failed("ساعات شروع و پایان نمیتوانند خالی باشد");
DateTime day = command.DateFa.ToGeorgianDateTime();
var workshopSettings = _customizeWorkshopSettingsRepository.GetBy(command.WorkshopId);
var employeeSettings =
_customizeWorkshopEmployeeSettingsRepository.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(
command.WorkshopId, command.EmployeeId)?.WorkshopShiftStatus;
if (employeeSettings == null && workshopSettings.WorkshopShiftStatus != WorkshopShiftStatus.Regular)
{
return operation.Failed("لطفا ابتدا برای این پرسنل گروهبندی انجام دهید ");
}
List<(TimeOnly start, TimeOnly end, long rollCallId)> preprocessedRollCalls = new();
try
{
preprocessedRollCalls = command.RollCallRecords.Select(x =>
{
if (!TimeOnly.TryParseExact(x.StartTime, "HH:mm", out TimeOnly start))
throw new Exception();
if (!TimeOnly.TryParseExact(x.EndTime, "HH:mm", out TimeOnly end))
throw new Exception();
return (start, end, x.RollCallId);
}).ToList();
}
catch (Exception e)
{
return operation.Failed("فرمت ساعات ورودی نادرست می باشد");
}
List<(DateTime Start, DateTime End, long RollCallId)> result = new();
if (employeeSettings == WorkshopShiftStatus.Regular)
{
TimeOnly offset =
_rollCallDomainService.GetEmployeeOffSetForRegularSettings(command.EmployeeId, command.WorkshopId);
var startWorkingPeriod = day.Date + offset.ToTimeSpan();
if (offset > new TimeOnly(12, 0, 0))
startWorkingPeriod = startWorkingPeriod.AddDays(-1);
foreach (var preprocessedRollCall in preprocessedRollCalls)
{
DateTime startDateTime = startWorkingPeriod.Date.Add(preprocessedRollCall.start.ToTimeSpan());
if (preprocessedRollCall.start.ToTimeSpan() < offset.ToTimeSpan())
{
startDateTime = startDateTime.AddDays(1);
}
DateTime endDateTime = startDateTime.Date + preprocessedRollCall.end.ToTimeSpan();
if (startDateTime > endDateTime)
{
endDateTime = endDateTime.AddDays(1);
}
if (result.Any(x => endDateTime > x.Start && startDateTime < x.End))
return operation.Failed("بازه های وارد شده با هم تداخل دارند");
result.Add(new(startDateTime, endDateTime, preprocessedRollCall.rollCallId));
}
}
else
{
#region RollCallTimes validation and parse to DateTime
if (day == Tools.GetUndefinedDateTime())
return operation.Failed("خطای سیستمی");
DateTime previousEnd = new DateTime();
preprocessedRollCalls = preprocessedRollCalls.OrderBy(x => x.start).ToList();
foreach (var item in preprocessedRollCalls)
{
(DateTime Start, DateTime End, long RollCallId) rollCallWithDateTime =
new()
{
Start = new DateTime(DateOnly.FromDateTime(day), item.start),
End = new DateTime(DateOnly.FromDateTime(day), item.end),
RollCallId = item.rollCallId
};
if (previousEnd != new DateTime())
{
if (rollCallWithDateTime.Start < previousEnd)
{
rollCallWithDateTime.Start = rollCallWithDateTime.Start.AddDays(1);
}
if (rollCallWithDateTime.Start == previousEnd)
return operation.Failed("ساعت ورود نمی تواند با ساعت خروج حضور غیاب دیگری در آن روز برابر باشد");
}
while (rollCallWithDateTime.Start >= rollCallWithDateTime.End)
{
rollCallWithDateTime.End = rollCallWithDateTime.End.AddDays(1);
}
result.Add(rollCallWithDateTime);
previousEnd = rollCallWithDateTime.End;
}
var firstShiftStart = result.OrderBy(x => x.Start).FirstOrDefault().Start;
var lastShiftEnd = result.OrderByDescending(x => x.Start).FirstOrDefault().End;
var lastShiftStart = result.OrderByDescending(x => x.Start).FirstOrDefault().Start;
if (firstShiftStart.AddDays(1) < lastShiftEnd)
return operation.Failed("بازه زمانی وارد شده نا معتبر است");
if (firstShiftStart.Date != lastShiftStart.Date)
return operation.Failed("شروع رکورد حضور غیاب نمی تواند در روز های بعد از تاریخ تعیین شده باشد");
#endregion
}
if (result.Sum(x => (x.End - x.Start).TotalHours) > 24)
{
return operation.Failed("بازه زمانی نمیتواند بیشتر از 24 ساعت باشد");
}
//from new
foreach (var activity in result)
{
//مرخصی روزانه در بالا چک شده است
var leave = _leaveRepository.GetByWorkshopIdEmployeeIdInDates(command.WorkshopId, command.EmployeeId, activity.Start, activity.End)
.Where(x => x.PaidLeaveType == "ساعتی");
if (leave.Any())
return operation.Failed("کارمند در بازه انتخاب شده مرخصی ساعتی دارد");
return operation.Failed("بازه حضور پرسنل نمی تواند بیشتر از 26 ساعت باشد");
}
if (result.Any(x =>
x.Start.Date < date.Date.AddDays(-1) ||
x.End.Date > date.Date.AddDays(1)))
{
return operation.Failed("حضور غیاب در حال ویرایش را نمیتوانید بیشتر از یک روز از ثبت حضور غیاب عقب تر یا جلو تر ببرید");
}
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("بازه های وارد شده با حضور غیاب های مربوط به روز های قبل و بعد تداخل زمانی دارد");
//مهم
//رول کال روز جاری
#region NewValidation
var currentDayRollCall = employeeRollCalls.FirstOrDefault(x => x.EndDate == null);
if (currentDayRollCall != null && result.Any(x => x.End >= currentDayRollCall.StartDate))
return operation.Failed("بازه های وارد شده با حضور غیاب جاری تداخل زمانی دارد");
#endregion
var checkoutViewModels = _checkoutRepository.SimpleSearch(new CheckoutSearchModel() { WorkshopId = command.WorkshopId, EmployeeId = command.EmployeeId });
if (result.Any(x => employeeRollCalls.Any(y => y.DateGr.Date != command.DateFa.ToGeorgianDateTime().Date &&
x.End >= y.StartDate.Value && x.Start <= y.EndDate.Value)))
return operation.Failed("بازه های وارد شده با حضور غیاب های مربوط به روز های قبل و بعد تداخل زمانی دارد");
if (checkoutViewModels.Any(x => x.HasRollCall && x.WorkshopId == command.WorkshopId && x.EmployeeId == command.EmployeeId &&
newRollCallDates.Any(y => (y.StartDate.Value.Date >= x.ContractStartGr.Date)
&& (y.StartDate.Value.Date <= x.ContractEndGr.Date))))
return operation.Failed("برای بازه های وارد شده فیش حقوقی ثبت شده است");
var checkoutViewModels = _checkoutRepository.SimpleSearch(new CheckoutSearchModel() { WorkshopId = command.WorkshopId, EmployeeId = command.EmployeeId });
if (checkoutViewModels.Any(x => x.HasRollCall && x.WorkshopId == command.WorkshopId && x.EmployeeId == command.EmployeeId &&
result.Any(y => (y.Start.Date >= x.ContractStartGr.Date)
&& (y.Start.Date <= x.ContractEndGr.Date))))
return operation.Failed("برای بازه های وارد شده فیش حقوقی ثبت شده است");
//---
if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate >= y.StartDateGr && x.EndDate <= y.EndDateGr)))
return operation.Failed("کارمند در بازه وارد شده غیر فعال است");
if (result == null || !result.All(newRollcall => employeeStatuses.Any(status => newRollcall.Start >= status.StartDateGr && newRollcall.End <= status.EndDateGr)))
return operation.Failed("کارمند در بازه وارد شده غیر فعال است");
var currentDayRollCall = employeeRollCalls.FirstOrDefault(x => x.EndDate == null);
if (currentDayRollCall != null && newRollCallDates.Any(x => x.EndDate!.Value >= currentDayRollCall.StartDate))
return operation.Failed("بازه های وارد شده با حضور غیاب جاری تداخل زمانی دارد");
var name = _rollCallEmployeeRepository.GetByEmployeeIdAndWorkshopId(command.EmployeeId, command.WorkshopId).EmployeeFullName;
var rollCallsAsEntityModels = result.Select(x => new RollCall(command.WorkshopId, command.EmployeeId, name, x.Start, x.End,
Convert.ToInt32(x.Start.ToFarsi().Substring(0, 4)), Convert.ToInt32(x.Start.ToFarsi().Substring(5, 2)), _rollCallDomainService, RollCallModifyType.EditByEmployer)).ToList();
_rollCallRepository.RemoveEmployeeRollCallsInDate(command.WorkshopId, command.EmployeeId, date);
var name = _rollCallEmployeeRepository.GetByEmployeeIdAndWorkshopId(command.EmployeeId, command.WorkshopId).EmployeeFullName;
var rollCallsAsEntityModels = newRollCallDates.Select(x => new RollCall(command.WorkshopId, command.EmployeeId, name, x.StartDate!.Value, x.EndDate,
Convert.ToInt32(x.StartDate.Value.ToFarsi().Substring(0, 4)), Convert.ToInt32(x.StartDate.ToFarsi().Substring(5, 2)), _rollCallDomainService, RollCallModifyType.EditByEmployer)).ToList();
_rollCallRepository.RemoveEmployeeRollCallsInDate(command.WorkshopId, command.EmployeeId, date);
_rollCallRepository.AddRange(rollCallsAsEntityModels);
_rollCallRepository.SaveChanges();
return operation.Succcedded();
}
public OperationResult ManualEditForUndefined(CreateOrEditEmployeeRollCall command)
{
var operation = new OperationResult();
_rollCallRepository.AddRange(rollCallsAsEntityModels);
_rollCallRepository.SaveChanges();
return operation.Succcedded();
}
public OperationResult ManualEditForUndefined(CreateOrEditEmployeeRollCall command)
{
var operation = new OperationResult();
DateTime date = command.DateFa.ToGeorgianDateTime();
if (date == Tools.GetUndefinedDateTime())
return operation.Failed("فرمت تاریخ وارد شده صحیح نمی باشد");
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("امکان اضافه کردن حضور غیاب برای روز جاری و روز های آینده وجود ندارد");
}
//from new
var twoDaysEarlier = date.AddDays(-2).Date;
var twoDaysLater = date.AddDays(2).Date >= DateTime.Today
? (date.AddDays(1).Date >= DateTime.Today ? DateTime.Today : date.AddDays(1).Date)
: date.AddDays(2).Date;
//---
var twoDaysEarlier = date.AddDays(-2).Date;
var twoDaysLater = date.AddDays(2).Date >= DateTime.Today
? (date.AddDays(1).Date >= DateTime.Today ? DateTime.Today : date.AddDays(1).Date)
: date.AddDays(2).Date;
if (command.WorkshopId < 1)
{
return operation.Failed("خطای سیستمی");
}
if (command.WorkshopId < 1)
{
return operation.Failed("خطای سیستمی");
}
if (command.RollCallRecords == null || command.RollCallRecords.Count == 0)
return operation.Failed("خطای سیستمی");
if (command.RollCallRecords == null || command.RollCallRecords.Count == 0)
return operation.Failed("خطای سیستمی");
if (_leaveRepository.HasDailyLeave(command.EmployeeId, command.WorkshopId, date))
return operation.Failed("در روز مرخصی کارمند نمی توانید حضور غیاب ثبت کنید");
var employeeStatuses = _rollCallEmployeeRepository.GetByEmployeeIdWithStatuses(command.EmployeeId)
.FirstOrDefault(x => x.WorkshopId == command.WorkshopId)?.Statuses;
var employeeRollCalls = _rollCallRepository.GetEmployeeRollCallsHistoryAllInDates(command.WorkshopId, command.EmployeeId, twoDaysEarlier, twoDaysLater);
if (_leaveRepository.HasDailyLeave(command.EmployeeId, command.WorkshopId, date))
return operation.Failed("در روز مرخصی کارمند نمی توانید حضور غیاب ثبت کنید");
//comented from new
//var employeeRollCalls = _rollCallRepository.GetWorkshopEmployeeRollCallsForDate(command.WorkshopId, command.EmployeeId, date);
var employeeStatuses = _rollCallEmployeeRepository.GetByEmployeeIdWithStatuses(command.EmployeeId)
.FirstOrDefault(x => x.WorkshopId == command.WorkshopId)?.Statuses;
//comented from new
//if (employeeRollCalls.Any(x => x.EndDate == null))
// return operation.Failed("به دلیل عدم ثبت خروج پرسنل در این تاریخ، شما قادر به افزودن رکورد جدید نمی باشید");
var employeeRollCalls = _rollCallRepository.GetEmployeeRollCallsHistoryAllInDates(command.WorkshopId, command.EmployeeId, twoDaysEarlier, twoDaysLater);
//if (employeeRollCalls.Any(x => x.StartDate.Value.Date== x.EndDate == null))
// return operation.Failed("به دلیل عدم ثبت خروج پرسنل در این تاریخ، شما قادر به افزودن رکورد جدید نمی باشید");
if (command.RollCallRecords.Any(x => string.IsNullOrWhiteSpace(x.StartTime) || string.IsNullOrWhiteSpace(x.EndTime)))
return operation.Failed("ساعات شروع و پایان نمیتوانند خالی باشد");
DateTime day = command.DateFa.ToGeorgianDateTime();
if (command.RollCallRecords.Any(x => string.IsNullOrWhiteSpace(x.StartTime) || string.IsNullOrWhiteSpace(x.EndTime)))
return operation.Failed("ساعات شروع و پایان نمیتوانند خالی باشد");
var workshopSettings = _customizeWorkshopSettingsRepository.GetBy(command.WorkshopId);
var employeeSettings =
_customizeWorkshopEmployeeSettingsRepository.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(
command.WorkshopId, command.EmployeeId)?.WorkshopShiftStatus;
DateTime day = command.DateFa.ToGeorgianDateTime();
if (employeeSettings == null && workshopSettings.WorkshopShiftStatus != WorkshopShiftStatus.Regular)
{
return operation.Failed("لطفا ابتدا برای این پرسنل گروهبندی انجام دهید ");
}
List<(TimeOnly start, TimeOnly end, long rollCallId)> preprocessedRollCalls = new();
try
{
preprocessedRollCalls = command.RollCallRecords.Select(x =>
{
var workshopSettings = _customizeWorkshopSettingsRepository.GetBy(command.WorkshopId);
var employeeSettings =
_customizeWorkshopEmployeeSettingsRepository.GetByEmployeeIdAndWorkshopIdIncludeGroupSettings(
command.WorkshopId, command.EmployeeId)?.WorkshopShiftStatus;
if (!TimeOnly.TryParseExact(x.StartTime, "HH:mm", out TimeOnly start))
throw new Exception();
if (!TimeOnly.TryParseExact(x.EndTime, "HH:mm", out TimeOnly end))
throw new Exception();
return (start, end, x.RollCallId);
if (employeeSettings == null && workshopSettings.WorkshopShiftStatus != WorkshopShiftStatus.Regular)
{
return operation.Failed("لطفا ابتدا برای این پرسنل گروهبندی انجام دهید ");
}
}).ToList();
}
catch (Exception e)
{
if (day == Tools.GetUndefinedDateTime())
return operation.Failed("خطای سیستمی");
return operation.Failed("فرمت ساعات ورودی نادرست می باشد");
}
List<EditRollCall> newRollCallDates = new();
List<(DateTime Start, DateTime End, long RollCallId)> result = new();
foreach (var record in command.RollCallRecords)
{
if (record.StartDate.TryToGeorgianDateTime(out var startDateGr) == false || record.EndDate.TryToGeorgianDateTime(out var endDateGr) == false)
return operation.Failed("فرمت تاریخ صحیح نمی باشد");
if (workshopSettings.WorkshopShiftStatus == WorkshopShiftStatus.Regular || employeeSettings == WorkshopShiftStatus.Regular)
{
TimeOnly offset =
_rollCallDomainService.GetEmployeeOffSetForRegularSettings(command.EmployeeId, command.WorkshopId);
if (TimeOnly.TryParse(record.StartTime, out var startTimeOnly) == false || TimeOnly.TryParse(record.EndTime, out var endTimeOnly) == false)
return operation.Failed("فرمت ساعت صحیح نمی باشد");
DateTime startDateTime = startDateGr + startTimeOnly.ToTimeSpan();
DateTime endDateTime = endDateGr + endTimeOnly.ToTimeSpan();
var startWorkingPeriod = day.Date + offset.ToTimeSpan();
if (startDateTime >= endDateTime)
return operation.Failed("زمان ورود نمی تواند بعد یا مساوی زمان خروج باشد");
if (offset > new TimeOnly(12, 0, 0))
startWorkingPeriod = startWorkingPeriod.AddDays(-1);
foreach (var preprocessedRollCall in preprocessedRollCalls)
{
DateTime startDateTime = startWorkingPeriod.Date.Add(preprocessedRollCall.start.ToTimeSpan());
if (endDateTime.Date >= DateTime.Today)
return operation.Failed("نمی توانید برای روز جاری یا روز های آینده حضور غیاب ثبت کنید");
if (preprocessedRollCall.start.ToTimeSpan() < offset.ToTimeSpan())
{
startDateTime = startDateTime.AddDays(1);
}
var rollCall = new EditRollCall
{
StartDate = startDateTime,
EndDate = endDateTime,
Id = record.RollCallId,
};
newRollCallDates.Add(rollCall);
}
DateTime endDateTime = startDateTime.Date + preprocessedRollCall.end.ToTimeSpan();
newRollCallDates.ForEach(x =>
{
if (startDateTime > endDateTime)
{
endDateTime = endDateTime.AddDays(1);
}
});
if (newRollCallDates.Any(x => newRollCallDates.Any(y => x != y && x.EndDate >= y.StartDate && x.StartDate <= y.EndDate)))
return operation.Failed("بازه های وارد شده با هم تداخل دارند");
if (result.Any(x => endDateTime > x.Start && startDateTime < x.End))
return operation.Failed("بازه های وارد شده با هم تداخل دارند");
result.Add(new(startDateTime, endDateTime, preprocessedRollCall.rollCallId));
}
}
else
{
#region RollCallTimes validation and parse to DateTime
foreach (var activity in newRollCallDates)
{
if (day == Tools.GetUndefinedDateTime())
return operation.Failed("خطای سیستمی");
DateTime previousEnd = new DateTime();
preprocessedRollCalls = preprocessedRollCalls.OrderBy(x => x.start).ToList();
//مرخصی روزانه در بالا چک شده است
var leave = _leaveRepository.GetByWorkshopIdEmployeeIdInDates(command.WorkshopId, command.EmployeeId, activity.StartDate.Value, activity.EndDate.Value)
.Where(x => x.PaidLeaveType == "ساعتی");
if (leave.Any())
return operation.Failed("کارمند در بازه انتخاب شده مرخصی ساعتی دارد");
}
if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate >= y.StartDateGr && x.EndDate <= y.EndDateGr)))
return operation.Failed("کارمند در بازه وارد شده غیر فعال است");
foreach (var item in preprocessedRollCalls)
{
(DateTime Start, DateTime End, long RollCallId) rollCallWithDateTime =
new()
{
Start = new DateTime(DateOnly.FromDateTime(day), item.start),
End = new DateTime(DateOnly.FromDateTime(day), item.end),
RollCallId = item.rollCallId
};
newRollCallDates.ForEach(x =>
{
x.ShiftDate =
_rollCallDomainService.GetEmployeeShiftDateByRollCallStartDate(command.WorkshopId, command.EmployeeId,
x.StartDate!.Value);
});
if (newRollCallDates.Any(x => x.ShiftDate.Date != date.Date))
{
return operation.Failed("حضور غیاب در حال ویرایش را نمیتوانید از تاریخ شیفت عقب تر یا جلو تر ببرید");
}
if (new TimeSpan(newRollCallDates.Sum(x => (x.EndDate.Value - x.StartDate.Value).Ticks)) > TimeSpan.FromHours(26))
{
return operation.Failed("بازه حضور پرسنل نمی تواند بیشتر از 26 ساعت باشد");
}
if (previousEnd != new DateTime())
{
if (rollCallWithDateTime.Start < previousEnd)
{
rollCallWithDateTime.Start = rollCallWithDateTime.Start.AddDays(1);
}
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("بازه های وارد شده با حضور غیاب های مربوط به روز های قبل و بعد تداخل زمانی دارد");
if (rollCallWithDateTime.Start == previousEnd)
return operation.Failed("ساعت ورود نمی تواند با ساعت خروج حضور غیاب دیگری در آن روز برابر باشد");
}
var checkoutViewModels = _checkoutRepository.SimpleSearch(new CheckoutSearchModel() { WorkshopId = command.WorkshopId, EmployeeId = command.EmployeeId });
while (rollCallWithDateTime.Start >= rollCallWithDateTime.End)
{
rollCallWithDateTime.End = rollCallWithDateTime.End.AddDays(1);
}
if (checkoutViewModels.Any(x => x.HasRollCall && x.WorkshopId == command.WorkshopId && x.EmployeeId == command.EmployeeId &&
newRollCallDates.Any(y => (y.StartDate.Value.Date >= x.ContractStartGr.Date)
&& (y.StartDate.Value.Date <= x.ContractEndGr.Date))))
return operation.Failed("برای بازه های وارد شده فیش حقوقی ثبت شده است");
result.Add(rollCallWithDateTime);
previousEnd = rollCallWithDateTime.End;
}
if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate >= y.StartDateGr && x.EndDate <= y.EndDateGr)))
return operation.Failed("کارمند در بازه وارد شده غیر فعال است");
var firstShiftStart = result.OrderBy(x => x.Start).FirstOrDefault().Start;
var lastShiftEnd = result.OrderByDescending(x => x.Start).FirstOrDefault().End;
var lastShiftStart = result.OrderByDescending(x => x.Start).FirstOrDefault().Start;
var currentDayRollCall = employeeRollCalls.FirstOrDefault(x => x.EndDate == null);
if (firstShiftStart.AddDays(1) < lastShiftEnd)
return operation.Failed("بازه زمانی وارد شده نا معتبر است");
if (currentDayRollCall != null && newRollCallDates.Any(x => x.EndDate!.Value >= currentDayRollCall.StartDate))
return operation.Failed("بازه های وارد شده با حضور غیاب جاری تداخل زمانی دارد");
if (firstShiftStart.Date != lastShiftStart.Date)
return operation.Failed("شروع رکورد حضور غیاب نمی تواند در روز های بعد از تاریخ تعیین شده باشد");
var name = _rollCallEmployeeRepository.GetByEmployeeIdAndWorkshopId(command.EmployeeId, command.WorkshopId).EmployeeFullName;
var rollCallsAsEntityModels = newRollCallDates.Select(x => new RollCall(command.WorkshopId, command.EmployeeId, name, x.StartDate!.Value, x.EndDate,
Convert.ToInt32(x.StartDate.Value.ToFarsi().Substring(0, 4)), Convert.ToInt32(x.StartDate.ToFarsi().Substring(5, 2)), _rollCallDomainService, RollCallModifyType.EditByEmployer)).ToList();
_rollCallRepository.RemoveEmployeeRollCallsWithUndefinedInDate(command.WorkshopId, command.EmployeeId, date);
#endregion
}
if (result.Sum(x => (x.End - x.Start).TotalHours) > 24)
{
return operation.Failed("بازه زمانی نمیتواند بیشتر از 24 ساعت باشد");
}
_rollCallRepository.AddRange(rollCallsAsEntityModels);
_rollCallRepository.SaveChanges();
return operation.Succcedded();
}
#endregion
//from new
foreach (var activity in result)
{
//مرخصی روزانه در بالا چک شده است
var leave = _leaveRepository.GetByWorkshopIdEmployeeIdInDates(command.WorkshopId, command.EmployeeId, activity.Start, activity.End)
.Where(x => x.PaidLeaveType == "ساعتی");
if (leave.Any())
return operation.Failed("کارمند در بازه انتخاب شده مرخصی ساعتی دارد");
}
if (result.Any(x =>
x.Start.Date < date.Date.AddDays(-1) ||
x.End.Date > date.Date.AddDays(1)))
{
return operation.Failed("حضور غیاب در حال ویرایش را نمیتوانید بیشتر از یک روز از ثبت حضور غیاب عقب تر یا جلو تر ببرید");
}
//مهم
//رول کال روز جاری
#region NewValidation
var currentDayRollCall = employeeRollCalls.FirstOrDefault(x => x.EndDate == null);
if (currentDayRollCall != null && result.Any(x => x.End >= currentDayRollCall.StartDate))
return operation.Failed("بازه های وارد شده با حضور غیاب جاری تداخل زمانی دارد");
#endregion
if (result.Any(x => employeeRollCalls.Any(y => y.DateGr.Date != command.DateFa.ToGeorgianDateTime().Date &&
x.End >= y.StartDate.Value && x.Start <= y.EndDate.Value)))
return operation.Failed("بازه های وارد شده با حضور غیاب های مربوط به روز های قبل و بعد تداخل زمانی دارد");
var checkoutViewModels = _checkoutRepository.SimpleSearch(new CheckoutSearchModel() { WorkshopId = command.WorkshopId, EmployeeId = command.EmployeeId });
if (checkoutViewModels.Any(x => x.HasRollCall && x.WorkshopId == command.WorkshopId && x.EmployeeId == command.EmployeeId &&
result.Any(y => (y.Start.Date >= x.ContractStartGr.Date)
&& (y.Start.Date <= x.ContractEndGr.Date))))
return operation.Failed("برای بازه های وارد شده فیش حقوقی ثبت شده است");
//---
if (result == null || !result.All(x => employeeStatuses.Any(y => x.Start >= y.StartDateGr || x.End <= y.EndDateGr)))
return operation.Failed("کارمند در بازه وارد شده غیر فعال است");
var name = _rollCallEmployeeRepository.GetByEmployeeIdAndWorkshopId(command.EmployeeId, command.WorkshopId).EmployeeFullName;
var rollCallsAsEntityModels = result.Select(x => new RollCall(command.WorkshopId, command.EmployeeId, name, x.Start, x.End,
Convert.ToInt32(x.Start.ToFarsi().Substring(0, 4)), Convert.ToInt32(x.Start.ToFarsi().Substring(5, 2)), _rollCallDomainService, RollCallModifyType.EditByEmployer)).ToList();
_rollCallRepository.RemoveEmployeeRollCallsWithUndefinedInDate(command.WorkshopId, command.EmployeeId, date);
_rollCallRepository.AddRange(rollCallsAsEntityModels);
_rollCallRepository.SaveChanges();
return operation.Succcedded();
}
#endregion
public List<RollCallViewModel> GetWorkshopEmployeeRollCallsForDate(long workshopId, long employeeId, string dateFa)
public List<RollCallViewModel> GetWorkshopEmployeeRollCallsForDate(long workshopId, long employeeId, string dateFa)
{
DateTime date = Tools.ToGeorgianDateTime(dateFa);
if (date == Tools.GetUndefinedDateTime())

View File

@@ -185,6 +185,13 @@
</svg>
حضورغیاب </a>
</li>
<li permission="306">
<a class="clik3" href="/AdminNew/Company/Bank">
<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="306"><a class="clik3" asp-page="/Company/SmsResult/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

@@ -0,0 +1,60 @@
@model CompanyManagment.App.Contracts.Bank.CreateBank
@{
string adminVersion = _0_Framework.Application.Version.AdminVersion;
<link href="~/AssetsClient/css/select2.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/assetsadminnew/bank/css/createbankmodal.css?ver=@adminVersion" 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 my-1">
<span class="spanTitleText">نام بانک</span>
<input type="text" id="bankName" class="form-control text-start" asp-for="@Model.BankName" placeholder="نام بانک را وارد نمائید" />
</div>
<div class="col-12 my-1">
<span class="spanTitleText">عکس بانک</span>
<input type="file" class="form-control text-start" asp-for="@Model.BankLogoPictureFile" placeholder="عکس بانک را آپلود نمائید" />
</div>
</div>
</div>
</div>
<div class="modal-footer d-block">
<div class="container p-0 m-0">
<div class="row">
<div class="col-6 text-center">
<button type="button" class="closeBtn justify-content-center" data-bs-dismiss="modal" aria-label="Close">انصراف</button>
</div>
<div class="col-6 text-center">
<button type="button" class="btnCreateNew position-relative" id="createData">
<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>
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
var createBankURL = `@Url.Page("./Index", "Create")`;
</script>
<script src="~/assetsadminnew/bank/js/createbankmodal.js?ver=@adminVersion"></script>

View File

@@ -0,0 +1,63 @@
@model CompanyManagment.App.Contracts.Bank.EditBank
@{
string adminVersion = _0_Framework.Application.Version.AdminVersion;
<link href="~/AssetsClient/css/select2.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/assetsadminnew/bank/css/editbankmodal.css?ver=@adminVersion" rel="stylesheet" />
}
<form role="form" method="post" name="create-form" id="create-form" autocomplete="off">
<input type="hidden" id="bankIdEdit" asp-for="@Model.Id" value="@Model.Id"/>
<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 my-1">
<span class="spanTitleText">نام بانک</span>
<input type="text" id="bankNameEdit" class="form-control text-start" asp-for="@Model.BankName" placeholder="نام بانک را وارد نمائید" />
</div>
<div class="col-12 my-1">
<span class="spanTitleText">عکس بانک</span>
<input type="file" class="form-control text-start" asp-for="@Model.BankLogoPictureFile" placeholder="عکس بانک را آپلود نمائید"/>
</div>
</div>
</div>
</div>
<div class="modal-footer d-block">
<div class="container p-0 m-0">
<div class="row">
<div class="col-6 text-center">
<button type="button" class="closeBtn justify-content-center" data-bs-dismiss="modal" aria-label="Close">انصراف</button>
</div>
<div class="col-6 text-center">
<button type="button" class="btnEdit position-relative" id="EditData">
<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>
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
var editBank = `@Url.Page("./Index", "Edit")`;
</script>
<script src="~/assetsadminnew/bank/js/editbankmodal.js?ver=@adminVersion"></script>

View File

@@ -0,0 +1,177 @@
@page
@model ServiceHost.Areas.AdminNew.Pages.Company.Bank.IndexModel
@{
string adminVersion = _0_Framework.Application.Version.AdminVersion;
ViewData["Title"] = " - " + "لیست بانک ها";
int index = 1;
int i = 0;
}
@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/rollcall-list-table.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/assetsclient/css/operation-button.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/dropdown.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/select2.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/filter-search.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/datetimepicker.css?ver=@adminVersion" rel="stylesheet" />
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
<link href="~/AssetsAdminNew/bank/css/index.css?ver=@adminVersion" rel="stylesheet" />
}
<div class="row">
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
<div class="col d-flex align-items-center justify-content-start">
<img src="~/AssetsClient/images/icons/banks.png" alt="" class="img-fluid mx-1" width="50px" />
<div>
<h4 class="title d-flex align-items-center">لیست بانک ها</h4>
</div>
</div>
</div>
</div>
<button class="btn btn-rounded mb-5 goToTop d-none">
<div class="d-flex align-items-center">
<span>برو بالا</span>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" width="20px" class="ms-1">
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 18.75 7.5-7.5 7.5 7.5" />
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 7.5-7.5 7.5 7.5" />
</svg>
</div>
</button>
<!-- List Items -->
<div class="container-fluid" id="containerHeight">
<div class="row py-lg-2">
<div class="card" style="margin: 0 0 60px 0;">
<div class="d-flex align-items-center mb-1 p-1">
<div class="col-12 col-md-4">
<div class="d-flex align-items-center gap-1">
<button type="button" class="btn-search text-nowrap d-flex align-items-center justify-content-center"
onclick="window.location.href = `#showmodal=@Url.Page("./Index", "Create")`">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 25 25" fill="none">
<circle cx="12.5" cy="12.5" r="8.775" stroke="white" stroke-width="2" stroke-opacity="0.84"></circle>
<path d="M12.5 8.3335L12.5 16.6668" stroke="white" stroke-width="2" stroke-linecap="round"></path>
<path d="M16.6667 12.5L8.33342 12.5" stroke="white" stroke-width="2" stroke-linecap="round"></path>
</svg>
<span class="mx-1">افزودن بانک</span>
</button>
<a asp-page-handler="DownloadExcel">excel</a>
<div class="col-6 col-xl-6 position-relative">
<input type="text" class="form-control" id="search" placeholder="جستجو ...">
<button type="button" id="clear-search" class="close-btn-search d-none">
<svg width="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
</svg>
</button>
</div>
</div>
</div>
<div class="col-4 d-none d-md-block text-center">
<span class="textListTitle">لیست بانک ها</span>
</div>
<div class="col-4 d-none d-md-block">
</div>
</div>
<div class="wrapper table-rollcall">
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
<div class="Rtable-row Rtable-row--head align-items-center d-flex stickyMain d-none d-md-flex">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">نام بانک</div>
<div class="Rtable-cell column-heading width3">عکس</div>
<div class="Rtable-cell column-heading width4 text-end">عملیات</div>
</div>
<div class="w-100 rollcall-list Rtable Rtable--5cols Rtable--collapse" id="bankLoadData">
<div></div>
@foreach (var item in Model.BanksList)
{
<div class="Rtable-row align-items-center openAction">
<div class="Rtable-cell width1 widthNumberCustom1">
<label class="Rtable-cell--content prevent-select">
<span class="d-flex justify-content-center align-items-center justify-content-center">
@index
</span>
</label>
</div>
<div class="Rtable-cell justify-content-start width2">
<div class="Rtable-cell--content text-start">@item.BankName</div>
</div>
<div class="Rtable-cell d-md-flex justify-content-center d-none width3">
<div class="Rtable-cell--content"><img class="bankImage" src="@Url.Page("./Index", "ShowPicture" ,new{filePath = item.BankLogoPicturePath})" /></div>
</div>
<div class="Rtable-cell width4">
<div class="Rtable-cell--content align-items-center justify-content-end d-flex text-end">
<button class="btn-edit position-relative d-md-block d-none" onclick="window.location.href = `#showmodal=@Url.Page("./Index", "Edit", new {id = item.Id})`">
<svg width="20" height="20" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.6027 6.838L5.85304 13.5876C5.84201 13.5987 5.83107 13.6096 5.8202 13.6204C5.65773 13.7825 5.5139 13.9261 5.41254 14.1051C5.31117 14.2841 5.2621 14.4813 5.20667 14.704C5.20296 14.7189 5.19923 14.7339 5.19545 14.7491L4.5813 17.2057C4.57908 17.2145 4.57686 17.2234 4.57462 17.2323C4.53537 17.389 4.49347 17.5564 4.47972 17.6969C4.46458 17.8516 4.46811 18.1127 4.67752 18.3221L5.03035 17.9693L4.67752 18.3221C4.88693 18.5315 5.14799 18.535 5.30272 18.5199C5.44326 18.5062 5.6106 18.4643 5.76728 18.425C5.77622 18.4228 5.78512 18.4205 5.79398 18.4183L8.25057 17.8042C8.26569 17.8004 8.28069 17.7967 8.29558 17.793C8.51832 17.7375 8.71549 17.6885 8.89452 17.5871C9.07356 17.4857 9.21708 17.3419 9.37921 17.1794C9.39005 17.1686 9.40097 17.1576 9.412 17.1466L16.1616 10.397L16.1849 10.3737C16.4983 10.0603 16.7684 9.79025 16.9556 9.54492C17.1562 9.282 17.3081 8.98958 17.3081 8.6292C17.3081 8.26759 17.1541 7.97384 16.9522 7.71001C16.7633 7.46303 16.4905 7.1903 16.1731 6.87292L16.1499 6.84972L16.1267 6.82652C15.8093 6.5091 15.5366 6.23634 15.2896 6.04738C15.0258 5.84553 14.732 5.69156 14.3704 5.69156C14.01 5.69156 13.7176 5.84345 13.4547 6.04405C13.2094 6.23123 12.9393 6.5013 12.6259 6.81474L12.6027 6.838Z" stroke-width="1.5" stroke="#4DA9D1" />
<path d="M11.9939 7.20397L14.8457 5.30273L17.6976 8.15459L15.7964 11.0064L11.9939 7.20397Z" fill="#4DA9D1" />
</svg>
<span class="mx-1">ویرایش</span>
</button>
<button data-remove-id="@item.Id" type="button" class="btn-delete removeBank d-md-block d-none">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-width="1.5" stroke-linecap="round" />
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-width="1.5" stroke-linecap="round" />
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-width="1.5" stroke-linecap="round" />
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-width="1.5" stroke-linecap="round" />
</svg>
<span class="mx-1">حذف</span>
</button>
</div>
</div>
</div>
index++;
}
</div>
</div>
</div>
</div>
</div>
</div>
<div id="MainModal" class="modal fade" aria-labelledby="myModalLabel" aria-hidden="true" tabindex="-1" data-bs-backdrop="static" style="display: none;">
<div class="modal-dialog modal-md modal-dialog-centered">
<div class="modal-content" id="ModalContent">
</div>
</div>
</div>
@section Script {
<script src="~/assetsclient/js/site.js?ver=@adminVersion"></script>
<script src="~/assetsclient/libs/jalaali-js/jalaali.js"></script>
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
<script src="~/assetsadminnew/libs/sweetalert2/sweetalert2.all.min.js"></script>
<script src="~/assetsadminnew/bank/js/index.js?ver=@adminVersion"></script>
<script>
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
var bankAjaxLoadData = `@Url.Page("./Index", "BankList")`;
var editBankUrl = `@Url.Page("./Index", "Edit")`;
var deleteBankUrl = `@Url.Page("./Index", "Delete")`;
</script>
}

View File

@@ -0,0 +1,93 @@
using _0_Framework.Application;
using CompanyManagment.App.Contracts.Bank;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace ServiceHost.Areas.AdminNew.Pages.Company.Bank
{
[Authorize]
public class IndexModel : PageModel
{
private readonly IBankApplication _bankApplication;
private readonly IWebHostEnvironment _hostEnvironment;
public IndexModel(IBankApplication bankApplication, IWebHostEnvironment hostEnvironment)
{
_bankApplication = bankApplication;
_hostEnvironment = hostEnvironment;
}
public List<BankViewModel> BanksList;
public void OnGet()
{
BanksList = _bankApplication.Search("");
}
public IActionResult OnGetCreate()
{
var command = new CreateBank();
return Partial("CreateBankModal", command);
}
public IActionResult OnPostCreate(CreateBank command)
{
var result = _bankApplication.Create(command);
return new JsonResult(new
{
success = result.IsSuccedded,
message = result.Message
});
}
public IActionResult OnGetEdit(long id)
{
var entity = _bankApplication.GetBy(id);
var command = new EditBank()
{
Id = entity.Id,
BankName = entity.BankName
};
return Partial("EditBankModal", command);
}
public IActionResult OnPostEdit(EditBank command)
{
var result = _bankApplication.Edit(command);
return new JsonResult(new
{
success = result.IsSuccedded,
message = result.Message
});
}
public IActionResult OnPostDelete(long id)
{
var result = _bankApplication.Remove(id);
return new JsonResult(new
{
success = result.IsSuccedded,
message = result.Message
});
}
public IActionResult OnGetShowPicture(string filePath)
{
if (string.IsNullOrEmpty(filePath))
return NotFound();
var path = Path.Combine(_hostEnvironment.ContentRootPath, filePath);
if (!System.IO.File.Exists(path))
return NotFound();
var contentType = Tools.GetContentTypeImage(Path.GetExtension(path));
return PhysicalFile(path, contentType);
}
}
}

View File

@@ -253,6 +253,13 @@
</svg>
حضورغیاب </a>
</li>
<li permission="306">
<a class="clik3" href="/AdminNew/Company/Bank">
<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="306">
<a class="clik3" asp-area="Admin" asp-page="/Company/SmsResult/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;">

View File

@@ -379,7 +379,6 @@
var close = document.getElementById("closingOnePrint");
function printElement(elem) {
debugger;
var domClone = elem.cloneNode(true);

View File

@@ -116,7 +116,7 @@
<link href="~/assetsclient/css/table-responsive.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/assetsclient/css/rollcall-list-table.css?ver=clientVersion" rel="stylesheet" />
<link href="~/assetsclient/css/operation-button.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/dropdown.css?ver=123" rel="stylesheet" />
<link href="~/AssetsClient/css/dropdown.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/select2.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/filter-search.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/assetsclient/pages/rollcall/css/casehistory.css?ver=@clientVersion" rel="stylesheet" />

View File

@@ -1,4 +1,5 @@
using _0_Framework.Application;
using _0_Framework.Application;
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings;
using CompanyManagment.App.Contracts.Leave;
@@ -19,6 +20,7 @@ using Microsoft.AspNetCore.Http.HttpResults;
using static System.Runtime.InteropServices.JavaScript.JSType;
using Company.Domain.empolyerAgg;
namespace ServiceHost.Areas.Client.Pages.Company.RollCall
{
[Authorize]
@@ -65,11 +67,11 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
public override void OnPageHandlerExecuting(PageHandlerExecutingContext context)
{
if (context.HttpContext.Request.Query["handler"].ToString().ToLower().Trim() == "edit")
{
//if (context.HttpContext.Request.Query["handler"].ToString().ToLower().Trim() == "edit")
//{
}
else
//}
//else
if (IrregularWorkshopHaveGroupedAllPersonnelValidation(_workshopId) == false)
context.HttpContext.Response.Redirect("./grouping");
@@ -78,16 +80,16 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
public bool IrregularWorkshopHaveGroupedAllPersonnelValidation(long workshopId)
{
//var isWorkshopIrregular = _customizeWorkshopSettingsApplication
// .GetWorkshopSettingsDetails(workshopId).WorkshopShiftStatus == WorkshopShiftStatus.Irregular;
//var isWorkshopIrregular = _customizeWorkshopSettingsApplication
// .GetWorkshopSettingsDetails(workshopId).WorkshopShiftStatus == WorkshopShiftStatus.Irregular;
//if (isWorkshopIrregular == false)
// return true;
var employeesWithoutGroup = _customizeWorkshopSettingsApplication.HasAnyEmployeeWithoutGroup(workshopId);
if (employeesWithoutGroup)
return false;
return true;
}
//if (isWorkshopIrregular == false)
// return true;
var employeesWithoutGroup = _customizeWorkshopSettingsApplication.HasAnyEmployeeWithoutGroup(workshopId);
if (employeesWithoutGroup)
return false;
return true;
}
public IActionResult OnGet()
{
@@ -212,14 +214,19 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
var result = _rollCallApplication.GetWorkshopEmployeeRollCallsForDate(_workshopId, employeeId, date);
//var dates = _rollCallApplication.GetEditableDatesForManualEdit(date.ToGeorgianDateTime());
var name = _rollCallEmployeeApplication.GetByEmployeeIdAndWorkshopId(employeeId, _workshopId);
var command = new EmployeeRollCallsViewModel()
var total = new TimeSpan(result.Sum(x =>
(x.EndDate!.Value.Ticks - x.StartDate!.Value.Ticks)));
var command = new EmployeeRollCallsViewModel()
{
EmployeeFullName = name.EmployeeFullName,
EmployeeId = employeeId,
DateFa = date,
//EditableDates = dates,
RollCalls = result
};
RollCalls = result,
TotalRollCallsDuration = total.ToFarsiHoursAndMinutes("-")
};
return Partial("ModalEditRollCall", command);
}
@@ -418,5 +425,35 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
$"{workshopFullName} - {caseHistoryRollCallExcelForOneDay.DayOfWeekFa}،{caseHistoryRollCallExcelForOneDay.DateFa}.xlsx");
}
}
public IActionResult OnPostCalculateRollCallsTotalDuration(List<CalculateRollCallsTotalDuration> rollCalls)
{
var withoutNull = rollCalls.Where(x => x.StartDateFa != null && x.StartTime !=null &&
x.EndDateFa != null && x.EndTime!=null);
var ticks = withoutNull.Sum(x =>
((x.EndDateFa.ToGeorgianDateTime().Ticks + TimeOnly.Parse(x.EndTime).Ticks) - (x.StartDateFa.ToGeorgianDateTime().Ticks + TimeOnly.Parse(x.StartTime).Ticks)));
var timeSpan = new TimeSpan(ticks);
return new JsonResult(new
{
result = timeSpan.ToFarsiHoursAndMinutes("-")
});
}
public IActionResult OnGetLeaveCreate(CreateLeave command)
{
return Partial("LeaveCreate", command);
}
}
public class CalculateRollCallsTotalDuration
{
public string StartDateFa { get; set; }
public string StartTime { get; set; }
public string EndDateFa { get; set; }
public string EndTime { get; set; }
}
}

View File

@@ -13,6 +13,7 @@
<link href="~/AssetsClient/css/table-responsive.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/assetsclient/css/operation-button.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/assetsclient/pages/rollcall/css/group.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/select2.css?ver=@clientVersion" rel="stylesheet" />
}
<div class="content-container">
@@ -42,7 +43,43 @@
</div>
</div>
<!-- List Items -->
<div class="container-fluid">
<div class="row px-2">
<div class="col-12 p-0 mb-2 d-none d-md-block">
<div class="search-box card border-0">
<div class="d-flex align-items-center gap-2">
<div class="col-3 col-xl-2">
<select class="form-select select2Option" aria-label="انتخاب پرسنل ..." id="employeeSelect">
<option value="0">انتخاب پرسنل ...</option>
@foreach (var itemEmployee in Model.RollCallEmployeeList)
{
<option value="@itemEmployee.EmployeeId">@itemEmployee.EmployeeFullName</option>
}
</select>
</div>
<button class="btn-search btn-w-size btn-search-click text-nowrap d-flex align-items-center justify-content-center" id="searchBtn" type="submit">
<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>
<a asp-page="/Company/RollCall/CaseHistory" class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center disable" id="filterRemove" style="padding: 7px 10px;">
<span>حذف جستجو</span>
</a>
</div>
</div>
</div>
</div>
</div>
<!-- List Items -->
<div class="container-fluid">
@if (Model.GroupedAllEmployees==false)
@@ -90,7 +127,8 @@
<div class="Rtable-row Rtable-row--head align-items-center d-flex mb-2 px-3">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
<div class="Rtable-cell column-heading text-center width3">ساعت کاری</div>
<div class="Rtable-cell column-heading text-center width3">نوع ساعت کاری</div>
<div class="Rtable-cell column-heading text-center width4">ساعت کاری</div>
<div class="Rtable-cell column-heading text-end width5">عملیات</div>
</div>
@@ -117,6 +155,7 @@
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
var loadWorkshopSettingsDataAjax = `@Url.Page("./Grouping", "WorkshopSettingsDataAjax")`;
var loadEmployeesGroupAjax = `@Url.Page("./Grouping", "EmployeesGroupAjax")`;
var loadEmployeesGroupSettingsByEmployeeIdAjax = `@Url.Page("./Grouping", "EmployeesGroupSettingsByEmployeeId")`;
var removeGroupAjax = `@Url.Page("./Grouping", "DeleteGroup")`;
var removeEmployeeFromGroupAjax = `@Url.Page("./Grouping", "RemoveEmployee")`;
var workshopSettingId = Number((@Model.RollCallWorkshopSettings.Id));

View File

@@ -12,6 +12,8 @@ using Microsoft.AspNetCore.Mvc.Formatters;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
using _0_Framework.Infrastructure;
using CompanyManagment.App.Contracts.RollCallEmployee;
using Company.Domain.EmployeeAgg;
namespace ServiceHost.Areas.Client.Pages.Company.RollCall
{
@@ -22,6 +24,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
private readonly IPasswordHasher _passwordHasher;
private readonly IWorkshopApplication _workshopApplication;
private readonly IEmployeeApplication _employeeApplication;
private readonly IRollCallEmployeeApplication _rollCallEmployeeApplication;
private readonly ICustomizeWorkshopSettingsApplication _customizeWorkshopSettingsApplication;
private readonly IHttpContextAccessor _contextAccessor;
private readonly IAuthHelper _authHelper;
@@ -29,8 +32,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
private readonly long _workshopId;
public string WorkshopFullName;
public CustomizeWorkshopSettingsViewModel RollCallWorkshopSettings;
public List<RollCallEmployeeViewModel> RollCallEmployeeList;
public GroupingModel(IPasswordHasher passwordHasher, IWorkshopApplication workshopApplication, ICustomizeWorkshopSettingsApplication rollCallWorkshopSettingsApplication, IEmployeeApplication employeeApplication, IHttpContextAccessor contextAccessor, IAuthHelper authHelper)
public GroupingModel(IPasswordHasher passwordHasher, IWorkshopApplication workshopApplication, ICustomizeWorkshopSettingsApplication rollCallWorkshopSettingsApplication, IEmployeeApplication employeeApplication, IHttpContextAccessor contextAccessor, IAuthHelper authHelper, IRollCallEmployeeApplication rollCallEmployeeApplication)
{
_passwordHasher = passwordHasher;
_workshopApplication = workshopApplication;
@@ -38,30 +42,33 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
_employeeApplication = employeeApplication;
_contextAccessor = contextAccessor;
_authHelper = authHelper;
_rollCallEmployeeApplication = rollCallEmployeeApplication;
var workshopHash = _contextAccessor.HttpContext?.User.FindFirstValue("WorkshopSlug");
_workshopId = _passwordHasher.SlugDecrypt(workshopHash);
if (_workshopId < 1)
throw new InvalidDataException("اختلال در کارگاه");
}
public bool IrregularWorkshopHaveGroupedAllPersonnelValidation(long workshopId)
{
//var isWorkshopIrregular = _customizeWorkshopSettingsApplication
// .GetWorkshopSettingsDetails(workshopId).WorkshopShiftStatus == WorkshopShiftStatus.Irregular;
//var isWorkshopIrregular = _customizeWorkshopSettingsApplication
// .GetWorkshopSettingsDetails(workshopId).WorkshopShiftStatus == WorkshopShiftStatus.Irregular;
//if (isWorkshopIrregular == false)
// return true;
var employeesWithoutGroup = _customizeWorkshopSettingsApplication.HasAnyEmployeeWithoutGroup(workshopId);
if (employeesWithoutGroup)
return false;
return true;
}
//if (isWorkshopIrregular == false)
// return true;
var employeesWithoutGroup = _customizeWorkshopSettingsApplication.HasAnyEmployeeWithoutGroup(workshopId);
if (employeesWithoutGroup)
return false;
return true;
}
public IActionResult OnGet()
{
//if (_workshopId != 11)
// return Redirect("/Client/Company/RollCall");
RollCallEmployeeList = _rollCallEmployeeApplication.GetEmployeeRollCalls(_workshopId);
var account = _authHelper.CurrentAccountInfo();
GroupedAllEmployees = IrregularWorkshopHaveGroupedAllPersonnelValidation(_workshopId);
@@ -99,7 +106,17 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
});
}
public IActionResult OnGetCreateGroup(long workshopSettingId)
public IActionResult OnGetEmployeesGroupSettingsByEmployeeId(long employeeId)
{
var result = _customizeWorkshopSettingsApplication.GetEmployeesGroupSettingsByEmployeeId(employeeId, _workshopId);
return new JsonResult(new
{
success = true,
data = result
});
}
public IActionResult OnGetCreateGroup(long workshopSettingId)
{
var command = new CreateCustomizeWorkshopGroupSettings
{

View File

@@ -0,0 +1,192 @@
@model CompanyManagment.App.Contracts.Leave.CreateLeave
@{
string clientVersion = _0_Framework.Application.Version.StyleVersion;
<link href="~/AssetsClient/css/select2.css?ver=@clientVersion" rel="stylesheet" />
<style>
.errored {
color: #FF3A3A !important;
border: 1px solid #FF3A3A !important
}
#printSection {
display: none;
}
@@media (min-width: 1366px) {
.modal-dialog, .modal-content {
height: 600px;
max-width: 710px;
}
}
</style>
}
<form role="form" method="post" name="create-leave-form" id="create-leave-form" autocomplete="off">
<div class="modal-content">
<div class="modal-header d-block text-center position-relative">
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
<h5 class="modal-title" id="morakhasiEstehghaghiModalLabel">ثبت مرخصی</h5>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row form-morakhasi-estehghaghi">
<div class="container-fluid">
<div class="row mb-3">
<div class="col-12 my-1">
<input type="hidden" id="employeeId" asp-for="EmployeeId" />
<div style="border: 1px solid #DADADA; background-color: #F6F6F6; padding: 6px; color: #4d4d4d; border-radius: 8px; font-size: 13px; text-align: center;">
@Model.EmployeeFullName
</div>
</div>
</div>
<div id="cardSectionLeave" class="card border">
<div class="row my-3">
<div class="col-12 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>
<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="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>
<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="row my-3">
<div class="col-lg-6 col-12 my-1">
<div class="input-group">
<label class="input-group-text" for="StartLeave">تاریخ شروع</label>
<input type="text" asp-for="StartLeave" class="form-control d-flex justify-content-center align-items-center text-center date" id="StartLeave">
</div>
</div>
<div class="col-lg-6 col-12 my-1" id="end_date_estehghaghi">
<div class="input-group">
<label class="input-group-text" for="EndLeave">تاریخ پایان</label>
<input type="text" asp-for="EndLeave" class="form-control d-flex justify-content-center align-items-center text-center date" id="EndLeave">
</div>
</div>
<div class="col-lg-3 col-6 my-1 time_paid" style="display:none;">
<div class="input-group">
<label class="input-group-text" for="StartHoures">ساعت شروع</label>
<input type="text" asp-for="StartHoures" class="form-control d-flex justify-content-center align-items-center text-center dateTime" id="StartHoures" style="direction: ltr">
</div>
</div>
<div class="col-lg-3 col-6 my-1 time_paid" style="display:none;">
<div class="input-group">
<label class="input-group-text" for="EndHours">ساعت پایان</label>
<input type="text" asp-for="EndHours" class="form-control d-flex justify-content-center align-items-center text-center dateTime" id="EndHours" style="direction: ltr">
</div>
</div>
<p class="mt-2">
<span>مدت مرخصی: </span>
<span class="sumHours sumHourseDiv"></span>
<span class="sumDaysDiv sumDays"></span>
</p>
</div>
<div class="row">
<div class="col-12">
<div class="form-check form-switch d-flex align-items-center">
<label class="form-check-label me-2" for="IsAccepted">عدم موافقت</label>
<input type="checkbox" asp-for="IsAccepted" id="IsAccepted" class="form-check-input" checked>
<label class="form-check-label" for="IsAccepted">موافقت</label>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="position-relative blur" id="blur-div">
<div class="position-absolute title-legend">دلیل عدم موافقت:</div>
<textarea asp-for="Decription" disabled="disabled" id="descriptionAcceptedCheck" class="w-100 my-3 p-2" cols="10" rows="2"></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<div class="container-fluid">
<div class="row">
<div class="col-12 text-center">
<div class="d-flex justify-content-center">
<a class="btn-cancel text-white w-25 mx-2" data-bs-dismiss="modal" aria-label="Close">انصراف</a>
<a href="#" id="save" class="btn-primary text-white w-25 mx-2" style="padding: 12px 8px;font-size: 14px;">ثبت</a>
<a id="printSingle" class="btn-blue text-white w-25 mx-2" style="cursor: pointer; display: none">پرینت</a>
<input type="hidden" id="printSingleID" />
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
<style>
.validTime {
color: #4d7c0f !important;
}
.invalidTime {
color: #b91c1c !important;
}
.blackSelect {
background-color: #cbd5e1;
}
</style>
<script src="~/assetsclient/libs/cleave/cleave.min.js"></script>
<script>
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
var leaveSaveAjax = `@Url.Page("/Index", "LeaveSave")`;
var PrintOneMobileUrl = `#showmodal=@Url.Page("/Company/Employees/Leave", "PrintOneMobile")`;
var computeLeaveHourlyAjax = `@Url.Page("/Company/Employees/Leave", "ComputeLeaveHourly")`;
var computeLeaveDailyAjax = `@Url.Page("/Company/Employees/Leave", "ComputeLeaveDaily")`;
var startLeave = `@Model.StartLeave`;
</script>
<script src="~/assetsclient/pages/rollcall/js/leavecreate.js?ver=@clientVersion"></script>

View File

@@ -11,8 +11,12 @@
border: 1px solid #eb3434 !important;
}
.modalRollCallWidth {
max-width: 670px;
}
.modal-dialog, .modal-content {
height: 420px;
height: 510px;
}
.timeWorkTitle {
@@ -21,6 +25,7 @@
font-size: 12px;
margin: auto 0 auto 6px;
white-space: nowrap;
width: 100px;
}
.groupBox {
@@ -31,18 +36,19 @@
margin: 6px 3px;
}
.groupBox .form-control {
background-color: #ffffff;
}
.groupBox .form-control {
background-color: #ffffff;
padding: .375rem .35rem;
}
.groupBox .form-control::placeholder {
color: #bfbfbf;
opacity: 1; /* Firefox */
}
.groupBox .form-control::placeholder {
color: #bfbfbf;
opacity: 1; /* Firefox */
}
.groupBox .form-control::-ms-input-placeholder { /* Edge 12-18 */
color: #bfbfbf;
}
.groupBox .form-control::-ms-input-placeholder { /* Edge 12-18 */
color: #bfbfbf;
}
.btnAddTimeWork {
display: flex;
@@ -56,15 +62,20 @@
padding: 4px 8px;
}
.removeBtn {
width: 42px
}
.btnRemoveTimeWork {
display: flex;
align-items: center;
justify-content: center;
justify-content: space-between;
background-color: #F87171;
border-radius: 7px;
padding: 3px;
width: 30px;
height: 30px;
/* padding: 3px; */
width: 24px;
height: 24px;
font-size: 12px;
}
.ShowMessage {
@@ -81,9 +92,74 @@
}
.heightControll {
height: 190px;
height: 240px;
overflow-y: scroll;
}
.allSumtxt {
font-size: 13px;
font-weight: 500;
color: #7f7f7f;
position: absolute;
top: 7px;
left: 6px;
}
.startDatetxt {
font-size: 12px;
font-weight: 500;
color: #5C5C5C;
background-color: #ECFCCA;
border: 1px solid #AAE729;
width: 140px;
padding: 5px;
text-align: center;
border-radius: 6px;
}
.endDatetxt {
font-size: 12px;
font-weight: 500;
color: #5C5C5C;
background-color: #ECFCCA;
border: 1px solid #AAE729;
width: 140px;
padding: 4px 5px;
text-align: center;
border-radius: 6px;
}
.cusDateTime {
width: 66px;
}
@@media (max-width: 768px) {
.cusDateTime {
width: 100%;
}
.mainDate {
width: 70px;
}
.startDatetxt {
font-size: 10px;
font-weight: 800;
width: 70px;
}
.endDatetxt {
font-size: 10px;
font-weight: 800;
width: 70px;
}
.form-control-date {
font-size: 10px;
font-weight: 700;
}
}
</style>
}
@@ -101,38 +177,50 @@
<div class="row">
<div class="col-12 my-1">
<div class="select-alert">
<select class="form-select select2OptionAddModal" aria-label="انتخاب پرسنل ..." name="Command.EmployeeId" id="employeeSelectAddModal">
</select>
<div class="position-relative">
<select class="form-select select2OptionAddModal" aria-label="انتخاب پرسنل ..." name="Command.EmployeeId" id="employeeSelectAddModal">
</select>
<span class="allSumtxt"></span>
</div>
</div>
</div>
<div class="col-12 my-1">
<input class="form-control form-control-date text-center" name="Command.DateFa" placeholder="تاریخ" style="direction: ltr" />
<div class="col-12 my-1 position-relative">
<input class="form-control form-control-date-main text-center" name="Command.DateFa" placeholder="تاریخ" style="direction: ltr" />
</div>
<div class="col-12 my-1 text-center d-flex align-items-center justify-content-center">
<div id="resultCalculateRollCallsTotal" style="font-size: 12px; border: 1px solid #04AAB6; border-radius: 5px; padding: 2px 10px; background: #E7F3F4;width: 170px;display: none"></div>
</div>
<div class="heightControll">
<div class="col-12" id="appendChildTimeWorkHtml">
<div class="groupBox">
<div class="row align-items-center justify-content-between">
<div class="col-2 d-flex align-items-center">
<div class="groupBox">
<div class="d-flex align-items-center justify-content-between">
<div class="timeWorkTitle">
نوبت اول
</div>
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">از</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="d-flex align-items-center justify-content-between gap-2">
<span class="startDatetxt">-</span>
<input type="text" class="form-control text-center form-control-date StartDate" name="Command.RollCallRecords[0].StartDate" placeholder="0000/00/00" style="direction: ltr;">
<input type="text" class="form-control text-center cusDateTime dateTime StartTime" name="Command.RollCallRecords[0].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">الی</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].EndTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="mx-2">
الی
</div>
<div class="col-2 d-flex align-items-center justify-content-end">
<div class="d-flex align-items-center justify-content-between gap-2">
<input type="text" class="form-control text-center cusDateTime dateTime EndTime" name="Command.RollCallRecords[0].EndTime" placeholder="00:00" style="direction: ltr;">
<input type="text" class="form-control text-center form-control-date EndDate" name="Command.RollCallRecords[0].EndDate" placeholder="0000/00/00" style="direction: ltr;">
<span class="endDatetxt">-</span>
</div>
<div class="removeBtn ms-2">
</div>
</div>
</div>
</div>
</div>
@@ -186,7 +274,9 @@
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
var saveRollCallWorkTimeAjax = `@Url.Page("./CaseHistory", "ManualCreateOrEdit")`;
var employeeListAjax = `@Url.Page("./CaseHistory", "EmployeeList")`;
var checkEmployeeData = `@Url.Page("./CaseHistory", "CheckEmployeeData")`;
var dayOfWeekDataUrl = `@Url.Page("./CaseHistory", "DayOfWeek")`;
var totalWorkingDataUrl = `@Url.Page("./CaseHistory", "TotalWorking")`;
var calculateRollCallsTotalDurationDataUrl = `@Url.Page("./CaseHistory", "CalculateRollCallsTotalDuration")`;
</script>
<script src="~/assetsclient/pages/rollcall/js/ModalAddRollCall.js?ver=@clientVersion"></script>

View File

@@ -17,11 +17,11 @@
}
.modalRollCallWidth {
max-width: 550px;
max-width: 670px;
}
.modal-dialog, .modal-content {
height: 420px;
height: 510px;
}
.timeWorkTitle {
@@ -30,6 +30,7 @@
font-size: 12px;
margin: auto 0 auto 6px;
white-space: nowrap;
width: 100px;
}
.groupBox {
@@ -40,18 +41,19 @@
margin: 6px 3px;
}
.groupBox .form-control {
background-color: #ffffff;
}
.groupBox .form-control {
background-color: #ffffff;
padding: .375rem .35rem;
}
.groupBox .form-control::placeholder {
color: #bfbfbf;
opacity: 1; /* Firefox */
}
.groupBox .form-control::placeholder {
color: #bfbfbf;
opacity: 1; /* Firefox */
}
.groupBox .form-control::-ms-input-placeholder { /* Edge 12-18 */
color: #bfbfbf;
}
.groupBox .form-control::-ms-input-placeholder { /* Edge 12-18 */
color: #bfbfbf;
}
.btnAddTimeWork {
display: flex;
@@ -65,15 +67,20 @@
padding: 4px 8px;
}
.removeBtn {
width: 42px
}
.btnRemoveTimeWork {
display: flex;
align-items: center;
justify-content: center;
justify-content: space-between;
background-color: #F87171;
border-radius: 7px;
padding: 3px;
width: 30px;
height: 30px;
/* padding: 3px; */
width: 24px;
height: 24px;
font-size: 12px;
}
.ShowMessage {
@@ -90,9 +97,129 @@
}
.heightControll {
height: 190px;
height: 240px;
overflow-y: scroll;
}
.irregularText {
color: #5C5C5C;
font-size: 12px;
}
.irregularBox {
position: relative;
width: 100%;
overflow: hidden;
background-color: #F5F5F5;
border-radius: 9px;
border: 1px solid #E7E7E7;
padding: 10px;
}
.irrregularContent {
flex-shrink: 0;
width: 100%;
height: 100%;
transform: translateX(100%);
transition: transform 1s ease-in-out, opacity 1s ease-in-out;
opacity: 0;
position: absolute;
top: 0;
left: 0;
}
.irrregularContent.active {
transform: translateX(0);
opacity: 1;
position: relative;
z-index: 1;
}
.navButton {
background-color: transparent;
color: white;
border: none;
padding: 10px 20px;
cursor: pointer;
font-size: 16px;
margin: 10px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: background-color 0.3s ease;
}
.navigation svg path {
transition: fill 0.3s ease;
}
.allSumtxt {
font-size: 13px;
font-weight: 500;
color: #7f7f7f;
position: absolute;
top: 7px;
left: 6px;
}
.startDatetxt {
font-size: 12px;
font-weight: 500;
color: #5C5C5C;
background-color: #ECFCCA;
border: 1px solid #AAE729;
width: 140px;
padding: 5px;
text-align: center;
border-radius: 6px;
}
.endDatetxt {
font-size: 12px;
font-weight: 500;
color: #5C5C5C;
background-color: #ECFCCA;
border: 1px solid #AAE729;
width: 140px;
padding: 4px 5px;
text-align: center;
border-radius: 6px;
}
.cusDateTime {
width: 66px;
}
@@media (max-width: 768px){
.cusDateTime {
width: 100%;
}
.mainDate {
width: 70px;
}
.startDatetxt {
font-size: 10px;
font-weight: 800;
width: 70px;
}
.endDatetxt {
font-size: 10px;
font-weight: 800;
width: 70px;
}
.form-control-date {
font-size: 10px;
font-weight: 700;
}
}
</style>
}
@@ -111,13 +238,20 @@
<div class="col-12 my-1">
<div class="select-alert">
<input type="hidden" id="employeeID" name="Command.EmployeeId" value="@Model.EmployeeId" />
<input class="form-control disable" value="@Model.EmployeeFullName" placeholder="نام پرسنل" />
<div class="position-relative">
<input class="form-control text-center disable" value="@Model.EmployeeFullName" placeholder="نام پرسنل" />
<span class="allSumtxt"></span>
</div>
</div>
</div>
<div class="col-12 my-1">
<input id="dateFa" type="hidden" name="Command.DateFa" value="@Model.DateFa" />
<input class="form-control form-control-date text-center disable" value="@Model.DateFa" placeholder="تاریخ" style="direction: ltr" />
<div class="col-12 my-1 position-relative">
<input type="hidden" name="Command.DateFa" value="@Model.DateFa" />
<input id="dateFa" class="form-control form-control-date text-center disable" value="@Model.DateFa" placeholder="تاریخ" style="direction: ltr" />
</div>
<div class="col-12 my-1 text-center d-flex align-items-center justify-content-center">
<div id="resultCalculateRollCallsTotal" style="font-size: 12px; border: 1px solid #04AAB6; border-radius: 5px; padding: 2px 10px; background: #E7F3F4;width: 170px;display: none"></div>
</div>
<div class="heightControll">
@@ -161,66 +295,87 @@
}
<div class="groupBox">
<div class="row align-items-center justify-content-between">
<div class="col-2 d-flex align-items-center">
<div class="timeWorkTitle">
<div class="d-flex align-items-end align-items-md-center justify-content-between">
<div class="timeWorkTitle d-none d-md-block">
نوبت @txtString
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<span class="startDatetxt">@item.StartDayOfWeekFa</span>
<input type="text" class="form-control text-center form-control-date StartDate" name="Command.RollCallRecords[@index].StartDate" value="@item.StartDateFa" placeholder="0000/00/00" style="direction: ltr;">
</div>
<input type="text" class="form-control text-center cusDateTime dateTime StartTime" name="Command.RollCallRecords[@index].StartTime" placeholder="00:00" value="@item.StartTimeString" style="direction: ltr;">
</div>
<div class="mx-2 position-relative">
<div class="timeWorkTitle position-absolute d-block d-md-none" style="width: auto;bottom: 43px;right: -10px;">
نوبت @txtString
</div>
<div>الی</div>
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">از</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[@index].StartTime" placeholder="00:00" value="@item.StartTimeString" style="direction: ltr;">
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">الی</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[@index].EndTime" placeholder="00:00" value="@item.EndTimeString" style="direction: ltr;">
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<input type="text" class="form-control text-center cusDateTime dateTime EndTime" name="Command.RollCallRecords[@index].EndTime" placeholder="00:00" value="@item.EndTimeString" style="direction: ltr;">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<input type="text" class="order-2 order-md-0 form-control text-center form-control-date EndDate" name="Command.RollCallRecords[@index].EndDate" value="@item.EndDateFa" placeholder="0000/00/00" style="direction: ltr;">
<span class="order-1 order-md-0 endDatetxt">@item.EndDayOfWeekFa</span>
</div>
</div>
@if (index == 0)
{
<div class="col-2 d-flex align-items-center justify-content-end">
<div class="removeBtn ms-2">
</div>
}
else
{
<div class="col-2 d-flex align-items-center justify-content-end">
<div class="removeBtn ms-2">
<button type="button" class="btnRemoveTimeWork">
<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" />
<circle cx="11" cy="11" r="8.25" stroke="white"/>
<path d="M6.875 11H15.125" stroke="white"/>
</svg>
</button>
</div>
}
</div>
</div>
index++;
}
}
else
{
<div class="groupBox">
<div class="row align-items-center justify-content-between">
<div class="col-2 d-flex align-items-center">
<div class="timeWorkTitle">
<div class="d-flex align-items-end align-items-md-center justify-content-between">
<div class="timeWorkTitle d-none d-md-block">
نوبت اول
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<span class="startDatetxt">-</span>
<input type="text" class="form-control text-center form-control-date StartDate" name="Command.RollCallRecords[0].StartDate" placeholder="0000/00/00" style="direction: ltr;">
</div>
<input type="text" class="form-control text-center cusDateTime dateTime StartTime" name="Command.RollCallRecords[0].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="mx-2 position-relative">
<div class="timeWorkTitle position-absolute d-block d-md-none" style="width: auto;bottom: 43px;right: -10px;">
نوبت اول
</div>
<div>الی</div>
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">از</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">الی</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].EndTime" placeholder="00:00" style="direction: ltr;">
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<input type="text" class="form-control text-center cusDateTime dateTime EndTime" name="Command.RollCallRecords[0].EndTime" placeholder="00:00" style="direction: ltr;">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<input type="text" class="order-2 order-md-0 form-control text-center form-control-date EndDate" name="Command.RollCallRecords[0].EndDate" placeholder="0000/00/00" style="direction: ltr;">
<span class="order-1 order-md-0 endDatetxt">-</span>
</div>
</div>
<div class="col-2 d-flex align-items-center justify-content-end">
<div class="removeBtn ms-2">
</div>
</div>
</div>
@@ -279,12 +434,138 @@
</div>
</div>
<div class="col-12 my-1 d-none">
<div class="irregularBox">
<div class="row d-flex align-items-center">
<div class="col-2">
<div class="navigation">
<button type="button" id="prevBox" class="navButton">
<svg width="21" height="24" viewBox="0 0 21 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.5 9.40192C21.5 10.5566 21.5 13.4434 19.5 14.5981L4.5 23.2583C2.5 24.413 -1.17888e-06 22.9697 -1.07793e-06 20.6603L-3.2083e-07 3.33974C-2.19883e-07 1.03034 2.5 -0.413032 4.5 0.741669L19.5 9.40192Z" fill="#2DBDBD" />
</svg>
</button>
</div>
</div>
<div class="col-8 position-relative overflow-hidden">
<div class="irrregularContent active">
<div class="row">
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">شروع بکار</div>
<input type="text" class="form-control text-center dateTimeIrregular" name="" placeholder="00:00" style="direction: ltr;">
</div>
</div>
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">پایان کار</div>
<input type="text" class="form-control text-center dateTimeIrregular" name="" placeholder="00:00" style="direction: ltr;">
</div>
</div>
<div class="ShowMessage d-none">
<p class="m-0" id="ShowSettingMessage"></p>
@* if the date is same, then need col-12 *@
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">1403/08/25</div>
<div class="irregularText">شنبه</div>
</div>
</div>
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">1403/08/26</div>
<div class="irregularText">یکشنبه</div>
</div>
</div>
</div>
</div>
<div class="irrregularContent">
<div class="row">
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">شروع بکار</div>
<input type="text" class="form-control text-center dateTimeIrregular" name="" placeholder="00:00" style="direction: ltr;">
</div>
</div>
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">پایان کار</div>
<input type="text" class="form-control text-center dateTimeIrregular" name="" placeholder="00:00" style="direction: ltr;">
</div>
</div>
@* if the date is same, then need col-12 *@
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">1403/08/25</div>
<div class="irregularText">شنبه</div>
</div>
</div>
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">1403/08/26</div>
<div class="irregularText">یکشنبه</div>
</div>
</div>
</div>
</div>
<div class="irrregularContent">
<div class="row">
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">شروع بکار</div>
<input type="text" class="form-control text-center dateTimeIrregular" name="" placeholder="00:00" style="direction: ltr;">
</div>
</div>
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">پایان کار</div>
<input type="text" class="form-control text-center dateTimeIrregular" name="" placeholder="00:00" style="direction: ltr;">
</div>
</div>
@* if the date is same, then need col-12 *@
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">1403/08/25</div>
<div class="irregularText">شنبه</div>
</div>
</div>
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">1403/08/26</div>
<div class="irregularText">یکشنبه</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-2">
<div class="navigation">
<button type="button" id="nextBox" class="navButton">
<svg width="21" height="24" viewBox="0 0 21 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.5 14.5981C-0.500003 13.4434 -0.5 10.5566 1.5 9.40192L16.5 0.741669C18.5 -0.413032 21 1.03034 21 3.33974L21 20.6603C21 22.9697 18.5 24.413 16.5 23.2583L1.5 14.5981Z" fill="#2DBDBD" />
</svg>
</button>
</div>
</div>
</div>
</div>
</div>
<div class="ShowMessage d-none">
<p class="m-0" id="ShowSettingMessage"></p>
</div>
</div>
</div>
</div>
</div>
@@ -316,9 +597,14 @@
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
var saveRollCallWorkTimeAjax = `@Url.Page("./CaseHistory", "ManualCreateOrEdit")`;
var loadByEmployeeRollCallWorkTimeAjax = `@Url.Page("./CaseHistory", "ManualCreateOrEdit")`;
var employeeListAjax = `@Url.Page("./CaseHistory", "EmployeeList")`;
var dayOfWeekDataUrl = `@Url.Page("./CaseHistory", "DayOfWeek")`;
var totalWorkingDataUrl = `@Url.Page("./CaseHistory", "TotalWorking")`;
var calculateRollCallsTotalDurationDataUrl = `@Url.Page("./CaseHistory", "CalculateRollCallsTotalDuration")`;
var saveRollCallWorkTimeFromWorkFlowAjax = `@Url.Page("./RollCall", "ManualCreateOrEdit")`;
var calculateRollCallsTotalDurationDataWorkFlowUrl = `@Url.Page("./RollCall", "CalculateRollCallsTotalDuration")`;
var dayOfWeekDataWorkFlowUrl = `@Url.Page("./RollCall", "DayOfWeek")`;
//var itemsEditableDatesData = @@Html.Raw(Json.Serialize(Model.EditableDates));
</script>
<script src="~/assetsclient/pages/rollcall/js/ModalEditRollCall.js?ver=@clientVersion"></script>

View File

@@ -44,10 +44,10 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
public IActionResult OnGet()
{
WorkshopFullName = _authHelper.GetWorkshopName();
//CountRollCall = _workFlowApplication.GetAllWorkFlowCount(_workshopId);
WorkshopFullName = _authHelper.GetWorkshopName();
//CountRollCall = _workFlowApplication.GetAllWorkFlowCount(_workshopId);
HasRollCallService = _rollCallServiceApplication.GetActiveServiceByWorkshopId(_workshopId) != null;
HasRollCallService = _rollCallServiceApplication.GetActiveServiceByWorkshopId(_workshopId) != null;
return Page();
}

View File

@@ -152,7 +152,7 @@
<div class="col-12 text-center">
<div class="d-flex justify-content-center">
<a class="btn-cancel text-white w-25 mx-2" data-bs-dismiss="modal" aria-label="Close">انصراف</a>
<a href="#" id="save" class="btn-primary text-white w-25 mx-2" style="padding: 10px 8px;font-size: 14px;">ثبت</a>
<a href="#" id="save" class="btn-primary text-white w-25 mx-2" style="padding: 12px 8px;font-size: 14px;">ثبت</a>
<a id="printSingle" class="btn-blue text-white w-25 mx-2" style="cursor: pointer; display: none">پرینت</a>
<input type="hidden" id="printSingleID" />
</div>

View File

@@ -17,11 +17,11 @@
}
.modalRollCallWidth {
max-width: 550px;
max-width: 670px;
}
.modal-dialog, .modal-content {
height: 420px;
height: 510px;
}
.timeWorkTitle {
@@ -30,6 +30,7 @@
font-size: 12px;
margin: auto 0 auto 6px;
white-space: nowrap;
width: 100px;
}
.groupBox {
@@ -42,6 +43,7 @@
.groupBox .form-control {
background-color: #ffffff;
padding: .375rem .35rem;
}
.groupBox .form-control::placeholder {
@@ -65,15 +67,20 @@
padding: 4px 8px;
}
.removeBtn {
width: 42px
}
.btnRemoveTimeWork {
display: flex;
align-items: center;
justify-content: center;
justify-content: space-between;
background-color: #F87171;
border-radius: 7px;
padding: 3px;
width: 30px;
height: 30px;
/* padding: 3px; */
width: 24px;
height: 24px;
font-size: 12px;
}
.ShowMessage {
@@ -90,9 +97,74 @@
}
.heightControll {
height: 190px;
height: 240px;
overflow-y: scroll;
}
.allSumtxt {
font-size: 13px;
font-weight: 500;
color: #7f7f7f;
position: absolute;
top: 7px;
left: 6px;
}
.startDatetxt {
font-size: 12px;
font-weight: 500;
color: #5C5C5C;
background-color: #ECFCCA;
border: 1px solid #AAE729;
width: 140px;
padding: 5px;
text-align: center;
border-radius: 6px;
}
.endDatetxt {
font-size: 12px;
font-weight: 500;
color: #5C5C5C;
background-color: #ECFCCA;
border: 1px solid #AAE729;
width: 140px;
padding: 4px 5px;
text-align: center;
border-radius: 6px;
}
.cusDateTime {
width: 66px;
}
@@media (max-width: 768px) {
.cusDateTime {
width: 100%;
}
.mainDate {
width: 70px;
}
.startDatetxt {
font-size: 10px;
font-weight: 800;
width: 70px;
}
.endDatetxt {
font-size: 10px;
font-weight: 800;
width: 70px;
}
.form-control-date {
font-size: 10px;
font-weight: 700;
}
}
</style>
}
@@ -111,14 +183,22 @@
<div class="col-12 my-1">
<div class="select-alert">
<input type="hidden" id="employeeID" name="Command.EmployeeId" value="@Model.EmployeeId" />
<input class="form-control disable" value="@Model.EmployeeFullName" placeholder="نام پرسنل" />
<div class="position-relative">
<input class="form-control text-center disable" value="@Model.EmployeeFullName" placeholder="نام پرسنل" />
<span class="allSumtxt"></span>
</div>
</div>
</div>
<div class="col-12 my-1">
<input id="dateFa" type="hidden" name="Command.DateFa" value="@Model.DateFa" />
<input class="form-control form-control-date text-center disable" value="@Model.DateFa" placeholder="تاریخ" style="direction: ltr" />
<div class="col-12 my-1 position-relative">
<input type="hidden" name="Command.DateFa" value="@Model.DateFa" />
<input id="dateFa" class="form-control form-control-date text-center disable" value="@Model.DateFa" placeholder="تاریخ" style="direction: ltr" />
</div>
<div class="col-12 my-1 text-center d-flex align-items-center justify-content-center">
<div id="resultCalculateRollCallsTotal" style="font-size: 12px; border: 1px solid #04AAB6; border-radius: 5px; padding: 2px 10px; background: #E7F3F4;width: 170px;display: none"></div>
</div>
<div class="heightControll">
<div class="col-12" id="appendChildTimeWorkHtml">
@if (@Model.RollCalls.Count > 0)
@@ -160,30 +240,42 @@
}
<div class="groupBox">
<div class="row align-items-center justify-content-between">
<div class="col-2 d-flex align-items-center">
<div class="timeWorkTitle">
<div class="d-flex align-items-end align-items-md-center justify-content-between">
<div class="timeWorkTitle d-none d-md-block">
نوبت @txtString
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<span class="startDatetxt">@item.StartDayOfWeekFa</span>
<input type="text" class="form-control text-center form-control-date StartDate" name="Command.RollCallRecords[@index].StartDate" value="@item.StartDateFa" placeholder="0000/00/00" style="direction: ltr;">
</div>
<input type="text" class="form-control text-center cusDateTime dateTime StartTime" name="Command.RollCallRecords[@index].StartTime" placeholder="00:00" value="@item.StartTimeString" style="direction: ltr;">
</div>
<div class="mx-2 position-relative">
<div class="timeWorkTitle position-absolute d-block d-md-none" style="width: auto;bottom: 43px;right: -10px;">
نوبت @txtString
</div>
<div>الی</div>
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<input type="text" class="form-control text-center cusDateTime dateTime EndTime" name="Command.RollCallRecords[@index].EndTime" placeholder="00:00" value="@item.EndTimeString" style="direction: ltr;">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<input type="text" class="order-2 order-md-0 form-control text-center form-control-date EndDate" name="Command.RollCallRecords[@index].EndDate" value="@item.EndDateFa" placeholder="0000/00/00" style="direction: ltr;">
<span class="order-1 order-md-0 endDatetxt">@(string.IsNullOrWhiteSpace(item.EndDayOfWeekFa) ? "-" : item.EndDayOfWeekFa)</span>
</div>
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">از</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[@index].StartTime" placeholder="00:00" value="@item.StartTimeString" style="direction: ltr;">
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">الی</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[@index].EndTime" placeholder="00:00" value="@item.EndTimeString" style="direction: ltr;">
</div>
@if (index == 0)
{
<div class="col-2 d-flex align-items-center justify-content-end">
<div class="removeBtn ms-2">
</div>
}
else
{
<div class="col-2 d-flex align-items-center justify-content-end">
<div class="removeBtn ms-2">
<button type="button" class="btnRemoveTimeWork">
<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" />
@@ -192,34 +284,43 @@
</button>
</div>
}
</div>
</div>
index++;
}
}
else
{
<div class="groupBox">
<div class="row align-items-center justify-content-between">
<div class="col-2 d-flex align-items-center">
<div class="timeWorkTitle">
<div class="d-flex align-items-end align-items-md-center justify-content-between">
<div class="timeWorkTitle d-none d-md-block">
نوبت اول
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<span class="startDatetxt">-</span>
<input type="text" class="form-control text-center form-control-date StartDate" name="Command.RollCallRecords[0].StartDate" placeholder="0000/00/00" style="direction: ltr;">
</div>
<input type="text" class="form-control text-center cusDateTime dateTime StartTime" name="Command.RollCallRecords[0].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="mx-2 position-relative">
<div class="timeWorkTitle position-absolute d-block d-md-none" style="width: auto;bottom: 43px;right: -10px;">
نوبت اول
</div>
<div>الی</div>
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<input type="text" class="form-control text-center cusDateTime dateTime EndTime" name="Command.RollCallRecords[0].EndTime" placeholder="00:00" style="direction: ltr;">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<input type="text" class="order-2 order-md-0 form-control text-center form-control-date EndDate" name="Command.RollCallRecords[0].EndDate" placeholder="0000/00/00" style="direction: ltr;">
<span class="order-1 order-md-0 endDatetxt">-</span>
</div>
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">از</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">الی</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].EndTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="col-2 d-flex align-items-center justify-content-end">
<div class="removeBtn ms-2">
</div>
</div>
</div>
@@ -234,8 +335,8 @@
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
</svg>
@switch (count)
{
case 0:
@@ -280,6 +381,132 @@
<div class="col-12 my-1 d-none">
<div class="irregularBox">
<div class="row d-flex align-items-center">
<div class="col-2">
<div class="navigation">
<button type="button" id="prevBox" class="navButton">
<svg width="21" height="24" viewBox="0 0 21 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.5 9.40192C21.5 10.5566 21.5 13.4434 19.5 14.5981L4.5 23.2583C2.5 24.413 -1.17888e-06 22.9697 -1.07793e-06 20.6603L-3.2083e-07 3.33974C-2.19883e-07 1.03034 2.5 -0.413032 4.5 0.741669L19.5 9.40192Z" fill="#2DBDBD" />
</svg>
</button>
</div>
</div>
<div class="col-8 position-relative overflow-hidden">
<div class="irrregularContent active">
<div class="row">
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">شروع بکار</div>
<input type="text" class="form-control text-center dateTimeIrregular" name="" placeholder="00:00" style="direction: ltr;">
</div>
</div>
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">پایان کار</div>
<input type="text" class="form-control text-center dateTimeIrregular" name="" placeholder="00:00" style="direction: ltr;">
</div>
</div>
@* if the date is same, then need col-12 *@
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">1403/08/25</div>
<div class="irregularText">شنبه</div>
</div>
</div>
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">1403/08/26</div>
<div class="irregularText">یکشنبه</div>
</div>
</div>
</div>
</div>
<div class="irrregularContent">
<div class="row">
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">شروع بکار</div>
<input type="text" class="form-control text-center dateTimeIrregular" name="" placeholder="00:00" style="direction: ltr;">
</div>
</div>
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">پایان کار</div>
<input type="text" class="form-control text-center dateTimeIrregular" name="" placeholder="00:00" style="direction: ltr;">
</div>
</div>
@* if the date is same, then need col-12 *@
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">1403/08/25</div>
<div class="irregularText">شنبه</div>
</div>
</div>
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">1403/08/26</div>
<div class="irregularText">یکشنبه</div>
</div>
</div>
</div>
</div>
<div class="irrregularContent">
<div class="row">
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">شروع بکار</div>
<input type="text" class="form-control text-center dateTimeIrregular" name="" placeholder="00:00" style="direction: ltr;">
</div>
</div>
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">پایان کار</div>
<input type="text" class="form-control text-center dateTimeIrregular" name="" placeholder="00:00" style="direction: ltr;">
</div>
</div>
@* if the date is same, then need col-12 *@
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">1403/08/25</div>
<div class="irregularText">شنبه</div>
</div>
</div>
<div class="col-6">
<div class="form-group text-center">
<div class="irregularText">1403/08/26</div>
<div class="irregularText">یکشنبه</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-2">
<div class="navigation">
<button type="button" id="nextBox" class="navButton">
<svg width="21" height="24" viewBox="0 0 21 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.5 14.5981C-0.500003 13.4434 -0.5 10.5566 1.5 9.40192L16.5 0.741669C18.5 -0.413032 21 1.03034 21 3.33974L21 20.6603C21 22.9697 18.5 24.413 16.5 23.2583L1.5 14.5981Z" fill="#2DBDBD" />
</svg>
</button>
</div>
</div>
</div>
</div>
</div>
<div class="ShowMessage d-none">
<p class="m-0" id="ShowSettingMessage"></p>
</div>
@@ -313,7 +540,9 @@
<script>
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
var saveRollCallWorkTimeAjax = `@Url.Page("./RollCall", "ManualCreateOrEditForUndefined")`;
var saveRollCallWorkTimeFromWorkFlowAjax = `@Url.Page("./RollCall", "ManualCreateOrEdit")`;
var dayOfWeekDataWorkFlowUrl = `@Url.Page("./RollCall", "DayOfWeek")`;
var calculateRollCallsTotalDurationDataWorkFlowUrl = `@Url.Page("./RollCall", "CalculateRollCallsTotalDuration")`;
var saveRollCallManualCreateOrEditForUndefinedUrl = `@Url.Page("./RollCall", "ManualCreateOrEditForUndefined")`;
</script>
<script src="~/assetsclient/pages/workflow/js/modaleditrollcallundefined.js?ver=@clientVersion"></script>

View File

@@ -322,8 +322,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
};
return Partial("ModalEditRollCallAction", command);
}
//return Partial("ModalEditRollCallAction", command);
return Partial("../RollCall/ModalEditRollCall", command);
}
public IActionResult OnGetEditRollCallForUndefined(long employeeId, string date)
{
@@ -339,8 +340,8 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
RollCalls = result
};
return Partial("ModalEditRollCallUndefined", command);
}
return Partial("ModalEditRollCallUndefined", command);
}
public IActionResult OnPostManualCreateOrEditForUndefined(CreateOrEditEmployeeRollCall command)
{
@@ -353,5 +354,44 @@ namespace ServiceHost.Areas.Client.Pages.Company.WorkFlow
message = result.Message,
});
}
public IActionResult OnGetDayOfWeek(string dateFa)
{
if (dateFa.TryToGeorgianDateTime(out DateTime date) == false)
return new JsonResult(new
{
success = true,
message = "",
});
return new JsonResult(new
{
success = true,
message = date.DayOfWeek.DayOfWeeKToPersian(),
});
}
public IActionResult OnPostCalculateRollCallsTotalDuration(List<CalculateRollCallsTotalDuration> rollCalls)
{
var withoutNull = rollCalls.Where(x => x.StartDateFa != null && x.StartTime != null &&
x.EndDateFa != null && x.EndTime != null);
var ticks = withoutNull.Sum(x =>
((x.EndDateFa.ToGeorgianDateTime().Ticks + TimeOnly.Parse(x.EndTime).Ticks) - (x.StartDateFa.ToGeorgianDateTime().Ticks + TimeOnly.Parse(x.StartTime).Ticks)));
var timeSpan = new TimeSpan(ticks);
return new JsonResult(new
{
result = timeSpan.ToFarsiHoursAndMinutes("-")
});
}
}
public class CalculateRollCallsTotalDuration
{
public string StartDateFa { get; set; }
public string StartTime { get; set; }
public string EndDateFa { get; set; }
public string EndTime { get; set; }
}
}

View File

@@ -19,7 +19,6 @@
<Compile Remove="Areas\Admin\Pages\Company\Tax\**" />
<Compile Remove="Areas\Client\Client\**" />
<Compile Remove="wwwroot\AssetsAdmin\Workshop\**" />
<Compile Remove="wwwroot\AssetsClient\pages\RollCall\js\AssetsClient\**" />
<Compile Remove="wwwroot\labels\صادق فرخی\**" />
<Compile Remove="wwwroot\labels\صفا پور توکلی\**" />
<Compile Remove="wwwroot\labels\میلاد مصباح\**" />
@@ -28,7 +27,6 @@
<Content Remove="Areas\Admin\Pages\Company\Tax\**" />
<Content Remove="Areas\Client\Client\**" />
<Content Remove="wwwroot\AssetsAdmin\Workshop\**" />
<Content Remove="wwwroot\AssetsClient\pages\RollCall\js\AssetsClient\**" />
<Content Remove="wwwroot\labels\صادق فرخی\**" />
<Content Remove="wwwroot\labels\صفا پور توکلی\**" />
<Content Remove="wwwroot\labels\میلاد مصباح\**" />
@@ -37,7 +35,6 @@
<EmbeddedResource Remove="Areas\Admin\Pages\Company\Tax\**" />
<EmbeddedResource Remove="Areas\Client\Client\**" />
<EmbeddedResource Remove="wwwroot\AssetsAdmin\Workshop\**" />
<EmbeddedResource Remove="wwwroot\AssetsClient\pages\RollCall\js\AssetsClient\**" />
<EmbeddedResource Remove="wwwroot\labels\صادق فرخی\**" />
<EmbeddedResource Remove="wwwroot\labels\صفا پور توکلی\**" />
<EmbeddedResource Remove="wwwroot\labels\میلاد مصباح\**" />
@@ -46,7 +43,6 @@
<None Remove="Areas\Admin\Pages\Company\Tax\**" />
<None Remove="Areas\Client\Client\**" />
<None Remove="wwwroot\AssetsAdmin\Workshop\**" />
<None Remove="wwwroot\AssetsClient\pages\RollCall\js\AssetsClient\**" />
<None Remove="wwwroot\labels\صادق فرخی\**" />
<None Remove="wwwroot\labels\صفا پور توکلی\**" />
<None Remove="wwwroot\labels\میلاد مصباح\**" />
@@ -97,6 +93,9 @@
<ItemGroup>
<None Include="Areas\AdminNew\Pages\Company\AndroidApk\Index.cshtml" />
<None Include="Areas\AdminNew\Pages\Company\Bank\CreateBankModal.cshtml" />
<None Include="Areas\AdminNew\Pages\Company\Bank\EditBankModal.cshtml" />
<None Include="Areas\AdminNew\Pages\Company\Bank\Index.cshtml" />
<None Include="Areas\AdminNew\Pages\Company\ContractingParties\Index.cshtml" />
<None Include="Areas\AdminNew\Pages\Company\Employees\Index.cshtml" />
<None Include="Areas\AdminNew\Pages\Company\Employers\Index.cshtml" />
@@ -389,6 +388,9 @@
<None Include="wwwroot\AdminTheme\assets\datatables-new\js\dataTables.responsive.min.js" />
<None Include="wwwroot\AdminTheme\assets\datatables-new\js\jquery.dataTables.min.js" />
<None Include="wwwroot\AdminTheme\assets\images\small\back1.jpg" />
<None Include="wwwroot\AssetsAdminNew\Bank\js\CreateBankModal.js" />
<None Include="wwwroot\AssetsAdminNew\Bank\js\EditBankModal.js" />
<None Include="wwwroot\AssetsAdminNew\Bank\js\Index.js" />
<None Include="wwwroot\AssetsAdminNew\ContractingParties\js\Index.js" />
<None Include="wwwroot\AssetsAdminNew\libs\SweetAlert2\sweetalert2.all.min.js" />
<None Include="wwwroot\AssetsAdminNew\libs\wavesurfer\wavesurfer.min.js" />
@@ -584,6 +586,49 @@
<None Include="wwwroot\AssetsClient\fonts\websima_rohan.ttf.bin" />
<None Include="wwwroot\AssetsClient\fonts\web_Yekan.svg" />
<None Include="wwwroot\AssetsClient\fonts\web_Yekan.ttf.bin" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Ansar - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Ayandeh - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Bank Markazi - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Caspian - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Dey - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Eghtesad Novin - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Futurebank - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Gardeshgari - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Ghavamin - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Hekmat - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Iran Europe - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Iran Venezuela - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Iran Zamin - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Karafarin - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Keshavarzi - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Khavar Mianeh - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Kosar - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Maskan - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Mehr Eghtesad - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Mehr Iran - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Melall - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Mellat - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Melli - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Noor - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Parsian - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Pasargad - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Postbank - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Refah - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Resalat - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Saderat - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Saman - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Sanat Madan - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Sarmayeh - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Sepah - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Shahr - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Sina - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Standard Chartered - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Taavon Eslami - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Tejarat - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Tosee - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Tosee Saderat - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\Bank - Tosee Taavon - Color.svg" />
<None Include="wwwroot\AssetsClient\images\banks svg\shetab.svg" />
<None Include="wwwroot\AssetsClient\images\employee personal 1.svg" />
<None Include="wwwroot\AssetsClient\images\gharadad.svg" />
<None Include="wwwroot\AssetsClient\images\gozareshgir-gr.svg" />
@@ -777,6 +822,7 @@
<None Include="wwwroot\AssetsClient\pages\RollCall\js\EmployeeUploadPicture.js" />
<None Include="wwwroot\AssetsClient\pages\RollCall\js\Grouping.js" />
<None Include="wwwroot\AssetsClient\pages\RollCall\js\Index.js" />
<None Include="wwwroot\AssetsClient\pages\RollCall\js\LeaveCreate.js" />
<None Include="wwwroot\AssetsClient\pages\RollCall\js\ModalAddEmployeeToGroup.js" />
<None Include="wwwroot\AssetsClient\pages\RollCall\js\ModalAddRollCall.js" />
<None Include="wwwroot\AssetsClient\pages\RollCall\js\ModalCameraAccount.js" />
@@ -791,6 +837,8 @@
<None Include="wwwroot\AssetsClient\pages\RollCall\js\ModalRollCallSetting.js" />
<None Include="wwwroot\AssetsClient\pages\RollCall\js\ModalSettingWorkTime.js" />
<None Include="wwwroot\AssetsClient\pages\RollCall\js\ModalTakeImages.js" />
<None Include="wwwroot\AssetsClient\pages\RollCall\js\ModalTakeImagesEdit.js" />
<None Include="wwwroot\AssetsClient\pages\RollCall\js\ModalTakeImagesGroupSettingStatus.js" />
<None Include="wwwroot\AssetsClient\pages\RollCall\js\Plans.js" />
<None Include="wwwroot\AssetsClient\pages\SalaryAid\js\Index.js" />
<None Include="wwwroot\AssetsClient\pages\SalaryAid\js\ModalCreateNewSalaryAid.js" />
@@ -802,6 +850,8 @@
<None Include="wwwroot\AssetsClient\pages\SubAccounts\js\ModalEditSubAccount.js" />
<None Include="wwwroot\AssetsClient\pages\SubAccounts\js\ModalEditSubAccountPasswordAndPhone.js" />
<None Include="wwwroot\AssetsClient\pages\WorkFlow\js\LeaveCreate.js" />
<None Include="wwwroot\AssetsClient\pages\WorkFlow\js\ModalEditRollCallAction.js" />
<None Include="wwwroot\AssetsClient\pages\WorkFlow\js\ModalEditRollCallUndefined.js" />
<None Include="wwwroot\AssetsClient\pages\WorkFlow\js\RollCall.js" />
<None Include="wwwroot\AssetsClient\Workshop\js\ContractCheckoutYearlyStatus.js" />
<None Include="wwwroot\AssetsClient\Workshop\js\employees.js" />

View File

@@ -0,0 +1,96 @@
.errored {
animation: shake 300ms;
color: #eb3434 !important;
background-color: #fef2f2 !important;
border: 1px solid #eb3434 !important;
}
.textLFontColor,
.form-control {
color: #797979;
font-size: 12px;
font-weight: 500;
}
/*.form-control-number {
border: 1px solid #C6C6C6;
border-radius: 6px;
width: 40px;
}
.form-control-currency {
border: 1px solid #C6C6C6;
border-radius: 6px;
width: 120px;
}
.form-control-select {
border: 1px solid #C6C6C6;
border-radius: 6px;
width: 80px;
}*/
.textLFontColor span {
font-size: 16px;
font-weight: 600;
}
.btnCreateNew {
font-size: 14px;
font-weight: 500;
background-color: #84CC16;
color: #FFFFFF;
border-radius: 8px;
padding: 10px 70px;
width:100%;
}
.closeBtn {
font-size: 14px;
font-weight: 500;
background-color: #454545;
color: #FFFFFF;
border-radius: 8px;
padding: 10px 70px;
width:100%;
}
.btnCreateNew:hover {
background-color: #5f9213;
}
.btnCreateNew,
.btn-cancel2 {
width: 100% !important;
}
.spanTitleText {
font-size: 13px;
font-weight: 500;
color: #454545;
}
@media (max-width:1366px) {
.spanTitleText {
font-size: 12px;
}
}
@media (max-width:768px) {
.form-control {
margin: 0 !important;
}
.spanTitleText {
font-size: 11px;
}
}
@media (max-width:576px) {
.btnCreateNew, .btn-cancel2 {
width: 100% !important;
padding: 10px 40px;
display: flex;
justify-content: center;
}
}

View File

@@ -0,0 +1,95 @@
.errored {
animation: shake 300ms;
color: #eb3434 !important;
background-color: #fef2f2 !important;
border: 1px solid #eb3434 !important;
}
.textLFontColor,
.form-control {
color: #797979;
font-size: 12px;
font-weight: 500;
}
/*.form-control-number {
border: 1px solid #C6C6C6;
border-radius: 6px;
width: 40px;
}
.form-control-currency {
border: 1px solid #C6C6C6;
border-radius: 6px;
width: 120px;
}
.form-control-select {
border: 1px solid #C6C6C6;
border-radius: 6px;
width: 80px;
}*/
.textLFontColor span {
font-size: 16px;
font-weight: 600;
}
.btnEdit {
font-size: 14px;
font-weight: 500;
background-color: #84CC16;
color: #FFFFFF;
border-radius: 8px;
padding: 10px 70px;
}
.closeBtn {
font-size: 14px;
font-weight: 500;
background-color: #454545;
color: #FFFFFF;
border-radius: 8px;
padding: 10px 70px;
width: 100%;
}
.btnCreateNew:hover {
background-color: #5f9213;
}
.btnCreateNew,
.btn-cancel2 {
width: 100% !important;
}
.spanTitleText {
font-size: 13px;
font-weight: 500;
color: #454545;
}
@media (max-width:1366px) {
.spanTitleText {
font-size: 12px;
}
}
@media (max-width:768px) {
.form-control {
margin: 0 !important;
}
.spanTitleText {
font-size: 11px;
}
}
@media (max-width:576px) {
.btnCreateNew, .btn-cancel2 {
width: 100% !important;
padding: 10px 40px;
display: flex;
justify-content: center;
}
}

View File

@@ -0,0 +1,99 @@
.goToTop {
position: fixed;
bottom: -10px;
margin-right: 100px;
z-index: 100;
color: #fff;
background-color: #25acacd6;
}
.goToTop:hover {
color: #fff;
background-color: #2ca4a4;
}
.table-rollcall .width4::before {
display: none;
}
.tooltipfull-container {
cursor: pointer;
position: relative;
}
.bankImage {
/*height: 30px;*/
width: 35px;
object-fit: cover;
object-position: center;
border-radius: 5px;
}
.tooltipfull {
opacity: 0;
z-index: 99;
color: #fff;
display: grid;
font-size: 12px;
padding: 5px 10px;
border-radius: 8px;
background: #23a8a8;
border: 1px solid #23a8a8;
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
position: absolute;
right: -2px;
bottom: 30px;
white-space: nowrap;
}
.tooltipfull-container:hover .tooltipfull, a:hover .tooltipfull {
opacity: 1;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
.tooltipfull:before, .tooltipfull:after {
content: '';
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #23a8a8;
position: absolute;
bottom: -10px;
right: 20px;
}
.close-btn-search {
position: absolute;
top: 50%;
left: 4px;
transform: translateY(-50%);
color: #fff;
background-color: #f87171;
width: 26px;
height: 26px;
display: flex;
align-items: center;
justify-content: center;
}
@media screen and (max-width: 767px) {
.goToTop {
position: fixed;
bottom: 54px;
margin-right: 39%;
z-index: 100;
color: #fff;
background-color: #25acac70;
}
}

View File

@@ -0,0 +1,58 @@
$(document).ready(function () {
$("#createData").click(function () {
$(".btnCreateNew .spinner-loading").css("display", "flex");
var name = $("#bankName").val();
if (name) {
createBank(name);
} else {
showAlertMessage('.alert-msg', 'نام بانک را مشخص کنید.', 3500);
}
});
});
function showAlertMessage(selector, message, timeout) {
$(selector).show();
$(selector + ' p').text(message);
setTimeout(function () {
$(selector).hide();
$(selector + ' p').text('');
}, timeout);
}
function createBank(name) {
var formData = new FormData();
formData.append('command.BankName', name);
formData.append('command.BankLogoPictureFile', $('#BankLogoPictureFile')[0].files[0]);
$.ajax({
async: false,
dataType: 'json',
type: 'POST',
url: createBankURL,
data: formData,
processData: false, // Important for FormData
contentType: false, // Important for FormData
headers: { 'RequestVerificationToken': antiForgeryToken },
success: function (response) {
console.log(response);
if (response.success) {
showAlertMessage('.alert-success-msg', 'بانک با موفقیت ایجاد شد.', 3500);
setTimeout(function () {
$(".btnCreateNew .spinner-loading").css("display", "none");
location.reload();
}, 500);
} else {
showAlertMessage('.alert-msg', response.message, 3500);
$(".btnEdit .spinner-loading").css("display", "none");
}
},
error: function () {
showAlertMessage('.alert-msg', response.message, 3500);
$(".btnEdit .spinner-loading").css("display", "none");
}
});
}

View File

@@ -0,0 +1,61 @@
$(document).ready(function () {
$("#EditData").click(function () {
$(".btnEdit .spinner-loading").css("display", "flex");
var name = $("#bankNameEdit").val();
if (name) {
editBank(name);
} else {
showAlertMessage('.alert-msg', 'نام بانک را مشخص کنید.', 3500);
}
});
});
function showAlertMessage(selector, message, timeout) {
$(selector).show();
$(selector + ' p').text(message);
setTimeout(function () {
$(selector).hide();
$(selector + ' p').text('');
}, timeout);
}
function editBank(name) {
var id = $("#bankIdEdit").val();
console.log(id);
var formData = new FormData();
formData.append('command.id', id);
formData.append('command.BankName', name);
formData.append('command.BankLogoPictureFile', $('#BankLogoPictureFile')[0].files[0]);
$.ajax({
async: false,
dataType: 'json',
type: 'POST',
url: editBankUrl,
data: formData,
processData: false, // Important for FormData
contentType: false, // Important for FormData
headers: { 'RequestVerificationToken': antiForgeryToken },
success: function (response) {
console.log(response);
if (response.success) {
showAlertMessage('.alert-success-msg', 'بانک با موفقیت ویرایش شد.', 3500);
setTimeout(function () {
$(".btnEdit .spinner-loading").css("display", "none");
location.reload();
}, 500);
} else {
showAlertMessage('.alert-msg', response.message, 3500);
$(".btnEdit .spinner-loading").css("display", "none");
}
},
error: function () {
showAlertMessage('.alert-msg', response.message, 3500);
$(".btnEdit .spinner-loading").css("display", "none");
}
});
}

View File

@@ -0,0 +1,54 @@
$(document).ready(function () {
$(".removeBank").click(function () {
var id = $(this).data("remove-id");
console.log(id);
swal.fire({
title: "اخطار",
text: "آیا میخواهید این بانک را حذف کنید؟",
icon: "warning",
showCancelButton: true,
confirmButtonText: "بله",
cancelButtonText: "خیر",
confirmButtonColor: '#84cc16',
reverseButtons: true
}).then((result) => {
if (result.isConfirmed) {
removeBank(id);
} else {
return;
}
});
});
function removeBank(id) {
$.ajax({
async: false,
type: 'POST',
url: deleteBankUrl,
data: {id:id},
headers: { 'RequestVerificationToken': antiForgeryToken },
success: function (response) {
console.log(response);
if (response.success) {
showAlertMessage('.alert-success-msg', 'با موفقیت حذف شد.', 3500);
location.reload();
} else {
showAlertMessage('.alert-msg', response.message, 3500);
}
},
error: function () {
showAlertMessage('.alert-msg', response.message, 3500);
}
});
}
function showAlertMessage(selector, message, timeout) {
$(selector).show();
$(selector + ' p').text(message);
setTimeout(function () {
$(selector).hide();
$(selector + ' p').text('');
}, timeout);
}
});

View File

@@ -0,0 +1,6 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M41 16.9803H7.05046V7H41V16.9803Z" fill="#EEB900"/>
<path d="M40.9495 41H7V31.0197H40.9495V41Z" fill="#EEB900"/>
<path d="M24.0247 0L0 23.9542L7.01847 31.0064L31.0432 7.05218L24.0247 0Z" fill="#AA1A1F"/>
<path d="M40.9815 16.9936L16.9568 40.9478L23.9753 48L48 24.0458L40.9815 16.9936Z" fill="#AA1A1F"/>
</svg>

After

Width:  |  Height:  |  Size: 415 B

View File

@@ -0,0 +1,19 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.67899 2.58619e-07H41.321C44.9811 2.58619e-07 48 3.01926 48 6.67871V41.3213C48 44.9807 44.9811 48 41.321 48H6.67899C3.01895 48 1.08157e-05 44.9807 1.08157e-05 41.3213V6.67963C-0.00317862 4.90887 0.699149 3.20957 1.9521 1.95649C3.20505 0.703419 4.9057 -0.00049258 6.67899 2.58619e-07Z" fill="url(#paint0_radial_1188_2721)"/>
<path d="M46 22V40.9178C46.0029 42.2653 45.4744 43.5586 44.5309 44.5121C43.5875 45.4656 42.3068 46.001 40.9716 46H7.02744C5.69257 46.0007 4.41227 45.4654 3.46907 44.5121C2.52587 43.5588 1.9973 42.2659 2.00001 40.9188V33.027C3.85412 12.8105 22.9654 33.2796 31.8438 33.2796C38.9043 33.2422 43.1113 27.7661 46 22" fill="url(#paint1_linear_1188_2721)"/>
<path d="M7.05943 2H40.9758C43.7547 2 46 4.25374 46 7.0433V14.6263C44.4318 35.5851 25.087 14.6616 16.1445 14.6616C9.126 14.6616 4.92154 20.277 2 26V7.0433C2.03613 4.28903 4.31574 2.00093 7.05943 2.00093" fill="url(#paint2_linear_1188_2721)"/>
<defs>
<radialGradient id="paint0_radial_1188_2721" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(23.9914 23.9894) scale(24.0034)">
<stop stop-color="#F4B31B"/>
<stop offset="1" stop-color="#CC932B"/>
</radialGradient>
<linearGradient id="paint1_linear_1188_2721" x1="46.0081" y1="45.9854" x2="46.0081" y2="21.9866" gradientUnits="userSpaceOnUse">
<stop stop-color="#6E2616"/>
<stop offset="1" stop-color="#9B4722"/>
</linearGradient>
<linearGradient id="paint2_linear_1188_2721" x1="2.02904" y1="2.01032" x2="2.02904" y2="26.0079" gradientUnits="userSpaceOnUse">
<stop stop-color="#6E2616"/>
<stop offset="1" stop-color="#9B4722"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M25.671 47.3078C25.2278 47.751 24.6267 48.0001 24 48C23.3732 47.9999 22.7722 47.751 22.329 47.3078C20.5508 45.5297 17.9909 42.9698 17.9909 42.9698C17.9909 42.9698 20.7323 42.9698 22.4968 42.9698C23.4282 42.9698 24.3214 42.5998 24.98 41.9412C27.8897 39.0316 35.9696 30.9516 35.9696 30.9516L36.0182 36.9607C36.0182 36.9607 28.9732 44.0056 25.671 47.3078ZM9.5253 36.3527C10.1827 37.01 11.0743 37.3793 12.004 37.3793C16.1166 37.3793 27.5482 37.3793 27.5482 37.3793L23.3335 41.6627H6.3373V33.1646C6.3373 33.1646 8.2777 35.105 9.5253 36.3527ZM41.6627 41.6627H33.1646C33.1646 41.6627 35.105 39.7223 36.3527 38.4747C37.01 37.8173 37.3793 36.9257 37.3793 35.996C37.3793 31.8834 37.3793 20.4518 37.3793 20.4518L41.6627 24.6665V41.6627ZM0.6922 25.671C0.249 25.2278 -9.99699e-05 24.6267 3.00968e-08 24C0.00010003 23.3732 0.249 22.7722 0.6922 22.329C2.4703 20.5508 5.0302 17.9909 5.0302 17.9909C5.0302 17.9909 5.0302 20.7323 5.0302 22.4968C5.0302 23.4282 5.4002 24.3214 6.0588 24.98C8.9684 27.8897 17.0484 35.9696 17.0484 35.9696L11.0393 36.0182C11.0393 36.0182 3.9944 28.9732 0.6922 25.671ZM24 12.9834C30.0803 12.9834 35.0166 17.9197 35.0166 24C35.0166 30.0803 30.0803 35.0166 24 35.0166C17.9197 35.0166 12.9834 30.0803 12.9834 24C12.9834 17.9197 17.9197 12.9834 24 12.9834ZM47.3078 22.329C47.751 22.7722 48 23.3733 48 24C48 24.6268 47.751 25.2278 47.3078 25.671C45.5297 27.4492 42.9698 30.0091 42.9698 30.0091C42.9698 30.0091 42.9698 27.2677 42.9698 25.5032C42.9698 24.5718 42.5998 23.6786 41.9412 23.02C39.0316 20.1103 30.9516 12.0304 30.9516 12.0304L36.9607 11.9818C36.9607 11.9818 44.0056 19.0268 47.3078 22.329ZM6.3373 6.3373H14.8354C14.8354 6.3373 12.895 8.2777 11.6473 9.5253C10.99 10.1827 10.6207 11.0743 10.6207 12.004C10.6207 16.1166 10.6207 27.5482 10.6207 27.5482L6.3373 23.3335V6.3373ZM30.0091 5.0302C30.0091 5.0302 27.2677 5.0302 25.5032 5.0302C24.5718 5.0302 23.6786 5.4002 23.02 6.0588C20.1103 8.9684 12.0304 17.0484 12.0304 17.0484L11.9818 11.0393C11.9818 11.0393 19.0268 3.9944 22.329 0.6922C22.7722 0.249 23.3733 0 24 0C24.6268 0 25.2278 0.249 25.671 0.6922C27.4492 2.4703 30.0091 5.0302 30.0091 5.0302ZM41.6627 6.3373V14.8354C41.6627 14.8354 39.7223 12.895 38.4747 11.6473C37.8173 10.99 36.9257 10.6207 35.996 10.6207C31.8834 10.6207 20.4518 10.6207 20.4518 10.6207L24.6665 6.3373H41.6627Z" fill="#00194A"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,4 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.03783 21.1567C6.90785 21.1567 5.013 22.2382 3.94874 24.0952C2.90363 25.9189 2.87516 28.157 3.94776 29.9762C4.98698 31.7391 6.94859 32.6725 8.95781 32.6725C15.1718 32.6725 19.2054 26.3557 22.4723 21.2397C23.2177 20.0724 23.9232 18.9676 24.6055 18.0146C24.9869 17.4819 25.3836 16.9649 25.7999 16.469C26.3609 15.8005 26.9574 15.1697 27.6 14.5914C29.9813 12.4465 32.9895 11.0152 37.1341 11.0005C37.1557 11 37.1778 11 37.1999 11V18.0146C35.3202 18.0146 33.5324 18.7042 31.7873 19.8132C30.9729 20.3307 30.1678 20.9394 29.3672 21.6118C27.5291 23.1558 25.8518 24.8708 24.1743 26.586C22.3819 28.4187 20.5892 30.2516 18.5999 31.8764C17.9775 32.3846 17.3457 32.8633 16.7021 33.3018C16.2289 33.6245 15.7493 33.9262 15.2624 34.2014C13.342 35.2883 11.2267 36 9.00003 36C7.05119 35.9956 5.1583 35.3717 3.59972 34.2014C3.23498 33.9277 2.89136 33.6265 2.57277 33.3018C0.981295 31.6797 0 29.4578 0 27.0073C0 26.067 0.144323 25.1611 0.411859 24.3091C0.982277 22.4957 2.11231 20.9296 3.59923 19.8132C5.15438 18.6458 7.05462 18.0146 9.00003 18.0146C11.4039 18.0209 13.6836 18.7135 15.8023 19.8132C16.7591 20.3096 17.6893 20.8874 18.5999 21.5196C18.6441 21.55 18.6883 21.5809 18.7325 21.6118C18.7712 21.639 18.817 21.6668 18.8677 21.6974C18.9231 21.7309 18.9843 21.7679 19.0481 21.8115L19.6932 22.2495L19.7049 22.2578L18.0045 24.7157C15.4528 22.8621 12.2777 21.1567 9.03783 21.1567Z" fill="#008B9A"/>
<path d="M37.1999 18.0146L37.1999 24.9359C39.3362 24.9433 41.0701 26.6963 41.0701 28.8054C41.0701 30.9386 39.3353 32.648 37.2156 32.6744L37.1999 32.6749L37.2058 32.6744C37.1956 32.6712 37.1835 32.6717 37.1719 32.6722C37.1679 32.6723 37.1639 32.6725 37.1601 32.6725V32.6749C36.924 32.6749 36.6879 32.6602 36.4527 32.6396C33.2605 32.0314 29.428 28.7485 26.8597 26.5472L26.7866 26.4849L24.5716 28.6985C28.4418 32.1084 33.5555 35.9725 38.9528 36H39.0466C41.0548 35.9897 42.9075 35.3221 44.4003 34.2014C44.765 33.9277 45.1082 33.6265 45.4267 33.3018C47.0187 31.6797 48 29.4578 48 27.0068C48 26.0675 47.8557 25.1611 47.5881 24.3091C47.0177 22.4957 45.8877 20.9296 44.4003 19.8132C42.9075 18.6924 41.0548 18.0249 39.0466 18.0146H37.1999Z" fill="#008B9A"/>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M40.5 33C44.6394 33 48 36.3606 48 40.5C48 44.6394 44.6394 48 40.5 48C36.3606 48 33 44.6394 33 40.5C33 36.3606 36.3606 33 40.5 33ZM34.138 0.4193C34.1912 0.1745 34.4074 0 34.6575 0C36.7606 0 45.9644 0 47.7988 0C47.8678 0 47.9321 0.0355 47.9689 0.0939C48.0058 0.1524 48.0101 0.2257 47.9805 0.2882C46.18 4.0741 27.2139 43.9549 25.4254 47.7158C25.3428 47.8894 25.1679 48 24.9758 48C24.8142 48 24.6113 48 24.4199 48C24.2693 47.9999 24.1268 47.9317 24.0322 47.8142C23.9377 47.6968 23.9014 47.5427 23.9334 47.3953C25.0675 42.1745 33.1859 4.802 34.138 0.4193ZM26.5596 0.4193C26.6127 0.1745 26.829 0 27.0791 0C27.9665 0 30.0107 0 31.0677 0C31.2286 0 31.3808 0.0729 31.4817 0.1984C31.5826 0.3238 31.6214 0.4882 31.5872 0.6457C30.4178 6.0289 22.3078 43.3628 21.3858 47.6074C21.336 47.8365 21.1335 47.9999 20.8993 48C20.0156 48 17.8962 48 16.8415 48C16.6909 48.0001 16.5483 47.9317 16.4538 47.8142C16.3593 47.6968 16.323 47.5428 16.355 47.3953C17.4891 42.1745 25.6075 4.802 26.5596 0.4193ZM22.5655 0.3035C22.6536 0.1181 22.8404 0 23.0454 0C23.1708 0 23.3178 0 23.4623 0C23.6231 0 23.7753 0.0729 23.8762 0.1984C23.9772 0.3238 24.016 0.4882 23.9818 0.6457C22.8124 6.0289 14.7023 43.3628 13.7803 47.6074C13.7305 47.8365 13.528 47.9999 13.2938 48C11.2516 48 2.037 48 0.2012 48C0.1322 47.9999 0.0679 47.9645 0.0311 47.9061C-0.0058 47.8476 -0.0101 47.7743 0.0195 47.7118C1.817 43.9322 20.7223 4.1791 22.5655 0.3035ZM7.5 0C11.6394 0 15 3.3606 15 7.5C15 11.6394 11.6394 15 7.5 15C3.3606 15 0 11.6394 0 7.5C0 3.3606 3.3606 0 7.5 0Z" fill="#662892"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,5 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 18.4603C7.6613 16.9797 16.1238 16.7229 25.8796 17.8508C34.0724 26.6222 37.9844 34.0111 40.7682 41.2914C30.5577 30.4065 17.7556 22.0332 0 18.4603Z" fill="#4DA2E7"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.71826 10.9131C17.5511 9.83366 22.717 10.1332 30.6134 11.3113C35.2087 15.2701 42.5295 23.1499 45.3133 30.4302C35.1028 19.5453 28.2771 14.0585 9.71826 10.9131Z" fill="#82BEEE"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.6313 6C22.6112 6.1734 27.1874 6.7151 35.0839 7.8932C38.8135 11.2993 42.6802 15.1215 47.3861 21.4673C35.1782 10.8801 33.1902 9.1453 14.6313 6Z" fill="#A6D0F3"/>
</svg>

After

Width:  |  Height:  |  Size: 760 B

View File

@@ -0,0 +1,4 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.3103 31.4658L12 44.7847H17.7339L10.0742 31.5794L11.5354 29.0486L20.6206 44.7847H36L38.8706 39.8127L23.5832 39.819L14.4502 24.0001L17.7754 18.2406H11.9459L4.3103 31.4658ZM40.3103 37.319L48 24.0001L45.1331 19.0344L37.5268 32.2705H34.6045L43.6897 16.5344L36 3.21545H30.2589L37.908 16.4516L28.7749 32.2705H22.1244L25.0392 37.319H40.3103ZM25.8601 10.6812L24.399 8.15025L9.1331 8.18115L12 3.21545H27.3794L35.015 16.4407L32.1002 21.4892L28.7749 15.7297H10.5088L2.8706 28.9721L0 24.0001L7.6897 10.6812H25.8601Z" fill="#B11116"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.9996 18.2604C27.2165 18.2604 29.8283 20.8722 29.8283 24.0891C29.8283 27.306 27.2165 29.9178 23.9996 29.9178C20.7827 29.9178 18.1709 27.306 18.1709 24.0891C18.1709 20.8722 20.7827 18.2604 23.9996 18.2604Z" fill="#00A1BF"/>
</svg>

After

Width:  |  Height:  |  Size: 951 B

View File

@@ -0,0 +1,5 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.29032 7.4184H36L27.8197 0H2.83491C0.478179 0 0 3.30658 0 3.30658V26.8124C0 26.8124 0.631878 38 16.0361 38C31.4402 38 29.5617 27.6005 29.5617 27.6005C29.5617 27.6005 28.1442 33.9053 19.6565 33.9053C11.1689 33.9053 9.29032 26.6583 9.29032 26.6583V7.4184Z" fill="#007D3D"/>
<path d="M36.7097 40.5816H10L18.1803 48H43.1651C45.5218 48 46 44.6934 46 44.6934V21.2047C46 21.2047 45.3681 10 29.9639 10C14.5598 10 16.4383 20.3995 16.4383 20.3995C16.4383 20.3995 17.8558 14.0947 26.3435 14.0947C34.8311 14.0947 36.7097 21.3417 36.7097 21.3417V40.5816Z" fill="#007D3D"/>
<path d="M23.4047 32.8229C28.3031 32.8229 32.2742 28.8419 32.2742 23.9309C32.2742 19.02 28.3031 15.0389 23.4047 15.0389C18.5062 15.0389 14.5352 19.02 14.5352 23.9309C14.5352 28.8419 18.5062 32.8229 23.4047 32.8229Z" fill="#FFF400"/>
</svg>

After

Width:  |  Height:  |  Size: 907 B

View File

@@ -0,0 +1,12 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M31.2787 7.40398C31.2787 11.482 28.0311 14.808 24.0492 14.808C20.0672 14.808 16.8197 11.482 16.8197 7.40398C16.8197 3.32594 20.0672 0 24.0492 0C28.0311 0 31.2787 3.32594 31.2787 7.40398Z" fill="#324C88"/>
<path d="M16.7213 16.571C16.7213 19.5946 14.3131 22.0609 11.3608 22.0609C8.40821 22.0609 6 19.5946 6 16.571C6 13.5471 8.40821 11.0808 11.3608 11.0808C14.3131 11.0808 16.7213 13.5471 16.7213 16.571Z" fill="#324C88"/>
<path d="M42 16.6717C42 19.6953 39.592 22.1616 36.6395 22.1616C33.6869 22.1616 31.2787 19.6953 31.2787 16.6717C31.2787 13.6478 33.6869 11.1815 36.6395 11.1815C39.592 11.1815 42 13.6478 42 16.6717Z" fill="#324C88"/>
<path d="M24.0492 29.4145C27.0018 29.4145 29.4097 26.9482 29.4097 23.9246C29.4097 20.9008 27.0018 18.4344 24.0492 18.4344C21.0966 18.4344 18.6886 20.9008 18.6886 23.9246C18.6886 26.9482 21.0966 29.4145 24.0492 29.4145Z" fill="#324C88"/>
<path d="M13.2295 33.041C15.1527 33.041 16.7213 31.4345 16.7213 29.4649C16.7213 27.4952 15.1527 25.8888 13.2295 25.8888C11.3063 25.8888 9.73766 27.4952 9.73766 29.4649C9.73766 31.4345 11.3063 33.041 13.2295 33.041Z" fill="#324C88"/>
<path d="M38.4098 29.4649C38.4098 31.4345 36.8412 33.041 34.9182 33.041C32.995 33.041 31.4264 31.4345 31.4264 29.4649C31.4264 27.4952 32.995 25.8888 34.9182 25.8888C36.8412 25.8888 38.4098 27.4952 38.4098 29.4649Z" fill="#324C88"/>
<path d="M24 40.4953C25.9232 40.4953 27.4918 38.8889 27.4918 36.9192C27.4918 34.9495 25.9232 33.3431 24 33.3431C22.0768 33.3431 20.5082 34.9495 20.5082 36.9192C20.5082 38.8889 22.0768 40.4953 24 40.4953Z" fill="#324C88"/>
<path d="M16.918 42.4595C16.918 43.4859 16.1007 44.3232 15.0985 44.3232C14.0962 44.3232 13.2787 43.4859 13.2787 42.4595C13.2787 41.4331 14.0962 40.596 15.0985 40.596C16.1007 40.596 16.918 41.4331 16.918 42.4595Z" fill="#324C88"/>
<path d="M33.1476 44.3232C34.1498 44.3232 34.9672 43.4859 34.9672 42.4595C34.9672 41.4331 34.1498 40.596 33.1476 40.596C32.1454 40.596 31.3281 41.4331 31.3281 42.4595C31.3281 43.4859 32.1454 44.3232 33.1476 44.3232Z" fill="#324C88"/>
<path d="M25.9181 46.1363C25.9181 47.1627 25.1005 48 24.0983 48C23.0961 48 22.2788 47.1627 22.2788 46.1363C22.2788 45.1099 23.0961 44.2728 24.0983 44.2728C25.1005 44.2728 25.9181 45.1099 25.9181 46.1363Z" fill="#324C88"/>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,4 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 32H48V0H16V32Z" fill="#A3A3A2"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 48H32V16H0V48Z" fill="#05326E"/>
</svg>

After

Width:  |  Height:  |  Size: 274 B

View File

@@ -0,0 +1,4 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M24 6C33.9344 6 42 14.0656 42 24C42 33.9344 33.9344 42 24 42C14.0656 42 6 33.9344 6 24C6 14.0656 14.0656 6 24 6Z" fill="#EDC53A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M48 48H34.8623L21.3642 22.1715H31.8132L41.8776 41.4296V6.12245H6.12245V41.8776H21.0975L24.2971 48H0V0H48V48ZM12 22.1715H20.1633L33.6613 48H25.498L12 22.1715Z" fill="#2E3390"/>
</svg>

After

Width:  |  Height:  |  Size: 508 B

View File

@@ -0,0 +1,4 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M31.5192 34.5659C9.96166 52.8208 -11.4402 25.1039 7.01292 6.4251C-1.57987 26.6761 14.2264 42.0018 31.5192 34.5659ZM34.4906 16.1951C53.0539 37.5024 25.7697 59.4188 6.83516 41.2307C27.1734 49.5079 42.1936 33.4072 34.4906 16.1951ZM16.4018 13.314C37.8413 -5.08003 59.4213 22.4975 41.089 41.2956C49.551 20.9892 33.6463 5.7664 16.4018 13.314ZM12.8162 30.6037C-3.64892 7.6279 25.5846 -11.5966 42.7142 8.30929C23.2501 -1.86357 6.77522 12.7371 12.8162 30.6037Z" fill="#4C2A93"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M24 33C28.957 33 33 28.9571 33 24.0001C33 19.043 28.957 15 24 15C19.043 15 15 19.043 15 24.0001C15 28.9571 19.043 33 24 33Z" fill="#F10B7C"/>
</svg>

After

Width:  |  Height:  |  Size: 813 B

View File

@@ -0,0 +1,4 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M24 33.5C18.7568 33.5 14.5 29.2432 14.5 24C14.5 18.7568 18.7568 14.5 24 14.5C29.2432 14.5 33.5 18.7568 33.5 24C33.5 29.2432 29.2432 33.5 24 33.5Z" fill="#AB7342"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 36L0 24L24 0L36 12L48 24L36 36L24 48L12 36H36V12H12V36Z" fill="#0C730A"/>
</svg>

After

Width:  |  Height:  |  Size: 443 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,10 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M42.4668 9.78094L47.9966 7.70754V4.2246L42.2251 7.11203L47.9966 2.47412V0H45.6923L40.5241 5.60239L43.9587 0H40.7098L37.7854 5.33495C39.8643 6.17844 41.5307 7.78334 42.4668 9.78094Z" fill="#F29200"/>
<path d="M47.9966 19.2412L42.5967 16.9733C42.9617 16.1138 43.1953 15.1817 43.2709 14.1995C43.3787 12.8022 43.1542 11.4559 42.665 10.2377L47.9966 8.94832V11.276L44.8157 12.1381L47.9966 12.747V15.081L45.4841 15.1791L47.9966 16.1093V19.2412Z" fill="#F29200"/>
<path d="M0 25.841L25.9014 15.6954C26.4254 17.7588 27.6813 19.5513 29.3957 20.7552L13.3511 47.9966H6.58975L20.9806 27.1287L0 48V37.5352L17.9716 23.4693L0 32.5091V25.841Z" fill="#F29200"/>
<path d="M18.5614 47.9966L29.8977 21.083C31.0421 21.7754 32.3615 22.2182 33.7862 22.3278C34.7107 22.399 35.6128 22.3249 36.4706 22.125L43.296 47.9966H38.0023L34.3631 30.551L34.1243 47.9966H28.7179L29.9729 30.9037L25.1116 47.9966H18.5614Z" fill="#F29200"/>
<path d="M37.1393 21.9408L47.9508 47.8899L47.9966 47.9966V35.9486L42.1928 25.9417L47.9966 31.3258V27.1936L44.3652 22.3332L47.9966 24.1389V20.958L42.3201 17.5631C41.2466 19.6463 39.3752 21.2291 37.1393 21.9408Z" fill="#F29200"/>
<path d="M39.354 0L37.3687 5.17821C36.6654 4.93366 35.92 4.77463 35.1429 4.71485C33.8666 4.61646 32.6327 4.79494 31.5003 5.19938L30.2449 0H32.8212L33.4175 2.2147L33.5008 0H35.8676L35.6957 2.84968L36.5784 0H39.354Z" fill="#F29200"/>
<path d="M31.0527 5.37242L28.9487 0H25.8942L27.0134 2.51102L24.9927 0H20.9577L24.293 3.64883L19.1486 0H11.1988L26.881 8.99094C27.8492 7.37346 29.3156 6.10179 31.0527 5.37242Z" fill="#F29200"/>
<path d="M5.74311 0L26.6216 9.4543C26.0904 10.4774 25.7521 11.6215 25.6579 12.8431C25.597 13.6337 25.6428 14.4077 25.7821 15.1516L0 22.0861V15.964L16.8458 13.6955L0 12.6197V7.56538L18.0228 9.90651L0 4.71485V0H5.74311Z" fill="#F29200"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,26 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M37.1744 37.7057C33.8627 40.8919 29.4415 42.6735 24.8459 42.6735C17.5069 42.6735 10.8889 38.1299 8.25192 31.2811C8.20182 31.1458 8.08592 31.045 7.94502 31.0143C7.80512 30.9789 7.65642 31.0172 7.55122 31.1159L0.142316 37.8772C0.0544163 37.9553 0.0030163 38.0666 0.000416301 38.1841C-0.0047837 38.3014 0.0389163 38.4157 0.121116 38.4995C4.88082 43.5252 11.506 46.3756 18.4279 46.3756C26.0847 46.3756 33.339 42.8878 38.1206 36.9076C38.1301 36.8964 38.1353 36.8821 38.1353 36.8674C38.1353 36.8332 38.1072 36.8051 38.073 36.8051C38.0547 36.8051 38.0372 36.8132 38.0254 36.8272C37.753 37.1236 37.4693 37.4164 37.1744 37.7057ZM27.7481 14.2129C35.3329 16.4055 40.5915 23.3996 40.5915 31.295C40.5915 35.3625 39.1958 39.3095 36.6388 42.4728C36.5461 42.5839 36.5165 42.7351 36.5605 42.8729C36.5999 43.0119 36.7079 43.1215 36.8463 43.1629L46.406 46.1964C46.4483 46.2096 46.4924 46.2163 46.5367 46.2163C46.7296 46.2163 46.9008 46.089 46.9564 45.9042C47.6485 43.5737 48 41.1553 48 38.7242C48 26.3166 38.8436 15.66 26.5775 13.7917C26.5463 13.7862 26.5158 13.8056 26.5076 13.8361C26.5061 13.8415 26.5054 13.8471 26.5054 13.8527C26.5054 13.882 26.5257 13.9076 26.5542 13.9144C26.955 13.9991 27.3529 14.0986 27.7481 14.2129ZM12.1173 34.124C11.7725 32.7285 11.5982 31.2963 11.5982 29.8588C11.5982 20.1042 19.625 12.0773 29.3797 12.0773C30.3042 12.0773 31.2273 12.1494 32.1405 12.2929C32.1618 12.2961 32.1833 12.2976 32.2047 12.2976C32.4463 12.2976 32.645 12.0989 32.645 11.8573C32.645 11.8273 32.642 11.7974 32.6359 11.768L30.483 1.97327C30.459 1.85857 30.3885 1.75887 30.2883 1.69807C30.1894 1.63397 30.0681 1.61397 29.9538 1.64307C18.6456 4.34577 10.6028 14.5373 10.6028 26.1641C10.6028 29.3048 11.1897 32.4181 12.3332 35.3433C12.3449 35.3725 12.3767 35.3889 12.4073 35.3814C12.4343 35.3744 12.4533 35.3499 12.4533 35.322C12.4533 35.3148 12.4521 35.3077 12.4496 35.301C12.3268 34.9157 12.2146 34.5198 12.1173 34.124Z" fill="#832D6A"/>
<path d="M31.8124 11.2112L29.9221 2.61677C29.9086 2.55047 29.8679 2.49287 29.8099 2.45807C29.7526 2.42177 29.6824 2.41167 29.6172 2.43047C19.0726 5.18177 11.5667 14.646 11.2896 25.5402C11.2883 25.5724 11.3126 25.6004 11.3446 25.6037C11.3759 25.6088 11.406 25.5881 11.4124 25.5571C13.5872 16.4988 22.2871 10.4286 31.5393 11.5139C31.5491 11.5151 31.5589 11.5157 31.5687 11.5157C31.7057 11.5157 31.8185 11.4029 31.8185 11.2659C31.8185 11.2475 31.8164 11.2292 31.8124 11.2112Z" fill="url(#paint0_radial_1188_2761)"/>
<path d="M37.7419 42.7269L46.1289 45.3877C46.1532 45.3954 46.1786 45.3992 46.2041 45.3992C46.3163 45.3992 46.4157 45.3242 46.4464 45.2163C49.3292 34.7108 44.8865 23.4845 35.5954 17.7967C35.5862 17.7918 35.576 17.7892 35.5655 17.7892C35.5307 17.7892 35.502 17.8179 35.502 17.8528C35.502 17.8689 35.5082 17.8845 35.5192 17.8962C42.2744 24.3098 43.181 34.8775 37.617 42.3479C37.5687 42.4129 37.5553 42.4977 37.581 42.5744C37.6074 42.6479 37.6672 42.7045 37.7419 42.7269Z" fill="url(#paint1_radial_1188_2761)"/>
<path d="M7.48569 32.1044L0.986987 38.0316C0.935287 38.0763 0.905287 38.1411 0.90434 38.2094C0.903087 38.2772 0.929087 38.3428 0.976387 38.3915C8.63319 46.1454 20.5812 47.9128 30.155 42.7077C30.1841 42.6927 30.1963 42.6569 30.1825 42.6273C30.1708 42.5982 30.1386 42.5825 30.1085 42.5913C21.176 45.237 11.5687 40.7381 7.88159 32.1827C7.85099 32.1083 7.78479 32.0541 7.70589 32.0388C7.62609 32.0204 7.54239 32.0454 7.48569 32.1044Z" fill="url(#paint2_radial_1188_2761)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M24.2643 20.0035C29.0543 19.2226 33.5771 22.4774 34.3581 27.2674C35.139 32.0573 31.8842 36.5802 27.0943 37.3611C22.3043 38.1421 17.7814 34.8873 17.0005 30.0973C16.2195 25.3074 19.4743 20.7845 24.2643 20.0035Z" fill="#FAA61A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M33.2945 25.8627C31.7411 21.6589 27.067 19.507 22.8631 21.0604C18.6592 22.6138 16.5074 27.288 18.0608 31.4918C19.6142 35.6957 24.2883 37.8475 28.4922 36.2941C32.696 34.7407 34.8479 30.0666 33.2945 25.8627Z" fill="url(#paint3_radial_1188_2761)"/>
<defs>
<radialGradient id="paint0_radial_1188_2761" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(18.5001 12) rotate(-27.4744) scale(14.089 15.191)">
<stop stop-color="#EC008C" stop-opacity="0.407843"/>
<stop offset="1" stop-color="#621A4F"/>
</radialGradient>
<radialGradient id="paint1_radial_1188_2761" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(46.0001 34) rotate(-92.7263) scale(10.5119 55.1984)">
<stop stop-color="#EC008C" stop-opacity="0.407843"/>
<stop offset="1" stop-color="#621A4F"/>
</radialGradient>
<radialGradient id="paint2_radial_1188_2761" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(13.0001 43.5) rotate(19.179) scale(12.1758 11.458)">
<stop stop-color="#EC008C" stop-opacity="0.407843"/>
<stop offset="1" stop-color="#621A4F"/>
</radialGradient>
<radialGradient id="paint3_radial_1188_2761" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(21.9706 24.4218) rotate(180) scale(11.9031)">
<stop stop-color="#FFE293"/>
<stop offset="1" stop-color="#FAA61A"/>
</radialGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 48H48V0H0V48ZM6.858 41.1419H41.142V6.8549H6.858V41.1419ZM39.822 30.855V23.472L24 17.142L8.178 23.472V30.855L24 24.528L39.822 30.855Z" fill="#EC520D"/>
</svg>

After

Width:  |  Height:  |  Size: 306 B

View File

@@ -0,0 +1,7 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M24.0562 0L29.3514 5.30122L16.07 18.6517C12.1662 22.5775 5.51193 20.9559 2.98928 15.2263C3.16135 15.2417 3.33312 15.2578 3.50452 15.2738C5.96623 15.5044 8.34974 15.7276 10.3953 13.6423L24.0562 0Z" fill="#029A4C"/>
<path d="M5.29521 18.7098L0 24.0118L13.6269 37.6874C15.7102 39.7364 15.4868 42.1231 15.2561 44.5871C15.2401 44.7582 15.224 44.9297 15.2087 45.1014C20.9326 42.5767 22.5523 35.9156 18.6306 32.0063L5.29521 18.7098Z" fill="#029A4C"/>
<path d="M18.6822 42.6992L23.9782 48L37.6379 34.3581C39.6848 32.2721 42.0692 32.4958 44.5308 32.7267C44.7014 32.7427 44.8723 32.7588 45.0435 32.7741C42.5221 27.0441 35.8677 25.4225 31.9632 29.3483L18.6822 42.6992Z" fill="#029A4C"/>
<path d="M42.7048 29.2786L48 23.9766L34.3731 10.3014C32.29 8.25266 32.5132 5.86586 32.7435 3.40245C32.7595 3.23111 32.7756 3.05939 32.7909 2.88739C27.0678 5.4117 25.4481 12.0736 29.3694 15.9825L42.7048 29.2786Z" fill="#029A4C"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.5 24.0016C16.5 19.8599 19.8583 16.5 24.0006 16.5C28.1413 16.5 31.5 19.8599 31.5 24.0016C31.5 28.1443 28.1413 31.5 24.0002 31.5C19.8583 31.5 16.5 28.1424 16.5 24.0016Z" fill="#EB8C30"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M48 6.72645C44.2222 8.25801 40.7496 10.2779 38.0695 13.5687C32.2512 19.7525 28.2295 28.371 25.938 39.303C25.892 39.5239 25.4116 39.1736 25.3533 39.3942C20.4047 37.2301 16.7788 30.3794 14.9909 22.9913C14.4049 20.5702 13.7435 17.9964 12.7254 15.5809C16.7115 14.4809 20.9373 16.9888 25.4527 23.8507C26.5463 20.0645 34.0037 9.00482 34.0037 9.00482L34.0826 8.71185C30.4651 5.47102 25.6909 3.5 20.4576 3.5C9.16124 3.5 0 12.6802 0 24.0001C0 35.3198 9.16124 44.5 20.4576 44.5C34.2479 44.5 39.3127 34.4384 42.8518 23.5629C44.5677 17.951 45.9549 11.9266 48 6.72645Z" fill="#209B1C"/>
</svg>

After

Width:  |  Height:  |  Size: 726 B

View File

@@ -0,0 +1,8 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.2753 10.5665C15.6056 11.3119 15.4029 11.7524 15.3673 12.5386C15.3265 13.4441 15.3783 13.5834 16.3744 15.2538C17.1669 16.5832 17.3336 16.6959 17.9155 16.2986C18.0557 16.2029 18.3683 15.9888 18.6098 15.823C19.6719 15.0937 21.0933 14.5381 22.4589 14.3189C23.6409 14.1291 23.6535 14.0941 23.1954 12.2471C22.8036 10.666 22.7162 10.4673 22.1699 9.91431C21.4289 9.16466 20.3776 8.87394 19.0389 9.04973C17.9534 9.19225 17.0788 9.67236 16.2753 10.5665ZM24.8473 12.1564C24.3529 14.0685 24.3725 14.1275 25.5643 14.3189C27.1493 14.5735 28.7027 15.2387 29.9476 16.1959C30.4398 16.5747 30.8427 16.5601 31.1111 16.1546C32.7775 13.6351 33.0471 12.4539 32.2408 11.2058C31.19 9.57974 29.5466 8.81497 27.6163 9.05351C26.0402 9.24896 25.4188 9.94493 24.8473 12.1564ZM9.36653 21.4117C9.80382 22.3393 10.3886 22.7022 12.1756 23.1539C14.0485 23.6273 14.1703 23.5951 14.3067 22.5945C14.5173 21.05 15.1624 19.4864 16.1364 18.1598C16.759 17.3118 16.7126 17.2171 15.2416 16.3374C13.4341 15.2564 12.8509 15.1041 11.8384 15.449C9.65985 16.1916 8.37136 19.2997 9.36653 21.4117ZM32.7816 16.3374C31.3169 17.2136 31.2629 17.3213 31.8745 18.1488C32.8397 19.4547 33.4838 21.0169 33.7187 22.6235C33.8604 23.5925 33.9763 23.6216 35.8312 23.1567C37.8999 22.6381 38.5798 22.1015 38.8777 20.7529C39.5272 17.8149 37.126 14.7747 34.6412 15.389C34.2361 15.4888 33.9924 15.6132 32.7816 16.3374ZM9.93769 25.8296C7.42606 28.3534 10.4005 33.6737 13.6731 32.5102C14.0703 32.3687 16.2349 31.1012 16.364 30.9342C16.5866 30.6461 16.525 30.3524 16.1319 29.8243C15.1911 28.5616 14.505 26.8905 14.3026 25.3691C14.1735 24.3988 14.0213 24.3578 12.2507 24.8139C10.6298 25.2314 10.458 25.3066 9.93769 25.8296ZM33.7228 25.3287C33.4875 26.9672 32.8545 28.5126 31.8673 29.8584C31.2573 30.69 31.3052 30.781 32.834 31.6922C35.1205 33.0544 36.0652 33.0405 37.5545 31.6224C39.5609 29.7112 39.4592 26.2152 37.3704 25.2835C37.1285 25.1758 34.4834 24.4674 34.3552 24.4762C34.3388 24.4772 34.2522 24.51 34.1632 24.5489C33.8958 24.6654 33.7916 24.8502 33.7228 25.3287ZM15.8652 33.59C14.9972 35.101 15.1753 36.3239 16.4521 37.616C18.3866 39.5742 21.7576 39.4283 22.7291 37.3444C22.8693 37.0431 23.5118 34.5852 23.5115 34.3509C23.5109 33.9937 23.2488 33.8083 22.5978 33.7043C20.9588 33.4422 19.4443 32.8184 18.1915 31.8889C17.7229 31.5415 17.423 31.4546 17.1574 31.5892C17.0438 31.647 16.4805 32.519 15.8652 33.59ZM25.5113 33.687C24.3867 33.8534 24.3637 33.9235 24.83 35.7687C25.2256 37.3333 25.3326 37.5743 25.8668 38.1043C28.0059 40.2257 32.6689 38.2916 32.6761 35.2797C32.678 34.5208 32.3898 33.8803 31.1872 31.971C30.8414 31.4218 30.5058 31.3748 29.9533 31.7983C28.7109 32.7509 27.0426 33.4602 25.5113 33.687Z" fill="#FF7F31"/>
<path d="M24 0C17.8376 0 12.7329 4.56461 11.8855 10.4943C15.0932 7.5817 19.3422 5.80723 24 5.80723C28.6578 5.80723 32.9068 7.5817 36.1145 10.4943C35.2671 4.56461 30.1624 0 24 0Z" fill="#37389A"/>
<path d="M10.5115 11.883C7.65097 15.1013 5.91107 19.3479 5.91107 24C5.91107 28.6521 7.65097 32.8987 10.5115 36.117C4.57344 35.2771 0 30.1684 0 24C0 17.8316 4.57344 12.7229 10.5115 11.883Z" fill="#37389A"/>
<path d="M48 24C48 17.8316 43.4266 12.7229 37.4885 11.883C40.3492 15.1013 42.0891 19.3479 42.0891 24C42.0891 28.6521 40.3492 32.8987 37.4885 36.117C43.4266 35.2771 48 30.1684 48 24Z" fill="#37389A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.2193 15.0273C17.5777 15.4486 13.7217 21.1778 15.3931 26.655C17.6336 33.9953 27.5691 35.3069 31.6138 28.7963C35.5316 22.4896 30.6442 14.4726 23.2193 15.0273ZM23.2885 28.8268C23.336 28.9512 23.3237 31.0314 23.2751 31.0616C23.1342 31.149 21.4657 28.9386 21.5586 28.7876C21.6105 28.7036 23.2557 28.741 23.2885 28.8268ZM29.7134 28.8002C29.8402 29.0056 28.2192 30.2666 27.1771 30.7734C26.3618 31.1696 26.3242 31.1555 26.7209 30.6033C27.0959 30.0809 27.4956 29.4224 27.6735 29.0328L27.8037 28.7481H28.7425C29.342 28.7481 29.6931 28.767 29.7134 28.8002ZM19.9131 28.7481H19.1035C18.4509 28.7481 18.2936 28.7613 18.2936 28.8163C18.2936 29.1342 20.7257 30.9409 21.1534 30.9409C21.2194 30.9409 21.1496 30.8155 20.751 30.2175C20.5155 29.8641 20.2304 29.3889 20.1179 29.1617L19.9131 28.7481ZM25.4301 28.7481H24.7119V29.7681C24.7119 30.5653 24.7253 30.7824 24.774 30.7611C24.9626 30.6795 26.2355 28.8887 26.1749 28.7903C26.1606 28.767 25.8255 28.7481 25.4301 28.7481ZM23.2945 24.7736C23.3094 24.8351 23.3154 25.435 23.3079 26.1066L23.2939 27.3278L20.8346 27.3544L20.7083 26.9391C20.4785 26.1849 20.2361 24.8289 20.3095 24.7098C20.3277 24.6802 20.9101 24.6614 21.803 24.6614H23.267L23.2945 24.7736ZM18.3151 27.3526C18.8778 27.3526 19.3381 27.3359 19.3381 27.3152C19.3381 27.2946 19.2719 27.0159 19.1913 26.696C19.059 26.1721 18.9148 25.3252 18.879 24.8609L18.8656 24.6862L17.7428 24.6731C17.1254 24.6656 16.6048 24.6749 16.586 24.6937C16.4433 24.8369 16.7649 26.2062 17.1258 26.9914L17.292 27.3526H18.3151ZM26.8881 27.3526L27.0472 26.8075C27.252 26.1051 27.3899 25.4188 27.4088 25.0104L27.4234 24.6862L26.1015 24.6731C25.3746 24.6659 24.7644 24.6752 24.7456 24.6937C24.7271 24.7126 24.7119 25.3184 24.7119 26.0402V27.3526H26.8881ZM30.7221 27.3526L30.9006 26.9253C31.1761 26.266 31.5081 24.912 31.4403 24.7236C31.4152 24.6539 28.916 24.6297 28.8748 24.6988C28.8626 24.7194 28.8372 24.8818 28.8184 25.06C28.759 25.6252 28.5912 26.5856 28.4906 26.9375C28.4372 27.1245 28.3936 27.2943 28.3936 27.3149C28.3936 27.3359 28.9175 27.3526 29.5578 27.3526H30.7221ZM23.2885 20.5041C23.3049 20.5475 23.3187 21.1623 23.3187 21.8706C23.3187 22.5787 23.3049 23.1935 23.2885 23.2369C23.2527 23.3305 20.3662 23.3592 20.3089 23.2668C20.1895 23.073 20.7537 20.587 20.9451 20.4649C21.0752 20.3821 23.2557 20.4186 23.2885 20.5041ZM18.3703 20.4252H17.3989L17.2054 20.8115C16.86 21.5011 16.4696 22.9788 16.5663 23.2315C16.5965 23.3104 16.6965 23.3164 17.7309 23.3041L18.8626 23.291L18.9205 22.7677C18.9895 22.144 19.1026 21.5699 19.2707 20.9889C19.3384 20.7544 19.3823 20.5317 19.3677 20.494C19.3468 20.439 19.1492 20.4252 18.3703 20.4252ZM26.8615 20.6246C27.0854 21.0833 27.5085 23.0368 27.429 23.2447C27.4052 23.3065 27.2007 23.3155 26.069 23.3041L24.7366 23.291L24.7235 21.9212C24.716 21.1677 24.7211 20.5224 24.7346 20.4874C24.7536 20.4375 24.9823 20.4261 25.7678 20.4369L26.7765 20.4503L26.8615 20.6246ZM31.4535 23.291L31.4373 23.0915C31.3884 22.4914 31.0788 21.4033 30.7922 20.8235L30.6077 20.4503L28.3324 20.4234L28.3595 20.5613C28.3745 20.6372 28.4446 20.9236 28.5151 21.1979C28.6333 21.656 28.7336 22.2295 28.8294 22.992L28.8667 23.291H31.4535ZM23.3187 17.9323C23.3187 18.4768 23.3049 18.9576 23.2885 19.0009C23.2539 19.091 21.7087 19.1218 21.6541 19.0333C21.5729 18.902 23.1494 16.8378 23.2724 16.9141C23.2984 16.9299 23.3187 17.3764 23.3187 17.9323ZM28.645 19.0796C29.2315 19.0796 29.5435 19.0614 29.5656 19.0255C29.679 18.8416 28.0539 17.583 27.2225 17.2107L27.1898 17.1961C26.7362 16.9928 26.5184 16.8953 26.4801 16.9428C26.4447 16.9865 26.5621 17.1538 26.7879 17.4755L26.8054 17.5005C27.0204 17.807 27.3228 18.2878 27.4774 18.5689L27.758 19.0796H28.645ZM19.9838 19.0796L20.1647 18.7184C20.3289 18.3912 20.943 17.426 21.1111 17.2319C21.1487 17.1886 21.1791 17.127 21.1791 17.0947C21.1791 17.005 21.1439 17.0182 20.5472 17.3306C19.7104 17.7687 18.3252 18.8795 18.4214 19.0353C18.4363 19.0599 18.7939 19.0796 19.2163 19.0796H19.9838ZM25.0767 17.5334C25.511 18.062 26.1191 18.9857 26.0672 19.0377C26.0424 19.0625 25.7328 19.0766 25.3794 19.0688L24.7366 19.0548L24.7219 18.0335C24.7138 17.4862 24.7104 17.2541 24.7734 17.2344C24.8198 17.2199 24.9023 17.3205 25.0455 17.4954L25.0767 17.5334Z" fill="#37389A"/>
<path d="M36.1145 37.5057C35.2671 43.4354 30.1624 48 24 48C17.8376 48 12.7329 43.4354 11.8855 37.5057C15.0932 40.4185 19.3422 42.1929 24 42.1929C28.6578 42.1929 32.9068 40.4185 36.1145 37.5057Z" fill="#37389A"/>
</svg>

After

Width:  |  Height:  |  Size: 7.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 361 KiB

View File

@@ -0,0 +1,4 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M31.6217 45.8425C31.6217 45.581 31.5179 45.3303 31.3333 45.1454C31.1486 44.9604 30.8982 44.8566 30.637 44.8566C27.9656 44.8566 20.6029 44.8566 17.9315 44.8566C17.6704 44.8566 17.42 44.9604 17.2353 45.1454C17.0506 45.3303 16.9469 45.581 16.9469 45.8425C16.9469 46.2159 16.9469 46.6407 16.9469 47.0141C16.9469 47.2756 17.0506 47.5263 17.2353 47.7112C17.42 47.8962 17.6704 48.0001 17.9315 48C20.6029 48 27.9656 48 30.637 48C30.8982 48.0001 31.1486 47.8962 31.3333 47.7112C31.5179 47.5263 31.6217 47.2756 31.6217 47.0141C31.6217 46.6407 31.6217 46.2159 31.6217 45.8425ZM24.7296 30.9934C24.7296 30.9934 29.3642 25.7711 33.7567 23.3035C38.9397 20.3919 46.75 21.068 46.75 21.068C46.75 21.068 40.5383 22.9404 36.7921 28.432C33.4356 33.3523 31.3535 43.5296 31.3535 43.5296C31.3535 43.5296 28.2178 35.8893 24.7296 30.9934ZM29.5434 43.4203H16.9763C16.9763 43.4203 15.2266 41.1121 14.5823 37.9352C13.8847 34.4949 12.749 30.4091 10.993 28.1586C7.66886 23.8986 1.25 21.2491 1.25 21.2491C1.25 21.2491 13.3368 19.2479 20.7146 28.5492C24.2936 33.0613 29.5389 43.4108 29.5434 43.4203Z" fill="#002263"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M24 14.7728C27.32 14.7728 30.0154 17.5123 30.0154 20.8864C30.0154 24.2606 27.32 27 24 27C20.68 27 17.9846 24.2606 17.9846 20.8864C17.9846 17.5123 20.68 14.7728 24 14.7728ZM31.1295 18.519C33.4385 17.148 38.2546 14.3964 40.8542 13.6908C41.0727 13.6314 41.2923 13.6034 41.5083 13.604L41.5237 13.6041C42.6183 13.614 43.6174 14.3579 43.9144 15.4806C44.2713 16.8301 43.4796 18.2192 42.1476 18.5808C39.795 19.2194 35.0429 19.3264 32.1777 19.3278H32.0784C31.8146 19.3277 31.5676 19.3268 31.3413 19.3253C31.285 19.0508 31.2141 18.7817 31.1295 18.519ZM16.6587 19.3253C13.9831 19.343 8.4524 19.2865 5.85243 18.5808C4.52034 18.2192 3.72871 16.8301 4.08562 15.4806C4.44252 14.1312 5.81374 13.3292 7.14584 13.6908C9.74526 14.3964 14.5614 17.148 16.8703 18.519C16.7859 18.7817 16.715 19.0508 16.6587 19.3253ZM17.54 17.0157C14.9994 16.1605 9.78438 14.3068 7.54752 12.7924C6.40105 12.0162 6.09218 10.443 6.85838 9.28142C7.62469 8.11985 9.17762 7.80705 10.3242 8.58327C12.5606 10.0974 16.2452 14.2681 17.9976 16.3194C17.833 16.5424 17.6801 16.7748 17.54 17.0157ZM29.9575 16.2592C31.7033 14.2058 35.3828 10.0203 37.6177 8.49959C38.7625 7.72074 40.3161 8.0299 41.085 9.18959C41.8539 10.3494 41.5487 11.9233 40.4039 12.7023C38.1704 14.222 32.9593 16.0881 30.4208 16.9493C30.2786 16.7104 30.1238 16.4801 29.9575 16.2592ZM19.1239 15.0977C16.9928 13.4521 12.6594 9.98827 11.03 7.82236C10.194 6.71122 10.4058 5.12158 11.5026 4.27479C12.5994 3.42789 14.1686 3.64248 15.0044 4.75362C16.6332 6.91865 18.78 12.0665 19.7819 14.5857C19.5532 14.7441 19.3336 14.9152 19.1239 15.0977ZM28.1827 14.5612C29.1819 12.0516 31.3405 6.87901 32.9759 4.70804C33.8125 3.59745 35.3818 3.38396 36.478 4.23152C37.5743 5.07908 37.7851 6.66883 36.9485 7.77942C35.3136 9.94962 30.9607 13.4222 28.8342 15.0616C28.6264 14.8833 28.409 14.7161 28.1827 14.5612ZM21.2093 13.8109C19.7102 11.5564 16.7087 6.8756 15.8522 4.29769C15.4124 2.97361 16.1163 1.53679 17.4233 1.09121C18.7303 0.645523 20.1486 1.35865 20.5884 2.68273C21.4447 5.26008 21.8479 10.8249 21.9995 13.5396C21.7298 13.6153 21.4661 13.7062 21.2093 13.8109ZM25.9992 13.5391C26.1502 10.8245 26.5525 5.25964 27.4083 2.68217C27.8481 1.35799 29.2661 0.644642 30.5732 1.09C31.8802 1.53547 32.5845 2.97207 32.1448 4.29626C31.2888 6.87439 28.2882 11.5557 26.7894 13.8104C26.5327 13.7057 26.2689 13.615 25.9992 13.5391ZM23.5825 13.2765C22.8714 10.6546 21.5013 5.25062 21.5013 2.53134C21.5013 1.13426 22.621 0 24 0C25.379 0 26.4986 1.13426 26.4986 2.53134C26.4986 5.25062 25.1286 10.6546 24.4176 13.2765C24.2793 13.2688 24.1401 13.2649 24 13.2649C23.8599 13.2649 23.7207 13.2688 23.5825 13.2765Z" fill="#0BBBB9"/>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -0,0 +1,4 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M44.8424 48H24.759V28.3586C25.0278 25.1931 25.504 22.2777 26.6719 20.1967C27.3661 20.5863 28.6052 22.309 28.9748 25.6423C29.8808 24.0063 30.9841 22.1722 32.9859 21.009C33.1208 24.6194 32.9059 25.9932 31.8941 28.5066C30.4737 32.0352 26.5648 32.8567 26.5648 32.8567V46.1942H43.0366C43.0366 35.3391 43.2414 24.482 43.0349 13.6288C43.0314 13.5199 43.0253 13.4114 43.0163 13.3028C42.9664 12.7787 42.8425 12.2655 42.6372 11.7802C42.1321 10.586 41.1668 9.61258 39.9814 9.09348L39.9798 9.09278C40.3376 8.54468 40.7033 8.05138 41.0651 7.60928C41.7129 7.93868 42.3081 8.37028 42.8225 8.88468C43.5494 9.61148 44.1109 10.4997 44.4525 11.4694C44.7121 12.2065 44.8375 12.9804 44.8424 13.7611V48ZM23.2406 48H3.15723V13.7611C3.16213 12.9804 3.28753 12.2065 3.54713 11.4694C3.88873 10.4997 4.45023 9.61148 5.17713 8.88468C5.69153 8.37028 6.28673 7.93868 6.93453 7.60928C7.29633 8.05138 7.66203 8.54468 8.01983 9.09278L8.01823 9.09348C6.83283 9.61258 5.86753 10.586 5.36243 11.7802C5.15713 12.2655 5.03323 12.7787 4.98333 13.3028C4.97433 13.4114 4.96823 13.5199 4.96473 13.6288C4.75823 24.482 4.96303 35.3391 4.96303 46.1942H21.4348V32.8567C21.4348 32.8567 17.5259 32.0352 16.1055 28.5066C15.0937 25.9932 14.8788 24.6194 15.0137 21.009C17.0155 22.1722 18.1188 24.0063 19.0248 25.6423C19.3944 22.309 20.6335 20.5863 21.3277 20.1967C22.4956 22.2777 22.9718 25.1931 23.2406 28.3586V48ZM31.5894 1.22858C31.5728 1.39288 31.5503 1.55668 31.5216 1.71978C31.4814 1.94828 31.4299 2.17458 31.368 2.39808C30.8586 4.23768 29.6746 5.80258 28.39 7.17788C28.1515 7.43318 27.9078 7.68358 27.6618 7.93158C27.4301 8.16508 27.1961 8.39638 26.9624 8.62778C27.3443 9.74838 27.785 10.8487 28.2795 11.9243C28.4811 12.3627 28.6921 12.7964 28.9109 13.2262C29.5314 12.2664 30.2174 11.3488 30.9596 10.4814C31.5253 9.82038 32.1248 9.18708 32.7566 8.58788C32.2779 7.67898 32.0034 6.67228 31.8287 5.66258C31.576 4.20118 31.5269 2.71008 31.5894 1.22858ZM16.4102 1.22858C16.4268 1.39288 16.4493 1.55668 16.478 1.71978C16.5182 1.94828 16.5697 2.17458 16.6316 2.39808C17.141 4.23768 18.325 5.80258 19.6096 7.17788C19.8481 7.43318 20.0918 7.68358 20.3378 7.93158C20.5695 8.16508 20.8035 8.39638 21.0372 8.62778C20.6553 9.74838 20.2146 10.8487 19.7201 11.9243C19.5185 12.3627 19.3075 12.7964 19.0887 13.2262C18.4682 12.2664 17.7822 11.3488 17.04 10.4814C16.4743 9.82038 15.8748 9.18708 15.243 8.58788C15.7217 7.67898 15.9962 6.67228 16.1709 5.66258C16.4236 4.20118 16.4727 2.71008 16.4102 1.22858Z" fill="#B27D53"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M42.9818 4.55519C39.8094 6.84139 36.0987 11.8376 35.6614 17.095C35.3053 21.3773 34.5736 23.2484 34.0272 24.0496C34.2693 22.6058 34.2678 20.6425 33.9967 19.0596C33.3904 19.3279 32.3842 19.9462 31.4629 20.8622C31.3484 20.4876 30.4083 18.5632 27.3114 19.4166C27.4604 18.9371 27.6247 18.4628 27.8075 17.9947C28.2448 16.875 28.7742 15.7915 29.3832 14.7543C29.3873 14.7476 29.3912 14.7409 29.395 14.7341C30.0506 13.6199 30.798 12.5594 31.6215 11.565C32.3218 10.7192 33.0794 9.91889 33.8905 9.17739C33.9148 9.15859 33.9377 9.13769 33.9591 9.11489C34.55 8.57909 35.1691 8.07449 35.8147 7.60629C37.6224 6.29539 39.6636 5.24999 41.8509 4.75539C42.225 4.67089 42.6021 4.60509 42.9818 4.55519ZM5.01855 4.55519C8.19095 6.84139 11.9017 11.8376 12.339 17.095C12.6951 21.3773 13.4268 23.2484 13.9732 24.0496C13.7311 22.6058 13.7326 20.6425 14.0037 19.0596C14.61 19.3279 15.6162 19.9462 16.5375 20.8622C16.652 20.4876 17.5921 18.5632 20.689 19.4166C20.54 18.9371 20.3757 18.4628 20.1929 17.9947C19.7556 16.875 19.2262 15.7915 18.6172 14.7543C18.6131 14.7476 18.6092 14.7409 18.6054 14.7341C17.9498 13.6199 17.2024 12.5594 16.3789 11.565C15.6786 10.7192 14.921 9.91889 14.1099 9.17739C14.0856 9.15859 14.0627 9.13769 14.0413 9.11489C13.4504 8.57909 12.8313 8.07449 12.1857 7.60629C10.378 6.29539 8.33675 5.24999 6.14945 4.75539C5.77535 4.67089 5.39825 4.60509 5.01855 4.55519ZM25.918 19.8861C25.5707 19.6322 25.0212 19.176 23.9875 19.1792C22.9537 19.1825 22.4175 19.6411 22.0824 19.8861C21.8244 18.2621 20.7577 16.314 19.8205 14.4305C20.2413 13.635 21.4994 10.869 21.8351 9.82179C22.7266 7.04109 23.5045 3.63249 24.0002 1.79459C24.4766 3.63759 25.255 7.16369 26.1653 9.82179C26.5216 10.8622 27.7591 13.635 28.1799 14.4305C27.2427 16.314 26.176 18.2621 25.918 19.8861ZM32.9309 3.22739C33.1708 1.32319 35.322 1.18269 36.6485 1.62689C38.5547 2.26529 39.2122 4.04589 37.6811 5.03469C36.9422 5.51189 36.1484 5.90119 35.4299 6.40259C34.8264 6.82379 34.2443 7.27519 33.6845 7.75299L33.6755 7.73329C33.0308 5.66069 32.7969 4.29069 32.9309 3.22739ZM15.0695 3.22739C14.8296 1.32319 12.6784 1.18269 11.3519 1.62689C9.44565 2.26529 8.78815 4.04589 10.3193 5.03469C11.0582 5.51189 11.852 5.90119 12.5705 6.40259C13.174 6.82379 13.7561 7.27519 14.3159 7.75299L14.3249 7.73329C14.9696 5.66069 15.2035 4.29069 15.0695 3.22739ZM25.4583 2.33879C25.2374 0.834591 26.8117 -0.146709 27.9378 0.0179909C28.6779 0.126191 30.6865 0.639091 30.1219 2.36189C29.9018 3.03359 29.5743 3.66849 29.1899 4.26089C28.5169 5.29789 27.673 6.20649 26.8076 7.08359C26.7226 7.16879 26.6374 7.25379 26.5522 7.33869C26.2175 6.21039 25.9414 5.06489 25.7215 3.90869C25.6223 3.38719 25.5354 2.86379 25.4583 2.33879ZM22.5421 2.33879C22.763 0.834591 21.1887 -0.146709 20.0626 0.0179909C19.3225 0.126191 17.3139 0.639091 17.8785 2.36189C18.0986 3.03359 18.4261 3.66849 18.8105 4.26089C19.4835 5.29789 20.3274 6.20649 21.1928 7.08359C21.2778 7.16879 21.363 7.25379 21.4482 7.33869C21.7829 6.21039 22.059 5.06489 22.2789 3.90869C22.3781 3.38719 22.465 2.86379 22.5421 2.33879Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 5.6 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M27.0228 0.207397C38.7799 1.69567 47.9221 11.7751 47.9221 23.9205C47.9221 37.0854 37.1806 47.8228 24.0106 47.8228C10.8408 47.8228 0.0991211 37.0854 0.0991211 23.9205C0.0991211 20.4976 0.825267 17.2388 2.13144 14.2901L3.36737 15.8788L3.43927 15.9674C3.43927 15.9674 3.67421 16.2445 3.9535 16.4859C4.20889 16.7037 4.53618 16.9 4.76667 16.9947C4.94267 17.0655 5.11745 17.1264 5.30115 17.1619C6.11026 17.3207 6.94044 17.3112 7.54135 17.2838C8.01932 17.2622 8.35998 17.2356 8.35998 17.2356C11.4844 17.0897 12.6798 18.4977 13.4925 19.4559C14.2377 20.332 21.5292 30.0433 21.5292 30.0433L25.1545 26.4146C25.1545 26.4146 22.1105 22.5349 20.76 20.7956C19.2503 18.8522 18.1566 17.4554 17.4893 16.8919C16.0315 15.6635 12.8074 15.5178 12.0693 15.391C12.0693 15.391 9.34773 15.0584 7.72363 13.3933C7.34125 13.0013 7.07613 12.655 7.07613 12.655L4.74384 9.79132C5.34114 8.9802 5.98835 8.20788 6.68087 7.47895L9.19623 10.7176C9.68697 11.3435 9.95492 11.7065 10.4507 12.2006C11.7135 13.4605 13.4976 13.6309 13.4976 13.6309C17.2187 14.3005 19.2507 14.477 20.4301 15.843C21.8453 17.481 22.1188 17.8557 23.3016 19.3802C23.7374 19.9419 27.1576 24.4122 27.1576 24.4122L30.6705 20.893C30.6705 20.893 28.4214 17.9963 27.115 16.2796C26.4758 15.4388 25.4632 14.1264 24.7166 13.5908C23.1772 12.4888 21.8071 12.6524 20.411 12.5045C19.2118 12.3765 18.1056 12.3521 16.6672 11.6676C16.6672 11.6676 16.0452 11.5292 14.7614 9.87603C13.4759 8.22426 13.1156 7.74527 13.1156 7.74527L10.36 4.31409C11.1712 3.74755 12.0189 3.22994 12.8988 2.7656L15.6143 6.28651L16.9704 8.05344C18.9242 10.5472 20.1874 10.5759 21.4895 10.7289C23.5553 10.9738 25.5004 10.8431 27.1827 12.1111C28.1562 12.8444 28.665 13.6224 29.3653 14.5242C30.4228 15.8849 32.7021 18.849 32.7021 18.849L36.218 15.3287C36.218 15.3287 34.1939 12.7133 33.4075 11.7196C33.1466 11.3911 32.6984 10.9748 32.0347 10.5442C30.9856 9.86191 29.9383 9.65216 27.2517 9.25566C24.566 8.85956 23.6928 8.39347 22.4238 7.00591C21.8172 6.34218 21.4812 5.87125 21.0727 5.34487L17.5556 0.905297C18.6523 0.596809 19.7806 0.364865 20.9341 0.215643L23.3305 3.52248C24.1348 4.49781 24.8521 5.76759 26.8941 6.67697C29.3514 7.77109 31.2074 7.51455 32.8896 7.94917C32.8896 7.94917 33.3479 8.0607 33.8526 8.28214C34.3879 8.51831 34.7363 8.87085 35.0711 9.2486C35.6272 9.87603 36.1143 10.4877 36.2257 10.6317C36.2486 10.6602 38.3114 13.231 38.3114 13.231L41.7862 9.75361C41.7862 9.75361 40.984 8.72887 40.3476 7.92456C39.9537 7.42702 39.7822 7.24772 39.4516 7.04584C39.1902 6.88671 38.8623 6.72819 38.4197 6.62352C37.9144 6.50574 37.2248 6.41841 36.0351 6.37041C32.9022 6.24577 31.7447 5.9967 29.751 3.61001L28.2717 1.81626L27.0228 0.207397Z" fill="#14763E"/>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M24 33C27.3115 33 30 35.6885 30 39C30 42.3115 27.3115 45 24 45C20.6885 45 18 42.3115 18 39C18 35.6885 20.6885 33 24 33ZM43.3688 31.4694H4.63139C1.71992 28.2209 0 24.2141 0 19.8814C0 15.7982 1.52747 12.0046 4.14019 8.86217H17.4267C12.6687 10.9244 9.40335 15.1541 9.40335 20.0323C9.40335 24.0416 11.6091 27.613 15.0366 29.9028H32.9634C36.3909 27.6128 38.5966 24.0416 38.5966 20.0323C38.5966 15.1541 35.3313 10.9244 30.5733 8.86217H43.8598C46.4724 12.0046 48 15.7982 48 19.8814C48 24.2141 46.28 28.2208 43.3688 31.4694ZM25.4242 25.6073H11.9724C17.084 23.6603 20.6523 19.2695 20.6523 14.1701C20.6523 9.29192 17.3869 5.0621 12.6289 3H25.9154C28.5282 6.14248 30.0556 9.93604 30.0556 14.0192C30.0556 18.3518 28.3358 22.3586 25.4242 25.6073Z" fill="#173576"/>
</svg>

After

Width:  |  Height:  |  Size: 904 B

View File

@@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.97283 41.1385C4.15453 40.6981 2.40183 39.5394 1.03703 37.199C-1.36707 33.076 0.946326 29.0071 2.56393 26.2216C-2.39077 36.5545 4.30513 39.7162 12.2331 32.7572C12.2331 32.7572 21.9412 23.0373 24.6541 20.3211C25.9084 19.0653 27.7771 18.2329 29.6363 18.4494C32.411 18.7726 34.2759 20.3551 35.3979 20.8361C36.134 21.1518 36.8017 20.6904 36.5483 20.0789C36.2903 19.4562 35.7411 18.7919 34.7013 17.7507C31.6171 14.6621 27.8322 11.0606 27.8322 11.0606C25.6314 8.94263 24.7547 7.01434 24.875 5.1194C25.0657 2.1162 27.8554 0.32901 29.7377 0.25C28.5942 1.6112 28.6931 2.77402 29.363 3.6213C29.363 3.6213 39.933 14.2061 40.1938 14.4672C41.531 15.8063 43.2504 21.3919 38.3612 22.8512C37.7723 23.027 37.1855 23.0157 36.5181 22.8226C34.7787 22.3192 32.1454 21.8404 30.3506 23.6056C27.112 26.7907 16.724 37.2934 15.8188 38.1577C14.9136 39.022 12.1832 41.1694 8.28033 41.3471C9.21513 44.6564 13.7358 44.2211 19.0356 39.5691C19.0356 39.5691 28.7437 29.8492 31.4565 27.1331C32.7109 25.8772 34.5673 25.2332 36.4387 25.2614C37.811 25.2821 38.8101 25.6475 39.5722 26.197C41.1198 27.3129 41.6719 28.3755 41.8946 29.5603C40.0937 28.5152 38.9479 28.6523 37.1531 30.4175C34.5552 32.9726 27.715 39.8505 25.1102 42.4718C25.1242 42.7472 25.2139 42.9949 25.4403 43.168C26.2393 43.7789 28.0772 43.7909 28.9453 42.9218C32.0331 39.8301 36.7184 35.1392 38.4741 33.3814C39.7284 32.1255 41.3561 31.3826 43.2276 31.4109C44.5998 31.4316 45.1138 31.7422 45.8759 32.2916C47.4235 33.4075 47.7772 34.8576 48 36.0424C46.3746 34.8944 45.4823 35.3758 44.1706 36.6658C42.273 38.5321 38.1119 42.705 34.9913 45.8405C33.9059 46.9311 31.0771 48.335 27.8784 47.2018C26.0764 46.5634 24.8576 44.6454 24.0802 43.519C23.8642 44.2975 13.4109 52.5485 7.37583 43.6585C6.78556 42.789 6.36157 41.9904 5.97283 41.1385ZM9.79393 21.3509C9.49213 20.8 9.32043 20.1677 9.32043 19.4955C9.32043 17.3615 11.0505 15.629 13.1815 15.629C15.3125 15.629 17.0426 17.3615 17.0426 19.4955C17.0426 21.6294 15.3125 23.362 13.1815 23.362C12.5103 23.362 11.8788 23.19 11.3286 22.8878C11.6304 23.4388 11.8021 24.0711 11.8021 24.7433C11.8021 26.8773 10.072 28.6098 7.94103 28.6098C5.81003 28.6098 4.07993 26.8773 4.07993 24.7433C4.07993 22.6093 5.81003 20.8768 7.94103 20.8768C8.61233 20.8768 9.24372 21.0487 9.79393 21.3509Z" fill="#00BBE6"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,5 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M31.8103 47.9992H47.5V8.12359C42.014 -4.84106 22.5335 0.357977 21.1418 5.61712C25.9597 2.92621 29.9696 2.38214 31.8103 6.65234V47.9992Z" fill="#2D2A68"/>
<path d="M16.1897 0.000699788H0.5V39.8764C5.98602 52.8411 25.4665 47.642 26.8581 42.3829C22.0401 45.0738 18.0304 45.6179 16.1897 41.3475V0.000699788Z" fill="#2D2A68"/>
<path d="M31.6847 23.9999C31.6847 28.2042 28.2326 31.6332 23.9999 31.6332C19.7674 31.6332 16.3152 28.2042 16.3152 23.9999C16.3152 19.7958 19.7674 16.3667 23.9999 16.3667C28.2326 16.3667 31.6847 19.7958 31.6847 23.9999Z" fill="#2D2A68"/>
</svg>

After

Width:  |  Height:  |  Size: 671 B

View File

@@ -0,0 +1,6 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.437 8.38092L16.4368 8.38072C18.3011 5.64392 20.9577 2.88752 23.844 0.292725C25.515 2.29622 26.9759 4.80682 27.4994 7.70462C29.5678 6.51612 31.8978 5.52752 34.3542 4.70362C35.9713 4.16132 37.6397 3.69112 39.32 3.28102C39.1121 7.03822 38.3996 11.0282 36.7703 14.6105V14.6106L36.7704 14.6105C40.6103 14.6896 44.4792 15.8171 48 17.3511C45.1882 20.9651 42.0341 24.3486 38.6891 26.7556L38.689 26.7558L38.6892 26.7557C41.0904 28.7392 42.7487 31.5121 43.866 34.2944C40.0817 35.8835 36.2745 37.1408 32.8978 37.5795L32.8973 37.5797L32.8979 37.5796C33.3329 39.9907 32.8979 42.5557 32.1644 44.8133C30.9606 44.7134 29.7715 44.5755 28.6277 44.3894C26.8766 44.1061 25.2259 43.7065 23.7809 43.149L23.7795 43.1486L23.7809 43.1491C22.963 44.9443 21.5448 46.4929 20.0993 47.7073C18.2027 46.5275 16.3945 45.1718 15.1109 43.6844L15.1105 43.684L15.111 43.6846C13.7876 44.6336 12.1477 45.1905 10.6257 45.5061C9.6845 44.0016 8.8458 42.3523 8.4359 40.7525C7.564 40.8647 6.6481 40.8157 5.7584 40.6693C5.2163 40.5814 4.6805 40.4581 4.1681 40.3136C3.9591 38.7621 3.8854 37.088 4.1528 35.5971V35.5965L4.1527 35.597C2.877 35.108 1.6494 34.2006 0.5926 33.2324C0.9916 31.7653 1.5686 30.2242 2.4061 28.9937L2.4062 28.9936C1.4262 27.8548 0.6306 26.3116 0 24.7608C0.9779 23.5202 2.1835 22.2858 3.5183 21.5148L3.5076 21.4723C3.0575 19.6712 2.9467 17.4997 3.0065 15.3546C3.5968 15.067 4.2168 14.8082 4.8565 14.5922C5.9099 14.2406 7.0016 14.0193 8.0606 14.038H8.0608C8.5035 11.5888 9.5184 8.83792 10.733 6.15092C12.723 6.41072 14.8222 7.04502 16.4367 8.38072L16.437 8.38092Z" fill="#7DCDF1"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.7027 14.4643V14.4642C20.9041 13.0325 22.3447 11.5709 24.0254 10.1366C25.0649 9.23809 26.2365 8.43499 27.4995 7.70459C27.7034 8.83629 27.7617 10.0116 27.6311 11.2141C27.4167 13.2003 26.9874 15.1164 26.3906 16.9015C28.2327 16.1262 30.2896 15.4715 32.5193 14.9935C33.9093 14.6981 35.333 14.5793 36.7705 14.6106C36.1544 15.9617 35.4119 17.241 34.5305 18.4132C33.1094 20.3045 31.6056 21.9531 30.0931 23.3506C31.9013 23.631 33.7645 24.1368 35.6064 24.8905C36.737 25.3543 37.7626 25.9906 38.6894 26.7557C37.4512 27.644 36.1886 28.3991 34.9011 28.9869C32.8428 29.9263 30.8812 30.6122 29.0604 31.0793V31.0794L29.0604 31.0793C30.1505 32.1641 31.1313 33.4294 31.9317 34.8496C32.4118 35.6966 32.7239 36.6203 32.8981 37.5795C31.6411 37.7438 30.4356 37.7961 29.2997 37.7104C27.4613 37.5752 25.7945 37.2869 24.3116 36.8825C24.5293 38.1653 24.5747 39.5095 24.43 40.8574C24.344 41.649 24.1133 42.4177 23.781 43.1492C22.8803 42.8008 22.0516 42.3942 21.323 41.908C20.1211 41.1078 19.083 40.2435 18.2114 39.3474L18.2046 39.3418L18.2113 39.3486C17.7891 40.3917 17.2297 41.3896 16.537 42.3063C16.1405 42.8375 15.6531 43.2927 15.111 43.6844C14.6109 43.108 14.1847 42.504 13.857 41.8738C13.3038 40.8214 12.8927 39.7622 12.6073 38.7234V38.7233C11.8453 39.3508 11.0016 39.8815 10.0954 40.2917C9.57435 40.532 9.01505 40.6759 8.43615 40.7525C8.27305 40.1151 8.17675 39.4812 8.16785 38.8591C8.15015 37.803 8.24715 36.779 8.44215 35.8102V35.81L8.44205 35.8102C7.56195 35.9813 6.65075 36.0363 5.73545 35.9685C5.20355 35.9296 4.67315 35.7985 4.15295 35.5969C4.26395 34.9935 4.42925 34.4136 4.66435 33.8833C5.07215 32.97 5.57035 32.1272 6.14295 31.3717V31.3716C5.30485 31.0842 4.47875 30.6786 3.69025 30.1524C3.22745 29.8432 2.80065 29.4502 2.40625 28.9938C2.75085 28.4894 3.13685 28.0365 3.57305 27.6612C4.32865 27.0129 5.14165 26.4801 5.98605 26.0651L5.98625 26.0649L5.98605 26.065C5.34345 25.3167 4.75445 24.4502 4.24275 23.4673C3.93865 22.8849 3.69985 22.226 3.51845 21.5134C4.07145 21.1974 4.64315 20.9588 5.22615 20.8345C6.23745 20.6181 7.25125 20.5562 8.23645 20.6373C7.98235 19.452 7.83645 18.145 7.81485 16.7309C7.79835 15.879 7.88955 14.9757 8.06085 14.0379C8.75615 14.0523 9.42995 14.1736 10.0596 14.4322C11.1381 14.8711 12.1251 15.4823 12.9998 16.2255L13.0001 16.2257L12.9999 16.2254C13.3867 14.7302 13.9427 13.131 14.692 11.4579C15.1514 10.4294 15.7424 9.40249 16.4368 8.38069C17.0882 8.91639 17.651 9.56199 18.0837 10.3287C18.8153 11.6226 19.3524 13.0258 19.7026 14.4642L19.7027 14.4643Z" fill="#00AAE7"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.9915 20.2414C15.9686 20.2933 16.0145 20.294 15.9915 20.2414L15.9923 20.2396L15.9915 20.2379C16.7981 18.4088 18.0391 16.4442 19.7024 14.4642C20.2045 16.5548 20.3006 18.6872 20.0208 20.6668C19.9835 20.6979 19.9811 20.7353 20.0047 20.7787C20.0102 20.7415 20.0156 20.7042 20.0209 20.6668C21.7084 19.2628 23.8596 17.9641 26.3903 16.9014C25.55 19.412 24.3957 21.6321 23.0666 23.4273L23.0663 23.4274H23.0666C23.4716 23.3469 23.885 23.2814 24.3111 23.2283C26.1003 23.0076 28.0557 23.0344 30.0928 23.3514C28.0092 25.2718 25.8978 26.7182 23.9179 27.665C25.7201 28.3709 27.4936 29.5246 29.0603 31.0793C27.0364 31.5973 25.1632 31.8425 23.5018 31.8481C23.1045 31.8489 22.7185 31.8357 22.3461 31.8102L22.346 31.8101L22.3461 31.8102C23.3058 33.2397 23.9903 34.9799 24.3111 36.8821C22.2384 36.3131 20.4909 35.5038 19.1266 34.534V34.533L19.1265 34.5338C19.1592 36.1112 18.8492 37.7668 18.211 39.3473C16.9589 38.0635 16.0216 36.6893 15.4233 35.3145C15.441 35.2813 15.3993 35.2591 15.4233 35.3145C14.7374 36.5963 13.7739 37.7652 12.607 38.7233C12.1901 37.1906 12.0473 35.6779 12.1716 34.2735L12.1717 34.2734H12.1716V34.2735C11.0659 35.0253 9.78954 35.5504 8.44174 35.8102C8.73694 34.3529 9.26004 33.0038 9.97464 31.8532C10.018 31.8493 10.0057 31.803 9.97474 31.8532C9.72084 31.876 9.46804 31.8882 9.21154 31.8882C8.19294 31.8907 7.15634 31.7204 6.14264 31.3717C7.01164 30.218 8.04564 29.2636 9.17284 28.5756C8.02574 28.0218 6.94164 27.1711 5.98584 26.065C7.02014 25.5559 8.09844 25.2292 9.16244 25.0978C9.42734 25.0637 9.69394 25.0449 9.96014 25.0373C9.98954 25.0831 10.0163 25.0356 9.96004 25.0373C9.19344 23.8461 8.60194 22.3567 8.23844 20.6375C9.73424 20.7634 11.1434 21.2225 12.3422 21.9682V21.9683C12.345 22.0195 12.3866 21.9959 12.3422 21.9683V21.9682C12.2452 20.283 12.4562 18.3365 12.9995 16.2255C14.3047 17.3366 15.3278 18.7231 15.9915 20.2379L15.9907 20.2397L15.9915 20.2414Z" fill="#006FBA"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.0239 20.6439C20.0229 20.6515 20.0219 20.6592 20.0208 20.6668C18.6658 21.7952 17.5918 23.0076 16.8426 24.2444C16.8511 22.9026 16.5588 21.5368 15.9915 20.2414C15.3317 21.7405 14.9485 23.175 14.8604 24.4871C14.2553 23.4742 13.3876 22.6182 12.3422 21.9683C12.4208 23.3807 12.7177 24.6371 13.2235 25.6778C12.2411 25.2098 11.1269 25.0013 9.95995 25.0373C9.94675 25.0168 9.92065 25.0195 9.88475 25.0398C9.90985 25.0389 9.93495 25.038 9.96005 25.0373C10.6144 26.058 11.4088 26.8772 12.312 27.4378C11.2421 27.5644 10.1724 27.9642 9.17285 28.5756C10.1724 29.061 11.2307 29.3191 12.2866 29.314C11.3859 29.9637 10.6034 30.8358 9.97465 31.8532C11.086 31.7529 12.1595 31.4285 13.1205 30.8823C12.5978 31.8989 12.2822 33.0526 12.1717 34.2734C13.16 33.6043 14.002 32.764 14.6336 31.79C14.6421 32.9509 14.915 34.1425 15.4233 35.3145C16.0292 34.1805 16.4032 32.9762 16.5049 31.7836C17.11 32.8008 18 33.732 19.1265 34.5338L19.1266 34.5337C19.0992 33.1668 18.8149 31.8827 18.2745 30.7812C19.3984 31.3521 20.774 31.7016 22.346 31.8101C21.5355 30.6048 20.5424 29.6386 19.4326 28.9865C20.8109 28.8693 22.3312 28.4244 23.9178 27.665C22.4434 27.088 20.9606 26.8216 19.5673 26.8759C20.8016 26.0477 21.9908 24.88 23.0666 23.4274L23.0665 23.4273C21.3679 23.7633 19.8535 24.3346 18.5959 25.1113C19.3047 23.8203 19.7895 22.3076 20.0209 20.6668C20.0269 20.6618 20.0276 20.6541 20.0239 20.6439Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M24 37.0088L33.1222 27.886L29.2362 24L24 29.2368L18.7632 24H10.9912L5.49561 29.4956H16.4868L24 37.0088ZM10.7318 5.49561H5.49561V42.5044H42.5044V5.49561H37.2676L27.886 14.8778L31.5126 18.5044H42.5044L37.0088 24H29.2362L24 18.7638L18.7632 24L14.8772 20.114L20.114 14.8778L10.7318 5.49561ZM48 0V48H0V0H13.0082L24 10.9918L34.9912 0H48Z" fill="#9B814C"/>
</svg>

After

Width:  |  Height:  |  Size: 502 B

View File

@@ -0,0 +1,5 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.1855 16.416V30.4299C23.1645 30.2601 32.1435 26.8254 41.1231 16.1046L41.0847 0.0665894C32.9505 9.84569 24.138 16.0947 14.1855 16.416Z" fill="#1F1F48"/>
<path d="M33.2865 41.9709C33.2865 45.2916 30.5781 48 27.2571 48C23.9364 48 21.228 45.2916 21.228 41.9709C21.228 38.6499 23.9364 35.9415 27.2571 35.9415C30.5781 35.9415 33.2865 38.6499 33.2865 41.9709Z" fill="#1F1F48"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M33.0274 17.6367V31.6506C23.0752 31.9719 14.2624 38.2209 6.12824 48L6.08984 31.962C15.0694 21.2412 24.0484 17.8065 33.0274 17.6367Z" fill="#AFB2AE"/>
</svg>

After

Width:  |  Height:  |  Size: 685 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 89 KiB

View File

@@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M24.0381 2.93737C26.4812 2.93737 28.4641 4.94096 28.4641 7.41253C28.4641 9.88436 26.481 11.888 24.0381 11.888C21.5912 11.888 19.608 9.88436 19.608 7.41253C19.608 4.94096 21.5912 2.93737 24.0381 2.93737ZM34.3442 0C36.7917 0 38.7735 2.00386 38.7735 4.47543C38.7737 6.94726 36.7917 8.95112 34.344 8.95112C31.9005 8.95112 29.9174 6.94726 29.9174 4.47543C29.9174 2.00386 31.9008 0 34.3442 0ZM14.593 7.51631C17.0389 7.51631 19.0214 9.52071 19.0214 11.9934C19.0214 14.4644 17.0389 16.4685 14.593 16.4685C12.1475 16.4685 10.1646 14.4644 10.1646 11.9934C10.1646 9.52071 12.1475 7.51631 14.593 7.51631ZM24.0105 28.441C24.3038 28.4269 27.2563 28.3107 29.0713 29.2255C29.7359 29.5601 29.8043 29.9915 29.8032 30.4481C29.8021 32.5712 24.0673 35.6026 23.5035 35.8901C16.2413 39.5957 6 40.2257 6 40.2257L6.09625 48C10.478 47.3927 18.3834 46.4991 27.9233 41.3305C32.6418 38.7738 37.7485 34.5653 36.796 28.5415C35.8756 22.7302 29.7893 21.0927 24.0576 21.3436L23.9901 28.4158C23.6997 28.4302 20.7453 28.5467 18.93 27.6322C18.2651 27.2975 18.1981 26.8664 18.1981 26.4092C18.1987 24.2859 23.933 21.2545 24.4973 20.9678C31.7603 17.2614 42 16.6314 42 16.6314L41.904 8.85682C37.5209 9.46543 29.6166 10.3583 20.0775 15.5266C15.3582 18.083 10.2531 22.2918 11.2064 28.3156C12.1265 34.1282 18.2129 35.7644 23.9429 35.5129L24.0105 28.441Z" fill="#D8262C"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,5 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M34.3083 5.97032L35.6347 6.76623L15.1518 18.7144V29.0476L22.4974 33.3181L10.9503 40.2542L3.5 35.8215V11.9406L24.0389 0L34.3083 5.97032Z" fill="#277EB5"/>
<path d="M13.6918 42.0297L12.3653 41.2338L32.8484 29.2856V18.9524L25.5027 14.6819L37.0499 7.74575L44.5 12.1785V36.0595L23.9611 48L13.6918 42.0297Z" fill="#277EB5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.9999 31C27.8555 31 31 27.8555 31 24C31 20.1445 27.8555 17 23.9999 17C20.1445 17 17 20.1445 17 24C17 27.8555 20.1445 31 23.9999 31Z" fill="#DBAF2E"/>
</svg>

After

Width:  |  Height:  |  Size: 633 B

View File

@@ -0,0 +1,6 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M26.1324 0L13.8283 7.58904C13.4335 8.18399 13.1798 8.88961 13.1798 9.74722C13.1798 11.7878 14.8506 12.6283 16.5275 13.3737L22.2238 15.9034C21.2905 15.4553 20.2433 14.9187 20.2433 14.2228C20.2433 13.6116 20.7861 13.213 21.1897 12.9668L25.7468 10.1895C27.8162 8.9332 29.0419 7.29715 29.0419 4.84708C29.0419 2.55798 27.6075 0.844099 26.1324 0ZM27.482 27.225C28.3846 27.6384 28.6914 27.9644 28.6914 28.481C28.6914 28.9775 28.259 29.4339 26.9211 30.1792L25.3262 31.0814L34.6857 35.274C35.3245 34.7262 35.7724 33.9273 35.7724 33.1335C35.7724 31.7372 35.1216 30.626 33.0381 29.6839L27.482 27.225ZM8.5 41.9078L14.4593 38.3167L23.7487 42.5092L17.8245 46.2949C16.5802 47.043 15.4514 47.4801 14.2665 47.4801C11.2003 47.4801 8.6473 44.9553 8.5 41.9078Z" fill="#80B0D5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M24.8876 15.6203L35.8071 8.98657C37.2826 9.84546 38.7342 11.5279 38.7342 13.816C38.7342 16.2658 37.5416 17.952 35.4215 19.1584L34.2822 19.8129L24.8876 15.6203ZM13.0918 25.0491C13.0918 23.9072 13.4265 23.3094 13.9682 22.7141L23.3628 26.8889L21.0316 28.2334C20.3911 28.6312 19.945 28.991 19.945 29.4894C19.945 30.0284 20.5596 30.4753 21.3822 30.8515L16.9478 28.8879C16.863 28.8497 16.7785 28.8117 16.6943 28.7739C14.8079 27.9274 13.0918 27.1572 13.0918 25.0491Z" fill="#A2D993"/>
<path d="M13.8286 7.58905C11.2536 9.17726 9.62207 11.3339 9.62207 14.6297C9.62207 18.209 11.8454 20.2578 15.4061 21.8472L33.0385 29.6839C35.1203 30.626 35.7727 31.739 35.7727 33.1335C35.7727 33.9282 35.3248 34.7262 34.686 35.274L35.7201 34.6195C37.9381 33.2267 39.3308 31.3356 39.3308 28.3395C39.3308 24.4975 36.8041 22.3909 33.687 20.9981L16.5278 13.3737C14.8509 12.6283 13.1801 11.7878 13.1801 9.74724C13.1801 8.88962 13.4338 8.184 13.8286 7.58905Z" fill="#086DA9"/>
<path d="M37.3923 47.9357C35.0265 46.0969 32.5029 44.853 29.4345 43.4482L15.2549 37.116C11.6923 35.5137 9.33008 33.3773 9.33008 29.7824C9.33008 26.288 11.006 24.5963 13.1845 23.2065L13.9719 22.7082C13.4303 23.3036 13.0869 23.9016 13.0869 25.0435C13.0869 27.2457 14.959 27.991 16.9422 28.8854L33.439 36.2227C36.3085 37.4662 38.9347 39.6054 38.9347 43.248C38.9347 45.2506 38.1797 47.0424 37.3923 47.9357Z" fill="#35AF3B"/>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 67 KiB

View File

@@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M36.0674 28.1378C29.495 28.1378 24.1344 22.7988 24.1344 16.2527C24.1344 9.70701 29.495 4.36795 36.0674 4.36795C42.6394 4.36795 48 9.70701 48 16.2527C48 22.7988 42.6394 28.1378 36.0674 28.1378ZM35.9895 19.8534V12.9181L21.5459 2L7.10221 12.9181V19.8534L21.5459 8.93529L35.9895 19.8534ZM0 46H43.0914V20.0494H36.0765V39.1138H7.01487V20.0494H0V46Z" fill="#8F2426"/>
</svg>

After

Width:  |  Height:  |  Size: 513 B

View File

@@ -0,0 +1,3 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M33.9411 48H14.0589L0 33.9411V14.0589L14.0589 0H33.9411L48 14.0589V33.9411L33.9411 48ZM31.0416 41L41 31.0416V16.9584L31.0416 7H16.9584L7 16.9584V31.0416L16.9584 41H31.0416ZM16.893 24L28.6352 35.804L23.9392 40.5L12.1971 28.7578L12.196 28.7589L7.5 24L13.3119 18.2511H22.7038L16.893 24ZM34.6881 29.7489H25.2962L31.107 24L19.3648 12.196L24.0608 7.5L35.8029 19.2422L35.804 19.2411L40.5 24L34.6881 29.7489Z" fill="#006D08"/>
</svg>

After

Width:  |  Height:  |  Size: 571 B

View File

@@ -0,0 +1,10 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M31.268 25.0021C31.268 20.9686 27.9908 17.6913 24.0076 17.6913C19.974 17.6913 16.6968 20.9181 16.6968 24.9517C16.6968 28.9853 19.974 32.2121 23.9572 32.2625C28.0412 32.313 31.268 29.0357 31.268 25.0021Z" fill="#CDCCCC"/>
<path d="M21.6884 15.7249C21.033 15.9266 20.3775 15.5232 20.1254 14.9182L16.4952 5.7923C16.3439 5.3889 16.4952 4.9351 16.8481 4.683L21.4363 1.3553C22.9993 0.195696 25.1169 0.195696 26.6295 1.3553L31.2177 4.7334C31.5707 4.9351 31.6715 5.3889 31.5707 5.7923L27.9404 14.9182C27.6883 15.5737 27.0329 15.9266 26.327 15.7753C25.6211 15.5737 24.8144 15.4728 24.0077 15.4728C23.2514 15.4728 22.4447 15.5737 21.6884 15.7249Z" fill="#51B5D1"/>
<path d="M29.7556 17.4392C31.016 18.3972 32.0244 19.6576 32.6295 21.0694C32.932 21.6744 33.7387 22.0274 34.3437 21.8257L43.6714 19.0022C44.0747 18.9014 44.3268 18.4476 44.3268 18.0442L44.1251 12.3468C44.0243 10.4309 42.7134 8.8174 40.8983 8.3132L35.4025 6.8006C34.9488 6.6998 34.5454 6.8511 34.3437 7.204L29.4026 15.7249C29.1505 16.1787 29.2514 17.0358 29.7556 17.4392Z" fill="#51B5D1"/>
<path d="M13.6213 21.8761L4.24322 19.1534C3.83992 18.9518 3.58782 18.5988 3.63822 18.1955L3.83992 12.4981C3.89032 10.5821 5.20122 8.9687 6.96592 8.4141L12.4616 6.8511C12.865 6.7502 13.2683 6.9015 13.5204 7.2544L18.4616 15.7249C18.8145 16.2795 18.6632 17.0862 18.159 17.4896C16.8986 18.4476 15.9406 19.7081 15.2851 21.1702C14.9826 21.7753 14.2263 22.0778 13.6213 21.8761Z" fill="#51B5D1"/>
<path d="M47.6041 27.5231L45.3352 22.3299C45.184 21.9265 44.7806 21.6744 44.3772 21.7753L34.6967 23.3383C33.9908 23.4391 33.4866 24.0442 33.537 24.75V25.0525C33.537 26.5651 33.1841 28.0273 32.5286 29.2878C32.2261 29.8928 32.4278 30.6491 32.9824 31.0021L41.1 36.4978C41.4529 36.7499 41.9571 36.6995 42.2596 36.397L46.4949 32.6155C47.957 31.3046 48.4108 29.2878 47.6041 27.5231Z" fill="#51B5D1"/>
<path d="M14.428 25.0021C14.428 26.5147 14.8313 27.9769 15.4868 29.2374C15.7389 29.8928 15.5876 30.6491 14.9826 31.0525L6.91552 36.5482C6.51212 36.8003 6.10882 36.7499 5.75582 36.4474L1.52062 32.7163C0.0584186 31.4558 -0.395381 29.3886 0.360919 27.6239L2.62982 22.4307C2.78112 22.0778 3.18442 21.8761 3.58782 21.8761L13.2683 23.3887C13.9742 23.4895 14.4784 24.0946 14.428 24.8004V25.0021Z" fill="#51B5D1"/>
<path d="M31.974 32.2625C31.4698 31.8088 30.7135 31.8088 30.1589 32.2121C28.9993 33.2205 27.5875 33.9264 26.0245 34.2793C25.369 34.3802 24.8649 35.0356 24.9153 35.7415L25.722 45.5229C25.7724 45.9263 26.1253 46.2792 26.5287 46.3296L32.1757 47.2876C34.0412 47.6405 35.9067 46.6826 36.8143 44.9683L39.4361 39.9263C39.6378 39.5734 39.5874 39.0692 39.2849 38.7667L31.974 32.2625Z" fill="#51B5D1"/>
<path d="M22.0414 34.3298C20.4783 33.9768 19.0162 33.2709 17.8565 32.313C17.3523 31.8592 16.5456 31.96 16.0918 32.3634L8.83142 39.0692C8.52892 39.3717 8.47852 39.8255 8.68022 40.1784L11.3524 45.2204C12.2599 46.8842 14.1759 47.7918 16.0414 47.4388L21.6884 46.4305C22.0918 46.3296 22.3943 45.9767 22.4447 45.5733L23.1506 35.7919C23.201 35.086 22.6968 34.4306 22.0414 34.3298Z" fill="#51B5D1"/>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Creator: CorelDRAW X6 -->
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="1574px" height="1108px" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
viewBox="0 0 1610 1134"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<style type="text/css">
<![CDATA[
.fil0 {fill:#3497FD}
]]>
</style>
</defs>
<g id="Layer_x0020_1">
<metadata id="CorelCorpID_0Corel-Layer"/>
<path class="fil0" d="M347 239c-4,-8 -2,-19 5,-25 14,-14 35,-17 54,-19 42,-4 84,-5 125,2 37,5 73,15 110,17 33,3 65,5 98,7 8,0 16,0 25,1 10,1 20,-1 30,1 14,1 28,0 42,1 258,0 516,0 774,0 0,-23 0,-46 0,-70 0,-39 -15,-78 -42,-106 -26,-28 -64,-47 -103,-47 -8,-1 -15,-1 -23,-1 -429,0 -858,0 -1287,0 -8,0 -15,1 -23,1 -37,5 -72,24 -96,52 -25,28 -37,66 -37,103 0,276 0,553 0,829 2,46 25,92 63,119 25,19 57,29 88,29 440,0 879,0 1318,0 12,-1 23,-3 35,-7 10,-6 20,-11 31,-14 40,-23 68,-66 74,-112 3,-30 1,-60 1,-90 -254,0 -509,0 -763,0 -46,1 -92,3 -138,6 -31,2 -62,4 -93,8 -24,5 -48,10 -72,14 -38,8 -77,10 -116,6 -7,0 -15,-1 -22,-2 -18,-2 -37,-6 -52,-18 -9,-7 -13,-20 -8,-31 7,-13 22,-19 36,-23 15,-2 30,-1 44,-2 20,1 39,-3 59,0 11,0 23,0 34,2 8,1 16,2 24,3 24,3 48,8 72,11 43,5 87,7 131,10 17,0 33,1 50,2 41,2 82,1 123,1l691 0c0,-22 0,-44 0,-66 -107,0 -213,0 -320,0 -14,2 -29,1 -43,1 -129,0 -258,0 -387,0 -30,2 -60,0 -90,1 -7,1 -13,2 -20,2 -12,1 -25,3 -37,4 -6,1 -12,2 -17,2 -6,1 -12,2 -17,2 -22,3 -43,5 -65,7 -12,2 -25,2 -37,2 -14,2 -28,0 -43,1 -65,0 -131,0 -196,0 -30,-3 -59,1 -89,-2 -17,0 -35,-2 -50,-12 -7,-5 -13,-13 -11,-22 3,-12 14,-21 25,-25 16,-7 34,-5 52,-5 14,-2 28,0 43,-1 8,-1 16,-1 24,-1l191 0c12,0 25,-1 37,1 20,0 40,1 60,3 19,2 38,4 56,7 7,1 14,2 21,3 9,1 18,2 26,4 21,2 42,6 64,6l822 0c0,-21 0,-41 0,-62 -110,0 -221,0 -331,0 -7,1 -14,1 -21,1l-296 0c-27,0 -55,-1 -82,1 -48,3 -97,7 -145,11 -20,2 -41,3 -61,4 -11,1 -22,2 -33,2 -14,1 -29,2 -43,2 -36,3 -72,2 -108,2 -38,-2 -75,-1 -113,-1 -39,0 -78,1 -117,-1 -25,0 -50,1 -74,-1 -15,0 -30,-3 -43,-9 -9,-5 -18,-15 -15,-26 3,-13 15,-21 27,-25 20,-7 41,-3 61,-5 22,1 43,-2 65,-1l204 0c8,0 15,0 23,1 17,1 33,-1 50,1 101,3 203,11 304,18 5,1 10,1 16,2 8,0 15,1 23,1 236,0 473,0 709,0l0 -59 -237 0c-30,0 -59,-1 -89,1 -121,0 -242,0 -363,0 -18,1 -37,3 -55,5 -9,1 -17,2 -26,2 -19,2 -38,3 -57,4 -59,4 -117,8 -176,10 -17,2 -34,-1 -51,2 -21,0 -42,0 -63,0 -51,-3 -103,1 -154,-2 -30,0 -60,1 -89,-1 -20,0 -39,0 -59,0 -14,-2 -28,0 -42,-2 -14,-1 -29,-4 -41,-12 -6,-4 -11,-10 -10,-18 -1,-11 8,-20 17,-25 14,-9 31,-9 47,-9 11,-2 21,0 32,-1 22,-2 45,1 67,-2 94,0 187,0 281,0 6,0 11,0 17,1 19,1 37,0 56,1 14,2 28,-1 42,2 17,0 33,1 50,2 20,1 41,2 61,4 8,0 16,1 24,2 14,1 28,3 41,4 7,1 13,1 20,2 7,1 13,1 20,2 9,1 19,2 28,3 6,1 12,2 19,2 231,0 462,0 694,0 0,-21 0,-41 0,-62l-237 0c-21,0 -42,-1 -63,1 -119,0 -238,0 -357,0 -12,1 -24,3 -36,4 -7,1 -13,1 -20,2 -8,1 -16,1 -24,2 -12,1 -24,3 -37,3 -61,5 -123,8 -184,10 -15,2 -30,-1 -45,2 -39,0 -78,0 -118,0 -39,-2 -78,-1 -118,-1 -33,-3 -67,1 -100,-2 -20,0 -39,0 -59,0 -21,-2 -41,1 -62,-2 -16,0 -32,-1 -47,-8 -8,-4 -17,-10 -18,-19 -2,-11 5,-22 15,-28 18,-11 40,-10 60,-10 17,-2 34,0 51,-1 7,-1 14,-1 21,-1 117,0 235,0 352,0 32,2 64,0 96,1 14,2 29,0 43,1 12,2 24,0 36,2 26,1 52,3 78,5 7,0 15,1 22,2 13,1 26,3 39,4 6,1 12,1 17,2 12,1 24,4 36,4 219,0 438,0 657,0l0 -59 -207 0c-36,0 -71,-1 -107,1 -105,0 -210,0 -315,0 -32,0 -65,-1 -97,3 -5,1 -10,1 -16,1 -21,2 -42,4 -63,5 -67,5 -133,10 -200,12 -16,2 -33,-1 -49,2 -30,0 -61,1 -91,-1 -28,0 -55,0 -83,0 -15,0 -29,1 -44,-1 -26,0 -52,0 -78,0 -25,-2 -49,0 -74,-1 -15,-2 -31,0 -46,-2 -15,-2 -31,-5 -42,-17 -7,-8 -5,-22 3,-29 10,-11 26,-16 41,-17 15,0 30,-2 46,-1 22,-2 44,0 66,-1 3,-1 5,-1 8,-1 93,0 185,0 278,0 23,2 45,0 68,1 14,2 28,-1 42,2 36,1 73,3 109,6 15,1 29,3 43,4 7,1 13,1 20,2 7,1 13,1 20,2 7,1 13,1 20,2 19,1 38,5 57,5 230,0 460,0 689,0l0 -62c-97,0 -194,0 -291,0 -15,2 -30,1 -46,1 -122,0 -244,0 -365,0 -28,1 -56,3 -83,5 -83,6 -166,12 -249,16 -38,1 -75,4 -113,1 -35,0 -70,0 -104,0 -36,0 -73,1 -109,-1 -20,0 -40,1 -60,-1 -17,0 -35,-2 -50,-11 -7,-4 -11,-11 -12,-18 0,-14 12,-25 25,-29 20,-8 43,-4 64,-7 13,0 27,0 40,0 3,-1 7,-1 10,-1 51,0 101,0 152,0 30,0 61,-1 91,1 51,-1 101,1 151,4 32,1 64,4 96,6 39,3 78,7 117,9 13,1 25,2 38,2l698 0 0 -64c-112,0 -223,0 -335,0 -6,0 -12,1 -17,1 -135,0 -270,0 -405,0 -32,3 -65,-1 -97,4l-6 1c-12,1 -25,3 -37,4 -6,1 -12,2 -17,2 -21,2 -42,5 -63,7 -9,1 -19,2 -28,2 -48,4 -97,3 -145,3 -30,-2 -59,-1 -89,-1 -27,0 -54,1 -81,-1 -24,0 -48,2 -71,-4 -12,-3 -25,-8 -29,-20 -5,-12 3,-25 13,-31 18,-13 41,-11 62,-11 19,-2 39,0 59,-2 70,0 141,0 211,0 17,2 34,-1 51,2 54,2 107,11 161,17 9,1 17,2 26,3 4,1 8,1 11,2 276,0 551,0 827,0l0 -65c-262,0 -523,0 -785,0 -21,1 -43,2 -64,2 -51,3 -103,4 -155,11 -13,2 -26,4 -40,6l-6 0c-39,6 -79,8 -119,7 -12,-2 -23,0 -35,-1 -9,-2 -18,0 -26,-2 -13,-3 -26,-9 -33,-21z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@@ -71,6 +71,22 @@
box-shadow: 0px 4px 5px 0px rgba(0, 0, 0, 0.03) inset;
}
.btn-leave-casehistory {
border: 1px solid transparent;
width: 30px;
height: 30px;
border-radius: 5px;
padding: 3px 1px;
color: #d97706;
margin: auto 1px auto 2px;
background: rgba(217, 119, 6, 0.18);
transition: ease .2s;
}
.btn-leave-casehistory span {
display: none;
}
.toggleRollCall {
cursor: pointer;
font-size: 12px;

View File

@@ -67,7 +67,7 @@
}
#ajaxDataMain {
height: 700px;
height: 650px;
border-radius: 10px;
padding: 3px;
overflow-y: auto;
@@ -75,7 +75,7 @@
}
#loadAccountItems {
height: 700px;
height: 650px;
background-color: #ffffff;
border-radius: 10px;
padding: 1px 6px;
@@ -341,10 +341,10 @@ button.btn-edit:hover {
@media(max-width: 1366px) {
#loadAccountItems {
height: 400px;
height: 350px;
}
#ajaxDataMain {
height: 400px;
height: 350px;
}
.widthBtn {

View File

@@ -460,6 +460,19 @@ function caseHistoryLoadAjax() {
<div class="Rtable-cell position-relative width9 bg-filter d-none d-md-flex justify-content-end">
<div class="Rtable-cell--content text-center h-100">
<div class="d-md-none d-none">عملیات: </div>
<button type="button" onclick="openModalLeave(${item.employeeId}, '${item.dateFa}', '${item.employeeFullName}')" class="btn-leave-casehistory position-relative d-none ${item.hasLeave || !item.isAbsent ? `disable` : ``}">
<svg width="20" height="20" viewBox="0 0 24 24" id="_24x24_On_Light_Session-Leave" data-name="24x24/On Light/Session-Leave" xmlns="http://www.w3.org/2000/svg" fill="#d97706">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<rect id="view-box" width="24" height="24" fill="none"></rect>
<path id="Shape" d="M2.95,17.5A2.853,2.853,0,0,1,0,14.75v-12A2.854,2.854,0,0,1,2.95,0h8.8a.75.75,0,0,1,0,1.5H2.95A1.362,1.362,0,0,0,1.5,2.75v12A1.363,1.363,0,0,0,2.95,16h8.8a.75.75,0,0,1,0,1.5Zm9.269-4.219a.751.751,0,0,1,0-1.061L14.939,9.5H5.75a.75.75,0,0,1,0-1.5h9.19L12.219,5.28A.75.75,0,1,1,13.28,4.22l4,4a.749.749,0,0,1,0,1.06l-4,4a.751.751,0,0,1-1.061,0Z" transform="translate(3.25 3.25)" fill="#d97706"></path>
</g>
</svg>
<span class="mx-1">مرخصی</span>
</button>
<button data-edit-id="${item.employeeId}" data-edit-date="${item.dateFa}" class="btn-edit position-relative d-md-block d-none ${item.hasLeave ? `disable` : ``}">
<svg width="20" height="20" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.6027 6.838L5.85304 13.5876C5.84201 13.5987 5.83107 13.6096 5.8202 13.6204C5.65773 13.7825 5.5139 13.9261 5.41254 14.1051C5.31117 14.2841 5.2621 14.4813 5.20667 14.704C5.20296 14.7189 5.19923 14.7339 5.19545 14.7491L4.5813 17.2057C4.57908 17.2145 4.57686 17.2234 4.57462 17.2323C4.53537 17.389 4.49347 17.5564 4.47972 17.6969C4.46458 17.8516 4.46811 18.1127 4.67752 18.3221L5.03035 17.9693L4.67752 18.3221C4.88693 18.5315 5.14799 18.535 5.30272 18.5199C5.44326 18.5062 5.6106 18.4643 5.76728 18.425C5.77622 18.4228 5.78512 18.4205 5.79398 18.4183L8.25057 17.8042C8.26569 17.8004 8.28069 17.7967 8.29558 17.793C8.51832 17.7375 8.71549 17.6885 8.89452 17.5871C9.07356 17.4857 9.21708 17.3419 9.37921 17.1794C9.39005 17.1686 9.40097 17.1576 9.412 17.1466L16.1616 10.397L16.1849 10.3737C16.4983 10.0603 16.7684 9.79025 16.9556 9.54492C17.1562 9.282 17.3081 8.98958 17.3081 8.6292C17.3081 8.26759 17.1541 7.97384 16.9522 7.71001C16.7633 7.46303 16.4905 7.1903 16.1731 6.87292L16.1499 6.84972L16.1267 6.82652C15.8093 6.5091 15.5366 6.23634 15.2896 6.04738C15.0258 5.84553 14.732 5.69156 14.3704 5.69156C14.01 5.69156 13.7176 5.84345 13.4547 6.04405C13.2094 6.23123 12.9393 6.5013 12.6259 6.81474L12.6027 6.838Z" stroke-width="1.5" stroke="#4DA9D1" />
@@ -557,6 +570,18 @@ function caseHistoryLoadAjax() {
<div class="col-12 mt-2">
<div class="d-flex">
<button type="button" onclick="openModalLeave(${item.employeeId}, '${item.dateFa}', '${item.employeeFullName}')" class="btn-leave-casehistory position-relative d-none justify-content-center align-items-center ${item.hasLeave || !item.isAbsent ? `disable` : ``}" style="width:100%">
<svg width="20" height="20" viewBox="0 0 24 24" id="_24x24_On_Light_Session-Leave" data-name="24x24/On Light/Session-Leave" xmlns="http://www.w3.org/2000/svg" fill="#d97706">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<rect id="view-box" width="24" height="24" fill="none"></rect>
<path id="Shape" d="M2.95,17.5A2.853,2.853,0,0,1,0,14.75v-12A2.854,2.854,0,0,1,2.95,0h8.8a.75.75,0,0,1,0,1.5H2.95A1.362,1.362,0,0,0,1.5,2.75v12A1.363,1.363,0,0,0,2.95,16h8.8a.75.75,0,0,1,0,1.5Zm9.269-4.219a.751.751,0,0,1,0-1.061L14.939,9.5H5.75a.75.75,0,0,1,0-1.5h9.19L12.219,5.28A.75.75,0,1,1,13.28,4.22l4,4a.749.749,0,0,1,0,1.06l-4,4a.751.751,0,0,1-1.061,0Z" transform="translate(3.25 3.25)" fill="#d97706"></path>
</g>
</svg>
<span class="mx-1 d-block" style="color: #d97706;">مرخصی</span>
</button>
<button data-edit-id="${item.employeeId}" data-edit-date="${item.dateFa}" class="btn-edit position-relative d-md-none d-flex justify-content-center align-items-center ${item.hasLeave ? `disable` : ``}" style="width:100%">
<svg width="20" height="20" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.6027 6.838L5.85304 13.5876C5.84201 13.5987 5.83107 13.6096 5.8202 13.6204C5.65773 13.7825 5.5139 13.9261 5.41254 14.1051C5.31117 14.2841 5.2621 14.4813 5.20667 14.704C5.20296 14.7189 5.19923 14.7339 5.19545 14.7491L4.5813 17.2057C4.57908 17.2145 4.57686 17.2234 4.57462 17.2323C4.53537 17.389 4.49347 17.5564 4.47972 17.6969C4.46458 17.8516 4.46811 18.1127 4.67752 18.3221L5.03035 17.9693L4.67752 18.3221C4.88693 18.5315 5.14799 18.535 5.30272 18.5199C5.44326 18.5062 5.6106 18.4643 5.76728 18.425C5.77622 18.4228 5.78512 18.4205 5.79398 18.4183L8.25057 17.8042C8.26569 17.8004 8.28069 17.7967 8.29558 17.793C8.51832 17.7375 8.71549 17.6885 8.89452 17.5871C9.07356 17.4857 9.21708 17.3419 9.37921 17.1794C9.39005 17.1686 9.40097 17.1576 9.412 17.1466L16.1616 10.397L16.1849 10.3737C16.4983 10.0603 16.7684 9.79025 16.9556 9.54492C17.1562 9.282 17.3081 8.98958 17.3081 8.6292C17.3081 8.26759 17.1541 7.97384 16.9522 7.71001C16.7633 7.46303 16.4905 7.1903 16.1731 6.87292L16.1499 6.84972L16.1267 6.82652C15.8093 6.5091 15.5366 6.23634 15.2896 6.04738C15.0258 5.84553 14.732 5.69156 14.3704 5.69156C14.01 5.69156 13.7176 5.84345 13.4547 6.04405C13.2094 6.23123 12.9393 6.5013 12.6259 6.81474L12.6027 6.838Z" stroke-width="1.5" stroke="#4DA9D1" />
@@ -717,6 +742,19 @@ function caseHistoryLoadAjax() {
<div class="Rtable-cell position-relative width9 bg-filter d-none d-md-flex justify-content-end">
<div class="Rtable-cell--content text-center h-100">
<div class="d-md-none d-none">عملیات: </div>
<button type="button" onclick="openModalLeave(${item.employeeId}, '${caseHistoryData.dateFa}', '${item.employeeFullName}')" class="btn-leave-casehistory position-relative d-none ${item.hasLeave || !item.isAbsent ? `disable` : ``}">
<svg width="20" height="20" viewBox="0 0 24 24" id="_24x24_On_Light_Session-Leave" data-name="24x24/On Light/Session-Leave" xmlns="http://www.w3.org/2000/svg" fill="#d97706">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<rect id="view-box" width="24" height="24" fill="none"></rect>
<path id="Shape" d="M2.95,17.5A2.853,2.853,0,0,1,0,14.75v-12A2.854,2.854,0,0,1,2.95,0h8.8a.75.75,0,0,1,0,1.5H2.95A1.362,1.362,0,0,0,1.5,2.75v12A1.363,1.363,0,0,0,2.95,16h8.8a.75.75,0,0,1,0,1.5Zm9.269-4.219a.751.751,0,0,1,0-1.061L14.939,9.5H5.75a.75.75,0,0,1,0-1.5h9.19L12.219,5.28A.75.75,0,1,1,13.28,4.22l4,4a.749.749,0,0,1,0,1.06l-4,4a.751.751,0,0,1-1.061,0Z" transform="translate(3.25 3.25)" fill="#d97706"></path>
</g>
</svg>
<span class="mx-1">مرخصی</span>
</button>
<button data-edit-id="${item.employeeId}" data-edit-date="${caseHistoryData.dateFa}" class="btn-edit position-relative d-md-block d-none ${item.hasLeave ? `disable` : ``}">
<svg width="20" height="20" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.6027 6.838L5.85304 13.5876C5.84201 13.5987 5.83107 13.6096 5.8202 13.6204C5.65773 13.7825 5.5139 13.9261 5.41254 14.1051C5.31117 14.2841 5.2621 14.4813 5.20667 14.704C5.20296 14.7189 5.19923 14.7339 5.19545 14.7491L4.5813 17.2057C4.57908 17.2145 4.57686 17.2234 4.57462 17.2323C4.53537 17.389 4.49347 17.5564 4.47972 17.6969C4.46458 17.8516 4.46811 18.1127 4.67752 18.3221L5.03035 17.9693L4.67752 18.3221C4.88693 18.5315 5.14799 18.535 5.30272 18.5199C5.44326 18.5062 5.6106 18.4643 5.76728 18.425C5.77622 18.4228 5.78512 18.4205 5.79398 18.4183L8.25057 17.8042C8.26569 17.8004 8.28069 17.7967 8.29558 17.793C8.51832 17.7375 8.71549 17.6885 8.89452 17.5871C9.07356 17.4857 9.21708 17.3419 9.37921 17.1794C9.39005 17.1686 9.40097 17.1576 9.412 17.1466L16.1616 10.397L16.1849 10.3737C16.4983 10.0603 16.7684 9.79025 16.9556 9.54492C17.1562 9.282 17.3081 8.98958 17.3081 8.6292C17.3081 8.26759 17.1541 7.97384 16.9522 7.71001C16.7633 7.46303 16.4905 7.1903 16.1731 6.87292L16.1499 6.84972L16.1267 6.82652C15.8093 6.5091 15.5366 6.23634 15.2896 6.04738C15.0258 5.84553 14.732 5.69156 14.3704 5.69156C14.01 5.69156 13.7176 5.84345 13.4547 6.04405C13.2094 6.23123 12.9393 6.5013 12.6259 6.81474L12.6027 6.838Z" stroke-width="1.5" stroke="#4DA9D1" />
@@ -796,7 +834,20 @@ function caseHistoryLoadAjax() {
</div>
</div>
<div class="col-6 mt-2">
<div class="col-4 pe-0 mt-2">
<button type="button" onclick="openModalLeave(${item.employeeId}, '${caseHistoryData.dateFa}', '${item.employeeFullName}')" class="btn-leave-casehistory position-relative d-none justify-content-center align-items-center ${item.hasLeave || !item.isAbsent ? `disable` : ``}" style="width:100%">
<svg width="20" height="20" viewBox="0 0 24 24" id="_24x24_On_Light_Session-Leave" data-name="24x24/On Light/Session-Leave" xmlns="http://www.w3.org/2000/svg" fill="#d97706">
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
<g id="SVGRepo_iconCarrier">
<rect id="view-box" width="24" height="24" fill="none"></rect>
<path id="Shape" d="M2.95,17.5A2.853,2.853,0,0,1,0,14.75v-12A2.854,2.854,0,0,1,2.95,0h8.8a.75.75,0,0,1,0,1.5H2.95A1.362,1.362,0,0,0,1.5,2.75v12A1.363,1.363,0,0,0,2.95,16h8.8a.75.75,0,0,1,0,1.5Zm9.269-4.219a.751.751,0,0,1,0-1.061L14.939,9.5H5.75a.75.75,0,0,1,0-1.5h9.19L12.219,5.28A.75.75,0,1,1,13.28,4.22l4,4a.749.749,0,0,1,0,1.06l-4,4a.751.751,0,0,1-1.061,0Z" transform="translate(3.25 3.25)" fill="#d97706"></path>
</g>
</svg>
<span class="mx-1 d-block" style="color: #d97706;">مرخصی</span>
</button>
</div>
<div class="col-4 mt-2">
<button data-edit-id="${item.employeeId}" data-edit-date="${caseHistoryData.dateFa}" class="btn-edit position-relative d-md-none d-flex justify-content-center align-items-center ${item.hasLeave ? `disable` : ``}" style="width:100%">
<svg width="20" height="20" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.6027 6.838L5.85304 13.5876C5.84201 13.5987 5.83107 13.6096 5.8202 13.6204C5.65773 13.7825 5.5139 13.9261 5.41254 14.1051C5.31117 14.2841 5.2621 14.4813 5.20667 14.704C5.20296 14.7189 5.19923 14.7339 5.19545 14.7491L4.5813 17.2057C4.57908 17.2145 4.57686 17.2234 4.57462 17.2323C4.53537 17.389 4.49347 17.5564 4.47972 17.6969C4.46458 17.8516 4.46811 18.1127 4.67752 18.3221L5.03035 17.9693L4.67752 18.3221C4.88693 18.5315 5.14799 18.535 5.30272 18.5199C5.44326 18.5062 5.6106 18.4643 5.76728 18.425C5.77622 18.4228 5.78512 18.4205 5.79398 18.4183L8.25057 17.8042C8.26569 17.8004 8.28069 17.7967 8.29558 17.793C8.51832 17.7375 8.71549 17.6885 8.89452 17.5871C9.07356 17.4857 9.21708 17.3419 9.37921 17.1794C9.39005 17.1686 9.40097 17.1576 9.412 17.1466L16.1616 10.397L16.1849 10.3737C16.4983 10.0603 16.7684 9.79025 16.9556 9.54492C17.1562 9.282 17.3081 8.98958 17.3081 8.6292C17.3081 8.26759 17.1541 7.97384 16.9522 7.71001C16.7633 7.46303 16.4905 7.1903 16.1731 6.87292L16.1499 6.84972L16.1267 6.82652C15.8093 6.5091 15.5366 6.23634 15.2896 6.04738C15.0258 5.84553 14.732 5.69156 14.3704 5.69156C14.01 5.69156 13.7176 5.84345 13.4547 6.04405C13.2094 6.23123 12.9393 6.5013 12.6259 6.81474L12.6027 6.838Z" stroke-width="1.5" stroke="#4DA9D1" />
@@ -805,7 +856,7 @@ function caseHistoryLoadAjax() {
<span class="mx-1 d-block" style="color: #009EE2;">ویرایش</span>
</button>
</div>
<div class="col-6 mt-2">
<div class="col-4 ps-0 mt-2">
<button data-remove-id="${item.employeeId}" data-remove-date="${caseHistoryData.dateFa}" type="button" class="btn-delete removeReward d-md-none d-flex justify-content-center align-items-center ${item.hasLeave || item.isAbsent ? `disable` : ``}" style="width:100%">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-width="1.5" stroke-linecap="round" />
@@ -1849,4 +1900,9 @@ function printAllWithoutPersonnel(exactDateFa) {
function printAllWithPersonnel(employeeId, firstPrint, lastPrint) {
var url = `/Client/Company/RollCall/CaseHistory?employeeId=${employeeId}&firstRecordToPrintStartDateFa=${firstPrint}&lastRecordToPrintEndDateFa=${lastPrint}&handler=PrintAllWithPersonnelNew`;
AjaxUrlContentModal(url);
}
function openModalLeave(employeeId, dateFa, employeeName) {
var goTo = `#showmodal=/Client/Company/RollCall/CaseHistory?handler=LeaveCreate&Command.StartLeave=${dateFa}&Command.EmployeeId=${employeeId}&Command.EmployeeFullName=${employeeName}`;
window.location.href = goTo;
}

View File

@@ -1,4 +1,63 @@
$(document).ready(function () {
$(".select2Option").select2({
language: "fa",
dir: "rtl"
});
$('.btn-search-click').click(function () {
var filterEmployeeId = 0;
if (window.matchMedia('(max-width: 767px)').matches) {
filterEmployeeId = $('#employeeSelectMobile').val();
} else {
filterEmployeeId = $('#employeeSelect').val();
}
if (filterEmployeeId !== "0") {
$('.btn-clear-filter').removeClass('disable');
} else {
$('.btn-clear-filter').addClass('disable');
}
$.ajax({
async: false,
contentType: 'charset=utf-8',
dataType: 'json',
type: 'GET',
url: loadEmployeesGroupSettingsByEmployeeIdAjax,
data: { employeeId: Number(filterEmployeeId) },
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
success: function (response) {
var responseData = response.data;
if (responseData == null || responseData.mainGroup === true) {
$('.alert-msg').show();
$('.alert-msg p').text("این پرسنل درهیچ گروهی یافت نشد.");
setTimeout(function() {
$('.alert-msg').hide();
$('.alert-msg p').text('');
},
3000);
} else {
$(`[data-index="${responseData.id}"]`).click();
$('.itemResultEmployee').each(function () {
var employeeId = $(this).data('employee-id');
if (employeeId !== Number(filterEmployeeId)) {
$(this).remove();
}
});
updateIndexesGrouping();
}
},
failure: function (response) {
console.log(5, response);
}
});
});
$("#newCreateGroup").click(function () {
window.location.href = `#showmodal=/Client/Company/RollCall/Grouping?workshopSettingId=${workshopSettingId}&handler=CreateGroup`;
});
@@ -52,8 +111,13 @@ function loadDataAjax() {
</div>
<div class="title-group1 text-center d-none d-md-block width3">`;
console.log('--------------------------------------------------------');
console.log(item);
if (item.workshopShiftStatus === 0) {
html += `<div style="margin: 0 0 8px 0;"><span style="border: 1px solid #ddd;padding: 3px 9px;font-size: 12px;border-radius: 40px;background: #f4f4f4;">منظم</span></div>`;
} else if (item.workshopShiftStatus === 1) {
html += `<div style="margin: 0 0 8px 0;"><span style="border: 1px solid #ddd;padding: 3px 9px;font-size: 12px;border-radius: 40px;background: #f4f4f4;">مختلط</span></div>`;
} else {
html += `<div style="margin: 0 0 8px 0;"><span style="border: 1px solid #ddd;padding: 3px 9px;font-size: 12px;border-radius: 40px;background: #f4f4f4;">گردشی</span></div>`;
}
if (item.workshopShiftStatus === 0) {
item.rollCallWorkshopShifts.forEach(function (itemShifts) {
@@ -168,7 +232,7 @@ function loadEmployeeAjax(groupSettingId) {
headers: { "RequestVerificationToken": `${antiForgeryToken}` },
success: function (response) {
var responseDataEmployee = response.data;
if (response.success) {
if (responseDataEmployee.length > 0) {
@@ -184,8 +248,8 @@ function loadEmployeeAjax(groupSettingId) {
isShiftChangedGlobal = true;
}
htmlEmployee += `<div></div>
<div class="my-1 Rtable-row align-items-center position-relative itemResultEmployee">
htmlEmployee += `<div></div>
<div class="my-1 Rtable-row align-items-center position-relative itemResultEmployee" data-employee-id="${itemEmployee.employeeId}">
<div class="Rtable-cell width1 widthMobile1">
<div class="Rtable-cell--content">
<span class="d-flex justify-content-center row-index2">
@@ -197,11 +261,28 @@ function loadEmployeeAjax(groupSettingId) {
<div class="Rtable-cell--heading d-none">نام پرسنل:</div>
<div class="Rtable-cell--content">
<div class="d-flex d-md-none">نام پرسنل:</div>
<div class="itemEmployeeName">${itemEmployee.name} </div>
<div class="itemEmployeeName">${itemEmployee
.name} </div>
</div>
</div>
<div class="Rtable-cell width3 widthMobile2 text-center d-none d-md-block">
<div class="Rtable-cell width3 widthMobile2">
<div class="Rtable-cell--heading d-none">نام پرسنل:</div>
<div class="Rtable-cell--content">
<div class="d-flex d-md-none">نام پرسنل:</div>
<div class="text-center">`;
if (itemEmployee.workshopShiftStatus === 0) {
htmlEmployee += `منظم`;
} else if (itemEmployee.workshopShiftStatus === 1) {
htmlEmployee += `مختلط`;
} else {
htmlEmployee += `گردشی`;
}
htmlEmployee += `</div>
</div>
</div>
<div class="Rtable-cell width4 widthMobile2 text-center d-none d-md-block">
<div class="Rtable-cell--heading d-none">ساعت کاری:</div>
<div class="Rtable-cell--content d-flex text-center">
<div class="d-flex d-md-none mx-1">ساعت کاری: </div>
@@ -416,4 +497,12 @@ function editGroup(groupId) {
function editEmployee(employee_id, groupId) {
var array_employees = [employee_id];
window.location.href = `#showmodal=/Client/Company/RollCall/Grouping?groupId=${groupId}&employeeId=${array_employees}&handler=EditEmployee`;
}
function updateIndexesGrouping() {
let indexGrouping = 0;
$(`.itemResultEmployee .row-index2`).each(function () {
$(this).text(indexGrouping++);
});
}

View File

@@ -0,0 +1,664 @@
$(document).ready(function () {
$('.loading').hide();
document.getElementById("MainModal").style.visibility = "visible";
//******************** شرط استحقاقی و استعلاجی ********************
$(document).on("change", ".LeaveType", function () {
if ($('#paid').is(':checked')) {
$('#dailyType').css('visibility', 'visible');
}
if ($('#sick').is(':checked')) {
$('#dailyType').css('visibility', 'hidden');
$('#daily').prop('checked', true);
if ($('#daily').is(':checked')) {
$('#end_date_estehghaghi').show();
$('.time_paid').hide();
}
}
});
// شرط ساعتی و روزانه
$(document).on("change", ".LeaveTime", function () {
if ($('#daily').is(':checked')) {
$('#end_date_estehghaghi').show();
$('.time_paid').hide();
}
if ($('#hourly').is(':checked')) {
$('#end_date_estehghaghi').hide();
$('.time_paid').show();
}
});
//******************** شرط استحقاقی و استعلاجی ********************
//******************** بلور کردن باکس ********************
$('#IsAccepted').on('change', function () {
if ($(this).is(':checked')) {
$('#blur-div').addClass('blur');
$('#descriptionAcceptedCheck').text('');
$('#descriptionAcceptedCheck').attr('disabled', true);
} else {
$('#blur-div').removeClass('blur');
$('#descriptionAcceptedCheck').attr('disabled', false);
}
});
if ($('#IsAccepted').is(':checked')) {
$('#blur-div').addClass('blur');
$('#descriptionAcceptedCheck').text('');
$('#descriptionAcceptedCheck').attr('disabled', true);
} else {
$('#blur-div').removeClass('blur');
$('#descriptionAcceptedCheck').attr('disabled', false);
}
//******************** بلور کردن باکس ********************
$(document).ready(function () {
$(document).on("change", "#IsAccepted", function () {
var IsAcceptedCheck = $('#IsAccepted').is(':checked');
if (IsAcceptedCheck) {
$('#descriptionAcceptedCheck').removeClass('errored');
$('#descriptionAcceptedCheck').addClass('disable-input');
$("#descriptionAcceptedCheck").prop('disabled', true);
} else {
$('#descriptionAcceptedCheck').removeClass('disable-input');
$("#descriptionAcceptedCheck").prop('disabled', false);
}
})
});
$('#printSingle').on('click', function () {
var id = $('#printSingleID').val();
var parametr = '&id=' + id;
var url = PrintOneMobileUrl;
location.href = url + parametr;
});
$('#save').on('click', function () {
$('#save').addClass("disable");
var workshopSelect = $("#workshopSelect").val();
var employeeSelect = $("#employeeSelect").val();
if (workshopSelect == '') {
$('.alert-msg').show();
$('.alert-msg p').text('لطفا کارگاه را انتخاب کنید ...');
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
return false;
}
if (employeeSelect == '') {
$('.alert-msg').show();
$('.alert-msg p').text('لطفا پرسنل را انتخاب کنید ...');
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
return false;
}
$("#descriptionAcceptedCheck").on("change", function () {
$('#descriptionAcceptedCheck').removeClass('errored');
});
var IsAcceptedCheck = $('#IsAccepted').is(':checked');
var descriptionAcceptedCheck = $('#descriptionAcceptedCheck').val();
if (!IsAcceptedCheck && descriptionAcceptedCheck.length === 0) {
$('#descriptionAcceptedCheck').addClass('errored');
$('.alert-msg').show();
$('.alert-msg p').text('لطفا توضیحات در صورت عدم موافقت را پر کنید.');
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
return false;
}
var dateFa = startLeave.replaceAll("/", "");
var dateEmployeeID = $('#employeeId').val() + '-' + dateFa;
if ($('.errored').length < 1) {
$.ajax({
async: false,
dataType: 'json',
type: 'POST',
url: leaveSaveAjax,
headers: { "RequestVerificationToken": antiForgeryToken },
data: $('#create-leave-form').serialize(),
success: function (response) {
if (response.isSuccedded) {
$('.alert-success-msg').show();
$('.alert-success-msg p').text(response.message);
setTimeout(function () {
$('.alert-success-msg').hide();
$('.alert-success-msg p').text('');
}, 1500);
$('#save').addClass("disable");
$('#printSingleID').val(response.printID);
$('#printSingle').show();
//$('#MainModal').modal('hide');
_RefreshCountMenu();
CountWorkFlowOfAbsentAndCut();
//var menuActive = $('#navbar-animmenu li.active').data('menu');
//switch (menuActive) {
// case "absent":
// loadWorkFlowsAbsentsList();
// break;
// case "cut":
// LoadWorkFlowsCutList();
// break;
// case "lunchBreak":
// loadWorkFlowEmployeesWithoutLunchBreakList();
// break;
// case "undefined":
// loadUndefinedRollCallsList();
// break;
// case "overlappingLeave":
// loadOverlappingLeavesList();
// break;
// default:
//}
var menuActive = $('#navbar-animmenu li.active').data('menu');
switch (menuActive) {
case "absent":
/*loadWorkFlowsAbsentsList();*/
$(`[data-absent-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`absent_${dateFa}`);
updateMainWorkFlow(`absentMain_${dateFa}`);
break;
case "cut":
//LoadWorkFlowsCutList();
$(`[data-cut-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`cut_${dateFa}`);
updateMainWorkFlow(`cutMain_${dateFa}`);
break;
case "lunchBreak":
//loadWorkFlowEmployeesWithoutLunchBreakList();
$(`[data-break-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`break_${dateFa}`);
updateMainWorkFlow(`breakMain_${dateFa}`);
break;
case "undefined":
//loadUndefinedRollCallsList();
$(`[data-undefined-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`undefined_${dateFa}`);
updateMainWorkFlow(`undefinedMain_${dateFa}`);
break;
case "overlappingLeave":
//loadOverlappingLeavesList();
$(`[data-leave-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`leave_${dateFa}`);
updateMainWorkFlow(`leaveMain_${dateFa}`);
break;
default:
}
} else {
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
$('#save').removeClass("disable");
}
},
error: function (err) {
$('#save').removeClass("disable");
console.log(err);
}
});
} else {
$('#save').removeClass("disable");
$('.alert-msg').show();
$('.alert-msg p').text('لطفا خطاها را برطرف کنید.');
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
}
});
$(".date").on('input', function () {
var value = $(this).val();
$(this).val(convertPersianNumbersToEnglish(value));
}).mask("0000/00/00");
$('.date').on('input', function () {
let startDate = this.value;
if (startDate.length == 10) {
let submitcheck = dateValidcheck(this);
if (submitcheck) {
$(this).removeClass('errored');
if ($('#StartLeave').val() != '' && $('#EndLeave').val() != '') {
computeDays();
}
} else {
$(this).addClass('errored');
}
} else {
$(this).addClass('errored');
}
});
function dateValidcheck(inputField1) {
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
fixNumbers = function (str) {
if (typeof str === 'string') {
for (var i = 0; i < 10; i++) {
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
}
}
return str;
};
let getdate = inputField1.value;
let m1, m2;
let y1, y2, y3, y4;
let d1, d2;
let s1, s2;
for (var i = 0; i < getdate.length; i++) {
if (i === 0) {
y1 = fixNumbers(getdate[i]);
}
if (i === 1) {
y2 = fixNumbers(getdate[i]);
}
if (i === 2) {
y3 = fixNumbers(getdate[i]);
}
if (i === 3) {
y4 = fixNumbers(getdate[i]);
}
if (i === 4) {
s1 = fixNumbers(getdate[i]);
}
if (i === 5) {
m1 = fixNumbers(getdate[i]);
}
if (i === 6) {
m2 = fixNumbers(getdate[i]);
}
if (i === 7) {
s2 = fixNumbers(getdate[i]);
}
if (i === 8) {
d1 = fixNumbers(getdate[i]);
}
if (i === 9) {
d2 = fixNumbers(getdate[i]);
}
}
let yRes = y1 + y2 + y3 + y4;
let year = parseInt(yRes);
let mRes = m1 + m2;
let month = parseInt(mRes);
let dRes = d1 + d2;
let day = parseInt(dRes);
let fixResult = yRes + s1 + mRes + s2 + dRes;
let test1 = checkEnValid(inputField1.value);
let isValid = /^([1][3-4][0-9][0-9][/])([0][1-9]|[1][0-2])([/])([0][1-9]|[1-2][0-9]|[3][0-1])$/.test(fixResult);
if (isValid && test1) {
// inputField1.style.backgroundColor = '#a6e9a6';
start1valid = true;
} else {
if (inputField1.value != "") {
// inputField1.style.backgroundColor = '#f94c4c';
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "لطفا تاریخ را بصورت صحیح وارد کنید");
start1valid = false;
}
}
return start1valid;
}
function checkEnValid(fixDate1) {
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
fixNumbers = function (str) {
if (typeof str === 'string') {
for (var i = 0; i < 10; i++) {
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
}
}
return str;
};
let getdate = fixDate1;
let m1, m2;
let y1, y2, y3, y4;
let d1, d2;
for (let i = 0; i < getdate.length; i++) {
if (i === 0) {
y1 = fixNumbers(getdate[i]);
}
if (i === 1) {
y2 = fixNumbers(getdate[i]);
}
if (i === 2) {
y3 = fixNumbers(getdate[i]);
}
if (i === 3) {
y4 = fixNumbers(getdate[i]);
}
if (i === 5) {
m1 = fixNumbers(getdate[i]);
}
if (i === 6) {
m2 = fixNumbers(getdate[i]);
}
if (i === 8) {
d1 = fixNumbers(getdate[i]);
}
if (i === 9) {
d2 = fixNumbers(getdate[i]);
}
}
let yRes = y1 + y2 + y3 + y4;
let year = parseInt(yRes);
let mRes = m1 + m2;
let month = parseInt(mRes);
let dRes = d1 + d2;
let day = parseInt(dRes);
let kabiseh = false;
if (month <= 6 && day > 31) {
return false;
} else if (month > 6 && month < 12 && day > 30) {
return false;
} else if (month === 12) {
switch (year) {
case 1346:
kabiseh = true;
break;
case 1350:
kabiseh = true;
break;
case 1354:
kabiseh = true;
break;
case 1358:
kabiseh = true;
break;
case 1362:
kabiseh = true;
break;
case 1366:
kabiseh = true;
break;
case 1370:
kabiseh = true;
break;
case 1375:
kabiseh = true;
break;
case 1379:
kabiseh = true;
break;
case 1383:
kabiseh = true;
break;
case 1387:
kabiseh = true;
break;
case 1391:
kabiseh = true;
break;
case 1395:
kabiseh = true;
break;
case 1399:
kabiseh = true;
break;
case 1403:
kabiseh = true;
break;
case 1408:
kabiseh = true;
break;
case 1412:
kabiseh = true;
break;
case 1416:
kabiseh = true;
break;
case 1420:
kabiseh = true;
break;
case 1424:
kabiseh = true;
break;
case 1428:
kabiseh = true;
break;
case 1432:
kabiseh = true;
break;
case 1436:
kabiseh = true;
break;
case 1441:
kabiseh = true;
break;
case 1445:
kabiseh = true;
break;
default:
kabiseh = false;
}
if (kabiseh == true && day > 30) {
return false;
} else if (kabiseh == false && day > 29) {
return false;
} else {
return true;
}
} else {
return true;
}
}
$('input:radio[name="PaidLeaveType"]').change(function () {
if ($(this).is(':checked') && $(this).val() === 'روزانه') {
$("#hours").val('');
$("#hours").attr("disabled", "disabled");
$("#endLeave").removeAttr("disabled");
$('.endLeaveLabal').show();
$('#StartHoures').removeClass("invalidTime");
$('#StartHoures').val('');
$('#EndHours').removeClass("invalidTime");
$('#EndHours').val('');
$("#endLeave").show();
$('.res').remove();
$('.validTime').removeClass("validTime");
$('.sumHourseDiv').hide();
$('.sumDaysDiv').show();
} else if ($(this).is(':checked') && $(this).val() === 'ساعتی') {
$("#endLeave").val('');
$("#endLeave").attr("disabled", "disabled");
$("#endLeave").hide();
$('.endLeaveLabal').hide();
$("#hours").removeAttr("disabled");
$('.sumHourseDiv').show();
$('.sumDaysDiv').hide();
}
});
/////////////////Time Input Validatet/////////////////
$(".dateTime").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
new Cleave(this, {
time: true,
timePattern: ['h', 'm']
});
});
$("#StartHoures, #EndHours").on("keyup", validateTimeOrder);
function parseTimeToMinutes(time) {
const [hours, minutes] = time.split(':').map(Number);
return hours * 60 + minutes;
}
function validateTimeOrder() {
const startTime = $("#StartHoures").val();
const endTime = $("#EndHours").val();
if (startTime && endTime) {
const startMinutes = parseTimeToMinutes(startTime);
const endMinutes = parseTimeToMinutes(endTime);
if (startMinutes >= endMinutes) {
$('.alert-msg').show();
$('.alert-msg p').text('ساعت شروع و پایان نامعتبر است');
$("#StartHoures, #EndHours").addClass("invalidTime").removeClass("validTime");
return false;
} else {
$('.alert-msg').hide();
$('.alert-msg p').text('');
$("#StartHoures, #EndHours").addClass("validTime").removeClass("invalidTime");
}
if ($("#StartHoures").val().length === 5 && $("#EndHours").val().length === 5) {
computeHourse();
}
} else {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}
return true;
}
//$('#StartHoures').on("keyup",
// function () {
// var isValid = /^([2][0-3]|[1][0-9]|[0-9]|[0][0-9])([:][0-5][0-9])$/.test($(this).val());
// if (isValid) {
// $(this).addClass("validTime");
// $(this).removeClass("invalidTime");
// if ($('#EndHours').hasClass('validTime') && $('#EndHours').val() != null) {
// computeHourse();
// }
// } else {
// $(this).removeClass("validTime");
// $(this).addClass("invalidTime");
// }
// });
//$('#EndHours').on("keyup",
// function () {
// var isValid = /^([2][0-3]|[1][0-9]|[0-9]|[0][0-9])([:][0-5][0-9])$/.test($(this).val());
// if (isValid) {
// $(this).addClass("validTime");
// $(this).removeClass("invalidTime");
// if ($('#StartHoures').hasClass('validTime') && $('#StartHoures').val() != null) {
// computeHourse();
// }
// } else {
// $(this).removeClass("validTime");
// $(this).addClass("invalidTime");
// }
// });
function computeHourse() {
$('.res').remove();
$.ajax({
async: false,
dataType: 'json',
type: 'GET',
url: computeLeaveHourlyAjax,
headers: { "RequestVerificationToken": antiForgeryToken },
data: { "startHours": $('#StartHoures').val(), "endHours": $('#EndHours').val() },
success: function (response) {
let res = `<span class="res">${response.res}</span>`;
$('.sumHours').append(res);
},
failure: function (response) {
console.log(5, response);
}
});
}
function computeDays() {
$('.resultDays').remove();
$.ajax({
async: false,
dataType: 'json',
type: 'GET',
url: computeLeaveDailyAjax,
headers: { "RequestVerificationToken": antiForgeryToken },
data: { "startDay": $('#StartLeave').val(), "endDay": $('#EndLeave').val() },
success: function (response) {
if (response.status == false) {
$('.sumDays').addClass("note");
} else {
$('.sumDays').removeClass("note");
}
let res = `<span class="resultDays">${response.res}</span>`;
$('.sumDays').append(res);
},
failure: function (response) {
console.log(5, response);
}
});
}
});
$(document).ready(function () {
var selectEmployeeValue = $('#employeeSelect').val();
if (selectEmployeeValue == '') {
$('#cardSectionLeave').addClass('blur');
$("#cardSectionLeave div *").prop('disabled', true);
}
var selectWorkshopValue = $('#workshopSelect').val();
if (selectWorkshopValue == '') {
$('#cardSectionLeave').addClass('blur');
$("#cardSectionLeave div *").prop('disabled', true);
}
$('#employeeSelect').change(function () {
var selectValue = $('#employeeSelect').val();
if (selectValue == '') {
$('#cardSectionLeave').addClass('blur');
$("#cardSectionLeave div *").prop('disabled', true);
} else {
$('#cardSectionLeave').removeClass('blur');
$("#cardSectionLeave div *").prop('disabled', false);
$('#descriptionAcceptedCheck').attr('disabled', true);
}
});
});

View File

@@ -1,5 +1,4 @@
$(document).ready(function () {
$("#modalWorkshopFullname").text($('#caseHistoryWorkshopFullname').text());
$('.btn-register').addClass('disable');
@@ -10,13 +9,33 @@
});
// فعال و غیر فعال شدن برای تنظیمات ساعت کاری براساس ورودی هایی که اعمال میشود
if ($('#employeeSelectAddModal').val() !== '0' && $('.form-control-date').val() !== '') {
if ($('#employeeSelectAddModal').val() !== '0' && $('.form-control-date-main').val() !== '') {
$('.heightControll').removeClass('disable');
} else {
$('.heightControll').addClass('disable');
}
$(".form-control-date-main").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
new Cleave(this, {
date: true,
delimiter: '/',
datePattern: ['Y', 'm', 'd']
});
});
$(".form-control-date").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
new Cleave(this, {
date: true,
delimiter: '/',
@@ -25,6 +44,12 @@
});
$(".dateTime").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
new Cleave(this, {
time: true,
timePattern: ['h', 'm']
@@ -38,13 +63,22 @@
$(".btnAddTimeWork").on("click", function () {
var currentCount = $('.groupBox').length;
var $inputs = $('.dateTime');
var $inputsDate = $('.form-control-date');
var allFilled = true;
$inputsDate.each(function () {
if ($(this).val() === '') {
allFilled = false;
$('.btn-register').addClass('disable');
showAlert('ابتدا تاریخ و ساعت شروع و پایان را وارد نمائید.', $(this));
}
});
$inputs.each(function () {
if ($(this).val() === '') {
allFilled = false;
$('.btn-register').addClass('disable');
showAlert('ابتدا ساعت شروع و پایان را وارد نمائید.', $(this));
showAlert('ابتدا تاریخ و ساعت شروع و پایان را وارد نمائید.', $(this));
}
});
@@ -73,37 +107,91 @@
var timeWorkHtml = `
<div class="groupBox timeWork">
<div class="row align-items-center justify-content-between">
<div class="col-2 d-flex align-items-center">
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">از</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${currentCount}].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">الی</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${currentCount}].EndTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="col-2 d-flex align-items-center justify-content-end">
<div class="d-flex align-items-end align-items-md-center justify-content-between">
<div class="timeWorkTitle d-none d-md-block">
نوبت ${namePlacementPersian}
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<span class="startDatetxt">-</span>
<input type="text" class="form-control text-center form-control-date StartDate" name="Command.RollCallRecords[${currentCount}].StartDate" placeholder="0000/00/00" style="direction: ltr;">
</div>
<input type="text" class="form-control text-center cusDateTime dateTime StartTime" name="Command.RollCallRecords[${currentCount}].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="mx-2 position-relative">
<div class="timeWorkTitle position-absolute d-block d-md-none" style="width: auto;bottom: 43px;right: -10px;">
نوبت ${namePlacementPersian}
</div>
<div>الی</div>
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<input type="text" class="form-control text-center cusDateTime dateTime EndTime" name="Command.RollCallRecords[${currentCount}].EndTime" placeholder="00:00" style="direction: ltr;">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<input type="text" class="order-2 order-md-0 form-control text-center form-control-date EndDate" name="Command.RollCallRecords[${currentCount}].EndDate" placeholder="0000/00/00" style="direction: ltr;">
<span class="order-1 order-md-0 endDatetxt">-</span>
</div>
</div>
<div class="removeBtn ms-2">
<button type="button" class="btnRemoveTimeWork">
<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"/>
</svg>
<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"/>
</svg>
</button>
</div>
</div>
</div>`;
</div>
</div>
</div>
`;
$('#appendChildTimeWorkHtml').append(timeWorkHtml);
new Cleave(`input[name="Command.RollCallRecords[${currentCount}].StartTime"]`, {
const newStartDateInput = $(`input[name="Command.RollCallRecords[${currentCount}].StartDate"]`);
const newEndDateInput = $(`input[name="Command.RollCallRecords[${currentCount}].EndDate"]`);
const newStartTimeInput = $(`input[name="Command.RollCallRecords[${currentCount}].StartTime"]`);
const newEndTimeInput = $(`input[name="Command.RollCallRecords[${currentCount}].EndTime"]`);
newStartDateInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newEndDateInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newStartTimeInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newEndTimeInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
new Cleave(newStartDateInput[0], {
date: true,
delimiter: '/',
datePattern: ['Y', 'm', 'd']
});
new Cleave(newEndDateInput[0], {
date: true,
delimiter: '/',
datePattern: ['Y', 'm', 'd']
});
new Cleave(newStartTimeInput[0], {
time: true,
timePattern: ['h', 'm']
});
new Cleave(`input[name="Command.RollCallRecords[${currentCount}].EndTime"]`, {
new Cleave(newEndTimeInput[0], {
time: true,
timePattern: ['h', 'm']
});
@@ -131,6 +219,8 @@
// Update Remove button enable/disable state
updateRemoveButtons();
fetchTotalsRollCall();
});
});
@@ -160,6 +250,14 @@ function updateAddButtonText(currentCount) {
}
let allFilled = true;
$('.form-control-date').each(function () {
const value = $(this).val().trim();
if (value === "" || !dateValidCheck(value)) {
allFilled = false;
return false; // Break the loop
}
});
$('.dateTime').each(function () {
const value = $(this).val().trim();
if (value === "" || !timeValidCheck(value)) {
@@ -202,37 +300,117 @@ function ajaxPersonals() {
});
}
$(document).on('keyup', ".dateTime", function () {
$(document).on('keyup', ".dateTime, .form-control-date", function () {
let $input = $(this);
let value = $input.val();
let lengthValue = value.length;
let currentCount = $('.groupBox').length;
if (lengthValue >= 5) {
if (!timeValidCheck(value)) {
showAlert('ساعت را به درستی وارد نمائید', $input);
updateAddButtonText(currentCount);
} else {
clearAlert($input);
// validateAllTimes();
updateAddButtonText(currentCount);
const $groupBox = $input.closest('.groupBox');
// focusNextTimeInput($input);
const startDate = $groupBox.find('.StartDate').val();
const startTime = $groupBox.find('[name*="StartTime"]').val();
const endDate = $groupBox.find('.EndDate').val();
const endTime = $groupBox.find('[name*="EndTime"]').val();
// Validate input based on the field type
if ($input.hasClass('form-control-date')) {
// Date validation logic
if (lengthValue >= 10) {
if (!dateValidCheck(value)) {
showAlert('تاریخ را به درستی وارد نمائید', $input);
} else {
clearAlert($input);
dayOfWeekLoad(this, value);
}
} else {
if ($input.hasClass('StartDate')) {
$groupBox.find('.startDatetxt').text('-');
} else if ($input.hasClass('EndDate')) {
$groupBox.find('.endDatetxt').text('-');
}
}
} else if ($input.hasClass('dateTime')) {
if (lengthValue >= 5) {
if (!timeValidCheck(value)) {
showAlert('ساعت را به درستی وارد نمائید', $input);
} else {
clearAlert($input);
}
}
} else {
updateAddButtonText(currentCount);
}
//if (startDate.length >= 10 && endDate.length >= 10) {
// if (!validateDates(startDate, endDate)) {
// showAlert('حضور غیاب در حال ویرایش را نمیتوانید بیشتر از یک روز از ثبت حضور غیاب عقب تر یا جلو تر ببرید', $input);
// }
//}
if (startDate.length >= 10 && startTime.length >= 5 && endDate.length >= 10 && endTime.length >= 5) {
//totalWorkingDataLoad(startDate, startTime, endDate, endTime, $groupBox);
fetchTotalsRollCall();
}
updateAddButtonText(currentCount);
});
//function focusNextTimeInput(currentInput) {
// var inputs = $(".dateTime");
// var currentIndex = inputs.index(currentInput);
// if (currentIndex !== -1 && currentIndex < inputs.length - 1) {
// $(inputs[currentIndex + 1]).focus();
// }
//function validateDates(startDate, endDate) {
// return itemsEditableDatesData.some(entry => entry.startFa === startDate && entry.endFa === endDate);
//}
function dayOfWeekLoad(input, value) {
$.ajax({
url: dayOfWeekDataUrl,
type: 'GET',
data: { dateFa: value },
success: function (response) {
if (response.success) {
const $groupBox = $(input).closest('.groupBox');
if ($(input).hasClass('StartDate')) {
$groupBox.find('.startDatetxt').text(response.message);
} else if ($(input).hasClass('EndDate')) {
$groupBox.find('.endDatetxt').text(response.message);
}
} else {
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
});
}
function totalWorkingDataLoad(startDateVal, startTimeVal, endDateVal, endTimeVal, $groupBox) {
$.ajax({
url: totalWorkingDataUrl,
type: 'GET',
data: { startDate: startDateVal, startTime: startTimeVal, endDate: endDateVal, endTime: endTimeVal },
success: function (response) {
if (response) {
//$groupBox.find('.ti').text(response.message);
} else {
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
});
}
function showAlert(message, inputElement) {
inputElement.addClass("errored");
$('.alert-msg').show().find('p').text(message);
@@ -251,47 +429,11 @@ function timeValidCheck(value) {
return timePattern.test(value);
}
//function validateAllTimes() {
// let timeRanges = [];
function dateValidCheck(value) {
const datePattern = /^\d{4}\/(0[1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01])$/;
return datePattern.test(value);
}
// $(".groupBox").each(function () {
// let startTime = $(this).find('input[name*="StartTime"]').val();
// let endTime = $(this).find('input[name*="EndTime"]').val();
// if (startTime.length === 5 && endTime.length === 5) {
// let startParts = startTime.split(':');
// let endParts = endTime.split(':');
// let startInMinutes = parseInt(startParts[0]) * 60 + parseInt(startParts[1]);
// let endInMinutes = parseInt(endParts[0]) * 60 + parseInt(endParts[1]);
// timeRanges.push({ start: startInMinutes, end: endInMinutes });
// }
// });
// // Check for conflicts and order
// for (let i = 0; i < timeRanges.length; i++) {
// for (let j = 0; j < i; j++) {
// if (timeRanges[i].start >= timeRanges[i].end) {
// showAlert('زمان شروع باید قبل از زمان پایان باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
// return;
// }
// // Check for overlap with previous entries
// if (timeRanges[i].start < timeRanges[j].end && timeRanges[i].end > timeRanges[j].start) {
// showAlert('زمان‌ها نباید تداخل داشته باشند', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
// return;
// }
// // Check if the current start time is before the previous start time
// if (i > 0 && timeRanges[i].start < timeRanges[i - 1].start) {
// showAlert('ساعت جدید نباید کوچکتر از ساعت‌های قبلی باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
// return;
// }
// }
// }
//}
//$(document).on('click', '.btn-register', function () {
//});
$('.btn-register').click(function() {
var loading = $('.btn-register .spinner-loading');
@@ -314,18 +456,16 @@ $('.btn-register').click(function() {
$('.alert-success-msg').hide();
$('.alert-success-msg p').text('');
loading.hide();
$('#MainModal').modal('hide');
//window.location.reload();
}, 2000);
setTimeout(function () {
hasData = true;
dateIndex = 0;
dateEmployeeIndex = null;
$('#caseHistoryLoadData').html('');
caseHistoryLoadAjax();
loadUntilHeightExceeds();
}, 1000);
hasData = true;
dateIndex = 0;
dateEmployeeIndex = null;
$('#caseHistoryLoadData').html('');
caseHistoryLoadAjax();
loadUntilHeightExceeds();
$('#MainModal').modal('hide');
} else {
$('.alert-msg').show();
@@ -346,7 +486,7 @@ $('.btn-register').click(function() {
$(document).on('change', '#employeeSelectAddModal', function () {
const employeeId = $('#employeeSelectAddModal').val();
const dateFa = $('.form-control-date').val();
const dateFa = $('.form-control-date-main').val();
// Toggle .heightControll based on conditions
toggleHeightControl();
@@ -357,13 +497,11 @@ $(document).on('change', '#employeeSelectAddModal', function () {
}
});
$(document).on('keyup', '.form-control-date', function () {
// Toggle .heightControll based on conditions
$(document).on('keyup', '.form-control-date-main', function () {
toggleHeightControl();
// Trigger fetching of roll call data if input length is valid
const employeeId = $('#employeeSelectAddModal').val();
const dateFa = $('.form-control-date').val();
const dateFa = $('.form-control-date-main').val();
if (dateFa.length >= 10 && employeeId !== '0') {
fetchAndDisplayRollCallData(employeeId, dateFa);
@@ -372,7 +510,7 @@ $(document).on('keyup', '.form-control-date', function () {
function toggleHeightControl() {
if ($('#employeeSelectAddModal').val() !== '0' && $('.form-control-date').val().length >= 10) {
if ($('#employeeSelectAddModal').val() !== '0' && $('.form-control-date-main').val().length >= 10) {
$('.heightControll').removeClass('disable');
$('.btn-register').removeClass('disable');
} else {
@@ -381,6 +519,9 @@ function toggleHeightControl() {
}
}
//var itemsEditableDatesData = [];
// Function to handle the AJAX request and generate HTML for roll call data
function fetchAndDisplayRollCallData(employeeId, dateFa) {
let htmlElement = '';
@@ -395,12 +536,13 @@ function fetchAndDisplayRollCallData(employeeId, dateFa) {
data: { 'employeeId': employeeId, 'date': dateFa },
success: function (response) {
const rollCallData = response.data;
//itemsEditableDatesData = response.editableDates;
console.log(response);
// console.log(response);
if (response.hasLeave) {
htmlElement = `
<div class="text-center">این پرسنل مرخصی ثبت شده است.</div>
<div class="text-center">برای این پرسنل مرخصی ثبت شده است.</div>
`;
$('#appendChildTimeWorkHtml').html(htmlElement);
$('.btn-register').addClass('disable');
@@ -442,52 +584,102 @@ function fetchAndDisplayRollCallData(employeeId, dateFa) {
namePlacementPersian = "";
}
htmlElement += `<div class="groupBox timeWork">
<div class="row align-items-center justify-content-between">
<div class="col-2 d-flex align-items-center">
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">از</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${indexRollCallTime}].StartTime" value="${employee.startTimeString}" placeholder="00:00" style="direction: ltr;">
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">الی</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${indexRollCallTime}].EndTime" value="${employee.endTimeString}" placeholder="00:00" style="direction: ltr;">
</div>`;
htmlElement += `
<div class="groupBox timeWork">
<div class="d-flex align-items-end align-items-md-center justify-content-between">
<div class="timeWorkTitle d-none d-md-block">
نوبت ${namePlacementPersian}
</div>
if (indexRollCallTime === 0) {
htmlElement += `<div class="col-2 d-flex align-items-center justify-content-end">
</div>`;
} else {
htmlElement += `<div class="col-2 d-flex align-items-center justify-content-end">
<button type="button" class="btnRemoveTimeWork">
<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"/>
</svg>
</button>
</div>`;
}
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<span class="startDatetxt">${employee.startDayOfWeekFa}</span>
<input type="text" class="form-control text-center form-control-date StartDate" name="Command.RollCallRecords[${indexRollCallTime}].StartDate" value="${employee.startDateFa}" placeholder="0000/00/00" style="direction: ltr;">
</div>
<input type="text" class="form-control text-center cusDateTime dateTime StartTime" name="Command.RollCallRecords[${indexRollCallTime}].StartTime" value="${employee.startTimeString}" placeholder="00:00" style="direction: ltr;">
</div>
<div class="mx-2 position-relative">
<div class="timeWorkTitle position-absolute d-block d-md-none" style="width: auto;bottom: 43px;right: -10px;">
نوبت ${namePlacementPersian}
</div>
<div>الی</div>
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<input type="text" class="form-control text-center cusDateTime dateTime EndTime" name="Command.RollCallRecords[${indexRollCallTime}].EndTime" value="${employee.endTimeString}" placeholder="00:00" style="direction: ltr;">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<input type="text" class="order-2 order-md-0 form-control text-center form-control-date EndDate" name="Command.RollCallRecords[${indexRollCallTime}].EndDate" value="${employee.endDateFa}" placeholder="0000/00/00" style="direction: ltr;">
<span class="order-1 order-md-0 endDatetxt">${employee.endDayOfWeekFa}</span>
</div>
</div>`;
if (indexRollCallTime === 0) {
htmlElement += `<div class="removeBtn ms-2"></div>`;
} else {
htmlElement += `<div class="removeBtn ms-2">
<button type="button" class="btnRemoveTimeWork">
<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"/>
</svg>
</button>
</div>`;
}
htmlElement += `
</div>
</div>`;
htmlElement += `</div>
</div>`;
$('#appendChildTimeWorkHtml').html(htmlElement);
// Apply time formatting with Cleave.js
new Cleave(`input[name="Command.RollCallRecords[${indexRollCallTime}].StartTime"]`,
{
time: true,
timePattern: ['h', 'm']
});
const newStartDateInput = $(`input[name="Command.RollCallRecords[${indexRollCallTime}].StartDate"]`);
const newEndDateInput = $(`input[name="Command.RollCallRecords[${indexRollCallTime}].EndDate"]`);
const newStartTimeInput = $(`input[name="Command.RollCallRecords[${indexRollCallTime}].StartTime"]`);
const newEndTimeInput = $(`input[name="Command.RollCallRecords[${indexRollCallTime}].EndTime"]`);
newStartDateInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newEndDateInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newStartTimeInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newEndTimeInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
new Cleave(newStartDateInput[0], {
date: true,
delimiter: '/',
datePattern: ['Y', 'm', 'd']
});
new Cleave(newEndDateInput[0], {
date: true,
delimiter: '/',
datePattern: ['Y', 'm', 'd']
});
new Cleave(newStartTimeInput[0], {
time: true,
timePattern: ['h', 'm']
});
new Cleave(newEndTimeInput[0], {
time: true,
timePattern: ['h', 'm']
});
new Cleave(`input[name="Command.RollCallRecords[${indexRollCallTime}].EndTime"]`,
{
time: true,
timePattern: ['h', 'm']
});
// Update add button text
updateAddButtonText(indexRollCallTime + 1);
@@ -497,55 +689,184 @@ function fetchAndDisplayRollCallData(employeeId, dateFa) {
$(".btnAddTimeWork").hide();
}
});
$(".form-control-date").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
new Cleave(this, {
date: true,
delimiter: '/',
datePattern: ['Y', 'm', 'd']
});
});
$(".dateTime").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
new Cleave(this, {
time: true,
timePattern: ['h', 'm']
});
});
} else {
var namePlacementPersian = "اول";
var nameBtnPersian = "دوم";
htmlElement += `<div class="groupBox timeWork">
<div class="row align-items-center justify-content-between">
<div class="col-2 d-flex align-items-center">
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
htmlElement += `
<div class="groupBox timeWork">
<div class="d-flex align-items-end align-items-md-center justify-content-between">
<div class="timeWorkTitle d-none d-md-block">
نوبت ${namePlacementPersian}
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<span class="startDatetxt">-</span>
<input type="text" class="form-control text-center form-control-date StartDate" name="Command.RollCallRecords[0].StartDate" placeholder="0000/00/00" style="direction: ltr;">
</div>
<input type="text" class="form-control text-center cusDateTime dateTime StartTime" name="Command.RollCallRecords[0].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="mx-2 position-relative">
<div class="timeWorkTitle position-absolute d-block d-md-none" style="width: auto;bottom: 43px;right: -10px;">
نوبت ${namePlacementPersian}
</div>
<div>الی</div>
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<input type="text" class="form-control text-center cusDateTime dateTime EndTime" name="Command.RollCallRecords[0].EndTime" placeholder="00:00" style="direction: ltr;">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<input type="text" class="order-2 order-md-0 form-control text-center form-control-date EndDate" name="Command.RollCallRecords[0].EndDate" placeholder="0000/00/00" style="direction: ltr;">
<span class="order-1 order-md-0 endDatetxt">-</span>
</div>
</div>
<div class="removeBtn ms-2">
</div>
</div>
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">از</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">الی</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[0].EndTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="col-2 d-flex align-items-center justify-content-end">
</div>
</div>
</div>`;
`;
// Update add button text
updateAddButtonText(1);
$('#appendChildTimeWorkHtml').html(htmlElement);
// Apply time formatting with Cleave.js
new Cleave(`input[name="Command.RollCallRecords[0].StartTime"]`,
{
time: true,
timePattern: ['h', 'm']
});
const newStartDateInput = $(`input[name="Command.RollCallRecords[0].StartDate"]`);
const newEndDateInput = $(`input[name="Command.RollCallRecords[0].EndDate"]`);
const newStartTimeInput = $(`input[name="Command.RollCallRecords[0].StartTime"]`);
const newEndTimeInput = $(`input[name="Command.RollCallRecords[0].EndTime"]`);
new Cleave(`input[name="Command.RollCallRecords[0].EndTime"]`,
{
time: true,
timePattern: ['h', 'm']
});
newStartDateInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newEndDateInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newStartTimeInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newEndTimeInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
new Cleave(newStartDateInput[0], {
date: true,
delimiter: '/',
datePattern: ['Y', 'm', 'd']
});
new Cleave(newEndDateInput[0], {
date: true,
delimiter: '/',
datePattern: ['Y', 'm', 'd']
});
new Cleave(newStartTimeInput[0], {
time: true,
timePattern: ['h', 'm']
});
new Cleave(newEndTimeInput[0], {
time: true,
timePattern: ['h', 'm']
});
}
// Update Remove button enable/disable state
updateRemoveButtons();
fetchTotalsRollCall();
}
},
error: function (err) {
console.log('Error fetching roll call data:', err);
}
});
}
function getTimeWorkData() {
var rollCalls = [];
$('.groupBox.timeWork').each(function () {
var startDate = $(this).find('.StartDate').val();
var startTime = $(this).find('.StartTime').val();
var endDate = $(this).find('.EndDate').val();
var endTime = $(this).find('.EndTime').val();
const calculateRollCallsTotalDuration = {};
calculateRollCallsTotalDuration.StartDateFa = startDate;
calculateRollCallsTotalDuration.StartTime = startTime;
calculateRollCallsTotalDuration.EndDateFa = endDate ;
calculateRollCallsTotalDuration.EndTime = endTime ;
rollCalls.push(calculateRollCallsTotalDuration);
});
return rollCalls;
}
function fetchTotalsRollCall() {
const employeeId = $('#employeeSelectAddModal').val();
const dateFa = $('.form-control-date-main').val();
if (employeeId !== '0' && dateFa !== '') {
var rollCalls = getTimeWorkData();
$.ajax({
dataType: 'json',
type: 'POST',
url: calculateRollCallsTotalDurationDataUrl,
data: { rollCalls },
headers: { "RequestVerificationToken": antiForgeryToken },
success: function (response) {
if (response) {
$('#resultCalculateRollCallsTotal').show();
$('#resultCalculateRollCallsTotal').text(response.result);
} else {
$('#resultCalculateRollCallsTotal').hide();
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
});
}
}

View File

@@ -6,6 +6,12 @@ $(document).ready(function () {
$('.btn-register').addClass('disable');
$(".form-control-date").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
new Cleave(this, {
date: true,
delimiter: '/',
@@ -14,6 +20,25 @@ $(document).ready(function () {
});
$(".dateTime").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
new Cleave(this, {
time: true,
timePattern: ['h', 'm']
});
});
$(".dateTimeIrregular").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
new Cleave(this, {
time: true,
timePattern: ['h', 'm']
@@ -25,13 +50,22 @@ $(document).ready(function () {
$(".btnAddTimeWork").on("click", function () {
var currentCount = $('.groupBox').length;
var $inputs = $('.dateTime');
var $inputsDate = $('.form-control-date');
var allFilled = true;
$inputsDate.each(function () {
if ($(this).val() === '') {
allFilled = false;
$('.btn-register').addClass('disable');
showAlert('ابتدا تاریخ و ساعت شروع و پایان را وارد نمائید.', $(this));
}
});
$inputs.each(function () {
if ($(this).val() === '') {
allFilled = false;
$('.btn-register').addClass('disable');
showAlert('ابتدا ساعت شروع و پایان را وارد نمائید.', $(this));
showAlert('ابتدا تاریخ و ساعت شروع و پایان را وارد نمائید.', $(this));
}
});
@@ -60,38 +94,91 @@ $(document).ready(function () {
}
var timeWorkHtml = `
<div class="groupBox timeWork">
<div class="row align-items-center justify-content-between">
<div class="col-2 d-flex align-items-center">
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">از</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${currentCount}].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">الی</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${currentCount}].EndTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="col-2 d-flex align-items-center justify-content-end">
<button type="button" class="btnRemoveTimeWork">
<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"/>
</svg>
</button>
</div>
</div>
</div>`;
<div class="groupBox">
<div class="d-flex align-items-end align-items-md-center justify-content-between">
<div class="timeWorkTitle d-none d-md-block">
نوبت ${namePlacementPersian}
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<span class="startDatetxt">-</span>
<input type="text" class="form-control text-center form-control-date StartDate" name="Command.RollCallRecords[${currentCount}].StartDate" placeholder="0000/00/00" style="direction: ltr;">
</div>
<input type="text" class="form-control text-center cusDateTime dateTime StartTime" name="Command.RollCallRecords[${currentCount}].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="mx-2 position-relative">
<div class="timeWorkTitle position-absolute d-block d-md-none" style="width: auto;bottom: 43px;right: -10px;">
نوبت ${namePlacementPersian}
</div>
<div>الی</div>
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<input type="text" class="form-control text-center cusDateTime dateTime EndTime" name="Command.RollCallRecords[${currentCount}].EndTime" placeholder="00:00" style="direction: ltr;">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<input type="text" class="order-2 order-md-0 form-control text-center form-control-date EndDate" name="Command.RollCallRecords[${currentCount}].EndDate" placeholder="0000/00/00" style="direction: ltr;">
<span class="order-1 order-md-0 endDatetxt">-</span>
</div>
</div>
<div class="removeBtn ms-2">
<button type="button" class="btnRemoveTimeWork">
<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"/>
</svg>
</button>
</div>
</div>
</div>`;
$('#appendChildTimeWorkHtml').append(timeWorkHtml);
new Cleave(`input[name="Command.RollCallRecords[${currentCount}].StartTime"]`, {
const newStartDateInput = $(`input[name="Command.RollCallRecords[${currentCount}].StartDate"]`);
const newEndDateInput = $(`input[name="Command.RollCallRecords[${currentCount}].EndDate"]`);
const newStartTimeInput = $(`input[name="Command.RollCallRecords[${currentCount}].StartTime"]`);
const newEndTimeInput = $(`input[name="Command.RollCallRecords[${currentCount}].EndTime"]`);
newStartDateInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newEndDateInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newStartTimeInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newEndTimeInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
new Cleave(newStartDateInput[0], {
date: true,
delimiter: '/',
datePattern: ['Y', 'm', 'd']
});
new Cleave(newEndDateInput[0], {
date: true,
delimiter: '/',
datePattern: ['Y', 'm', 'd']
});
new Cleave(newStartTimeInput[0], {
time: true,
timePattern: ['h', 'm']
});
new Cleave(`input[name="Command.RollCallRecords[${currentCount}].EndTime"]`, {
new Cleave(newEndTimeInput[0], {
time: true,
timePattern: ['h', 'm']
});
@@ -102,11 +189,11 @@ $(document).ready(function () {
$(".btnAddTimeWork").hide();
}
// Update Remove button enable/disable state
updateRemoveButtons();
}
});
$(document).on("click", ".btnRemoveTimeWork", function () {
$(this).closest(".groupBox").remove();
var currentCount = $('.groupBox').length;
@@ -119,7 +206,78 @@ $(document).ready(function () {
// Update Remove button enable/disable state
updateRemoveButtons();
fetchTotalsRollCall();
});
//--------------------------------------------------------------
const $boxes = $('.irrregularContent');
const $forwardArrow = $('#nextBox').parent().find('svg path:first-child');
const $backwardArrow = $('#prevBox').parent().find('svg path:first-child');
let currentIndex = 0;
const updateBoxes = () => {
$boxes.each((index, box) => {
const $box = $(box);
if (index < currentIndex) {
// Previous boxes
$box.css({
transform: 'translateX(-100%)',
opacity: 0,
position: 'absolute',
});
} else if (index === currentIndex) {
// Current box
$box.addClass('active').css({
transform: 'translateX(0)',
opacity: 1,
position: 'relative',
});
} else {
// Next boxes
$box.css({
transform: 'translateX(100%)',
opacity: 0,
position: 'absolute',
});
}
});
if (currentIndex === 0) {
$backwardArrow.attr('fill', '#D9D9D9');
$forwardArrow.attr('fill', '#2DBDBD');
} else if (currentIndex === $boxes.length - 1) {
$backwardArrow.attr('fill', '#2DBDBD');
$forwardArrow.attr('fill', '#D9D9D9');
} else {
$backwardArrow.attr('fill', '#2DBDBD');
$forwardArrow.attr('fill', '#2DBDBD');
}
};
$('#nextBox').on('click', function () {
if (currentIndex < $boxes.length - 1) {
currentIndex++;
updateBoxes();
}
});
$('#prevBox').on('click', function () {
if (currentIndex > 0) {
currentIndex--;
updateBoxes();
}
});
updateBoxes();
//--------------------------------------------------------------
fetchTotalsRollCall();
});
function updateRemoveButtons() {
$(".btnRemoveTimeWork").addClass("disable");
@@ -147,6 +305,14 @@ function updateAddButtonText(currentCount) {
}
let allFilled = true;
$('.form-control-date').each(function () {
const value = $(this).val().trim();
if (value === "" || !dateValidCheck(value)) {
allFilled = false;
return false; // Break the loop
}
});
$('.dateTime').each(function () {
const value = $(this).val().trim();
if (value === "" || !timeValidCheck(value)) {
@@ -162,37 +328,121 @@ function updateAddButtonText(currentCount) {
}
}
$(document).on('keyup', ".dateTime", function () {
$(document).on('keyup', ".dateTime, .form-control-date", function () {
let $input = $(this);
let value = $input.val();
let lengthValue = value.length;
let currentCount = $('.groupBox').length;
if (lengthValue >= 5) {
if (!timeValidCheck(value)) {
showAlert('ساعت را به درستی وارد نمائید', $input);
updateAddButtonText(currentCount);
} else {
clearAlert($input);
// validateAllTimes();
updateAddButtonText(currentCount);
const $groupBox = $input.closest('.groupBox');
// focusNextTimeInput($input);
const startDate = $groupBox.find('.StartDate').val();
const startTime = $groupBox.find('[name*="StartTime"]').val();
const endDate = $groupBox.find('.EndDate').val();
const endTime = $groupBox.find('[name*="EndTime"]').val();
// Validate input based on the field type
if ($input.hasClass('form-control-date')) {
// Date validation logic
if (lengthValue >= 10) {
if (!dateValidCheck(value)) {
showAlert('تاریخ را به درستی وارد نمائید', $input);
} else {
clearAlert($input);
dayOfWeekLoad(this, value);
}
} else {
if ($input.hasClass('StartDate')) {
$groupBox.find('.startDatetxt').text('-');
} else if ($input.hasClass('EndDate')) {
$groupBox.find('.endDatetxt').text('-');
}
}
} else if ($input.hasClass('dateTime')) {
if (lengthValue >= 5) {
if (!timeValidCheck(value)) {
showAlert('ساعت را به درستی وارد نمائید', $input);
} else {
clearAlert($input);
}
}
} else {
updateAddButtonText(currentCount);
}
//if (startDate.length >= 10 && endDate.length >= 10) {
// if (!validateDates(startDate, endDate)) {
// showAlert('حضور غیاب در حال ویرایش را نمیتوانید بیشتر از یک روز از ثبت حضور غیاب عقب تر یا جلو تر ببرید', $input);
// }
//}
if (startDate.length >= 10 && startTime.length >= 5 && endDate.length >= 10 && endTime.length >= 5) {
//totalWorkingDataLoad(startDate, startTime, endDate, endTime, $groupBox);
fetchTotalsRollCall();
}
updateAddButtonText(currentCount);
});
//function focusNextTimeInput(currentInput) {
// var inputs = $(".dateTime");
// var currentIndex = inputs.index(currentInput);
// if (currentIndex !== -1 && currentIndex < inputs.length - 1) {
// $(inputs[currentIndex + 1]).focus();
// }
//function validateDates(startDate, endDate) {
// return itemsEditableDatesData.some(entry => entry.startFa === startDate && entry.endFa === endDate);
//}
function dayOfWeekLoad(input, value) {
var dayOfWeekUrl = ``;
if (urlPathname.indexOf('/Client/Company/WorkFlow/RollCall') > -1) {
dayOfWeekUrl = dayOfWeekDataWorkFlowUrl;
} else {
dayOfWeekUrl = dayOfWeekDataUrl;
}
$.ajax({
url: dayOfWeekUrl,
type: 'GET',
data: { dateFa: value },
success: function (response) {
if (response.success) {
const $groupBox = $(input).closest('.groupBox');
if ($(input).hasClass('StartDate')) {
$groupBox.find('.startDatetxt').text(response.message);
} else if ($(input).hasClass('EndDate')) {
$groupBox.find('.endDatetxt').text(response.message);
}
} else {
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
});
}
function totalWorkingDataLoad(startDateVal, startTimeVal, endDateVal, endTimeVal, $groupBox) {
$.ajax({
url: totalWorkingDataUrl,
type: 'GET',
data: { startDate: startDateVal, startTime: startTimeVal, endDate: endDateVal, endTime: endTimeVal },
success: function (response) {
if (response) {
//$groupBox.find('.ti').text(response.message);
} else {
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
});
}
function showAlert(message, inputElement) {
inputElement.addClass("errored");
$('.alert-msg').show().find('p').text(message);
@@ -211,45 +461,13 @@ function timeValidCheck(value) {
return timePattern.test(value);
}
//function validateAllTimes() {
// let timeRanges = [];
// $(".groupBox").each(function () {
// let startTime = $(this).find('input[name*="StartTime"]').val();
// let endTime = $(this).find('input[name*="EndTime"]').val();
// if (startTime.length === 5 && endTime.length === 5) {
// let startParts = startTime.split(':');
// let endParts = endTime.split(':');
// let startInMinutes = parseInt(startParts[0]) * 60 + parseInt(startParts[1]);
// let endInMinutes = parseInt(endParts[0]) * 60 + parseInt(endParts[1]);
// timeRanges.push({ start: startInMinutes, end: endInMinutes });
// }
// });
// // Check for conflicts and order
// for (let i = 0; i < timeRanges.length; i++) {
// for (let j = 0; j < i; j++) {
// if (timeRanges[i].start >= timeRanges[i].end) {
// showAlert('زمان شروع باید قبل از زمان پایان باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
// return;
// }
// // Check for overlap with previous entries
// if (timeRanges[i].start < timeRanges[j].end && timeRanges[i].end > timeRanges[j].start) {
// showAlert('زمان‌ها نباید تداخل داشته باشند', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
// return;
// }
// // Check if the current start time is before the previous start time
// if (i > 0 && timeRanges[i].start < timeRanges[i - 1].start) {
// showAlert('ساعت جدید نباید کوچکتر از ساعت‌های قبلی باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
// return;
// }
// }
// }
//}
function dateValidCheck(value) {
const datePattern = /^\d{4}\/(0[1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01])$/;
return datePattern.test(value);
}
$('.btn-register').click(function () {
var urlPostEditRollCall = ``;
if (urlPathname.indexOf('/Client/Company/WorkFlow/RollCall') > -1) {
urlPostEditRollCall = saveRollCallWorkTimeFromWorkFlowAjax;
@@ -261,9 +479,7 @@ $('.btn-register').click(function () {
var dateEmployeeID = $('#employeeID').val() + '-' + dateFa;
var loading = $('.btn-register .spinner-loading');
var data = $('#create-form').serialize();
$.ajax({
async: false,
dataType: 'json',
@@ -291,6 +507,26 @@ $('.btn-register').click(function () {
//loadUndefinedRollCallsList();
//loadOverlappingLeavesList();
//var menuActive = $('#navbar-animmenu li.active').data('menu');
//switch (menuActive) {
// case "absent":
// loadWorkFlowsAbsentsList();
// break;
// case "cut":
// LoadWorkFlowsCutList();
// break;
// case "lunchBreak":
// loadWorkFlowEmployeesWithoutLunchBreakList();
// break;
// case "undefined":
// loadUndefinedRollCallsList();
// break;
// case "overlappingLeave":
// loadOverlappingLeavesList();
// break;
// default:
//}
var menuActive = $('#navbar-animmenu li.active').data('menu');
switch (menuActive) {
case "absent":
@@ -326,7 +562,6 @@ $('.btn-register').click(function () {
default:
}
$('#MainModal').modal('hide');
}
@@ -340,28 +575,7 @@ $('.btn-register').click(function () {
$('#MainModal').modal('hide');
}
//loading.show();
//$('.alert-success-msg').show();
//$('.alert-success-msg p').text(response.message);
//setTimeout(function () {
// $('.alert-success-msg').hide();
// $('.alert-success-msg p').text('');
// loading.hide();
// //$('#MainModal').modal('hide');
// window.location.reload();
//}, 2000);
//setTimeout(function () {
// window.location.reload();
// //hasData = true;
// //dateIndex = 0;
// //dateEmployeeIndex = null;
// //$('#caseHistoryLoadData').html('');
// //caseHistoryLoadAjax();
// //loadUntilHeightExceeds();
//}, 1000);
//window.location.reload();
} else {
$('.alert-msg').show();
@@ -386,4 +600,59 @@ function toggleHeightControl() {
} else {
$('.heightControll').addClass('disable');
}
}
function getTimeWorkData() {
var rollCalls = [];
$('.groupBox').each(function () {
var startDate = $(this).find('.StartDate').val();
var startTime = $(this).find('.StartTime').val();
var endDate = $(this).find('.EndDate').val();
var endTime = $(this).find('.EndTime').val();
const calculateRollCallsTotalDuration = {};
calculateRollCallsTotalDuration.StartDateFa = startDate;
calculateRollCallsTotalDuration.StartTime = startTime;
calculateRollCallsTotalDuration.EndDateFa = endDate;
calculateRollCallsTotalDuration.EndTime = endTime;
rollCalls.push(calculateRollCallsTotalDuration);
});
return rollCalls;
}
function fetchTotalsRollCall() {
const employeeId = $('#employeeSelectAddModal').val();
const dateFa = $('.form-control-date-main').val();
var calculateRollCallUrl = ``;
if (urlPathname.indexOf('/Client/Company/WorkFlow/RollCall') > -1) {
calculateRollCallUrl = calculateRollCallsTotalDurationDataWorkFlowUrl;
} else {
calculateRollCallUrl = calculateRollCallsTotalDurationDataUrl;
}
if (employeeId !== '0' && dateFa !== '') {
var rollCalls = getTimeWorkData();
$.ajax({
dataType: 'json',
type: 'POST',
url: calculateRollCallUrl,
data: { rollCalls },
headers: { "RequestVerificationToken": antiForgeryToken },
success: function (response) {
if (response) {
$('#resultCalculateRollCallsTotal').show();
$('#resultCalculateRollCallsTotal').text(response.result);
} else {
$('#resultCalculateRollCallsTotal').hide();
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
});
}
}

View File

@@ -81,6 +81,7 @@
});
$('#save').on('click', function () {
$('#save').addClass("disable");
var workshopSelect = $("#workshopSelect").val();
var employeeSelect = $("#employeeSelect").val();
@@ -142,6 +143,7 @@
$('.alert-success-msg p').text('');
}, 1500);
$('#save').addClass("disable");
$('#printSingleID').val(response.printID);
$('#printSingle').show();
//$('#MainModal').modal('hide');
@@ -210,13 +212,18 @@
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
}
$('#save').removeClass("disable");
}
},
error: function (err) {
$('#save').removeClass("disable");
console.log(err);
}
});
} else {
$('#save').removeClass("disable");
$('.alert-msg').show();
$('.alert-msg p').text('لطفا خطاها را برطرف کنید.');
setTimeout(function () {

View File

@@ -1,11 +1,15 @@
var urlPathname = location.pathname;
$(document).ready(function () {
$(document).ready(function () {
$("#modalWorkshopFullname").text($('#caseHistoryWorkshopFullname').text());
$('.btn-register').addClass('disable');
$(".form-control-date").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
new Cleave(this, {
date: true,
delimiter: '/',
@@ -14,6 +18,25 @@ $(document).ready(function () {
});
$(".dateTime").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
new Cleave(this, {
time: true,
timePattern: ['h', 'm']
});
});
$(".dateTimeIrregular").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
new Cleave(this, {
time: true,
timePattern: ['h', 'm']
@@ -25,13 +48,22 @@ $(document).ready(function () {
$(".btnAddTimeWork").on("click", function () {
var currentCount = $('.groupBox').length;
var $inputs = $('.dateTime');
var $inputsDate = $('.form-control-date');
var allFilled = true;
$inputsDate.each(function () {
if ($(this).val() === '') {
allFilled = false;
$('.btn-register').addClass('disable');
showAlert('ابتدا تاریخ و ساعت شروع و پایان را وارد نمائید.', $(this));
}
});
$inputs.each(function () {
if ($(this).val() === '') {
allFilled = false;
$('.btn-register').addClass('disable');
showAlert('ابتدا ساعت شروع و پایان را وارد نمائید.', $(this));
showAlert('ابتدا تاریخ و ساعت شروع و پایان را وارد نمائید.', $(this));
}
});
@@ -60,38 +92,91 @@ $(document).ready(function () {
}
var timeWorkHtml = `
<div class="groupBox timeWork">
<div class="row align-items-center justify-content-between">
<div class="col-2 d-flex align-items-center">
<div class="timeWorkTitle">نوبت ${namePlacementPersian}</div>
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">از</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${currentCount}].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="col-4 d-flex align-items-center">
<div class="timeWorkTitle">الی</div>
<input type="text" class="form-control text-center dateTime" name="Command.RollCallRecords[${currentCount}].EndTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="col-2 d-flex align-items-center justify-content-end">
<button type="button" class="btnRemoveTimeWork">
<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"/>
</svg>
</button>
</div>
</div>
</div>`;
<div class="groupBox">
<div class="d-flex align-items-end align-items-md-center justify-content-between">
<div class="timeWorkTitle d-none d-md-block">
نوبت ${namePlacementPersian}
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<span class="startDatetxt">-</span>
<input type="text" class="form-control text-center form-control-date StartDate" name="Command.RollCallRecords[${currentCount}].StartDate" placeholder="0000/00/00" style="direction: ltr;">
</div>
<input type="text" class="form-control text-center cusDateTime dateTime StartTime" name="Command.RollCallRecords[${currentCount}].StartTime" placeholder="00:00" style="direction: ltr;">
</div>
<div class="mx-2 position-relative">
<div class="timeWorkTitle position-absolute d-block d-md-none" style="width: auto;bottom: 43px;right: -10px;">
نوبت ${namePlacementPersian}
</div>
<div>الی</div>
</div>
<div class="d-flex align-items-end align-items-md-center justify-content-between gap-2">
<input type="text" class="form-control text-center cusDateTime dateTime EndTime" name="Command.RollCallRecords[${currentCount}].EndTime" placeholder="00:00" style="direction: ltr;">
<div class="d-flex flex-md-row flex-column align-items-center justify-content-between gap-1 mainDate">
<input type="text" class="order-2 order-md-0 form-control text-center form-control-date EndDate" name="Command.RollCallRecords[${currentCount}].EndDate" placeholder="0000/00/00" style="direction: ltr;">
<span class="order-1 order-md-0 endDatetxt">-</span>
</div>
</div>
<div class="removeBtn ms-2">
<button type="button" class="btnRemoveTimeWork">
<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"/>
</svg>
</button>
</div>
</div>
</div>`;
$('#appendChildTimeWorkHtml').append(timeWorkHtml);
new Cleave(`input[name="Command.RollCallRecords[${currentCount}].StartTime"]`, {
const newStartDateInput = $(`input[name="Command.RollCallRecords[${currentCount}].StartDate"]`);
const newEndDateInput = $(`input[name="Command.RollCallRecords[${currentCount}].EndDate"]`);
const newStartTimeInput = $(`input[name="Command.RollCallRecords[${currentCount}].StartTime"]`);
const newEndTimeInput = $(`input[name="Command.RollCallRecords[${currentCount}].EndTime"]`);
newStartDateInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newEndDateInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newStartTimeInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
newEndTimeInput.on('input', function () {
const value = convertPersianNumbersToEnglish($(this).val());
$(this).val(value);
});
new Cleave(newStartDateInput[0], {
date: true,
delimiter: '/',
datePattern: ['Y', 'm', 'd']
});
new Cleave(newEndDateInput[0], {
date: true,
delimiter: '/',
datePattern: ['Y', 'm', 'd']
});
new Cleave(newStartTimeInput[0], {
time: true,
timePattern: ['h', 'm']
});
new Cleave(`input[name="Command.RollCallRecords[${currentCount}].EndTime"]`, {
new Cleave(newEndTimeInput[0], {
time: true,
timePattern: ['h', 'm']
});
@@ -102,11 +187,11 @@ $(document).ready(function () {
$(".btnAddTimeWork").hide();
}
// Update Remove button enable/disable state
updateRemoveButtons();
}
});
$(document).on("click", ".btnRemoveTimeWork", function () {
$(this).closest(".groupBox").remove();
var currentCount = $('.groupBox').length;
@@ -119,7 +204,78 @@ $(document).ready(function () {
// Update Remove button enable/disable state
updateRemoveButtons();
fetchTotalsRollCall();
});
//--------------------------------------------------------------
const $boxes = $('.irrregularContent');
const $forwardArrow = $('#nextBox').parent().find('svg path:first-child');
const $backwardArrow = $('#prevBox').parent().find('svg path:first-child');
let currentIndex = 0;
const updateBoxes = () => {
$boxes.each((index, box) => {
const $box = $(box);
if (index < currentIndex) {
// Previous boxes
$box.css({
transform: 'translateX(-100%)',
opacity: 0,
position: 'absolute',
});
} else if (index === currentIndex) {
// Current box
$box.addClass('active').css({
transform: 'translateX(0)',
opacity: 1,
position: 'relative',
});
} else {
// Next boxes
$box.css({
transform: 'translateX(100%)',
opacity: 0,
position: 'absolute',
});
}
});
if (currentIndex === 0) {
$backwardArrow.attr('fill', '#D9D9D9');
$forwardArrow.attr('fill', '#2DBDBD');
} else if (currentIndex === $boxes.length - 1) {
$backwardArrow.attr('fill', '#2DBDBD');
$forwardArrow.attr('fill', '#D9D9D9');
} else {
$backwardArrow.attr('fill', '#2DBDBD');
$forwardArrow.attr('fill', '#2DBDBD');
}
};
$('#nextBox').on('click', function () {
if (currentIndex < $boxes.length - 1) {
currentIndex++;
updateBoxes();
}
});
$('#prevBox').on('click', function () {
if (currentIndex > 0) {
currentIndex--;
updateBoxes();
}
});
updateBoxes();
//--------------------------------------------------------------
fetchTotalsRollCall();
});
function updateRemoveButtons() {
$(".btnRemoveTimeWork").addClass("disable");
@@ -147,6 +303,14 @@ function updateAddButtonText(currentCount) {
}
let allFilled = true;
$('.form-control-date').each(function () {
const value = $(this).val().trim();
if (value === "" || !dateValidCheck(value)) {
allFilled = false;
return false; // Break the loop
}
});
$('.dateTime').each(function () {
const value = $(this).val().trim();
if (value === "" || !timeValidCheck(value)) {
@@ -162,37 +326,114 @@ function updateAddButtonText(currentCount) {
}
}
$(document).on('keyup', ".dateTime", function () {
$(document).on('keyup', ".dateTime, .form-control-date", function () {
let $input = $(this);
let value = $input.val();
let lengthValue = value.length;
let currentCount = $('.groupBox').length;
if (lengthValue >= 5) {
if (!timeValidCheck(value)) {
showAlert('ساعت را به درستی وارد نمائید', $input);
updateAddButtonText(currentCount);
} else {
clearAlert($input);
// validateAllTimes();
updateAddButtonText(currentCount);
const $groupBox = $input.closest('.groupBox');
// focusNextTimeInput($input);
const startDate = $groupBox.find('.StartDate').val();
const startTime = $groupBox.find('[name*="StartTime"]').val();
const endDate = $groupBox.find('.EndDate').val();
const endTime = $groupBox.find('[name*="EndTime"]').val();
// Validate input based on the field type
if ($input.hasClass('form-control-date')) {
// Date validation logic
if (lengthValue >= 10) {
if (!dateValidCheck(value)) {
showAlert('تاریخ را به درستی وارد نمائید', $input);
} else {
clearAlert($input);
dayOfWeekLoad(this, value);
}
} else {
if ($input.hasClass('StartDate')) {
$groupBox.find('.startDatetxt').text('-');
} else if ($input.hasClass('EndDate')) {
$groupBox.find('.endDatetxt').text('-');
}
}
} else if ($input.hasClass('dateTime')) {
if (lengthValue >= 5) {
if (!timeValidCheck(value)) {
showAlert('ساعت را به درستی وارد نمائید', $input);
} else {
clearAlert($input);
}
}
} else {
updateAddButtonText(currentCount);
}
//if (startDate.length >= 10 && endDate.length >= 10) {
// if (!validateDates(startDate, endDate)) {
// showAlert('حضور غیاب در حال ویرایش را نمیتوانید بیشتر از یک روز از ثبت حضور غیاب عقب تر یا جلو تر ببرید', $input);
// }
//}
if (startDate.length >= 10 && startTime.length >= 5 && endDate.length >= 10 && endTime.length >= 5) {
//totalWorkingDataLoad(startDate, startTime, endDate, endTime, $groupBox);
fetchTotalsRollCall();
}
updateAddButtonText(currentCount);
});
//function focusNextTimeInput(currentInput) {
// var inputs = $(".dateTime");
// var currentIndex = inputs.index(currentInput);
// if (currentIndex !== -1 && currentIndex < inputs.length - 1) {
// $(inputs[currentIndex + 1]).focus();
// }
//function validateDates(startDate, endDate) {
// return itemsEditableDatesData.some(entry => entry.startFa === startDate && entry.endFa === endDate);
//}
function dayOfWeekLoad(input, value) {
$.ajax({
url: dayOfWeekDataWorkFlowUrl,
type: 'GET',
data: { dateFa: value },
success: function (response) {
if (response.success) {
const $groupBox = $(input).closest('.groupBox');
if ($(input).hasClass('StartDate')) {
$groupBox.find('.startDatetxt').text(response.message);
} else if ($(input).hasClass('EndDate')) {
$groupBox.find('.endDatetxt').text(response.message);
}
} else {
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
});
}
function totalWorkingDataLoad(startDateVal, startTimeVal, endDateVal, endTimeVal, $groupBox) {
$.ajax({
url: totalWorkingDataUrl,
type: 'GET',
data: { startDate: startDateVal, startTime: startTimeVal, endDate: endDateVal, endTime: endTimeVal },
success: function (response) {
if (response) {
//$groupBox.find('.ti').text(response.message);
} else {
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
});
}
function showAlert(message, inputElement) {
inputElement.addClass("errored");
$('.alert-msg').show().find('p').text(message);
@@ -211,62 +452,25 @@ function timeValidCheck(value) {
return timePattern.test(value);
}
//function validateAllTimes() {
// let timeRanges = [];
// $(".groupBox").each(function () {
// let startTime = $(this).find('input[name*="StartTime"]').val();
// let endTime = $(this).find('input[name*="EndTime"]').val();
// if (startTime.length === 5 && endTime.length === 5) {
// let startParts = startTime.split(':');
// let endParts = endTime.split(':');
// let startInMinutes = parseInt(startParts[0]) * 60 + parseInt(startParts[1]);
// let endInMinutes = parseInt(endParts[0]) * 60 + parseInt(endParts[1]);
// timeRanges.push({ start: startInMinutes, end: endInMinutes });
// }
// });
// // Check for conflicts and order
// for (let i = 0; i < timeRanges.length; i++) {
// for (let j = 0; j < i; j++) {
// if (timeRanges[i].start >= timeRanges[i].end) {
// showAlert('زمان شروع باید قبل از زمان پایان باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
// return;
// }
// // Check for overlap with previous entries
// if (timeRanges[i].start < timeRanges[j].end && timeRanges[i].end > timeRanges[j].start) {
// showAlert('زمان‌ها نباید تداخل داشته باشند', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
// return;
// }
// // Check if the current start time is before the previous start time
// if (i > 0 && timeRanges[i].start < timeRanges[i - 1].start) {
// showAlert('ساعت جدید نباید کوچکتر از ساعت‌های قبلی باشد', $(".groupBox").eq(i).find('input[name*="StartTime"]'));
// return;
// }
// }
// }
//}
function dateValidCheck(value) {
const datePattern = /^\d{4}\/(0[1-9]|1[0-2])\/(0[1-9]|[12]\d|3[01])$/;
return datePattern.test(value);
}
$('.btn-register').click(function () {
var dateFa = $('#dateFa').val().replaceAll("/", "");
var dateEmployeeID = $('#employeeID').val() + '-' + dateFa;
var loading = $('.btn-register .spinner-loading');
var data = $('#create-form').serialize();
$.ajax({
async: false,
dataType: 'json',
type: 'POST',
url: saveRollCallWorkTimeAjax,
url: saveRollCallManualCreateOrEditForUndefinedUrl,
headers: { "RequestVerificationToken": antiForgeryToken },
data: data,
success: function (response) {
if (response.success) {
loading.show();
$('.alert-success-msg').show();
@@ -277,86 +481,48 @@ $('.btn-register').click(function () {
loading.hide();
}, 2000);
if (urlPathname.indexOf('/Client/Company/WorkFlow/RollCall') > -1) {
_RefreshCountMenu();
CountWorkFlowOfAbsentAndCut();
//LoadWorkFlowsCutList();
//loadWorkFlowsAbsentsList();
//loadWorkFlowEmployeesWithoutLunchBreakList();
//loadUndefinedRollCallsList();
//loadOverlappingLeavesList();
_RefreshCountMenu();
CountWorkFlowOfAbsentAndCut();
var menuActive = $('#navbar-animmenu li.active').data('menu');
switch (menuActive) {
case "absent":
/*loadWorkFlowsAbsentsList();*/
$(`[data-absent-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`absent_${dateFa}`);
updateMainWorkFlow(`absentMain_${dateFa}`);
break;
case "cut":
//LoadWorkFlowsCutList();
$(`[data-cut-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`cut_${dateFa}`);
updateMainWorkFlow(`cutMain_${dateFa}`);
break;
case "lunchBreak":
//loadWorkFlowEmployeesWithoutLunchBreakList();
$(`[data-break-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`break_${dateFa}`);
updateMainWorkFlow(`breakMain_${dateFa}`);
break;
case "undefined":
//loadUndefinedRollCallsList();
$(`[data-undefined-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`undefined_${dateFa}`);
updateMainWorkFlow(`undefinedMain_${dateFa}`);
break;
case "overlappingLeave":
//loadOverlappingLeavesList();
$(`[data-leave-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`leave_${dateFa}`);
updateMainWorkFlow(`leaveMain_${dateFa}`);
break;
default:
}
$('#MainModal').modal('hide');
var menuActive = $('#navbar-animmenu li.active').data('menu');
switch (menuActive) {
case "absent":
/*loadWorkFlowsAbsentsList();*/
$(`[data-absent-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`absent_${dateFa}`);
updateMainWorkFlow(`absentMain_${dateFa}`);
break;
case "cut":
//LoadWorkFlowsCutList();
$(`[data-cut-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`cut_${dateFa}`);
updateMainWorkFlow(`cutMain_${dateFa}`);
break;
case "lunchBreak":
//loadWorkFlowEmployeesWithoutLunchBreakList();
$(`[data-break-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`break_${dateFa}`);
updateMainWorkFlow(`breakMain_${dateFa}`);
break;
case "undefined":
//loadUndefinedRollCallsList();
$(`[data-undefined-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`undefined_${dateFa}`);
updateMainWorkFlow(`undefinedMain_${dateFa}`);
break;
case "overlappingLeave":
//loadOverlappingLeavesList();
$(`[data-leave-employee-date="${dateEmployeeID}"]`).remove();
updateIndexesWorkFlow(`leave_${dateFa}`);
updateMainWorkFlow(`leaveMain_${dateFa}`);
break;
default:
}
if (urlPathname.indexOf('/Client/Company/RollCall/CaseHistory') > -1) {
hasData = true;
dateIndex = 0;
dateEmployeeIndex = null;
$('#caseHistoryLoadData').html('');
caseHistoryLoadAjax();
loadUntilHeightExceeds();
$('#MainModal').modal('hide');
}
$('#MainModal').modal('hide');
//loading.show();
//$('.alert-success-msg').show();
//$('.alert-success-msg p').text(response.message);
//setTimeout(function () {
// $('.alert-success-msg').hide();
// $('.alert-success-msg p').text('');
// loading.hide();
// //$('#MainModal').modal('hide');
// window.location.reload();
//}, 2000);
//setTimeout(function () {
// window.location.reload();
// //hasData = true;
// //dateIndex = 0;
// //dateEmployeeIndex = null;
// //$('#caseHistoryLoadData').html('');
// //caseHistoryLoadAjax();
// //loadUntilHeightExceeds();
//}, 1000);
//window.location.reload();
} else {
$('.alert-msg').show();
@@ -381,4 +547,52 @@ function toggleHeightControl() {
} else {
$('.heightControll').addClass('disable');
}
}
function getTimeWorkData() {
var rollCalls = [];
$('.groupBox').each(function () {
var startDate = $(this).find('.StartDate').val();
var startTime = $(this).find('.StartTime').val();
var endDate = $(this).find('.EndDate').val();
var endTime = $(this).find('.EndTime').val();
const calculateRollCallsTotalDuration = {};
calculateRollCallsTotalDuration.StartDateFa = startDate;
calculateRollCallsTotalDuration.StartTime = startTime;
calculateRollCallsTotalDuration.EndDateFa = endDate;
calculateRollCallsTotalDuration.EndTime = endTime;
rollCalls.push(calculateRollCallsTotalDuration);
});
return rollCalls;
}
function fetchTotalsRollCall() {
const employeeId = $('#employeeSelectAddModal').val();
const dateFa = $('.form-control-date-main').val();
if (employeeId !== '0' && dateFa !== '') {
var rollCalls = getTimeWorkData();
$.ajax({
dataType: 'json',
type: 'POST',
url: calculateRollCallsTotalDurationDataWorkFlowUrl,
data: { rollCalls },
headers: { "RequestVerificationToken": antiForgeryToken },
success: function (response) {
if (response) {
$('#resultCalculateRollCallsTotal').show();
$('#resultCalculateRollCallsTotal').text(response.result);
} else {
$('#resultCalculateRollCallsTotal').hide();
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
});
}
}

View File

@@ -475,7 +475,7 @@ function loadEmployeeListByWorkFlowsCut(date) {
<span class="mx-1">تایید</span>
</button>
<button class="btn-workflow-rollcall-edit position-relative" onclick="showModalEditRollCall(${rollCallItem.employeeId}, '${data.dateTimeFa}')">
<button class="btn-workflow-rollcall-edit position-relative" onclick="showModalEditRollCallAction(${rollCallItem.employeeId}, '${data.dateTimeFa}')">
<span class="mx-1">ویرایش</span>
</button>