Skip to content

Commit

Permalink
Update job edit
Browse files Browse the repository at this point in the history
  • Loading branch information
Layoric committed Nov 10, 2023
1 parent 8505bfb commit c264c38
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<PackageReference Include="ServiceStack.Server" Version="6.*" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack.OrmLite\src\ServiceStack.OrmLite\ServiceStack.OrmLite.csproj" />
<ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack\src\ServiceStack.Server\ServiceStack.Server.csproj" />
<ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack\src\ServiceStack\ServiceStack.csproj" />
</ItemGroup>
<!-- <ItemGroup>-->
<!-- <ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack.OrmLite\src\ServiceStack.OrmLite\ServiceStack.OrmLite.csproj" />-->
<!-- <ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack\src\ServiceStack.Server\ServiceStack.Server.csproj" />-->
<!-- <ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack\src\ServiceStack\ServiceStack.csproj" />-->
<!-- </ItemGroup>-->

<ItemGroup>
<ProjectReference Include="..\TalentBlazor.ServiceModel\TalentBlazor.ServiceModel.csproj" />
Expand Down
1 change: 1 addition & 0 deletions TalentBlazor.Tests/TalentBlazor.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

<!-- <ItemGroup>-->
<!-- <ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack\src\ServiceStack\ServiceStack.csproj" />-->
<!-- <ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack\src\ServiceStack.Kestrel\ServiceStack.Kestrel.csproj" />-->
<!-- </ItemGroup>-->

</Project>
19 changes: 6 additions & 13 deletions TalentBlazor/Components/Pages/Talent/JobEdit.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
@inherits AppComponentBase
@inject NavigationManager navigationManager;
@using ServiceStack.Blazor.Components.Tailwind
@layout MainLayout
@page "/jobs/{JobId:int}/edit"
@rendermode RenderMode.InteractiveServer

<SetHeader>
<div class="flex-1 min-w-0">
Expand Down Expand Up @@ -36,12 +38,7 @@

<main class="space-y-8 divide-y divide-gray-200">
<div class="space-y-8 divide-y divide-gray-200">
@if (appMetadata != null)
{
<CascadingValue Value="appMetadata">
<AutoQueryForm TResponse="Job" T="UpdateJob" Request="request" OnSave="Save" OnDone="Done" OnCancel="OnCancel"></AutoQueryForm>
</CascadingValue>
}
<AutoEditForm ApiType="typeof(UpdateJob)" Edit="job" FormStyle="FormStyle.Card" Model="Job" Save="Save" Done="OnCancel" />
</div>
</main>

Expand All @@ -56,16 +53,12 @@
UpdateJob request = new();
Job? job;

async Task Save(UpdateJob req)
{
//request = req;
}

async Task Done(Job response)
async Task Save(Job model)
{
await RefreshData();
navigationManager.NavigateTo("/jobs/" + JobId + "/applications");
}

async Task OnCancel()
{
navigationManager.NavigateTo("/jobs/" + JobId + "/applications");
Expand Down

0 comments on commit c264c38

Please sign in to comment.