45 lines
1.4 KiB
Plaintext
45 lines
1.4 KiB
Plaintext
@page "/"
|
|
@page "/prospect"
|
|
@page "/prospects"
|
|
@using FoodsharingSiegen.Server.Dialogs
|
|
@using FoodsharingSiegen.Server.Controls
|
|
@using FoodsharingSiegen.Contracts.Entity
|
|
|
|
<PageTitle>Einarbeitungen</PageTitle>
|
|
|
|
<h4>Aktuelle Einarbeitungen</h4>
|
|
|
|
<Button Color="Color.Primary" Clicked="() => ProspectModal.Show()">Hinzufügen</Button>
|
|
|
|
@{
|
|
var activeProspects = ProspectList?.Where(x => x.Interactions.All(i => i.Type != InteractionType.Complete));
|
|
}
|
|
@if (activeProspects?.Any() == true)
|
|
{
|
|
<hr />
|
|
<h4>Aktuell:</h4>
|
|
<div class="row">
|
|
<Repeater Items="@activeProspects">
|
|
<ProspectContainer Prospect="context" InteractionModal="InteractionModal" RemoveInteraction="@RemoveInteraction"></ProspectContainer>
|
|
</Repeater>
|
|
</div>
|
|
}
|
|
|
|
|
|
@{
|
|
var completedProspects = ProspectList?.Where(x => x.Interactions.Any(i => i.Type == InteractionType.Complete));
|
|
}
|
|
@if (completedProspects?.Any() == true)
|
|
{
|
|
<hr />
|
|
<h4>Abgeschlossen:</h4>
|
|
<div class="row">
|
|
<Repeater Items="@completedProspects">
|
|
<ProspectContainer Prospect="context" InteractionModal="InteractionModal" RemoveInteraction="@RemoveInteraction"></ProspectContainer>
|
|
</Repeater>
|
|
</div>
|
|
}
|
|
|
|
|
|
<AddProspectModal @ref="ProspectModal" OnAdd="OnAddProspect"></AddProspectModal>
|
|
<AddInteractionModal @ref="InteractionModal" OnAdd="OnAddInteraction" Users="Users"></AddInteractionModal> |