Prospects Page
This commit is contained in:
93
FoodsharingSiegen.Server/Controls/ProspectContainer.razor
Normal file
93
FoodsharingSiegen.Server/Controls/ProspectContainer.razor
Normal file
@@ -0,0 +1,93 @@
|
||||
@using FoodsharingSiegen.Contracts.Entity
|
||||
|
||||
@{
|
||||
var divClass = "pc-main";
|
||||
if (Prospect.Complete) divClass += " complete";
|
||||
}
|
||||
|
||||
<div class="@divClass">
|
||||
<h5 class="mb-0">
|
||||
@Prospect.Name
|
||||
<small style="font-size: .9rem; opacity: .7;">
|
||||
<a class="invert" href="https://foodsharing.de/profile/@Prospect.FsId" target="_blank">Profil öffnen</a>
|
||||
</small>
|
||||
</h5>
|
||||
<div>@Prospect.Memo</div>
|
||||
<table>
|
||||
|
||||
<InteractionRow
|
||||
Prospect="Prospect"
|
||||
Type="InteractionType.Welcome"
|
||||
AddClick="() => AddInteraction(InteractionType.Welcome)"
|
||||
RemoveClick="@RemoveInteraction"
|
||||
Caption="Begrüßung"
|
||||
ButtonText="Abhaken"
|
||||
IconClass="fa-solid fa-handshake-simple">
|
||||
</InteractionRow>
|
||||
|
||||
<InteractionRow
|
||||
Prospect="Prospect"
|
||||
Type="InteractionType.EinAb"
|
||||
AddClick="() => AddInteraction(InteractionType.EinAb)"
|
||||
RemoveClick="@RemoveInteraction"
|
||||
Caption="Einführungen"
|
||||
Multiple="true"
|
||||
Minimum="3"
|
||||
ButtonText="Hinzufügen"
|
||||
IconClass="fa-solid fa-basket-shopping">
|
||||
</InteractionRow>
|
||||
|
||||
<InteractionRow
|
||||
Prospect="Prospect"
|
||||
Type="InteractionType.IdCheck"
|
||||
AddClick="() => AddInteraction(InteractionType.IdCheck)"
|
||||
RemoveClick="@RemoveInteraction"
|
||||
Caption="Perso prüfen"
|
||||
ButtonText="Abhaken"
|
||||
IconClass="fa-solid fa-magnifying-glass">
|
||||
</InteractionRow>
|
||||
|
||||
<InteractionRow
|
||||
Prospect="Prospect"
|
||||
Type="InteractionType.PdfPass"
|
||||
AddClick="() => AddInteraction(InteractionType.PdfPass)"
|
||||
RemoveClick="@RemoveInteraction"
|
||||
Caption="FS-Ausweis (digital)"
|
||||
ButtonText="Abhaken"
|
||||
IconClass="fa-solid fa-file-pdf">
|
||||
</InteractionRow>
|
||||
|
||||
<InteractionRow
|
||||
Prospect="Prospect"
|
||||
Type="InteractionType.PrintPass"
|
||||
AddClick="() => AddInteraction(InteractionType.PrintPass)"
|
||||
RemoveClick="@RemoveInteraction"
|
||||
Caption="FS-Ausweis (print)"
|
||||
ButtonText="Abhaken"
|
||||
IconClass="fa-solid fa-id-card">
|
||||
</InteractionRow>
|
||||
|
||||
<InteractionRow
|
||||
Prospect="Prospect"
|
||||
Type="InteractionType.Verify"
|
||||
AddClick="() => AddInteraction(InteractionType.Verify)"
|
||||
RemoveClick="@RemoveInteraction"
|
||||
Caption="Verifizieren"
|
||||
ButtonText="Abhaken"
|
||||
IconClass="fa-solid fa-user-check">
|
||||
</InteractionRow>
|
||||
|
||||
<InteractionRow
|
||||
Prospect="Prospect"
|
||||
Type="InteractionType.Complete"
|
||||
AddClick="() => AddInteraction(InteractionType.Complete)"
|
||||
RemoveClick="@RemoveInteraction"
|
||||
Caption="Fertig"
|
||||
ButtonText="Abhaken"
|
||||
IconClass="fa-solid fa-flag-checkered">
|
||||
</InteractionRow>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
26
FoodsharingSiegen.Server/Controls/ProspectContainer.razor.cs
Normal file
26
FoodsharingSiegen.Server/Controls/ProspectContainer.razor.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using FoodsharingSiegen.Contracts.Entity;
|
||||
using FoodsharingSiegen.Server.Dialogs;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace FoodsharingSiegen.Server.Controls
|
||||
{
|
||||
public partial class ProspectContainer
|
||||
{
|
||||
[Parameter] public Prospect? Prospect { get; set; }
|
||||
|
||||
[Parameter] public AddInteractionModal InteractionModal { get; set; } = null!;
|
||||
|
||||
[Parameter] public EventCallback<Guid> RemoveInteraction { get; set; }
|
||||
|
||||
|
||||
private async Task AddInteraction(InteractionType type)
|
||||
{
|
||||
await InteractionModal.Show(type, Prospect?.Id);
|
||||
}
|
||||
|
||||
private List<Interaction> GetTyped(InteractionType type)
|
||||
{
|
||||
return Prospect?.Interactions?.Where(x => x.Type == type).ToList() ?? new List<Interaction>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
::deep a,
|
||||
::deep a.invert:hover{
|
||||
|
||||
color: #64ae24;
|
||||
}
|
||||
|
||||
::deep a.invert,
|
||||
::deep a:hover {
|
||||
color: #533a20;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: #64ae24;
|
||||
}
|
||||
|
||||
.pc-main {
|
||||
flex-basis: 0;
|
||||
flex-grow: 1;
|
||||
max-width: 100%;
|
||||
min-width: 350px;
|
||||
border: 1px solid #533a20;
|
||||
border-radius: 15px;
|
||||
margin: 5px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.complete {
|
||||
background: #76ff003b;
|
||||
}
|
||||
Reference in New Issue
Block a user