Skip to content

Commit

Permalink
feat: add flemish region filter for list api GAWR-5205
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneD authored and jvandaal committed Jan 29, 2024
1 parent 94e3109 commit 8e6edb0
Show file tree
Hide file tree
Showing 8 changed files with 728 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ protected override IQueryable<StreetNameListItemV2> Filter(FilteringHeader<Stree
if (!string.IsNullOrEmpty(filtering.Filter.NameGerman))
streetNames = streetNames.Where(s => s.NameGerman.Contains(filtering.Filter.NameGerman));

if (filtering.Filter.IsInFlemishRegion.HasValue)
streetNames = streetNames.Where(x => x.IsInFlemishRegion);

var filterMunicipalityName = filtering.Filter.MunicipalityName.RemoveDiacritics();
if (!string.IsNullOrEmpty(filtering.Filter.MunicipalityName))
{
Expand Down Expand Up @@ -156,5 +159,7 @@ public sealed class StreetNameFilter
public string Status { get; set; } = string.Empty;
public string? NisCode { get; set; } = string.Empty;
public string? PostalCode { get; set; } = string.Empty;

public bool? IsInFlemishRegion { get; set; } = null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ protected override IQueryable<StreetNameListItemV2> Filter(FilteringHeader<Stree
streetNames = streetNames.Where(s => s.NameGerman.Contains(filtering.Filter.NameGerman));
}

if (filtering.Filter.IsInFlemishRegion.HasValue)
{
streetNames = streetNames.Where(x => x.IsInFlemishRegion);
}

var filterMunicipalityName = filtering.Filter.MunicipalityName.RemoveDiacritics();
if (!string.IsNullOrEmpty(filtering.Filter.MunicipalityName))
{
Expand Down Expand Up @@ -165,5 +170,6 @@ public class StreetNameFilter
public string Status { get; set; }
public string? NisCode { get; set; }
public string? PostalCode { get; set; }
public bool? IsInFlemishRegion { get; set; } = null;
}
}
Loading

0 comments on commit 8e6edb0

Please sign in to comment.