Compare commits
14 Commits
8262c4979b
...
781da32796
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
781da32796 | ||
|
|
b1ed916da4 | ||
|
|
94a2dbf801 | ||
|
|
dc9276e3e9 | ||
|
|
aba2007481 | ||
|
|
cf4b73735b | ||
|
|
cb3a2ae042 | ||
|
|
8ad6a143de | ||
|
|
46d5bcd00d | ||
|
|
545f59e059 | ||
|
|
cad9617451 | ||
|
|
04084b4bf7 | ||
|
|
69516b2701 | ||
|
|
def8702489 |
@@ -59,7 +59,7 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the prospect (ab)
|
||||
/// </summary>
|
||||
public Prospect Prospect { get; set; }
|
||||
public Prospect Prospect { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the prospect id (ab)
|
||||
@@ -74,7 +74,7 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the user (ab)
|
||||
/// </summary>
|
||||
public User User { get; set; }
|
||||
public User User { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the user id (ab)
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the interactions (ab)
|
||||
/// </summary>
|
||||
public IList<Interaction> Interactions { get; set; }
|
||||
public IList<Interaction> Interactions { get; set; } = new List<Interaction>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the memo (ab)
|
||||
@@ -51,7 +51,7 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the name (ab)
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the state of the record within the system.
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the encrypted password (ab)
|
||||
/// </summary>
|
||||
public string EncryptedPassword { get; set; }
|
||||
public string EncryptedPassword { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the force logout (ab)
|
||||
@@ -30,7 +30,7 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the groups (ab)
|
||||
/// </summary>
|
||||
public string Groups { get; set; }
|
||||
public string Groups { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the groups list (ab)
|
||||
@@ -57,12 +57,12 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the interactions (ab)
|
||||
/// </summary>
|
||||
public IList<Interaction> Interactions { get; set; }
|
||||
public IList<Interaction> Interactions { get; set; } = new List<Interaction>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the mail (ab)
|
||||
/// </summary>
|
||||
public string Mail { get; set; }
|
||||
public string Mail { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the memo (ab)
|
||||
@@ -72,7 +72,7 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the name (ab)
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the network (ab)
|
||||
|
||||
@@ -2,11 +2,13 @@ using FoodsharingSiegen.Contracts;
|
||||
using FoodsharingSiegen.Contracts.Entity;
|
||||
using FoodsharingSiegen.Contracts.Enums;
|
||||
using FoodsharingSiegen.Contracts.Helper;
|
||||
using FoodsharingSiegen.Contracts.Model;
|
||||
using FoodsharingSiegen.Server.Data;
|
||||
using FoodsharingSiegen.Server.Service;
|
||||
using FoodsharingSiegen.Shared.Helper;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace FoodsharingSiegen.Server.Auth
|
||||
{
|
||||
@@ -55,6 +57,11 @@ namespace FoodsharingSiegen.Server.Auth
|
||||
/// </summary>
|
||||
private readonly IMailService _mailService;
|
||||
|
||||
/// <summary>
|
||||
/// The application settings
|
||||
/// </summary>
|
||||
private readonly AppSettings _appSettings;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Setup/Teardown
|
||||
@@ -70,12 +77,14 @@ namespace FoodsharingSiegen.Server.Auth
|
||||
FsContext context,
|
||||
LocalStorageService localStorageService,
|
||||
AuthenticationStateProvider authenticationStateProvider,
|
||||
IMailService mailService)
|
||||
IMailService mailService,
|
||||
IOptions<AppSettings> appSettings)
|
||||
{
|
||||
Context = context;
|
||||
_localStorageService = localStorageService;
|
||||
_authenticationStateProvider = authenticationStateProvider;
|
||||
_mailService = mailService;
|
||||
_appSettings = appSettings.Value;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -211,7 +220,17 @@ namespace FoodsharingSiegen.Server.Auth
|
||||
await Context.SaveChangesAsync();
|
||||
|
||||
var resetLink = $"{baseUri.TrimEnd('/')}/reset-password/{resetToken}";
|
||||
var mailBody = $"Hallo {user.Name},<br><br>Um dein Passwort zurückzusetzen, klicke bitte auf den folgenden Link (dieser ist 30 Minuten gültig):<br><a href='{resetLink}'>{resetLink}</a><br><br>Viele Grüße<br>Dein Foodsharing Team";
|
||||
var mailBody = $"""
|
||||
Hallo {user.Name},<br>
|
||||
<br>
|
||||
für dein Konto wurde eine Anfrage zum Zurücksetzen des Passworts gestellt. <br>
|
||||
Wenn du diese Anfrage nicht gestellt hast, kannst du diese E-Mail ignorieren und dein Passwort bleibt unverändert.<br>
|
||||
<br>
|
||||
Um dein Passwort zurückzusetzen, klicke bitte auf den folgenden Link (dieser ist 30 Minuten gültig):<br>
|
||||
<a href='{resetLink}'>{resetLink}</a><br>
|
||||
<br>
|
||||
Viele Grüße<br>Dein Team {_appSettings.Terms.Title}
|
||||
""";
|
||||
|
||||
await _mailService.SendEmailAsync(user.Mail, "Passwort zurücksetzen", mailBody);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
</Button>
|
||||
|
||||
|
||||
@if(StateFilter > ProspectStateFilter.OnBoarding)
|
||||
@if(StateFilter > ProspectStateFilter.OnBoarding && CurrentUser.IsInGroup(UserGroup.Ambassador))
|
||||
{
|
||||
@if(Prospect?.Complete != true)
|
||||
{
|
||||
@@ -173,7 +173,12 @@
|
||||
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>
|
||||
|
||||
>
|
||||
<span class="fa-stack" style="vertical-align: top;">
|
||||
<i class="fa-solid fa-slash fa-xl"></i>
|
||||
<i class="fa-solid fa-flag fa-stack-1x"></i>
|
||||
</span>
|
||||
</Button>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,15 +32,11 @@
|
||||
}
|
||||
|
||||
&.warning {
|
||||
-webkit-box-shadow: 0 0 9px 4px rgba(214,100,23,0.87);
|
||||
-moz-box-shadow: 0 0 9px 4px rgba(214,100,23,0.87);
|
||||
box-shadow: 0 0 9px 4px rgba(214,100,23,0.87);
|
||||
box-shadow: rgb(255 145 0 / 36%) 0px 8px 10px 1px, rgb(255 145 0 / 44%) 0px 3px 14px 2px, rgb(255 145 0 / 49%) 0px 5px 5px -3px !important;
|
||||
}
|
||||
|
||||
&.deleted {
|
||||
-webkit-box-shadow: 0 0 9px 4px rgb(214 23 23 / 87%);
|
||||
-moz-box-shadow: 0 0 9px 4px rgb(214 23 23 / 87%);
|
||||
box-shadow: 0 0 9px 4px rgb(214 23 23 / 87%);
|
||||
box-shadow: rgba(255, 0, 0, 0.36) 0px 8px 10px 1px, rgba(255, 0, 0, 0.44) 0px 3px 14px 2px, rgba(255, 0, 0, 0.49) 0px 5px 5px -3px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,11 +10,7 @@ using Microsoft.AspNetCore.Components;
|
||||
namespace FoodsharingSiegen.Server.Controls;
|
||||
|
||||
public partial class ProspectSortControl
|
||||
{
|
||||
[Inject] private IModalService ModalService { get; set; } = null!;
|
||||
|
||||
[Inject] private LocalStorageService LocalStorageService { get; set; } = null!;
|
||||
|
||||
{
|
||||
[Parameter]
|
||||
public ProspectSortOption CurrentSort { get; set; } = ProspectSortOption.NameAscending;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@using Blazorise
|
||||
@using FoodsharingSiegen.Contracts.Enums
|
||||
@inherits FsBase
|
||||
|
||||
<div class="mt-1 mb-3">
|
||||
@@ -22,9 +23,13 @@
|
||||
<i class="fa-solid fa-link me-2"></i> Upload-Link erstellen / anzeigen
|
||||
</Button>
|
||||
|
||||
<Button Color="Color.Success" Clicked="@ViewImagesAsync" Disabled="@(ImageCount == 0)">
|
||||
<i class="fa-solid fa-images me-2"></i> Hochgeladene Bilder ansehen (@ImageCount)
|
||||
</Button>
|
||||
@if(CurrentUser.IsAdmin() || CurrentUser.IsInGroup(UserGroup.Ambassador))
|
||||
{
|
||||
<Button Color="Color.Success" Clicked="@ViewImagesAsync" Disabled="@(ImageCount == 0)">
|
||||
<i class="fa-solid fa-images me-2"></i> Hochgeladene Bilder ansehen (@ImageCount)
|
||||
</Button>
|
||||
}
|
||||
|
||||
|
||||
<Button Color="Color.Danger" Clicked="@DeleteImagesAsync" Disabled="@(ImageCount == 0)">
|
||||
<i class="fa-solid fa-trash-can me-2"></i> Alle Bilder löschen
|
||||
|
||||
@@ -12,9 +12,6 @@ namespace FoodsharingSiegen.Server.Dialogs
|
||||
[Inject]
|
||||
public ProspectService ProspectService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
public NavigationManager NavigationManager { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
public IJSRuntime JS { get; set; } = null!;
|
||||
|
||||
@@ -95,7 +92,7 @@ namespace FoodsharingSiegen.Server.Dialogs
|
||||
{
|
||||
if (Prospect == null) return;
|
||||
|
||||
await ConfirmDialog.ShowAsync(ModalService, "Bilder Löschen", "Sollen alle Identitätsprüfungsbilder dieses Users unwiderruflich gelöscht werden?", async () =>
|
||||
await ConfirmDialog.ShowAsync(ModalService, "Bilder Löschen", $"Sollen alle Identitätsprüfungsbilder von {Prospect.Name} unwiderruflich gelöscht werden?", async () =>
|
||||
{
|
||||
var result = await ProspectService.DeleteVerificationImagesAsync(Prospect.Id);
|
||||
if (result.Success)
|
||||
|
||||
@@ -7,7 +7,11 @@
|
||||
<Button Color="Color.Secondary" Class="position-absolute start-0 top-0 m-2 z-3 text-white bg-dark border-0 rounded-circle w-40px h-40px fs-4 lh-1" Clicked="() => SelectedImageIndex = null">
|
||||
<i class="fa-solid fa-close"></i>
|
||||
</Button>
|
||||
<img src="@(_images[SelectedImageIndex.Value])" class="img-fluid rounded" style="max-height: 80vh;" />
|
||||
|
||||
<a href="@(_images[SelectedImageIndex.Value])" target="_blank" download>
|
||||
<img src="@(_images[SelectedImageIndex.Value])" class="img-fluid rounded" style="max-height: 80vh;" />
|
||||
</a>
|
||||
|
||||
<div class="d-flex justify-content-between position-absolute top-50 start-0 w-100">
|
||||
<Button Color="Color.Dark" Class="rounded-circle" Disabled="@(SelectedImageIndex.Value == 0)" Clicked="() => SelectedImageIndex--"><i class="fa-solid fa-chevron-left"></i></Button>
|
||||
<Button Color="Color.Dark" Class="rounded-circle" Disabled="@(SelectedImageIndex.Value == _images.Count - 1)" Clicked="() => SelectedImageIndex++"><i class="fa-solid fa-chevron-right"></i></Button>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AspNetCore.SassCompiler" Version="1.81.0" />
|
||||
<PackageReference Include="MailKit" Version="4.4.0" />
|
||||
<PackageReference Include="AspNetCore.SassCompiler" Version="1.81.1" />
|
||||
<PackageReference Include="MailKit" Version="4.16.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.3" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.3">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
[DbContext(typeof(FsContext))]
|
||||
[Migration("20220521155432_init")]
|
||||
partial class init
|
||||
partial class Init
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
public partial class init : Migration
|
||||
public partial class Init : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
<PageTitle>@AppSettings.Terms.Title - Passwort vergessen</PageTitle>
|
||||
|
||||
<div class="d-flex justify-content-center align-items-center" style="min-height: 100vh;">
|
||||
<div class="d-flex justify-content-center align-items-center-sm" style="min-height: 100vh; align-items: start;">
|
||||
<div class="card shadow border-0" style="width: 100%; max-width: 420px; border-radius: 12px; margin: 1rem;">
|
||||
|
||||
<div class="card-body p-4 p-md-5">
|
||||
<div class="text-center mb-4">
|
||||
<i class="fa-solid fa-leaf mb-3" style="font-size: 3rem; color: #64ae24;"></i>
|
||||
<h4 class="font-weight-bold" style="color: #533a20;"><small style="font-size: .6em;">Einarbeitungen</small> @AppSettings.Terms.Title</h4>
|
||||
<h4 class="font-weight-bold" style="color: #533a20;"><small style="font-size: .6em;" class="d-block">Einarbeitungen</small> @AppSettings.Terms.Title</h4>
|
||||
<p class="text-muted">Passwort zurücksetzen</p>
|
||||
</div>
|
||||
|
||||
@@ -27,6 +27,13 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (!string.IsNullOrEmpty(ErrorMessage))
|
||||
{
|
||||
<div class="alert alert-danger text-center">
|
||||
@ErrorMessage
|
||||
</div>
|
||||
}
|
||||
|
||||
<Validation Validator="ValidationHelper.ValidateMail" @bind-Status="@IsValidMail">
|
||||
<Field>
|
||||
<FieldLabel>E-Mail Adresse</FieldLabel>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using Blazorise;
|
||||
using FoodsharingSiegen.Server.BaseClasses;
|
||||
using FoodsharingSiegen.Server.Auth;
|
||||
@@ -15,19 +16,30 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
|
||||
public bool IsSubmitted { get; set; }
|
||||
public bool IsLoading { get; set; }
|
||||
public string? ErrorMessage { get; set; }
|
||||
|
||||
public async Task SubmitRequest()
|
||||
{
|
||||
if (IsValidMail != ValidationStatus.Success) return;
|
||||
|
||||
IsLoading = true;
|
||||
ErrorMessage = null;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
|
||||
await AuthService.InitiatePasswordReset(MailAddress, NavigationManager.BaseUri);
|
||||
|
||||
IsSubmitted = true;
|
||||
IsLoading = false;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
try
|
||||
{
|
||||
await AuthService.InitiatePasswordReset(MailAddress, NavigationManager.BaseUri);
|
||||
IsSubmitted = true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
ErrorMessage = "Es gab ein Problem bei der Verarbeitung der Anfrage. Bitte versuche es später erneut oder wende dich an einen Administrator.";
|
||||
}
|
||||
finally
|
||||
{
|
||||
IsLoading = false;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task TextEdit_KeyUp(KeyboardEventArgs e)
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
<PageTitle>@AppSettings.Terms.Title - Login</PageTitle>
|
||||
|
||||
<div class="d-flex justify-content-center align-items-center" style="min-height: 100vh;">
|
||||
<div class="d-flex justify-content-center align-items-center-sm" style="min-height: 100vh; align-items: start;">
|
||||
<div class="card shadow border-0" style="width: 100%; max-width: 420px; border-radius: 12px; margin: 1rem;">
|
||||
|
||||
<div class="card-body p-4 p-md-5">
|
||||
<div class="text-center mb-4">
|
||||
<i class="fa-solid fa-leaf mb-3" style="font-size: 3rem; color: #64ae24;"></i>
|
||||
<h4 class="font-weight-bold" style="color: #533a20;"><small style="font-size: .6em;">Einarbeitungen</small> @AppSettings.Terms.Title</h4>
|
||||
<h4 class="font-weight-bold" style="color: #533a20;"><small style="font-size: .6em;" class="d-block">Einarbeitungen</small> @AppSettings.Terms.Title</h4>
|
||||
<p class="text-muted">Bitte melde dich an, um fortzufahren.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
<TextEdit @bind-Text="User.Mail" ReadOnly="true"></TextEdit>
|
||||
</FieldBody>
|
||||
</Field>
|
||||
@* <Validation Validator="ValidationRule.None"> *@
|
||||
@* <Field ColumnSize="ColumnSize.Is12"> *@
|
||||
@* <FieldLabel>Info über dich</FieldLabel> *@
|
||||
@* <FieldBody> *@
|
||||
@* <MemoEdit Rows="3" Placeholder="z.B. Bieb bei Rewe Musterhausen" @bind-Text="User.Memo"/> *@
|
||||
@* </FieldBody> *@
|
||||
@* </Field> *@
|
||||
@* </Validation> *@
|
||||
<Validation Validator="ValidationRule.None">
|
||||
<Field ColumnSize="ColumnSize.Is12">
|
||||
<FieldLabel>Info über dich</FieldLabel>
|
||||
<FieldBody>
|
||||
<MemoEdit Rows="3" Placeholder="z.B. Bieb bei Rewe Musterhausen" @bind-Text="User.Memo"/>
|
||||
</FieldBody>
|
||||
</Field>
|
||||
</Validation>
|
||||
</Validations>
|
||||
</Fields>
|
||||
</div>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
@using FoodsharingSiegen.Shared.Helper
|
||||
@inherits FsBase
|
||||
|
||||
<PageTitle>Neue Foodsaver - @AppSettings.Terms.Title</PageTitle>
|
||||
<h2>Neue Foodsaver</h2>
|
||||
<PageTitle>Aktuelle - @AppSettings.Terms.Title</PageTitle>
|
||||
<h2>Aktuelle Einarbeitungen</h2>
|
||||
|
||||
@if (AppSettings.TestMode)
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
@using FoodsharingSiegen.Shared.Helper
|
||||
@inherits FsBase
|
||||
|
||||
<PageTitle>Abgeschlossen - @AppSettings.Terms.Title</PageTitle>
|
||||
<h2>Abgeschlossen</h2>
|
||||
<PageTitle>Fertige - @AppSettings.Terms.Title</PageTitle>
|
||||
<h2>Abgeschlossene Einarbeitungen</h2>
|
||||
|
||||
@if (AppSettings.TestMode)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
@inherits FsBase
|
||||
|
||||
<PageTitle>Freischalten - @AppSettings.Terms.Title</PageTitle>
|
||||
<h2>Freischalten</h2>
|
||||
<h2>Zum Freischalten freigegeben</h2>
|
||||
|
||||
@if (AppSettings.TestMode)
|
||||
{
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
<PageTitle>@AppSettings.Terms.Title - Neues Passwort setzen</PageTitle>
|
||||
|
||||
<div class="d-flex justify-content-center align-items-center" style="min-height: 100vh;">
|
||||
<div class="d-flex justify-content-center align-items-center-sm" style="min-height: 100vh; align-items: start;">
|
||||
<div class="card shadow border-0" style="width: 100%; max-width: 420px; border-radius: 12px; margin: 1rem;">
|
||||
|
||||
<div class="card-body p-4 p-md-5">
|
||||
<div class="text-center mb-4">
|
||||
<i class="fa-solid fa-leaf mb-3" style="font-size: 3rem; color: #64ae24;"></i>
|
||||
<h4 class="font-weight-bold" style="color: #533a20;"><small style="font-size: .6em;">Einarbeitungen</small> @AppSettings.Terms.Title</h4>
|
||||
<h4 class="font-weight-bold" style="color: #533a20;"><small style="font-size: .6em;" class="d-block">Einarbeitungen</small> @AppSettings.Terms.Title</h4>
|
||||
<p class="text-muted">Neues Passwort festlegen</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<PageTitle>Identitätsprüfung - @AppSettings.Value.Terms.Title</PageTitle>
|
||||
|
||||
<div class="row min-vh-100 align-items-center justify-content-center p-0 p-md-5 m-0">
|
||||
<div class="row min-vh-100 align-items-center-sm justify-content-center p-0 p-md-5 m-0">
|
||||
<div class="col-12 col-md-10 col-lg-8 col-xl-5 login-form p-2">
|
||||
<div class="card shadow-sm border-0">
|
||||
<div class="card-body p-3 p-md-5">
|
||||
@@ -38,6 +38,22 @@
|
||||
<strong>Hinweis:</strong> Dies ist die Upload-Seite für Foodsaver <b>@_prospect.FsId</b>.
|
||||
</div>
|
||||
|
||||
<div class="mb-3 text-center">
|
||||
|
||||
@if (_uploadedCount >= 5)
|
||||
{
|
||||
<div class="alert alert-warning py-2 mb-0">Du hast die maximale Anzahl von 5 Bildern erreicht.</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<InputFile id="fileInput" OnChange="OnInputFileChange" class="d-none" accept="image/*" />
|
||||
<label for="fileInput" class="btn btn-outline-success w-100" style="height: 5rem;">
|
||||
<i class="fa-solid fa-images me-2"></i>Bild auswählen
|
||||
</label>
|
||||
<span class="badge bg-secondary mt-2 text-wrap">Es können noch bis zu @(5 - _uploadedCount) Bilder hochgeladen werden</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="mb-1 text-muted">
|
||||
Um dich auf der Foodsharing-Plattform als Foodsaver freischalten zu können, muss ein*e Botschafter*in Name, Adresse und Geburtsdatum im Profil des Foodsavers auf Korrektheit durch Vergleich mit einem Ausweisdokument prüfen. Das ist wichtig, damit die <a href="https://wiki.foodsharing.network/wiki/Rechtsvereinbarung" target="_blank">Rechtsvereinbarung</a> Bestand hat und wir die Zusagen erfüllen, die wir den Spenderbetrieben geben.<br>
|
||||
</div>
|
||||
@@ -58,22 +74,6 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="mb-4 text-center">
|
||||
|
||||
@if (_uploadedCount >= 5)
|
||||
{
|
||||
<div class="alert alert-warning py-2 mb-0">Du hast die maximale Anzahl von 5 Bildern erreicht.</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="badge bg-secondary mb-2 text-wrap">Es können noch bis zu @(5 - _uploadedCount) Bilder hochgeladen werden</span>
|
||||
<InputFile id="fileInput" OnChange="OnInputFileChange" class="d-none" accept="image/*" />
|
||||
<label for="fileInput" class="btn btn-outline-success w-100">
|
||||
<i class="fa-solid fa-images me-2"></i>Bild auswählen
|
||||
</label>
|
||||
}
|
||||
</div>
|
||||
|
||||
@if (_isUploading)
|
||||
{
|
||||
<div class="text-center my-3">
|
||||
|
||||
@@ -92,9 +92,9 @@
|
||||
Data="@UserGroups"
|
||||
TextField="@(( item ) => item.ToString())"
|
||||
ValueField="@(( item ) => item)"
|
||||
Multiple="true"
|
||||
SelectionMode="AutocompleteSelectionMode.Multiple"
|
||||
SelectedValues="@((List<UserGroup>) context.CellValue)"
|
||||
SelectedValuesChanged="@(v => context.CellValue = v)"
|
||||
SelectedValuesChanged="@(v => { context.CellValue = v.ToList(); })"
|
||||
@bind-SelectedTexts="SelectedCompanyTexts">
|
||||
</Autocomplete>
|
||||
<small>Verfügbar: @string.Join(", ", Enum.GetValues<UserGroup>())</small>
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
/// <param name="arg">The arg</param>
|
||||
private async Task RowInserted(SavedRowItem<User, Dictionary<string, object>> arg)
|
||||
{
|
||||
var addUserR = await UserService.AddUserAsync(arg.Item);
|
||||
var addUserR = await UserService.AddUserAsync(arg.OldItem);
|
||||
if (!addUserR.Success)
|
||||
await Notification.Error($"Fehler beim Anlegen: {addUserR.ErrorMessage}")!;
|
||||
else
|
||||
@@ -151,9 +151,9 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
/// <param name="arg">The arg</param>
|
||||
private async Task RowUpdated(SavedRowItem<User, Dictionary<string, object>> arg)
|
||||
{
|
||||
if (arg.Item?.Id == null || arg.Item.Id.Equals(Guid.Empty) || arg.Values?.Any() != true) return;
|
||||
if (arg.OldItem?.Id == null || arg.OldItem.Id.Equals(Guid.Empty) || arg.Values?.Any() != true) return;
|
||||
|
||||
var updateR = await UserService.Update(arg.Item);
|
||||
var updateR = await UserService.Update(arg.OldItem);
|
||||
if (!updateR.Success)
|
||||
await Notification.Error($"Fehler beim Speichern: {updateR.ErrorMessage}")!;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<base href="~/"/>
|
||||
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||
<meta name="apple-mobile-web-app-title" content="Foodsharing Einarbeitungen" />
|
||||
<link rel="manifest" href="/site.webmanifest" />
|
||||
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css"/>
|
||||
<link href="css/site.css" rel="stylesheet"/>
|
||||
<link href="FoodsharingSiegen.Server.styles.css" rel="stylesheet"/>
|
||||
|
||||
@@ -24,5 +24,5 @@
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
|
||||
<NotificationAlert/>
|
||||
<MessageAlert/>
|
||||
<NotificationProvider/>
|
||||
<MessageProvider/>
|
||||
@@ -1,11 +1,11 @@
|
||||
@using FoodsharingSiegen.Contracts.Enums
|
||||
<nav class="d-flex flex-column h-100">
|
||||
<div class="nav-logo"></div>
|
||||
<div class="d-flex px-3 justify-content-center text-center font-weight-bold">
|
||||
Einarbeitungen<br/>
|
||||
@(AppSettings.Terms.TitleShort ?? AppSettings.Terms.Title)
|
||||
<i class="fa-solid fa-leaf mb-3 mt-3 text-center" style="font-size: 4rem; color: #64ae24;"></i>
|
||||
<div class="px-3 justify-content-center text-center font-weight-bold">
|
||||
<span class="d-block">Einarbeitungen</span>
|
||||
<h5 class="d-block">@(AppSettings.Terms.Title ?? AppSettings.Terms.TitleShort)</h5>
|
||||
</div>
|
||||
<div class="d-flex px-3 mt-3 justify-content-center text-center font-weight-bold">
|
||||
<div class="d-flex px-3 justify-content-center text-center text-muted">
|
||||
Hallo @CurrentUser.Name!
|
||||
</div>
|
||||
|
||||
@@ -92,5 +92,5 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pb-1 text-center small">@($"v{Version ?? "0"}")</div>
|
||||
<div class="pb-1 text-center small text-muted">@($"Version {Version ?? "0"}")</div>
|
||||
</nav>
|
||||
BIN
FoodsharingSiegen.Server/wwwroot/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
@@ -58,6 +58,14 @@ $spacers: (
|
||||
margin-top: $size-val !important;
|
||||
margin-bottom: $size-val !important;
|
||||
}
|
||||
|
||||
.align-items-center#{$breakpoint} {
|
||||
align-items: center !important;
|
||||
}
|
||||
|
||||
.align-items-start#{$breakpoint} {
|
||||
align-items: flex-start !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BIN
FoodsharingSiegen.Server/wwwroot/favicon-96x96.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 15 KiB |
1
FoodsharingSiegen.Server/wwwroot/favicon.svg
Normal file
|
After Width: | Height: | Size: 62 KiB |
21
FoodsharingSiegen.Server/wwwroot/site.webmanifest
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "Foodsharing Einarbeitungen",
|
||||
"short_name": "FS Onboarding",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/web-app-manifest-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/web-app-manifest-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
],
|
||||
"theme_color": "#e8ffe2",
|
||||
"background_color": "#f2ffe9",
|
||||
"display": "standalone"
|
||||
}
|
||||
BIN
FoodsharingSiegen.Server/wwwroot/web-app-manifest-192x192.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
FoodsharingSiegen.Server/wwwroot/web-app-manifest-512x512.png
Normal file
|
After Width: | Height: | Size: 26 KiB |