Skip to content

Commit

Permalink
fix color filtering (#106)
Browse files Browse the repository at this point in the history
* fix color filtering

* package upgrades

* woops
  • Loading branch information
mlapaglia authored Sep 22, 2022
1 parent b68e70a commit d2f2a43
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ export class PlatesComponent implements OnInit, OnDestroy, AfterViewInit {
request.filterIgnoredPlates = this.filterIgnoredPlates;
request.filterPlatesSeenLessThan = this.filterPlatesSeenLessThan ? 10 : 0;
request.regexSearchEnabled = this.regexSearchEnabled;
request.vehicleColor = this.filterVehicleColor;
request.vehicleMake = this.filterVehicleMake;
request.vehicleModel = this.filterVehicleModel;
request.vehicleType = this.filterVehicleType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ public async Task<SearchLicensePlateResponse> HandleAsync(
dbRequest = dbRequest.Where(x => !x.PossibleNumbers.Any(y => platesToIgnore.Contains(y.Number)) && !platesToIgnore.Contains(x.BestNumber));
}

if (!string.IsNullOrWhiteSpace(request.VehicleColor))
{
dbRequest = dbRequest.Where(x => x.VehicleColor.Contains(request.VehicleColor.ToLower()));
}

if (!string.IsNullOrWhiteSpace(request.VehicleMake))
{
dbRequest = dbRequest.Where(x => x.VehicleMakeModel.Contains(request.VehicleMake.ToLower()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class SearchLicensePlateRequest

public int PageSize { get; set; }

public string VehicleColor { get; set; }

public string VehicleMake { get; set; }

public string VehicleModel { get; set; }
Expand Down
32 changes: 16 additions & 16 deletions OpenAlprWebhookProcessor/OpenAlprWebhookProcessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,27 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="Bogus" Version="33.1.1" />
<PackageReference Include="CoordinateSharp" Version="2.12.1.1" />
<PackageReference Include="Flurl" Version="3.0.2" />
<PackageReference Include="Hangfire" Version="1.7.26" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.26" />
<PackageReference Include="AutoMapper" Version="11.0.1" />
<PackageReference Include="Bogus" Version="34.0.2" />
<PackageReference Include="CoordinateSharp" Version="2.13.1.1" />
<PackageReference Include="Flurl" Version="3.0.6" />
<PackageReference Include="Hangfire" Version="1.7.31" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.31" />
<PackageReference Include="Hangfire.InMemory" Version="0.3.4" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.11" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="5.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0-rc.2.21480.5">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.8" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.2" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.11.1" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="Serilog.AspNetCore" Version="4.1.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="4.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.8" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="Serilog.AspNetCore" Version="6.0.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="5.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.14.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.22.1" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit d2f2a43

Please sign in to comment.