Compare commits

..

15 Commits

Author SHA1 Message Date
6eba59fa7b set leftWork 2025-04-05 21:44:05 +03:30
SamSys
b6a581c456 tomam for kabab mahdi 2025-04-05 13:33:14 +03:30
MahanCh
3e914b7b1d fix add reward bug 2025-04-05 12:29:29 +03:30
MahanCh
40f021197b add method for creating reward for kebab mahdi 2025-04-05 09:47:00 +03:30
SamSys
a950c3130d change 2025-03-30 19:00:38 +03:30
SamSys
85f493bcbb changes 2025-03-30 18:58:15 +03:30
SamSys
b8a82f783c merge from master 2025-03-30 18:53:30 +03:30
SamSys
ee5e608581 add somthing again 2025-03-30 18:36:08 +03:30
SamSys
6583706db6 Print & delet Permission Customizechekout ajax ug fixed 2025-03-30 18:33:51 +03:30
SamSys
1fec40982c Revert "changes"
This reverts commit 677adbeddb.
2025-03-30 04:14:37 +03:30
SamSys
868abae2e8 merge from Customize-Chekout-Headr To Master 2025-03-30 03:45:37 +03:30
SamSys
c627ba6d3d merg from master 2025-03-30 03:41:03 +03:30
SamSys
dadf541dd1 Permission for CustomizeCheckoutTemp Bug Fixed 2025-03-30 03:37:55 +03:30
4b0c700b3e add daily wage for non calculation for kabab mahdi 2025-03-30 00:48:17 +03:30
677adbeddb changes 2025-03-30 00:44:01 +03:30
9 changed files with 448 additions and 350 deletions

View File

@@ -9,6 +9,7 @@ using Company.Domain.EmployeeAgg;
using Company.Domain.JobAgg;
using Company.Domain.LeftWorkAgg;
using Company.Domain.LeftWorkTempAgg;
using Company.Domain.RollCallAgg;
using Company.Domain.RollCallEmployeeAgg;
using Company.Domain.RollCallEmployeeStatusAgg;
using Company.Domain.WorkshopAgg;
@@ -34,9 +35,11 @@ public class LeftWorkTempApplication : ILeftWorkTempApplication
private readonly IContractRepository _contractRepository;
private readonly IRollCallEmployeeRepository _rollCallEmployeeRepository;
private readonly IRollCallEmployeeStatusRepository _rollCallEmployeeStatusRepository;
private readonly IRollCallRepository _rollCallRepository;
public LeftWorkTempApplication(ILeftWorkTempRepository leftWorkTempRepository, ILeftWorkRepository leftWorkRepository, IWorkshopRepository workshopRepository, IEmployeeRepository employeeRepository, IJobRepository jobRepository, ICheckoutRepository checkoutRepository, IContractRepository contractRepository, IRollCallEmployeeStatusRepository rollCallEmployeeStatusRepository, IRollCallEmployeeRepository rollCallEmployeeRepository)
public LeftWorkTempApplication(ILeftWorkTempRepository leftWorkTempRepository, ILeftWorkRepository leftWorkRepository, IWorkshopRepository workshopRepository, IEmployeeRepository employeeRepository, IJobRepository jobRepository, ICheckoutRepository checkoutRepository, IContractRepository contractRepository, IRollCallEmployeeStatusRepository rollCallEmployeeStatusRepository, IRollCallEmployeeRepository rollCallEmployeeRepository, IRollCallRepository rollCallRepository)
{
_leftWorkTempRepository = leftWorkTempRepository;
_leftWorkRepository = leftWorkRepository;
@@ -47,87 +50,103 @@ public class LeftWorkTempApplication : ILeftWorkTempApplication
_contractRepository = contractRepository;
_rollCallEmployeeStatusRepository = rollCallEmployeeStatusRepository;
_rollCallEmployeeRepository = rollCallEmployeeRepository;
}
_rollCallRepository = rollCallRepository;
}
public async Task<OperationResult> Create(CreateLeftWorkTemp command)
{
var op = new OperationResult();
public async Task<OperationResult> Create(CreateLeftWorkTemp command)
{
var op = new OperationResult();
foreach (var employeeId in command.EmployeeIds)
{
#region Validation
foreach (var employeeId in command.EmployeeIds)
{
#region Validation
if (command.LeftWorkTime.TryToGeorgianDateTime(out var leftWorkDateGr) == false)
{
return op.Failed("تاریخ شروع به کار وارد شده نامعتبر است");
}
if (command.LastDayStanding.TryToGeorgianDateTime(out var lastDayStandingDateGr) == false)
{
return op.Failed("تاریخ شروع به کار وارد شده نامعتبر است");
}
if (command.LeftWorkTime.TryToGeorgianDateTime(out var leftWorkDateGr) == false)
{
return op.Failed("تاریخ شروع به کار وارد شده نامعتبر است");
}
if (command.LastDayStanding.TryToGeorgianDateTime(out var lastDayStandingDateGr) == false)
{
return op.Failed("تاریخ شروع به کار وارد شده نامعتبر است");
}
var leftWork = await _leftWorkRepository.GetLastLeftWork(employeeId, command.WorkshopId);
var leftWork = await _leftWorkRepository.GetLastLeftWork(employeeId, command.WorkshopId);
if (lastDayStandingDateGr.AddDays(1).Date != leftWorkDateGr)
{
return op.Failed("تاریخ آخرین روز کاری با تاریخ ترک کار یک روز اختلاف ندارند");
}
if (lastDayStandingDateGr.AddDays(1).Date != leftWorkDateGr)
{
return op.Failed("تاریخ آخرین روز کاری با تاریخ ترک کار یک روز اختلاف ندارند");
}
if (leftWork == null)
{
return op.Failed("شروع به کار پرسنل یافت نشد");
}
if (leftWork == null)
{
return op.Failed("شروع به کار پرسنل یافت نشد");
}
if (leftWork.HasLeft)
{
return op.Failed("پرسنل وارد شده قبلا ترک کار ثبت شده است");
}
if (leftWork.HasLeft)
{
return op.Failed("پرسنل وارد شده قبلا ترک کار ثبت شده است");
}
if (leftWork.StartWorkDate > lastDayStandingDateGr)
{
return op.Failed("تاریخ ثبت شده قبل از شروع به کار است");
}
if (leftWork.StartWorkDate > lastDayStandingDateGr)
{
return op.Failed("تاریخ ثبت شده قبل از شروع به کار است");
}
if (leftWork.WorkshopId != command.WorkshopId || leftWork.EmployeeId != employeeId)
{
return op.Failed("اطلاعات وارد شده نامعتبر است");
}
if (leftWork.WorkshopId != command.WorkshopId || leftWork.EmployeeId != employeeId)
{
return op.Failed("اطلاعات وارد شده نامعتبر است");
}
if (_rollCallRepository.Exists(x => x.ShiftDate >= leftWorkDateGr && x.EmployeeId == leftWork.EmployeeId && x.WorkshopId == leftWork.WorkshopId))
{
return op.Failed("در تاریخ ترک کار وارد شده یا جلوتر ، پرسنل دارای حضورغیاب میباشد. لطفا اول حضور غیاب های پرسنل را حذف نمایید");
}
//if (leftWork.StartWorkDate >= leftWorkDateGr)
//{
// return op.Failed("ترک کار نمیتواند کوچک تر یا مساوی شروع به کار باشد");
//}
//if (leftWork.StartWorkDate >= leftWorkDateGr)
//{
// return op.Failed("ترک کار نمیتواند کوچک تر یا مساوی شروع به کار باشد");
//}
//if (_checkoutRepository.Exists(x => x.EmployeeId == leftWorkTemp.EmployeeId &&
// x.WorkshopId == leftWorkTemp.WorkshopId &&
// x.ContractStart <= lastDayStandingGr && x.ContractEnd >= lastDayStandingGr))
//{
// return op.Failed("این پرسنل در تاریخ ترک کار وارد شده دارای فیش حقوقی میباشد. ابتدا فیش حقوقی پرسنل را حذف کنید ");
//}
//if (_checkoutRepository.Exists(x => x.EmployeeId == leftWorkTemp.EmployeeId &&
// x.WorkshopId == leftWorkTemp.WorkshopId &&
// x.ContractStart <= lastDayStandingGr && x.ContractEnd >= lastDayStandingGr))
//{
// return op.Failed("این پرسنل در تاریخ ترک کار وارد شده دارای فیش حقوقی میباشد. ابتدا فیش حقوقی پرسنل را حذف کنید ");
//}
//if (_contractRepository.Exists(x => x.EmployeeId == leftWorkTemp.EmployeeId &&
// x.WorkshopIds == leftWorkTemp.WorkshopId &&
// x.ContarctStart <= lastDayStandingGr && x.ContractEnd >= lastDayStandingGr))
//{
// return op.Failed("این پرسنل در تاریخ ترک کار وارد شده دارای قرارداد میباشد");
//}
//if (_contractRepository.Exists(x => x.EmployeeId == leftWorkTemp.EmployeeId &&
// x.WorkshopIds == leftWorkTemp.WorkshopId &&
// x.ContarctStart <= lastDayStandingGr && x.ContractEnd >= lastDayStandingGr))
//{
// return op.Failed("این پرسنل در تاریخ ترک کار وارد شده دارای قرارداد میباشد");
//}
#endregion
#endregion
var leftWorkTemp = LeftWorkTemp.CreateLeftWork(leftWork.id, leftWork.StartWorkDate, leftWorkDateGr, lastDayStandingDateGr,
command.WorkshopId, employeeId, leftWork.JobId);
var leftWorkTemp = LeftWorkTemp.CreateLeftWork(leftWork.id, leftWork.StartWorkDate, leftWorkDateGr, lastDayStandingDateGr,
command.WorkshopId, employeeId, leftWork.JobId);
var rollCallEmployee =
_rollCallEmployeeRepository.GetByEmployeeIdAndWorkshopId(employeeId, leftWork.WorkshopId);
if (rollCallEmployee != null)
{
var employeeStatus =
_rollCallEmployeeStatusRepository.GetByRollCallEmployeeIdAndDate(
rollCallEmployee.Id, leftWorkDateGr);
await _leftWorkTempRepository.CreateAsync(leftWorkTemp);
}
employeeStatus?.Deactivate(leftWorkDateGr);
}
await _leftWorkTempRepository.SaveChangesAsync();
return op.Succcedded();
}
await _leftWorkTempRepository.CreateAsync(leftWorkTemp);
public Task<GetStartWorkTempDetails> GetStartAndLeftWorkDetails(long employeeId, long workshopId)
}
await _leftWorkTempRepository.SaveChangesAsync();
return op.Succcedded();
}
public Task<GetStartWorkTempDetails> GetStartAndLeftWorkDetails(long employeeId, long workshopId)
{
return _leftWorkTempRepository.GetStartAndLeftWorkDetails(employeeId, workshopId);
}
@@ -215,7 +234,12 @@ public class LeftWorkTempApplication : ILeftWorkTempApplication
return op.Failed("ترک کار نمیتواند کوچک تر یا مساوی شروع به کار باشد");
}
if (_checkoutRepository.Exists(x => x.EmployeeId == leftWorkTemp.EmployeeId &&
if (_rollCallRepository.Exists(x => x.ShiftDate >= leftWorkDateGr && x.EmployeeId == leftWork.EmployeeId && x.WorkshopId == leftWork.WorkshopId))
{
return op.Failed("در تاریخ ترک کار وارد شده یا جلوتر ، پرسنل دارای حضورغیاب میباشد. لطفا اول حضور غیاب های پرسنل را حذف نمایید");
}
if (_checkoutRepository.Exists(x => x.EmployeeId == leftWorkTemp.EmployeeId &&
x.WorkshopId == leftWorkTemp.WorkshopId &&
x.ContractStart <= lastDayStandingGr && x.ContractEnd >= lastDayStandingGr))
{

View File

@@ -91,13 +91,13 @@ namespace CompanyManagment.Application
public bool HasRollCallRecord(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd)
{
//موقت
// دادمهرگستر 11
//585 کاشی گالری سرامیس (بابک ابراهیمی )
//آموزشگاه ملل 604
//کاریابی ملل 605
// دادمهرگستر 11 *
//585 کاشی گالری سرامیس (بابک ابراهیمی ) *
//آموزشگاه ملل 604 *
//کاریابی ملل 605 *
//368 پیتزا امیر آماده سازی
//367 پیتزا امیر رستوران
//286 مرکز توان بخشی رسالت
//286 مرکز توان بخشی رسالت *
bool skipRollCallByWorkshopId = workshopId is 11 or 585 or 604 or 605 or 368 or 367 or 286;
//#if DEBUG

View File

@@ -11,266 +11,292 @@ using Microsoft.EntityFrameworkCore;
namespace ServiceHost.Areas.AdminNew.Pages.Company.AndroidApk
{
[Authorize]
public class IndexModel : PageModel
{
private readonly IAndroidApkVersionApplication _application;
private readonly IRollCallDomainService _rollCallDomainService;
private readonly CompanyContext _context;
private readonly AccountContext _accountContext;
[Authorize]
public class IndexModel : PageModel
{
private readonly IAndroidApkVersionApplication _application;
private readonly IRollCallDomainService _rollCallDomainService;
private readonly CompanyContext _context;
private readonly AccountContext _accountContext;
[BindProperty]
public IFormFile File { get; set; }
[BindProperty]
public IFormFile File { get; set; }
public IndexModel(IAndroidApkVersionApplication application, IRollCallDomainService rollCallDomainService, CompanyContext context, AccountContext accountContext)
{
_application = application;
_rollCallDomainService = rollCallDomainService;
_context = context;
_accountContext = accountContext;
}
public IndexModel(IAndroidApkVersionApplication application, IRollCallDomainService rollCallDomainService, CompanyContext context, AccountContext accountContext)
{
_application = application;
_rollCallDomainService = rollCallDomainService;
_context = context;
_accountContext = accountContext;
}
public void OnGet()
{
}
public void OnGet()
{
}
public async Task<IActionResult> OnPostUpload()
{
var result = await _application.CreateAndActive(File);
ViewData["message"] = result.Message;
return Page();
}
public async Task<IActionResult> OnPostUpload()
{
var result = await _application.CreateAndActive(File);
ViewData["message"] = result.Message;
return Page();
}
public IActionResult OnPostShiftDate()
{
//var startRollCall = new DateTime(2025, 2, 19);
//var rollCalls = _context.RollCalls.Where(x => x.ShiftDate >= startRollCall);
public IActionResult OnPostShiftDate()
{
//var startRollCall = new DateTime(2025, 2, 19);
//var rollCalls = _context.RollCalls.Where(x => x.ShiftDate >= startRollCall);
//var endedRollCalls = rollCalls.Where(x => x.EndDate != null).ToList();
//var endedRollCalls = rollCalls.Where(x => x.EndDate != null).ToList();
//var notEndedRollCalls = rollCalls.Where(x => x.EndDate == null).ToList();
//RefactorAllTheRollCallsOnEsfand(endedRollCalls, notEndedRollCalls);
CreateRewardForKebabMahdi().GetAwaiter().GetResult();
ViewData["message"] = "ایجاد شد";
return Page();
}
//var notEndedRollCalls = rollCalls.Where(x => x.EndDate == null).ToList();
//RefactorAllTheRollCallsOnEsfand(endedRollCalls, notEndedRollCalls);
CreateRewardForKebabMahdi().GetAwaiter().GetResult();
ViewData["message"] = "ایجاد شد";
return Page();
}
public IActionResult OnPostShiftDateNew()
{
var startRollCall = new DateTime(2025, 2, 19);
var rollCalls = _context.RollCalls.Where(x => x.ShiftDate >= startRollCall && x.WorkshopId == 170).ToList();
var r1 = rollCalls.Take(3000).ToList();
public IActionResult OnPostShiftDateNew()
{
var startRollCall = new DateTime(2025, 2, 19);
var rollCalls = _context.RollCalls.Where(x => x.ShiftDate >= startRollCall && x.WorkshopId == 170).ToList();
var r1 = rollCalls.Take(3000).ToList();
Console.ForegroundColor = ConsoleColor.DarkRed;
Console.WriteLine("endStep 1 ============");
SetRollCall(r1);
Console.ForegroundColor = ConsoleColor.DarkRed;
Console.WriteLine("endStep 1 ============");
SetRollCall(r1);
ViewData["message"] = "تومام یک";
return Page();
}
public IActionResult OnPostShiftDateNew2()
{
var startRollCall = new DateTime(2025, 2, 19);
var rollCalls = _context.RollCalls.Where(x => x.ShiftDate >= startRollCall && x.WorkshopId == 170).ToList();
var r2 = rollCalls.Skip(3000).ToList();
ViewData["message"] = "تومام یک";
return Page();
}
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("endStep 2 ============");
SetRollCall2(r2);
public IActionResult OnPostShiftDateNew2()
{
var startRollCall = new DateTime(2025, 2, 19);
var rollCalls = _context.RollCalls.Where(x => x.ShiftDate >= startRollCall && x.WorkshopId == 170).ToList();
ViewData["message"] = "تومام دو";
return Page();
}
var r2 = rollCalls.Skip(3000).ToList();
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("endStep 2 ============");
SetRollCall2(r2);
#region Create reward for kebab mahdi
ViewData["message"] = "تومام دو";
return Page();
}
public async System.Threading.Tasks.Task CreateRewardForKebabMahdi()
{
var esfandCustomizeCheckouts = _context.CustomizeCheckouts
.Where(x => x.WorkshopId == 170 && x.MonthInt == 12 && x.YearInt == 1403);
#region Create reward for kebab mahdi
public async System.Threading.Tasks.Task CreateRewardForKebabMahdi()
{
//var esfandCustomizeCheckouts = _context.CustomizeCheckouts
// .Where(x => x.WorkshopId == 170 && x.MonthInt == 12 && x.YearInt == 1403);
var sinzdahBedarDate = new DateTime(2025, 04, 2);
var chahardah = sinzdahBedarDate.AddDays(1);
var employeeSettings = _context.CustomizeWorkshopEmployeeSettings
.Where(x => x.WorkshopId == 170 &&
esfandCustomizeCheckouts.Any(c => c.EmployeeId == x.EmployeeId));
var workingEmp = _context.LeftWorkList.Where(x => x.WorkshopId == 170 && x.StartWorkDate <= sinzdahBedarDate && x.LeftWorkDate >= sinzdahBedarDate)
.GroupBy(x => x.EmployeeId).Select(x=>x.Key);
var absentEmployees = employeeSettings.Where(x => !_context.RollCalls
.Any(a => a.EmployeeId == x.EmployeeId && a.ShiftDate == new DateTime(2025,03,20)))
.ToList();
foreach (var employeeSetting in absentEmployees)
{
var amount = (int) employeeSetting.Salary / 30;
var reward = new Reward(employeeSetting.EmployeeId, 170, amount, "", 0, new DateTime(2025, 3, 21),
"بابت تعطیلی روز آخر سال 1403");
_context.Rewards.Add(reward);
}
await _context.SaveChangesAsync();
}
var employeesHaveRollCall = _context.RollCallEmployees
.Where(x => workingEmp.Contains(x.EmployeeId) && x.WorkshopId == 170)
.Include(x => x.EmployeesStatus)
.Where(x => x.EmployeesStatus.Any(s => s.StartDate <= sinzdahBedarDate && s.EndDate >= sinzdahBedarDate)).Select(x=>x.EmployeeId);
#endregion
#region AccountLeftwork
private void AddToAccountLeftWork()
{
List<long> roleIds = [3, 5, 7, 8, 23, 24];
var accounts = _accountContext.Accounts
.Where(x => roleIds.Contains(x.RoleId)).Where(x => x.AdminAreaPermission == "true");
var accountsIds = accounts.Select(x => x.id).ToList();
var workshopAccount = _context.WorkshopAccounts
.Where(x => accountsIds.Contains(x.AccountId))
.GroupBy(x => x.AccountId);
var employeeSettings = _context.CustomizeWorkshopEmployeeSettings
.Where(x => x.WorkshopId == 170 &&
employeesHaveRollCall.Any(c => c == x.EmployeeId));
List<long> oldAccountleftworkActiveNow = [300, 332, 333, 334, 18, 25, 14];
List<long> oldAccountleftworkDeActivedNow = [50, 49, 15];
var continueWorking = _0_Framework.Application.StaticWorkshopAccounts.ContinuesWorkingDate;
var absentEmployeesInSinzdah = employeeSettings.Where(x => !_context.RollCalls
.Any(a => a.EmployeeId == x.EmployeeId && a.ShiftDate == sinzdahBedarDate))
.ToList();
foreach (var item in workshopAccount)
{
var absentEmployeesInChahardah = employeeSettings.Where(x => !_context.RollCalls
.Any(a => a.EmployeeId == x.EmployeeId && a.ShiftDate == chahardah))
.ToList();
foreach (var employeeSetting in absentEmployeesInSinzdah)
{
var amount = (int)employeeSetting.Salary / 30;
var reward = new Reward(employeeSetting.EmployeeId, 170, amount, "", 0, sinzdahBedarDate,
"بابت تعطیلی روز 13 فروردین");
_context.Rewards.Add(reward);
}
var oldActive = item.FirstOrDefault(x => oldAccountleftworkActiveNow.Contains(x.AccountId));
if (oldActive != null)
{
var roleId = accounts.FirstOrDefault(x => x.id == oldActive.AccountId)!.RoleId;
var startGr = item.Key != 25 ? new DateTime(2024, 07, 22) : new DateTime(2024, 08, 22);
//if (item.Key is 380 or 381)
// startGr = new DateTime(2025, 02, 19);
if (item.Key is 14 or 18)
startGr = new DateTime(2020, 05, 21);
if (item.Key is 300)
startGr = new DateTime(2024, 05, 22);
foreach (var employeeSetting in absentEmployeesInChahardah)
{
var amount = (int)employeeSetting.Salary / 30;
var reward = new Reward(employeeSetting.EmployeeId, 170, amount, "", 0, sinzdahBedarDate.AddDays(1),
"بابت تعطیلی روز 14 فروردین");
_context.Rewards.Add(reward);
}
foreach (var workshop in item)
{
_accountContext.AccountLeftWorks.Add(new AccountLeftWork(startGr, continueWorking, workshop.AccountId, workshop.WorkshopId, roleId, true));
await _context.SaveChangesAsync();
}
}
_accountContext.SaveChanges();
#endregion
}
var oldDeActive = item.FirstOrDefault(x => oldAccountleftworkDeActivedNow.Contains(x.AccountId));
if (oldDeActive != null)
{
var roleId = accounts.FirstOrDefault(x => x.id == oldDeActive.AccountId)!.RoleId;
var startGr = new DateTime(2022, 03, 21);
if (item.Key == 49)
startGr = new DateTime(2023, 04, 21);
if (item.Key == 50)
startGr = new DateTime(2023, 03, 21);
foreach (var workshop in item)
{
_accountContext.Add(new AccountLeftWork(startGr, new DateTime(2024, 07, 21), workshop.AccountId, workshop.WorkshopId, roleId, false));
#region AccountLeftwork
}
_accountContext.SaveChanges();
private void AddToAccountLeftWork()
{
List<long> roleIds = [3, 5, 7, 8, 23, 24];
var accounts = _accountContext.Accounts
.Where(x => roleIds.Contains(x.RoleId)).Where(x => x.AdminAreaPermission == "true");
var accountsIds = accounts.Select(x => x.id).ToList();
var workshopAccount = _context.WorkshopAccounts
.Where(x => accountsIds.Contains(x.AccountId))
.GroupBy(x => x.AccountId);
}
List<long> oldAccountleftworkActiveNow = [300, 332, 333, 334, 18, 25, 14];
List<long> oldAccountleftworkDeActivedNow = [50, 49, 15];
var continueWorking = _0_Framework.Application.StaticWorkshopAccounts.ContinuesWorkingDate;
}
foreach (var item in workshopAccount)
{
Console.WriteLine("finished");
}
#endregion
var oldActive = item.FirstOrDefault(x => oldAccountleftworkActiveNow.Contains(x.AccountId));
if (oldActive != null)
{
var roleId = accounts.FirstOrDefault(x => x.id == oldActive.AccountId)!.RoleId;
var startGr = item.Key != 25 ? new DateTime(2024, 07, 22) : new DateTime(2024, 08, 22);
//if (item.Key is 380 or 381)
// startGr = new DateTime(2025, 02, 19);
if (item.Key is 14 or 18)
startGr = new DateTime(2020, 05, 21);
if (item.Key is 300)
startGr = new DateTime(2024, 05, 22);
#region RefactorRollcall
foreach (var workshop in item)
{
_accountContext.AccountLeftWorks.Add(new AccountLeftWork(startGr, continueWorking, workshop.AccountId, workshop.WorkshopId, roleId, true));
private void RefactorAllTheRollCallsOnEsfand(List<global::Company.Domain.RollCallAgg.RollCall> endedRollCalls, List<global::Company.Domain.RollCallAgg.RollCall> notEndedRollCalls)
{
var countEndedRollCalls = endedRollCalls.Count;
var countNotEndedRollCalls = notEndedRollCalls.Count;
}
_accountContext.SaveChanges();
var step1 = 1;
foreach (var rollCall in endedRollCalls)
{
rollCall.setStartAndEnd(rollCall.StartDate.Value, rollCall.EndDate.Value, _rollCallDomainService);
Console.WriteLine($"{step1} - {countEndedRollCalls} ended Edit {rollCall.id}");
step1 += 1;
}
var step2 = 1;
foreach (var notEndedRollCall in notEndedRollCalls)
{
notEndedRollCall.SetStartAgain(notEndedRollCall.StartDate.Value);
Console.WriteLine($"{step2} - {countNotEndedRollCalls} not ended startAgain {notEndedRollCall.id}");
step2 += 1;
}
_context.SaveChanges();
}
}
private void SetRollCall(List<global::Company.Domain.RollCallAgg.RollCall> r1)
{
var endedRollCalls2 = r1.Where(x => x.EndDate != null).ToList();
var countSetTDRollCall = endedRollCalls2.Count;
var stepSetTDRollCal = 1;
foreach (var endedRollCall in endedRollCalls2)
{
endedRollCall.ClearTimeDiff();
_context.SaveChanges();
endedRollCall.SetEndDateTime(endedRollCall.EndDate.Value, _rollCallDomainService);
Console.WriteLine($"{stepSetTDRollCal} - {countSetTDRollCall} ended Set Time Differences{endedRollCall.id}");
stepSetTDRollCal += 1;
}
//_context.SaveChanges();
}
private void SetRollCall2(List<global::Company.Domain.RollCallAgg.RollCall> r2)
{
var endedRollCalls2 = r2.Where(x => x.EndDate != null).ToList();
var countSetTDRollCall = endedRollCalls2.Count;
var stepSetTDRollCal = 1;
foreach (var endedRollCall in endedRollCalls2)
{
endedRollCall.SetEndDateTime(endedRollCall.EndDate.Value, _rollCallDomainService);
Console.WriteLine($"{stepSetTDRollCal} - {countSetTDRollCall} ended Set Time Differences{endedRollCall.id}");
stepSetTDRollCal += 1;
}
//_context.SaveChanges();
}
#endregion
//public async Task<IActionResult> OnPostShiftDate()
//{
// var customizeWorkshopSettings = _context.CustomizeWorkshopSettings.AsSplitQuery();
var oldDeActive = item.FirstOrDefault(x => oldAccountleftworkDeActivedNow.Contains(x.AccountId));
if (oldDeActive != null)
{
var roleId = accounts.FirstOrDefault(x => x.id == oldDeActive.AccountId)!.RoleId;
var startGr = new DateTime(2022, 03, 21);
if (item.Key == 49)
startGr = new DateTime(2023, 04, 21);
if (item.Key == 50)
startGr = new DateTime(2023, 03, 21);
foreach (var workshop in item)
{
_accountContext.Add(new AccountLeftWork(startGr, new DateTime(2024, 07, 21), workshop.AccountId, workshop.WorkshopId, roleId, false));
}
_accountContext.SaveChanges();
// customizeWorkshopSettings = customizeWorkshopSettings.Where(x => x.WorkshopId == 499);
// var rollCalls =
// _context.RollCalls.Where(x => customizeWorkshopSettings.Any(a => a.WorkshopId == x.WorkshopId))
// .ToList();
// foreach (var rollCall in rollCalls)
// {
// rollCall.SetShiftDate(_rollCallDomainService);
// Console.WriteLine(rollCall.id);
// }
}
// await _context.SaveChangesAsync();
// ViewData["message"] = "تومام";
// return Page();
//}
}
}
Console.WriteLine("finished");
}
#endregion
#region RefactorRollcall
private void RefactorAllTheRollCallsOnEsfand(List<global::Company.Domain.RollCallAgg.RollCall> endedRollCalls, List<global::Company.Domain.RollCallAgg.RollCall> notEndedRollCalls)
{
var countEndedRollCalls = endedRollCalls.Count;
var countNotEndedRollCalls = notEndedRollCalls.Count;
var step1 = 1;
foreach (var rollCall in endedRollCalls)
{
rollCall.setStartAndEnd(rollCall.StartDate.Value, rollCall.EndDate.Value, _rollCallDomainService);
Console.WriteLine($"{step1} - {countEndedRollCalls} ended Edit {rollCall.id}");
step1 += 1;
}
var step2 = 1;
foreach (var notEndedRollCall in notEndedRollCalls)
{
notEndedRollCall.SetStartAgain(notEndedRollCall.StartDate.Value);
Console.WriteLine($"{step2} - {countNotEndedRollCalls} not ended startAgain {notEndedRollCall.id}");
step2 += 1;
}
_context.SaveChanges();
}
private void SetRollCall(List<global::Company.Domain.RollCallAgg.RollCall> r1)
{
var endedRollCalls2 = r1.Where(x => x.EndDate != null).ToList();
var countSetTDRollCall = endedRollCalls2.Count;
var stepSetTDRollCal = 1;
foreach (var endedRollCall in endedRollCalls2)
{
endedRollCall.ClearTimeDiff();
_context.SaveChanges();
endedRollCall.SetEndDateTime(endedRollCall.EndDate.Value, _rollCallDomainService);
Console.WriteLine($"{stepSetTDRollCal} - {countSetTDRollCall} ended Set Time Differences{endedRollCall.id}");
stepSetTDRollCal += 1;
}
//_context.SaveChanges();
}
private void SetRollCall2(List<global::Company.Domain.RollCallAgg.RollCall> r2)
{
var endedRollCalls2 = r2.Where(x => x.EndDate != null).ToList();
var countSetTDRollCall = endedRollCalls2.Count;
var stepSetTDRollCal = 1;
foreach (var endedRollCall in endedRollCalls2)
{
endedRollCall.SetEndDateTime(endedRollCall.EndDate.Value, _rollCallDomainService);
Console.WriteLine($"{stepSetTDRollCal} - {countSetTDRollCall} ended Set Time Differences{endedRollCall.id}");
stepSetTDRollCal += 1;
}
//_context.SaveChanges();
}
#endregion
//public async Task<IActionResult> OnPostShiftDate()
//{
// var customizeWorkshopSettings = _context.CustomizeWorkshopSettings.AsSplitQuery();
// customizeWorkshopSettings = customizeWorkshopSettings.Where(x => x.WorkshopId == 499);
// var rollCalls =
// _context.RollCalls.Where(x => customizeWorkshopSettings.Any(a => a.WorkshopId == x.WorkshopId))
// .ToList();
// foreach (var rollCall in rollCalls)
// {
// rollCall.SetShiftDate(_rollCallDomainService);
// Console.WriteLine(rollCall.id);
// }
// await _context.SaveChangesAsync();
// ViewData["message"] = "تومام";
// return Page();
//}
}
}

View File

@@ -444,7 +444,7 @@
</div>
<div class="Rtable-cell d-md-flex d-none width10">
<div class="Rtable-cell--content align-items-center d-flex d-md-block text-end">
<button class="btn-print moreThan992" type="button" onclick="printOne(@item.Id, '@item.Year', '@item.Month')" Permission="@SubAccountPermissionHelper.CreateCustomizeCheckoutTempPermissionCode">
<button class="btn-print moreThan992" type="button" onclick="printOne(@item.Id, '@item.Year', '@item.Month')" Permission="@SubAccountPermissionHelper.PrintCustomizeCheckoutTempPermissionCode">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008"/>
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z"/>
@@ -453,7 +453,7 @@
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732"/>
</svg>
</button>
<button class="btn-print lessThan992" type="button" onclick="printOne(@item.Id, '@item.Year', '@item.Month')" Permission="@SubAccountPermissionHelper.CreateCustomizeCheckoutTempPermissionCode">
<button class="btn-print lessThan992" type="button" onclick="printOne(@item.Id, '@item.Year', '@item.Month')" Permission="@SubAccountPermissionHelper.PrintCustomizeCheckoutTempPermissionCode">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008"/>
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z"/>
@@ -506,7 +506,7 @@
@item.ContractEndFa
</div>
<div class="Rtable-cell--heading d-flex text-center">
<button class="btn-print" type="button" onclick="printOne(@item.Id, '@item.Year', '@item.Month')" Permission="@SubAccountPermissionHelper.CreateCustomizeCheckoutTempPermissionCode">
<button class="btn-print" type="button" onclick="printOne(@item.Id, '@item.Year', '@item.Month')" Permission="@SubAccountPermissionHelper.PrintCustomizeCheckoutTempPermissionCode">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008"/>
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z"/>

View File

@@ -10,6 +10,7 @@ using System.Security.Claims;
using System.Text.RegularExpressions;
using _0_Framework.Infrastructure;
using CompanyManagment.App.Contracts.Bank;
using Microsoft.Extensions.Configuration.UserSecrets;
namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
{
@@ -23,6 +24,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
private readonly IBankApplication _bankApplication;
private readonly IPasswordHasher _passwordHasher;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthHelper _authHelper;
private readonly long _workshopId;
public string WorkshopFullName;
@@ -31,7 +33,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
public List<string> YearlyList;
public CheckoutTemporaryModel(IWorkshopApplication workshopApplication, IHttpContextAccessor httpContextAccessor, IYearlySalaryApplication yearlySalaryApplication, IPasswordHasher passwordHasher, ICustomizeCheckoutTempApplication customizeCheckoutTempApplication, IEmployeeApplication employeeApplication, IBankApplication bankApplication)
public CheckoutTemporaryModel(IWorkshopApplication workshopApplication, IHttpContextAccessor httpContextAccessor, IYearlySalaryApplication yearlySalaryApplication, IPasswordHasher passwordHasher, ICustomizeCheckoutTempApplication customizeCheckoutTempApplication, IEmployeeApplication employeeApplication, IBankApplication bankApplication, IAuthHelper authHelper)
{
_workshopApplication = workshopApplication;
_httpContextAccessor = httpContextAccessor;
@@ -40,6 +42,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
_customizeCheckoutTempApplication = customizeCheckoutTempApplication;
_employeeApplication = employeeApplication;
_bankApplication = bankApplication;
_authHelper = authHelper;
var workshopHash = _httpContextAccessor.HttpContext?.User.FindFirstValue("WorkshopSlug");
_workshopId = _passwordHasher.SlugDecrypt(workshopHash);
@@ -82,6 +85,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
public IActionResult OnGetCheckoutList(SearchCustomizeCheckout searchModel)
{
var permission = _authHelper.GetPermissions();
string printPermission = permission.Any(x => x == SubAccountPermissionHelper.PrintCustomizeCheckoutTempPermissionCode) ? "true" : "false";
string deletePermission = permission.Any(x => x == SubAccountPermissionHelper.DeleteCustomizeCheckoutTempPermissionCode) ? "true" : "false";
searchModel.WorkshopId = _workshopId;
var resultData = _customizeCheckoutTempApplication.Search(searchModel).ToList();
@@ -89,7 +95,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout
{
success = true,
data = resultData,
pageIndex = resultData.Count()
pageIndex = resultData.Count(),
printPermission = printPermission,
deletePermission = deletePermission,
});
}

View File

@@ -515,7 +515,7 @@
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732"/>
</svg>
</button>
<button type="button" class="btn-delete RemoveBtn" data-delete-id="@(item.Id)" Permission="@SubAccountPermissionHelper.DeleteCustomizeCheckoutPermissionCode">
<button type="button" class="btn-delete RemoveBtn" data-delete-id="@(item.Id)" Permission="@SubAccountPermissionHelper.DeleteCustomizeCheckoutPermissionCode">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-linecap="round" />

View File

@@ -12,6 +12,7 @@ using System.Security.Cryptography;
using System.Text.RegularExpressions;
using _0_Framework.Infrastructure;
using CompanyManagment.App.Contracts.Bank;
using System.Linq;
namespace ServiceHost.Areas.Client.Pages.Company.CustomizeCheckout;
@@ -296,6 +297,10 @@ public class CheckoutUnofficialModel : PageModel
//}
public IActionResult OnGetCustomizeCheckoutsList(SearchCustomizeCheckout searchModel)
{
var permission = _authHelper.GetPermissions();
string printPermission = permission.Any(x=> x == SubAccountPermissionHelper.PrintCustomizeCheckoutPermissionCode) ? "true" : "false";
string deletePermission = permission.Any(x => x == SubAccountPermissionHelper.DeleteCustomizeCheckoutPermissionCode) ? "true" : "false";
var search = new SearchCustomizeCheckout()
{
WorkshopId = _workshopId,
@@ -314,7 +319,9 @@ public class CheckoutUnofficialModel : PageModel
{
success = true,
data = resultData,
pageIndex = resultData.Count()
pageIndex = resultData.Count(),
printPermission = printPermission,
deletePermission = deletePermission,
});
}

View File

@@ -1486,41 +1486,45 @@ function loadMore() {
${item.contractEndFa}
</div>
<div class="Rtable-cell--heading d-flex text-center">
<button class="btn-print" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
</svg>
</button>
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-linecap="round" />
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-linecap="round" />
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-linecap="round" />
</svg>
<span class="mx-1">حذف</span>
</button>
${response.printPermission === "true" ? `
<button class="btn-print" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
</svg>
</button>
` : ``}
${response.deletePermission === "true" ? `
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-linecap="round" />
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-linecap="round" />
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-linecap="round" />
</svg>
<span class="mx-1">حذف</span>
</button>
` : ``}
</div>
</div>
</div>
<div class="Rtable-cell d-md-flex d-none width10">
<div class="Rtable-cell--content align-items-center d-flex d-md-block text-end">
<button class="btn-print moreThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
</svg>
</button>
<button class="btn-print lessThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
${response.printPermission === "true" ? `
<button class="btn-print moreThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
@@ -1530,7 +1534,20 @@ function loadMore() {
</svg>
</button>
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
<button class="btn-print lessThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
</svg>
</button>
` : ``}
${response.deletePermission === "true" ? `
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-linecap="round" />
@@ -1539,6 +1556,11 @@ function loadMore() {
</svg>
<span class="mx-1">حذف</span>
</button>
` : ``}
</div>
</div>
</div>

View File

@@ -2,7 +2,7 @@
let $checkAll = $("#checkAll2");
let $checkboxes = $(".foo");
$checkAll.on("change", function () {
$checkboxes.prop("checked", this.checked);
@@ -150,7 +150,7 @@ $(document).on('click', '.btn-search-click', function (event) {
const selectedMonth = $('#sendDropdownMonth').val();
const isYearMonthSelected = selectedYear === "0" && selectedMonth === "0";
if (!isYearMonthSelected && (selectedYear === "0" || selectedMonth === "0") ) {
if (!isYearMonthSelected && (selectedYear === "0" || selectedMonth === "0")) {
$('#dropdown-year').addClass("errored");
$('#dropdown-month').addClass("errored");
@@ -175,7 +175,7 @@ $(document).on('click', '.btn-search-click', function (event) {
const endDate = $('.end-date').val();
const isStartEndDateSelected = startDate.trim() === "" && endDate.trim() === "";
if (!isStartEndDateSelected && (startDate.trim() === "" || endDate.trim() === "") ) {
if (!isStartEndDateSelected && (startDate.trim() === "" || endDate.trim() === "")) {
$('.start-date').addClass("errored");
$('.end-date').addClass("errored");
@@ -223,7 +223,7 @@ $(document).ready(function () {
} else {
$('.btn-clear-filter').addClass('disable');
}
if(filterStart !== '') {
if (filterStart !== '') {
$('#start-date').text(filterStart);
}
if (filterEnd !== '') {
@@ -1447,7 +1447,7 @@ function loadMore() {
<div class="Rtable-cell--content ${item.salaryAidDeduction === "0" ? "" : "textRed"}">${item.salaryAidDeduction}</div>
</div>
<div class="Rtable-cell d-md-flex d-none width9">
<div class="${item.totalPaymentD < 0 ? "bgColorMonthlySalaryMinus" : "bgColorMonthlySalaryPlus" }">
<div class="${item.totalPaymentD < 0 ? "bgColorMonthlySalaryMinus" : "bgColorMonthlySalaryPlus"}">
<div class="Rtable-cell--heading">مبلغ قابل پرداخت</div>
<div class="Rtable-cell--content ">${item.totalPayment} ریال</div>
</div>
@@ -1481,41 +1481,43 @@ function loadMore() {
${item.contractEndFa}
</div>
<div class="Rtable-cell--heading d-flex text-center">
<button class="btn-print" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
</svg>
</button>
${response.printPermission === "true" ? `
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-linecap="round" />
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-linecap="round" />
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-linecap="round" />
</svg>
<span class="mx-1">حذف</span>
</button>
<button class="btn-print" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
</svg>
</button>
` : ``}
${response.deletePermission === "true" ? `
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
<path d="M13.2917 13.2915L13.2917 10.5415" stroke-linecap="round" />
<path d="M2.75 5.9585H19.25V5.9585C18.122 5.9585 17.558 5.9585 17.1279 6.17946C16.7561 6.3704 16.4536 6.67297 16.2626 7.04469C16.0417 7.47488 16.0417 8.03886 16.0417 9.16683V13.8752C16.0417 15.7608 16.0417 16.7036 15.4559 17.2894C14.8701 17.8752 13.9273 17.8752 12.0417 17.8752H9.95833C8.07271 17.8752 7.12991 17.8752 6.54412 17.2894C5.95833 16.7036 5.95833 15.7608 5.95833 13.8752V9.16683C5.95833 8.03886 5.95833 7.47488 5.73737 7.04469C5.54643 6.67297 5.24386 6.3704 4.87214 6.17946C4.44195 5.9585 3.87797 5.9585 2.75 5.9585V5.9585Z" stroke-linecap="round" />
<path d="M8.70841 3.20839C8.70841 3.20839 9.16675 2.2915 11.0001 2.2915C12.8334 2.2915 13.2917 3.20817 13.2917 3.20817" stroke-linecap="round" />
</svg>
<span class="mx-1">حذف</span>
</button>
` : ``}
</div>
</div>
</div>
<div class="Rtable-cell d-md-flex d-none width10">
<div class="Rtable-cell--content align-items-center d-flex d-md-block text-end">
<button class="btn-print moreThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
<path d="M7.91675 11.25L11.2501 11.25" stroke-linecap="round" />
<path d="M7.91675 13.75L12.0834 13.75" stroke-linecap="round" />
<path d="M14.5834 5.41732V5.41732C14.5834 3.97799 14.5834 3.25833 14.1954 2.76756C14.1087 2.65791 14.0095 2.55874 13.8998 2.47204C13.4091 2.08398 12.6894 2.08398 11.2501 2.08398H8.75008C7.31076 2.08398 6.5911 2.08398 6.10032 2.47204C5.99068 2.55874 5.8915 2.65791 5.8048 2.76756C5.41675 3.25833 5.41675 3.97799 5.41675 5.41732V5.41732" />
</svg>
</button>
<button class="btn-print lessThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
${response.printPermission === "true" ? `
<button class="btn-print moreThan992" type="button" onclick="printOne(${item.id}, '${item.year}', '${item.month}')">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path d="M15.0001 11.2493H15.139C16.0279 11.2493 16.4723 11.2493 16.759 10.9866C16.7805 10.967 16.801 10.9464 16.8207 10.9249C17.0834 10.6382 17.0834 10.1938 17.0834 9.3049V9.3049C17.0834 7.52714 17.0834 6.63826 16.558 6.06484C16.5187 6.02194 16.4775 5.98077 16.4346 5.94146C15.8612 5.41602 14.9723 5.41602 13.1945 5.41602H6.91675C5.03113 5.41602 4.08832 5.41602 3.50253 6.0018C2.91675 6.58759 2.91675 7.5304 2.91675 9.41602V10.2493C2.91675 10.7208 2.91675 10.9565 3.06319 11.1029C3.20964 11.2493 3.44534 11.2493 3.91675 11.2493H5.00008" />
<path d="M5.41675 16.3903L5.41675 9.91732C5.41675 8.97451 5.41675 8.5031 5.70964 8.21021C6.00253 7.91732 6.47394 7.91732 7.41675 7.91732L12.5834 7.91732C13.5262 7.91732 13.9976 7.91732 14.2905 8.21021C14.5834 8.5031 14.5834 8.97451 14.5834 9.91732L14.5834 16.3903C14.5834 16.7068 14.5834 16.8651 14.4796 16.9399C14.3758 17.0148 14.2256 16.9647 13.9253 16.8646L12.2572 16.3086C12.1712 16.2799 12.1282 16.2656 12.0839 16.2669C12.0396 16.2682 11.9975 16.285 11.9134 16.3187L10.1858 17.0097C10.0941 17.0464 10.0482 17.0647 10.0001 17.0647C9.95194 17.0647 9.90609 17.0464 9.81439 17.0097L8.0868 16.3187C8.00267 16.285 7.9606 16.2682 7.91627 16.2669C7.87194 16.2656 7.82896 16.2799 7.74299 16.3086L6.07486 16.8646C5.77455 16.9647 5.62439 17.0148 5.52057 16.9399C5.41675 16.8651 5.41675 16.7068 5.41675 16.3903Z" />
@@ -1525,6 +1527,10 @@ function loadMore() {
</svg>
</button>
` : ``}
${response.deletePermission === "true" ? `
<button type="button" class="btn-delete RemoveBtn" data-delete-id="${item.id}">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
<path d="M8.70825 13.2915L8.70825 10.5415" stroke-linecap="round" />
@@ -1534,6 +1540,11 @@ function loadMore() {
</svg>
<span class="mx-1">حذف</span>
</button>
` : ``}
</div>
</div>
</div>