Skip to content

Commit

Permalink
Merge pull request #834 from bcgov/yj
Browse files Browse the repository at this point in the history
feat(dss-969)
  • Loading branch information
ychung-mot authored Nov 27, 2024
2 parents 3b9d092 + 06cd4d1 commit ff3e4b8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions server/StrDss.Data/Repositories/RentalListingRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ private static void ApplyFilters(string? all, string? address, string? url, stri

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

if (businessLicence != null && businessLicence.IsNotEmpty())
{
var businessLicenceLower = businessLicence.ToLower();
query = query.Where(x => x.BusinessLicenceNo != null && x.BusinessLicenceNo.ToLower().Contains(businessLicenceLower));
var effectiveBusinessLicenceNo = CommonUtils.SanitizeAndUppercaseString(businessLicence);
query = query.Where(x => x.EffectiveBusinessLicenceNo != null && x.EffectiveBusinessLicenceNo.StartsWith(effectiveBusinessLicenceNo));
}

if (prRequirement != null)
Expand All @@ -245,7 +245,6 @@ private static void ApplyFilters(string? all, string? address, string? url, stri
: x.IsBusinessLicenceRequired == null || x.IsBusinessLicenceRequired == false);
}


if (reassigned != null && reassigned.Value == false)
{
reassigned = null;
Expand Down

0 comments on commit ff3e4b8

Please sign in to comment.