Skip to content

Commit

Permalink
CGI-FR#3239 Change checkboxes for layers displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
E068097 authored and judramos committed Dec 3, 2024
1 parent d223fe4 commit 00c8f0e
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/IoTHub.Portal.Client/Components/Planning/EditPlanning.razor
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,26 @@
<MudTreeViewItem @bind-Expanded="@context.IsExpanded" Items="@context.Children">
<Content>
<MudTreeViewItemToggleButton @bind-Expanded="@context.IsExpanded" Visible="@(context.Children.Count() != 0)" />
<MudCheckBox T="bool?" Checked="@(context.LayerData.Planning == planning.Id)" ValueChanged="@(() => CheckedChanged(context))"></MudCheckBox>

@if ((context.LayerData.Planning != null && context.LayerData.Planning != "None" && context.LayerData.Planning == planning.Id))
{
<MudTooltip Text="Already registered">
<MudIconButton Color="Color.Success" Icon="@Icons.Material.Filled.CheckBox" Size="Size.Medium" @onclick="() => CheckedChanged(context)"></MudIconButton>
</MudTooltip>
}
else if (context.LayerData.Planning != null && context.LayerData.Planning != "None" && context.LayerData.Planning != planning.Id)
{
<MudTooltip Text="Registered on other planning">
<MudIconButton Color="Color.Error" Icon="@Icons.Material.Filled.IndeterminateCheckBox" Size="Size.Medium" @onclick="() => CheckedChanged(context)"></MudIconButton>
</MudTooltip>
}
else
{
<MudTooltip Text="Add device">
<MudIconButton Color="Color.Default" Icon="@Icons.Material.Filled.CheckBoxOutlineBlank" Size="Size.Medium" @onclick="() => CheckedChanged(context)"></MudIconButton>
</MudTooltip>
}

<MudText>@context.LayerData.Name</MudText>
</Content>
</MudTreeViewItem>
Expand Down

0 comments on commit 00c8f0e

Please sign in to comment.