From 1915dc056511a30c4fd34a26ba047d5a12c08cb2 Mon Sep 17 00:00:00 2001 From: MahanCh Date: Wed, 16 Apr 2025 15:30:20 +0330 Subject: [PATCH] fix rollcall bug and reward desc bug --- CompanyManagment.EFCore/Repository/RewardRepository.cs | 4 ++-- .../Repository/RollCallEmployeeRepository.cs | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CompanyManagment.EFCore/Repository/RewardRepository.cs b/CompanyManagment.EFCore/Repository/RewardRepository.cs index 1e78eb05..cfecb44f 100644 --- a/CompanyManagment.EFCore/Repository/RewardRepository.cs +++ b/CompanyManagment.EFCore/Repository/RewardRepository.cs @@ -50,7 +50,7 @@ public class RewardRepository : RepositoryBase, IRewardRepository Title = x.Title, Amount = x.Amount, CreationDate = x.CreationDate, - Description = x.Description, + Description = x.Description??"", GrantDateFa = x.GrantDateFa, EmployeeFullName = employees.FirstOrDefault(e => e.id == x.EmployeeId).FullName, Id = x.Id, @@ -203,7 +203,7 @@ public class RewardRepository : RepositoryBase, IRewardRepository WorkshopId = x.WorkshopId, Amount = x.Amount.ToMoney(), AmountDouble = x.Amount, - Description = x.Description, + Description = x.Description??"", EmployeeFullName = employees.FirstOrDefault(e => e.id == x.EmployeeId).FullName, EmployeeId = x.EmployeeId, GrantDateFa = x.GrantDate.ToFarsi(), diff --git a/CompanyManagment.EFCore/Repository/RollCallEmployeeRepository.cs b/CompanyManagment.EFCore/Repository/RollCallEmployeeRepository.cs index 2f290277..7b8b4a79 100644 --- a/CompanyManagment.EFCore/Repository/RollCallEmployeeRepository.cs +++ b/CompanyManagment.EFCore/Repository/RollCallEmployeeRepository.cs @@ -72,7 +72,12 @@ public class RollCallEmployeeRepository : RepositoryBase EmployeeLName = x.LName, EmployeeFullName = x.EmployeeFullName, IsActiveString = x.IsActiveString, - HasUploadedImage = x.HasUploadedImage + HasUploadedImage = x.HasUploadedImage, + Statuses = x.EmployeesStatus.Select(x => new RollCallEmployeeStatusViewModel() + { + StartDateGr = x.StartDate, + EndDateGr = x.EndDate + }) }).FirstOrDefault(); }