Added confirmed work states to the BeyondFacts Lab (#1182)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-10 11:27:51 +01:00
1 parent 6d0052ecdf
commit a9579dd282
39 files changed
+3160 -16

No files matched your search

@@ -0,0 +1,35 @@
using AIStudio.Components;
using Microsoft.AspNetCore.Components;
namespace AIStudio.Assistants.BeyondFactsLab;
/// <summary>
/// The work states the person confirmed in a preparation of the BeyondFacts Lab, beside the steps.
/// </summary>
/// <remarks>
/// They are what the lab builds on in the later steps, so the person sees them while working on any step, with the
/// outdated ones marked.
/// </remarks>
public partial class BflConfirmedWorkStates : MSGComponentBase
{
/// <summary>
/// Gets or sets the work states of the preparation, by their steps.
/// </summary>
[Parameter, EditorRequired]
public IReadOnlyDictionary<BflStep, BflWorkState> WorkStates { get; set; } = new Dictionary<BflStep, BflWorkState>();
/// <summary>
/// Gets or sets the forms of the preparation, by their steps, which tell whether a work state is outdated.
/// </summary>
[Parameter, EditorRequired]
public IReadOnlyDictionary<BflStep, BflStepFormData> Forms { get; set; } = new Dictionary<BflStep, BflStepFormData>();
/// <summary>
/// Gets or sets further CSS classes of the area.
/// </summary>
[Parameter]
public string Class { get; set; } = string.Empty;
private IReadOnlyList<BflStep> ConfirmedSteps => [.. BflStep.All.Where(step => this.WorkStates.GetValueOrDefault(step)?.Confirmed is not null)];
}