Skip to content

Commit

Permalink
feat(dss-969)
Browse files Browse the repository at this point in the history
  • Loading branch information
ychung-mot committed Nov 27, 2024
1 parent cfd1737 commit 06cd4d1
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 06cd4d1

Please sign in to comment.