Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public CityAccessForCityAdminGetter(IRepositoryWrapper repositoryWrapper)
{
var cityAdministration = await _repositoryWrapper.CityAdministration.GetFirstOrDefaultAsync(
predicate: c => c.UserId == userId
&& (DateTime.Now < c.EndDate || c.EndDate == null)
&& (DateTime.Now.Date <= c.EndDate.Value.Date || c.EndDate == null)
&& (c.AdminTypeId == _cityAdminType.ID
|| c.AdminTypeId == _cityAdminDeputyType.ID
|| c.AdminTypeId == _cityReferentUPSType.ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public ClubAccessForClubAdminGetter(IRepositoryWrapper repositoryWrapper)
public async Task<IEnumerable<DatabaseEntities.Club>> GetClubs(string userId)
{
var ClubAdministration = await _repositoryWrapper.ClubAdministration.GetFirstOrDefaultAsync(
predicate: c => c.UserId == userId && (DateTime.Now < c.EndDate || c.EndDate == null) && (c.AdminTypeId == _ClubAdminType.ID || c.AdminTypeId == _ClubAdminDeputyType.ID));
predicate: c => c.UserId == userId && (DateTime.Now.Date <= c.EndDate.Value.Date || c.EndDate == null) && (c.AdminTypeId == _ClubAdminType.ID || c.AdminTypeId == _ClubAdminDeputyType.ID));
return ClubAdministration != null ? await _repositoryWrapper.Club.GetAllAsync(
predicate: c => c.ID == ClubAdministration.ClubId)
: Enumerable.Empty<DatabaseEntities.Club>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public RegionAccessForRegionAdminGetter(IRepositoryWrapper repositoryWrapper)
public async Task<IEnumerable<DatabaseEntities.Region>> GetRegionAsync(string userId)
{
var RegionAdministration = await _repositoryWrapper.RegionAdministration.GetFirstOrDefaultAsync(
predicate: c => c.UserId == userId && (DateTime.Now < c.EndDate || c.EndDate == null) &&
predicate: c => c.UserId == userId && (DateTime.Now.Date <= c.EndDate.Value.Date || c.EndDate == null) &&
(c.AdminTypeId == _RegionAdminType.ID || c.AdminTypeId == _RegionAdminDeputyType.ID));
return RegionAdministration != null ? await _repositoryWrapper.Region.GetAllAsync(
predicate: c => c.ID == RegionAdministration.RegionId)
Expand Down