Claim Logic
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
|
||||
[Parameter]
|
||||
public int Minimum { get; set; } = 1;
|
||||
|
||||
[Parameter]
|
||||
public bool AllowAddInteraction { get; set; }
|
||||
|
||||
private List<Interaction> Interactions => Prospect?.Interactions?.Where(x => x.Type == Type).ToList() ?? new List<Interaction>();
|
||||
|
||||
@@ -62,7 +65,7 @@
|
||||
<span>(<i>@interaction.Info</i>)</span>
|
||||
}
|
||||
|
||||
@if (!Prospect.Complete || interaction.Type == InteractionType.Complete)
|
||||
@if ((!Prospect.Complete || interaction.Type == InteractionType.Complete) && AllowAddInteraction)
|
||||
{
|
||||
<span> <a href=""><i class="fa-solid fa-square-xmark" @onclick="async () => await RemoveClick.InvokeAsync(interaction.Id)" @onclick:preventDefault></i></a></span>
|
||||
}
|
||||
@@ -71,7 +74,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@if (!Prospect.Complete && (Interactions.Count == 0 || Multiple))
|
||||
@if (!Prospect.Complete && (Interactions.Count == 0 || Multiple) && AllowAddInteraction)
|
||||
{
|
||||
if (Multiple) ButtonText = "+";
|
||||
<Button Size="Size.Small" Clicked="AddClick">@ButtonText</Button>
|
||||
|
||||
Reference in New Issue
Block a user