Compare commits
5 Commits
297a7c60bd
...
c7e0bfd8da
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7e0bfd8da | ||
|
|
5f5690e84d | ||
|
|
05b74b929e | ||
|
|
328e194611 | ||
|
|
8a65c03c2c |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -8,3 +8,8 @@ Publish/
|
|||||||
app.db
|
app.db
|
||||||
FoodsharingSiegen.Server/wwwroot/buildinfo.txt
|
FoodsharingSiegen.Server/wwwroot/buildinfo.txt
|
||||||
FoodsharingSiegen.Server/config/appsettings.json
|
FoodsharingSiegen.Server/config/appsettings.json
|
||||||
|
|
||||||
|
# Generated CSS files from SCSS
|
||||||
|
FoodsharingSiegen.Server/Pages/AuditView.razor.css
|
||||||
|
FoodsharingSiegen.Server/Shared/DefaultLayout.razor.css
|
||||||
|
FoodsharingSiegen.Server/Shared/NavMenu.razor.css
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
@using FoodsharingSiegen.Contracts.Enums
|
@using FoodsharingSiegen.Contracts.Enums
|
||||||
@using FoodsharingSiegen.Shared.Helper
|
@using FoodsharingSiegen.Shared.Helper
|
||||||
|
@using System.ComponentModel
|
||||||
@inherits FsBase
|
@inherits FsBase
|
||||||
|
|
||||||
@{
|
@{
|
||||||
var divClass = $"{CssClass} pc-main";
|
var divClass = $"{CssClass} pc-main shadow border-0";
|
||||||
if (Prospect is { Complete: true }) divClass += " complete";
|
if (Prospect is { Complete: true }) divClass += " complete";
|
||||||
if (Prospect is { Warning: true }) divClass += " warning";
|
if (Prospect is { Warning: true }) divClass += " warning";
|
||||||
if (Prospect is { RecordState: RecordState.Archived }) divClass += " deleted";
|
if (Prospect is { RecordState: RecordState.Archived }) divClass += " deleted";
|
||||||
@@ -11,7 +12,8 @@
|
|||||||
|
|
||||||
<div class="@divClass">
|
<div class="@divClass">
|
||||||
<h5 class="mb-2 d-flex">
|
<h5 class="mb-2 d-flex">
|
||||||
<div class="flex-grow-1">
|
<div class="flex-grow-1 d-flex">
|
||||||
|
<div>
|
||||||
@if(string.IsNullOrWhiteSpace(Prospect?.Name))
|
@if(string.IsNullOrWhiteSpace(Prospect?.Name))
|
||||||
{
|
{
|
||||||
<i class="fa-solid fa-exclamation-triangle text-warning"></i>
|
<i class="fa-solid fa-exclamation-triangle text-warning"></i>
|
||||||
@@ -23,32 +25,20 @@
|
|||||||
{
|
{
|
||||||
@Prospect?.Name
|
@Prospect?.Name
|
||||||
}
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="flex-grow: 1;"></div>
|
||||||
|
|
||||||
@if (Prospect?.FsId != null && Prospect.FsId != 0)
|
@if (Prospect?.FsId != null && Prospect.FsId != 0)
|
||||||
{
|
{
|
||||||
<small style="font-size: .9rem; margin-left: 0.5rem;">@Prospect?.FsId</small>
|
<a href="@(CurrentUser.NetworkLink)/profile/@Prospect?.FsId" target="_blank">
|
||||||
|
<small style="font-size: .9rem;">
|
||||||
|
<i class="fa-solid fa-eye"></i> @Prospect?.FsId
|
||||||
|
</small>
|
||||||
|
</a>
|
||||||
}
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
@if (CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.Ambassador))
|
|
||||||
{
|
|
||||||
<i class="fa-solid fa-pen-to-square link mr-2" @onclick="EditProspectAsync" @onclick:preventDefault></i>
|
|
||||||
}
|
|
||||||
<a href="@(CurrentUser.NetworkLink)/profile/@Prospect?.FsId" target="_blank"><i class="fa-solid fa-eye"></i></a>
|
|
||||||
@if (CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.Ambassador))
|
|
||||||
{
|
|
||||||
if (Prospect?.RecordState != RecordState.Archived)
|
|
||||||
{
|
|
||||||
<i class="fa-solid fa-box-archive link ml-2" @onclick="ArchiveProspectAsync" title="Archivieren" @onclick:preventDefault></i>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<i class="fa-solid fa-recycle link ml-2" @onclick="RestoreProspectAsync" title="Wiederherstellen" @onclick:preventDefault></i>
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</h5>
|
</h5>
|
||||||
|
|
||||||
@if (!string.IsNullOrWhiteSpace(Prospect?.Memo))
|
@if (!string.IsNullOrWhiteSpace(Prospect?.Memo))
|
||||||
@@ -154,27 +144,74 @@
|
|||||||
ButtonIconClass="fa-solid fa-check"
|
ButtonIconClass="fa-solid fa-check"
|
||||||
IconClass="fa-solid fa-user-check">
|
IconClass="fa-solid fa-user-check">
|
||||||
</InteractionRow>
|
</InteractionRow>
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td colspan="3">
|
|
||||||
<hr style="margin: 10px 0;">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<InteractionRow
|
|
||||||
Prospect="Prospect"
|
|
||||||
AllowInteraction="@CurrentUser.IsInGroup(UserGroup.Ambassador)"
|
|
||||||
Type="InteractionType.Complete"
|
|
||||||
AddClick="AddInteraction"
|
|
||||||
RemoveClick="@RemoveInteraction"
|
|
||||||
ButtonIconClass="fa-solid fa-check"
|
|
||||||
IconClass="fa-solid fa-flag-checkered">
|
|
||||||
</InteractionRow>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="flex-grow-1"></div>
|
<div class="flex-grow-1"></div>
|
||||||
|
|
||||||
<small class="text-center" style="margin-top: .5rem;">Zuletzt geändert: @Prospect?.Modified?.ToLocalTime()</small>
|
<div class="text-center d-flex justify-content-center gap-2 mt-1">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Color="Color.Secondary"
|
||||||
|
Height="Height.Px(35)"
|
||||||
|
title="Bearbeiten"
|
||||||
|
Clicked="EditProspectAsync"
|
||||||
|
Visibility="@(CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.Ambassador) ? Visibility.Default : Visibility.Invisible)"
|
||||||
|
><i class="fa-solid fa-pen-to-square"></i>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
|
@if(StateFilter > ProspectStateFilter.OnBoarding)
|
||||||
|
{
|
||||||
|
@if(Prospect?.Complete != true)
|
||||||
|
{
|
||||||
|
<Button
|
||||||
|
Color="Color.Primary"
|
||||||
|
Height="Height.Px(35)"
|
||||||
|
title="Fertigstellen"
|
||||||
|
Clicked="@(() => AddInteraction(InteractionType.Complete))"
|
||||||
|
Visibility="@(CurrentUser.IsInGroup(UserGroup.Ambassador) ? Visibility.Default : Visibility.Invisible)"
|
||||||
|
><i class="fa-solid fa-flag-checkered"></i>
|
||||||
|
</Button>
|
||||||
|
} else {
|
||||||
|
<Button
|
||||||
|
Color="Color.Primary"
|
||||||
|
Height="Height.Px(35)"
|
||||||
|
title="Fertigstellen rückgängig"
|
||||||
|
Clicked="@(() => AddInteraction(InteractionType.Complete))"
|
||||||
|
Visibility="@(CurrentUser.IsInGroup(UserGroup.Ambassador) ? Visibility.Default : Visibility.Invisible)"
|
||||||
|
><i class="fa-solid fa-flag"></i>
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@if (Prospect?.RecordState != RecordState.Archived)
|
||||||
|
{
|
||||||
|
<Button
|
||||||
|
Color="Color.Danger"
|
||||||
|
Height="Height.Px(35)"
|
||||||
|
title="Archivieren"
|
||||||
|
Clicked="ArchiveProspectAsync"
|
||||||
|
Visibility="@(CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.Ambassador) ? Visibility.Default : Visibility.Invisible)"
|
||||||
|
><i class="fa-solid fa-box-archive"></i>
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<Button
|
||||||
|
Color="Color.Success"
|
||||||
|
Height="Height.Px(35)"
|
||||||
|
title="Wiederherstellen"
|
||||||
|
Clicked="RestoreProspectAsync"
|
||||||
|
Visibility="@(CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.Ambassador) ? Visibility.Default : Visibility.Invisible)"
|
||||||
|
><i class="fa-solid fa-recycle"></i>
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<small class="text-center" style="margin-top: .5rem;">Geändert: @Prospect?.Modified?.ToLocalTime()</small>
|
||||||
</div>
|
</div>
|
||||||
@@ -106,6 +106,27 @@ namespace FoodsharingSiegen.Server.Controls
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task RemoveInteraction(InteractionType type)
|
||||||
|
{
|
||||||
|
var typeName = type.Translate(AppSettings);
|
||||||
|
await ConfirmDialog.ShowAsync(ModalService, "Bestätigen", $"Alle {typeName}-Interaktionen wirklich entfernen?", async () =>
|
||||||
|
{
|
||||||
|
var interactions = Prospect?.Interactions.Where(x => x.Type == type);
|
||||||
|
|
||||||
|
var dataChanged = false;
|
||||||
|
|
||||||
|
foreach (var interaction in interactions ?? [])
|
||||||
|
{
|
||||||
|
var removeR = await ProspectService.RemoveInteraction(interaction.Id);
|
||||||
|
if (!removeR.Success) continue;
|
||||||
|
|
||||||
|
dataChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(dataChanged && OnDataChanged != null) await OnDataChanged();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Private Method RestoreProspectAsync
|
#region Private Method RestoreProspectAsync
|
||||||
|
|||||||
@@ -19,11 +19,18 @@
|
|||||||
flex-basis: 0;
|
flex-basis: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
max-width: 480px;
|
max-width: 480px;
|
||||||
border: 1px solid #533a20;
|
border-radius: 12px;
|
||||||
border-radius: 3px;
|
margin: 15px;
|
||||||
margin: 5px;
|
padding: 1rem 1rem 0 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 576px) {
|
||||||
|
.pc-main {
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
padding: .5rem .5rem 0 .5rem;
|
padding: .5rem .5rem 0 .5rem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.pc-main.warning {
|
.pc-main.warning {
|
||||||
-webkit-box-shadow: 0 0 9px 4px rgba(214,100,23,0.87);
|
-webkit-box-shadow: 0 0 9px 4px rgba(214,100,23,0.87);
|
||||||
|
|||||||
@@ -22,13 +22,13 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<LibSassOutputStyle>expanded</LibSassOutputStyle>
|
<DartSassOutputStyle>expanded</DartSassOutputStyle>
|
||||||
<LibSassOutputLevel>verbose</LibSassOutputLevel>
|
<DartSassOutputLevel>verbose</DartSassOutputLevel>
|
||||||
<LibSassMessageLevel>High</LibSassMessageLevel>
|
<DartSassMessageLevel>High</DartSassMessageLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="LibSassBuilder" Version="2.0.1" />
|
<PackageReference Include="DartSassBuilder" Version="1.1.0" />
|
||||||
<PackageReference Include="MailKit" Version="4.4.0" />
|
<PackageReference Include="MailKit" Version="4.4.0" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.3" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.3" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.3">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.3">
|
||||||
|
|||||||
@@ -17,13 +17,12 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
Color="Color.Primary"
|
Color="Color.Primary"
|
||||||
Width="Width.Px(50)"
|
|
||||||
Height="Height.Px(50)"
|
Height="Height.Px(50)"
|
||||||
title="Hinzufügen"
|
title="Hinzufügen"
|
||||||
style="min-width: auto;"
|
style="min-width: auto;"
|
||||||
Clicked="@CreateProspectAsync"
|
Clicked="@CreateProspectAsync"
|
||||||
Visibility="@(CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.Ambassador) ? Visibility.Default : Visibility.Invisible)"
|
Visibility="@(CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.Ambassador) ? Visibility.Default : Visibility.Invisible)"
|
||||||
><i class="fa-solid fa-plus"></i>
|
><i class="fa-solid fa-plus"></i> Neu
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user