mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 04:47:21 +00:00
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AIStudio.Assistants.SWOTAnalysis;
|
|
|
|
/// <summary>
|
|
/// Shows a complete SWOT analysis, in the order of SwotAnalysisMarkdownFormatter: the matrix, the
|
|
/// overall assessment, the prioritized actions, the details of each category, and what the moderator
|
|
/// changed.
|
|
/// </summary>
|
|
public partial class SwotAnalysisResultView
|
|
{
|
|
/// <summary>
|
|
/// The analysis to show.
|
|
/// </summary>
|
|
[Parameter]
|
|
public SwotAnalysisResult Result { get; set; } = new();
|
|
|
|
private SwotQuadrantLabels Labels => new(
|
|
this.Result.Strengths.Label,
|
|
this.Result.Weaknesses.Label,
|
|
this.Result.Opportunities.Label,
|
|
this.Result.Threats.Label,
|
|
this.Result.InternalLabel,
|
|
this.Result.ExternalLabel,
|
|
this.Result.PositiveLabel,
|
|
this.Result.NegativeLabel);
|
|
|
|
private SwotCategory CategoryOf(SwotAnalysisCategory category) => category switch
|
|
{
|
|
SwotAnalysisCategory.STRENGTHS => this.Result.Strengths,
|
|
SwotAnalysisCategory.WEAKNESSES => this.Result.Weaknesses,
|
|
SwotAnalysisCategory.OPPORTUNITIES => this.Result.Opportunities,
|
|
SwotAnalysisCategory.THREATS => this.Result.Threats,
|
|
|
|
_ => new(),
|
|
};
|
|
} |