diff --git a/src/JobsJobsJobs.sln b/src/JobsJobsJobs.sln index f33e0c9..0de6ec4 100644 --- a/src/JobsJobsJobs.sln +++ b/src/JobsJobsJobs.sln @@ -12,6 +12,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{50B51580-9F09-41E2-BC78-DAD38C37B583}" ProjectSection(SolutionItems) = preProject .dockerignore = .dockerignore + ..\.gitignore = ..\.gitignore database\12-add-real-name.sql = database\12-add-real-name.sql database\16-job-listing.sql = database\16-job-listing.sql JobsJobsJobs\Directory.Build.props = JobsJobsJobs\Directory.Build.props diff --git a/src/JobsJobsJobs/Client/Pages/Listings/Mine.razor b/src/JobsJobsJobs/Client/Pages/Listings/Mine.razor index dd3c55f..325eccc 100644 --- a/src/JobsJobsJobs/Client/Pages/Listings/Mine.razor +++ b/src/JobsJobsJobs/Client/Pages/Listings/Mine.razor @@ -6,20 +6,36 @@

My Job Listings

- - @if (Loading) + +

+ Add a New Job Listing +

+ @if (Listings.Any()) { -

Loading job listings…

+ + + + + + + + + + + @foreach (var listing in Listings) + { + + + + + + + } + +
ActionTitleCreatedUpdated
Edit@listing.Title
} else { - @if (Listings.Any()) - { -

TODO: list them

- } - else - { -

No job listings found

- } +

No job listings found

} -
+ diff --git a/src/JobsJobsJobs/Client/Pages/Listings/Mine.razor.cs b/src/JobsJobsJobs/Client/Pages/Listings/Mine.razor.cs index c9b9ec9..53fcd4c 100644 --- a/src/JobsJobsJobs/Client/Pages/Listings/Mine.razor.cs +++ b/src/JobsJobsJobs/Client/Pages/Listings/Mine.razor.cs @@ -1,6 +1,5 @@ using JobsJobsJobs.Shared; using Microsoft.AspNetCore.Components; -using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -9,22 +8,16 @@ namespace JobsJobsJobs.Client.Pages.Listings { public partial class Mine : ComponentBase { - /// - /// Whether the page is loading data - /// - private bool Loading { get; set; } = true; - - /// - /// Error messages encountered while searching for profiles - /// - private IList ErrorMessages { get; } = new List(); - /// /// The job listings entered by the current user /// private IEnumerable Listings { get; set; } = Enumerable.Empty(); - protected override async Task OnInitializedAsync() + /// + /// Load the user's job listings + /// + /// Error collection for possible problems + private async Task OnLoad(ICollection errors) { var listings = await ServerApi.RetrieveMany(http, "listing/mine"); @@ -34,7 +27,7 @@ namespace JobsJobsJobs.Client.Pages.Listings } else { - ErrorMessages.Add(listings.Error); + errors.Add(listings.Error); } } } diff --git a/src/JobsJobsJobs/Client/Shared/ErrorList.razor b/src/JobsJobsJobs/Client/Shared/ErrorList.razor index 8c03d02..da6cfc1 100644 --- a/src/JobsJobsJobs/Client/Shared/ErrorList.razor +++ b/src/JobsJobsJobs/Client/Shared/ErrorList.razor @@ -15,7 +15,7 @@ else @code { [Parameter] - public IList Errors { get; set; } = default!; + public ICollection Errors { get; set; } = default!; [Parameter] public RenderFragment ChildContent { get; set; } = default!; diff --git a/src/JobsJobsJobs/Client/Shared/Loading.razor b/src/JobsJobsJobs/Client/Shared/Loading.razor index 3b977f9..1041605 100644 --- a/src/JobsJobsJobs/Client/Shared/Loading.razor +++ b/src/JobsJobsJobs/Client/Shared/Loading.razor @@ -2,17 +2,9 @@ {

@Message

} -else if (ErrorMessages.Count > 0) +else { -

The following error@(ErrorMessages.Count == 1 ? "" : "s") occurred:

-
    - @foreach (var msg in ErrorMessages) - { -
  • @msg
  • - } -
-} -else -{ - @ChildContent + + @ChildContent + } diff --git a/src/JobsJobsJobs/Client/Shared/NavMenu.razor b/src/JobsJobsJobs/Client/Shared/NavMenu.razor index 7bb8323..f0e5024 100644 --- a/src/JobsJobsJobs/Client/Shared/NavMenu.razor +++ b/src/JobsJobsJobs/Client/Shared/NavMenu.razor @@ -38,12 +38,22 @@ + + } diff --git a/src/JobsJobsJobs/Client/Shared/NavMenu.razor.css b/src/JobsJobsJobs/Client/Shared/NavMenu.razor.css index acc5f9f..4eb6315 100644 --- a/src/JobsJobsJobs/Client/Shared/NavMenu.razor.css +++ b/src/JobsJobsJobs/Client/Shared/NavMenu.razor.css @@ -50,6 +50,9 @@ color: white; } +.nav-item.separator { + border-bottom: solid 1px white; +} @media (min-width: 641px) { .navbar-toggler { display: none; diff --git a/src/JobsJobsJobs/Shared/Domain/Listing.cs b/src/JobsJobsJobs/Shared/Domain/Listing.cs index 9717dd6..dee0278 100644 --- a/src/JobsJobsJobs/Shared/Domain/Listing.cs +++ b/src/JobsJobsJobs/Shared/Domain/Listing.cs @@ -1,4 +1,5 @@ -using System; +using NodaTime; +using System; namespace JobsJobsJobs.Shared { @@ -8,15 +9,15 @@ namespace JobsJobsJobs.Shared public record Listing( ListingId Id, CitizenId CitizenId, - DateTime CreatedOn, + Instant CreatedOn, string Title, ContinentId ContinentId, string Region, bool RemoteWork, bool IsExpired, - DateTime UpdatedOn, + Instant UpdatedOn, MarkdownString Text, - DateTime? NeededBy, + LocalDate? NeededBy, bool? WasFilledHere) { ///