Skills now saved / returned
Edging closer to #2 completion; need to finish styles, create display page, and put some interesting stuff on the dashboard
This commit is contained in:
22
src/JobsJobsJobs/Client/Shared/SkillEdit.razor
Normal file
22
src/JobsJobsJobs/Client/Shared/SkillEdit.razor
Normal file
@@ -0,0 +1,22 @@
|
||||
<div class="form-row">
|
||||
<div class="col col-xs-2 col-sm-2 col-md-1">
|
||||
<br>
|
||||
<button type="button" class="btn btn-outline-danger" title="Delete" @onclick="@RemoveMe">−</button>
|
||||
</div>
|
||||
<div class="col col-xs-10 col-sm-10 col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="skillDesc@(Skill.Id)">Skill</label>
|
||||
<input type="text" id="skillDesc@(Skill.Id)" @bind="@Skill.Description" class="form-control" maxlength="100"
|
||||
placeholder="A skill (language, design technique, process, etc.)">
|
||||
<ValidationMessage For="@(() => Skill.Description)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-xs-12 col-sm-12 col-md-5">
|
||||
<div class="form-group">
|
||||
<label for="skillNotes@(Skill.Id)">Notes</label>
|
||||
<input type="text" id="skillNotes@(Skill.Id)" @bind="@Skill.Notes" class="form-control" maxlength="100"
|
||||
placeholder="A further description of the skill (100 characters max)">
|
||||
<ValidationMessage For="@(() => Skill.Notes)" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
29
src/JobsJobsJobs/Client/Shared/SkillEdit.razor.cs
Normal file
29
src/JobsJobsJobs/Client/Shared/SkillEdit.razor.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using JobsJobsJobs.Shared.Api;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JobsJobsJobs.Client.Shared
|
||||
{
|
||||
/// <summary>
|
||||
/// A component that allows a skill to be edited
|
||||
/// </summary>
|
||||
public partial class SkillEdit : ComponentBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The skill being edited
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public SkillForm Skill { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Callback used if the remove button is clicked
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public EventCallback<string> OnRemove { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Remove this skill from the skill collection
|
||||
/// </summary>
|
||||
private Task RemoveMe() => OnRemove.InvokeAsync(Skill.Id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user