Skip to content

Commit

Permalink
Merge pull request #835 from bcgov/yj
Browse files Browse the repository at this point in the history
chore: fix host search
  • Loading branch information
ychung-mot authored Nov 28, 2024
2 parents ff3e4b8 + 7a2bb61 commit 8cb0f36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/StrDss.Data/Repositories/RentalListingRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private static void ApplyFilters(string? all, string? address, string? url, stri
(x.PlatformListingUrl != null && x.PlatformListingUrl.ToLower().Contains(allLower)) ||
(x.PlatformListingNo != null && x.PlatformListingNo.ToLower().Contains(allLower)) ||
(x.ListingContactNamesTxt != null && x.ListingContactNamesTxt.ToLower().Contains(allLower)) ||
(x.BusinessLicenceNo != null && x.BusinessLicenceNo.ToLower().Contains(allLower)));
(x.EffectiveBusinessLicenceNo != null && x.EffectiveBusinessLicenceNo.StartsWith(CommonUtils.SanitizeAndUppercaseString(all))));
}

if (address != null && address.IsNotEmpty())
Expand All @@ -221,8 +221,8 @@ private static void ApplyFilters(string? all, string? address, string? url, stri

if (hostName != null && hostName.IsNotEmpty())
{
var effectiveHostNm = CommonUtils.SanitizeAndUppercaseString(hostName);
query = query.Where(x => x.EffectiveHostNm != null && x.EffectiveHostNm.StartsWith(effectiveHostNm));
var hostNameLower = hostName.ToLower();
query = query.Where(x => x.ListingContactNamesTxt != null && x.ListingContactNamesTxt.ToLower().Contains(hostNameLower));
}

if (businessLicence != null && businessLicence.IsNotEmpty())
Expand Down

0 comments on commit 8cb0f36

Please sign in to comment.