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:
2020-12-27 22:30:07 -05:00
parent a48af190fa
commit fe3510b818
11 changed files with 424 additions and 102 deletions

View 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">&minus;</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>

View 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);
}
}