From 72435f2d4714a7e54ddd339a8ccbfb3c11b6edbf Mon Sep 17 00:00:00 2001 From: mahan Date: Mon, 22 Sep 2025 11:07:37 +0330 Subject: [PATCH 01/10] fix: InsuranceList edit on get bug --- .../Repository/InsuranceListRepository.cs | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/CompanyManagment.EFCore/Repository/InsuranceListRepository.cs b/CompanyManagment.EFCore/Repository/InsuranceListRepository.cs index 0ecbe40a..1419fd36 100644 --- a/CompanyManagment.EFCore/Repository/InsuranceListRepository.cs +++ b/CompanyManagment.EFCore/Repository/InsuranceListRepository.cs @@ -1345,8 +1345,12 @@ public class InsuranceListRepository : RepositoryBase, IIns public List GetEmployeeInsuranceDataForEdit(long insuranceListId, DateTime startDate, DateTime endDate) { - var res = _context.EmployeeInsurancListDataSet + var employeeDataQuery = _context.EmployeeInsurancListDataSet .Where(x => x.InsuranceListId == insuranceListId) + .Join(_context.InsuranceListSet, + employeeInsurancListData => employeeInsurancListData.InsuranceListId, + insuranceList => insuranceList.id, + (employeeInsurancListData, insuranceList) => new{employeeInsurancListData,insuranceList}) .Join(_context.LeftWorkInsuranceList .Where(x => ((x.LeftWorkDate != null && x.LeftWorkDate != DateTime.MinValue) && @@ -1357,14 +1361,18 @@ public class InsuranceListRepository : RepositoryBase, IIns (x.LeftWorkDate == null || x.LeftWorkDate == DateTime.MinValue)) .Where(x => x.StartWorkDate <= endDate) .Include(x => x.Employee), - employeeData => employeeData.EmployeeId, - leftwork => leftwork.EmployeeId, - (employeeData, leftwork) => new { employeeData, leftwork }) - .Join(_context.Jobs, + employeeData =>new { employeeData.employeeInsurancListData.EmployeeId,employeeData.insuranceList.WorkshopId}, + leftwork => new {leftwork.EmployeeId,leftwork.WorkshopId}, + (employeeData, leftwork) + => new { employeeData = employeeData.employeeInsurancListData, leftwork }); + + var employeeJobs =employeeDataQuery.Join(_context.Jobs, result => result.leftwork.JobId, job => job.id, - (result, job) => new { result, job }) - .GroupJoin(_context.InsuranceEmployeeInformationSet.AsSplitQuery(), + (result, job) => new { result, job }); + + + var res =employeeJobs.GroupJoin(_context.InsuranceEmployeeInformationSet.AsSplitQuery(), allResult => allResult.result.employeeData.EmployeeId, employeeInfo => employeeInfo.EmployeeId, (allResult, employeeInfo) => new From c3bbd9af98d3e3a1ed03a56bd10ba688eeba11d5 Mon Sep 17 00:00:00 2001 From: mahan Date: Tue, 23 Sep 2025 17:55:03 +0330 Subject: [PATCH 02/10] feat: change the loan is paid by checkout --- .../Repository/LoanRepository.cs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/CompanyManagment.EFCore/Repository/LoanRepository.cs b/CompanyManagment.EFCore/Repository/LoanRepository.cs index 6f23763e..92efc586 100644 --- a/CompanyManagment.EFCore/Repository/LoanRepository.cs +++ b/CompanyManagment.EFCore/Repository/LoanRepository.cs @@ -35,9 +35,18 @@ public class LoanRepository : RepositoryBase, ILoanRepository var startDate = loan.LoanInstallments.MinBy(x => x.InstallmentDate).InstallmentDate; var endDate = loan.LoanInstallments.MaxBy(x => x.InstallmentDate).InstallmentDate; - - var customizeCheckouts =await _companyContext.CustomizeCheckouts.Where(x => x.WorkshopId == loan.WorkshopId && x.EmployeeId == loan.EmployeeId && - x.ContractStart <= endDate && x.ContractEnd >= startDate).Select(x=> new {x.MonthInt, x.YearInt}).ToListAsync(); + var pc = new PersianCalendar(); + var customizeCheckouts = (await _companyContext.CheckoutSet + .Where(x => x.WorkshopId == loan.WorkshopId && x.EmployeeId == loan.EmployeeId && + startDate<=x.ContractEnd && endDate>=x.ContractEnd) + .Select(x => x.ContractStart).ToListAsync()) + .Select(x => + { + + var year = pc.GetYear(x); + var month = pc.GetMonth(x); + return new { Month = month, Year = year }; + }); var result = new LoanDetailsViewModel() { @@ -51,7 +60,7 @@ public class LoanRepository : RepositoryBase, ILoanRepository Id = x.Id, InstallmentAmount = x.AmountForMonth.ToMoney(), InstallmentDate = x.InstallmentDate.ToFarsi(), - IsPaid = customizeCheckouts.Any(c => c.MonthInt.ToString() == x.Month && c.YearInt.ToString() == x.Year) + IsPaid = customizeCheckouts.Any(c => c.Month.ToString("00") == x.Month && c.Year.ToString() == x.Year), }).ToList() }; From ffc6969ee7d7d56c53b481283c90b852d2796161 Mon Sep 17 00:00:00 2001 From: mahan Date: Wed, 24 Sep 2025 13:47:55 +0330 Subject: [PATCH 03/10] feat: change the create customize checkout --- CompanyManagment.Application/CustomizeCheckoutApplication.cs | 5 ++++- .../CustomizeCheckoutTempApplication.cs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CompanyManagment.Application/CustomizeCheckoutApplication.cs b/CompanyManagment.Application/CustomizeCheckoutApplication.cs index 7e325e2c..b82e3be1 100644 --- a/CompanyManagment.Application/CustomizeCheckoutApplication.cs +++ b/CompanyManagment.Application/CustomizeCheckoutApplication.cs @@ -319,7 +319,10 @@ namespace CompanyManagment.Application if (workshopId == 170) { - var exceptionEmployeeIds = _customizeWorkshopGroupSettingsRepository.GetEmployeeSettingsByGroupSettingsId(117).Select(x => x.EmployeeId).ToList(); + var exceptionEmployeeIds = _customizeWorkshopGroupSettingsRepository + .GetEmployeeSettingsByGroupSettingsId(117) + .Select(x => x.EmployeeId) + .Where(x=> workshopLeftWorksInMonth.Select(l=>l.EmployeeId).Contains(x)).ToList(); foreach (var employeesId in exceptionEmployeeIds) { diff --git a/CompanyManagment.Application/CustomizeCheckoutTempApplication.cs b/CompanyManagment.Application/CustomizeCheckoutTempApplication.cs index a6fb6511..750e9a96 100644 --- a/CompanyManagment.Application/CustomizeCheckoutTempApplication.cs +++ b/CompanyManagment.Application/CustomizeCheckoutTempApplication.cs @@ -249,7 +249,10 @@ namespace CompanyManagment.Application if (workshopId == 170) { - var exceptionEmployeeIds = _customizeWorkshopGroupSettingsRepository.GetEmployeeSettingsByGroupSettingsId(117).Select(x => x.EmployeeId).ToList(); + var exceptionEmployeeIds = _customizeWorkshopGroupSettingsRepository + .GetEmployeeSettingsByGroupSettingsId(117) + .Select(x => x.EmployeeId) + .Where(x=> workshopLeftWorksInMonth.Select(l=>l.EmployeeId).Contains(x)).ToList(); foreach (var employeesId in exceptionEmployeeIds) { From f387d0c535e9761a40dc665928d7f6106dc492f9 Mon Sep 17 00:00:00 2001 From: mahan Date: Wed, 24 Sep 2025 15:38:47 +0330 Subject: [PATCH 04/10] fix create pay bug --- ServiceHost/Areas/Client/Controllers/FinancialController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ServiceHost/Areas/Client/Controllers/FinancialController.cs b/ServiceHost/Areas/Client/Controllers/FinancialController.cs index d45266f8..cdae7c2d 100644 --- a/ServiceHost/Areas/Client/Controllers/FinancialController.cs +++ b/ServiceHost/Areas/Client/Controllers/FinancialController.cs @@ -52,6 +52,7 @@ public class FinancialController : ClientBaseController /// /// [HttpPost("CreatePay")] + [AllowAnonymous] public async Task>> CreatePay([FromForm] CreateFinancialPayRequest request, CancellationToken cancellationToken) { var op = new OperationResult(); From b9ff14757b15cf1a63c5c15d642839adfe8947f3 Mon Sep 17 00:00:00 2001 From: SamSys Date: Thu, 25 Sep 2025 12:26:38 +0330 Subject: [PATCH 05/10] new tab permission code --- .../Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml | 9 ++++++--- .../Areas/Admin/Pages/Accounts/Account/EditRole.cshtml | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml b/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml index 30a37640..fca01fe8 100644 --- a/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml @@ -230,9 +230,12 @@
-
- -
+
+ +
+
+ +
diff --git a/ServiceHost/Areas/Admin/Pages/Accounts/Account/EditRole.cshtml b/ServiceHost/Areas/Admin/Pages/Accounts/Account/EditRole.cshtml index 6f17ca6b..025f5756 100644 --- a/ServiceHost/Areas/Admin/Pages/Accounts/Account/EditRole.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Accounts/Account/EditRole.cshtml @@ -230,9 +230,12 @@
-
- -
+
+ +
+
+ +
From b8b8d9c3c40368863f674ecd316fb1917cd946b5 Mon Sep 17 00:00:00 2001 From: mahan Date: Thu, 25 Sep 2025 12:47:04 +0330 Subject: [PATCH 06/10] set account permission in EditWorkshop --- .../Admin/Pages/Company/Workshops/EditWorkshop.cshtml | 10 +++++++++- .../Pages/Company/Workshops/EditWorkshop.cshtml.cs | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ServiceHost/Areas/Admin/Pages/Company/Workshops/EditWorkshop.cshtml b/ServiceHost/Areas/Admin/Pages/Company/Workshops/EditWorkshop.cshtml index f76180ac..21ea2cfe 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/Workshops/EditWorkshop.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/Workshops/EditWorkshop.cshtml @@ -312,7 +312,15 @@
- + + +
- + +
From 85936cad63b99d5c251e33a9ca369e491a3540a2 Mon Sep 17 00:00:00 2001 From: SamSys Date: Mon, 29 Sep 2025 05:11:05 +0330 Subject: [PATCH 10/10] gozareshgir address and phone changed --- ServiceHost/Pages/contact-us/Index.cshtml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ServiceHost/Pages/contact-us/Index.cshtml b/ServiceHost/Pages/contact-us/Index.cshtml index e3469289..24c73869 100644 --- a/ServiceHost/Pages/contact-us/Index.cshtml +++ b/ServiceHost/Pages/contact-us/Index.cshtml @@ -196,13 +196,13 @@
نشانی گزارشگیر
-
منطقه آزاد انزلی، مجتمع ونوس طبقه اول، قرفه ۵۵۰
+
رشت - خیابان حاجی آباد - روبروی پارکینگ بزرگ حاجی آباد - ابتدای کوچه سپهدار - ساختمان دادماش - طبقه پنجم - واحد 17
شماره تماس
-
۰۱۳۳۲۳۲۸۸۸۶
-
۰۱۳۳۲۳۲۸۸۸۷
-
۰۱۳۳۳۲۴۴۹۲۶
-
۰۱۳۳۳۲۳۸۷۷۷
+
01333238777
+
01333328886
+
01333328887
+