mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
38 lines
693 B
Plaintext
38 lines
693 B
Plaintext
@using LocalModels
|
|
|
|
@inject YamlManager yamlManager
|
|
@inject CoursePlanner planner
|
|
|
|
@code
|
|
{
|
|
[Parameter]
|
|
public int RefreshKey { get; set; }
|
|
public IEnumerable<LocalCourse>? localCourses { get; set; }
|
|
protected override async Task OnParametersSetAsync()
|
|
{
|
|
localCourses = await yamlManager.LoadSavedCourses();
|
|
}
|
|
|
|
}
|
|
|
|
@if(localCourses != null)
|
|
{
|
|
<h3>Stored Courses</h3>
|
|
@foreach (var course in localCourses)
|
|
{
|
|
void SetCourse()
|
|
{
|
|
planner.LocalCourse = course;
|
|
this.StateHasChanged();
|
|
}
|
|
<div>
|
|
<button
|
|
class="btn btn-outline-primary"
|
|
@onclick="@SetCourse"
|
|
>
|
|
Use
|
|
</button>
|
|
@course.Name
|
|
</div>
|
|
}
|
|
} |