62 lines
2.5 KiB
Plaintext
62 lines
2.5 KiB
Plaintext
@using TechHelper.Client.Exam
|
|
@using Entities.Contracts // Assuming SubjectAreaEnum is defined here, adjust if not
|
|
|
|
<MudPaper Outlined="true" Class="mt-2">
|
|
|
|
<MudText Typo="Typo.h6" Class="mb-4">Current Parsing Rules</MudText>
|
|
|
|
@* Display Question Patterns *@
|
|
@if (ExamParserConfig.QuestionPatterns.Any())
|
|
{
|
|
<MudExpansionPanel Text="Question Patterns" Class="mb-2" IsInitiallyExpanded="true">
|
|
<MudStack Spacing="1">
|
|
@foreach (var config in ExamParserConfig.QuestionPatterns)
|
|
{
|
|
<MudChip T="string" Color="Color.Info" Variant="Variant.Outlined" Class="d-flex justify-content-between align-items-center">
|
|
<div class="d-flex flex-column align-items-start">
|
|
<MudText Typo="Typo.body2">**Type:** @config.Type</MudText>
|
|
<MudText Typo="Typo.body2">**Pattern:** <code>@config.Pattern</code></MudText>
|
|
</div>
|
|
<MudText Typo="Typo.body2">**Priority:** @config.Priority</MudText>
|
|
</MudChip>
|
|
}
|
|
</MudStack>
|
|
</MudExpansionPanel>
|
|
}
|
|
else
|
|
{
|
|
<MudText Typo="Typo.body2" Class="mb-2">No question patterns configured.</MudText>
|
|
}
|
|
|
|
@* Display Option Patterns *@
|
|
@if (ExamParserConfig.OptionPatterns.Any())
|
|
{
|
|
<MudExpansionPanel Text="Option Patterns" Class="mb-2" IsInitiallyExpanded="true">
|
|
<MudStack Spacing="1">
|
|
@foreach (var config in ExamParserConfig.OptionPatterns)
|
|
{
|
|
<MudChip T="string" Color="Color.Warning" Variant="Variant.Outlined" Class="d-flex justify-content-between align-items-center">
|
|
<div class="d-flex flex-column align-items-start">
|
|
<MudText Typo="Typo.body2">**Type:** @config.Type</MudText>
|
|
<MudText Typo="Typo.body2">**Pattern:** <code>@config.Pattern</code></MudText>
|
|
</div>
|
|
<MudText Typo="Typo.body2">**Priority:** @config.Priority</MudText>
|
|
</MudChip>
|
|
}
|
|
</MudStack>
|
|
</MudExpansionPanel>
|
|
}
|
|
else
|
|
{
|
|
<MudText Typo="Typo.body2" Class="mb-2">No option patterns configured.</MudText>
|
|
}
|
|
|
|
</MudPaper>
|
|
|
|
@code {
|
|
|
|
[Parameter]
|
|
public ExamParserConfig ExamParserConfig { get; set; } = new ExamParserConfig();
|
|
|
|
// No other properties or methods are needed as the component is now purely for display.
|
|
} |