fix rollcall bug and reward desc bug

This commit is contained in:
MahanCh
2025-04-16 15:30:20 +03:30
parent 39eb401575
commit 1915dc0565
2 changed files with 8 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ public class RewardRepository : RepositoryBase<long, Reward>, 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<long, Reward>, 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(),

View File

@@ -72,7 +72,12 @@ public class RollCallEmployeeRepository : RepositoryBase<long, RollCallEmployee>
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();
}