Skip to content

Commit

Permalink
Fix Layer rules UI (#15234)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Feb 2, 2024
1 parent 3d5ebe4 commit 95726b8
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
@model ConditionGroupViewModel
@inject IDisplayManager<Condition> DisplayManager

@if (Model.Entries.Any())
{
<ol class="condition-group pt-3" data-conditiongroupid="@Model.Condition.ConditionId">
@foreach (var entry in Model.Entries)
{
dynamic summary = await DisplayManager.BuildDisplayAsync(entry.Condition, null, "Summary");
summary.Condition = entry.Condition;
<li class="list-group-item pr-0" data-conditionid="@entry.Condition.ConditionId">
@await DisplayAsync(summary)
</li>
}
</ol>
}
else
@if (Model.Entries.Length == 0)
{
<p class="alert alert-warning message-warning mb-0 ms-0 mt-3 me-3">@T["No conditions found. Please add at least one condition."]</p>

return;
}

<ol class="list-group condition-group pt-3" data-conditiongroupid="@Model.Condition.ConditionId">
@foreach (var entry in Model.Entries)
{
dynamic summary = await DisplayManager.BuildDisplayAsync(entry.Condition, null, "Summary");
summary.Condition = entry.Condition;
<li class="list-group-item pr-0" data-conditionid="@entry.Condition.ConditionId">
@await DisplayAsync(summary)
</li>
}
</ol>

0 comments on commit 95726b8

Please sign in to comment.