Moved enums to a dedicated namespace and updated references across the codebase. Renamed the `Info` field in the `Interaction` entity to `Info1`, including necessary migrations and UI adjustments. These changes improve the organization and consistency of the codebase.
50 lines
2.0 KiB
Plaintext
50 lines
2.0 KiB
Plaintext
@using FoodsharingSiegen.Contracts.Entity
|
|
@using FoodsharingSiegen.Contracts.Enums
|
|
@using FoodsharingSiegen.Shared.Helper
|
|
|
|
@inherits FsBase
|
|
|
|
@{
|
|
var rowClass = "";
|
|
if (Done) rowClass += " done";
|
|
if (NotNeeded) rowClass += " notneeded";
|
|
if (Alert) rowClass += " fs-alert";
|
|
}
|
|
|
|
<tr class="@rowClass" style="border-top: 5px solid transparent;">
|
|
<th class="text-center align-top pr-2">
|
|
<i class="@IconClass"></i>
|
|
</th>
|
|
<th class="pr-2 align-top" style="white-space: nowrap;">@Type.Translate(AppSettings):</th>
|
|
<td class="align-top d-flex flex-column">
|
|
@if (Interactions.Count > 0)
|
|
{
|
|
foreach (var interaction in Interactions)
|
|
{
|
|
<div style="padding-bottom: .5rem;">
|
|
<div style="white-space: nowrap;">
|
|
<span title="@interaction.User.Memo">@interaction.User.Name</span> (@interaction.Date.ToShortDateString())
|
|
|
|
@if ((Prospect is not { Complete: true } || interaction.Type == InteractionType.Complete) && AllowInteraction)
|
|
{
|
|
<span> <a href=""><i class="fa-solid fa-square-xmark" @onclick="async () => { if (RemoveClick != null) await RemoveClick.Invoke(interaction.Id); }" @onclick:preventDefault></i></a></span>
|
|
}
|
|
</div>
|
|
|
|
@if (!string.IsNullOrWhiteSpace(interaction.Info1))
|
|
{
|
|
<span>(<i>@interaction.Info1</i>)</span>
|
|
}
|
|
</div>
|
|
}
|
|
}
|
|
|
|
@if (Prospect is not {Complete: true } && (Interactions.Count == 0 || Multiple) && AllowInteraction)
|
|
{
|
|
if (Multiple) ButtonIconClass = "fa-solid fa-plus";
|
|
<div class="m-auto">
|
|
<Button Size="Size.Small" Clicked="@(async () => { if (AddClick != null) await AddClick(Type); })"><i class="@ButtonIconClass" style="color: #64ae24;"></i></Button>
|
|
</div>
|
|
}
|
|
</td>
|
|
</tr> |