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 committed Sep 29, 2023
1 parent f1bd743 commit fcac2a9
Show file tree
Hide file tree
Showing 10 changed files with 728 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,6 @@ public sealed class StreetNameFilter
public string NameEnglish { get; set; } = string.Empty;
public string Status { get; set; } = string.Empty;
public string? NisCode { get; set; } = string.Empty;
public bool? IsInFlemishRegion { get; set; } = null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,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
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,6 @@ public class StreetNameFilter
public string NameEnglish { get; set; }
public string Status { get; set; }
public string? NisCode { get; set; }
public bool? IsInFlemishRegion { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,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
Loading

0 comments on commit fcac2a9

Please sign in to comment.