Skip to content

Commit

Permalink
Add isHidden, status, license plates
Browse files Browse the repository at this point in the history
  • Loading branch information
sboulema committed Jun 22, 2024
1 parent 2962c7d commit 4f80f7d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/Models/ViewModels/PersonViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ public class PersonViewModel
public string Name => $"{FirstName}{(!string.IsNullOrEmpty(LastName) ? $" {LastName}" : string.Empty)}";

public bool IsDisabled { get; set; }

public bool IsHidden { get; set; }

public string Status { get; set; } = string.Empty;

public List<string> LicensePlates { get; set; } = [];
}

[JsonSerializable(typeof(PersonViewModel))]
Expand Down
3 changes: 2 additions & 1 deletion src/Services/StreetBookService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.Json;
using Microsoft.Extensions.Hosting;
using StreetBook.Models.ViewModels;
Expand Down Expand Up @@ -29,7 +30,7 @@ public StreetBookViewModel GetStreetBook()

return new()
{
Persons = people
Persons = people.Where(people => !people.IsHidden).ToList(),
};
}
}
2 changes: 1 addition & 1 deletion src/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<div class="container">
<div class="row">
<div class="col-auto">
&copy; 2023 : StreetBook
&copy; 2023 - 2024 : StreetBook
</div>
</div>
</div>
Expand Down

0 comments on commit 4f80f7d

Please sign in to comment.