im profil kann ein nutzer nun seine daten exportieren. man kann seinen account löschen. nach 2 jahren werden inaktive accounts gelöscht, 1 monat vorher wird eine email geschickt. Hilfetexte und Legal Pages in der Guest PWA korrigiert und vom layout her optimiert (dark mode).
This commit is contained in:
39
app/Notifications/InactiveTenantDeletionWarning.php
Normal file
39
app/Notifications/InactiveTenantDeletionWarning.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use App\Models\Tenant;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
class InactiveTenantDeletionWarning extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public function __construct(private readonly Tenant $tenant, private readonly Carbon $plannedDeletion)
|
||||
{
|
||||
$this->afterCommit();
|
||||
}
|
||||
|
||||
public function via(object $notifiable): array
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
public function toMail(object $notifiable): MailMessage
|
||||
{
|
||||
$locale = $this->tenant->user?->preferred_locale ?? app()->getLocale();
|
||||
$formattedDate = $this->plannedDeletion->copy()->locale($locale)->translatedFormat('d. F Y');
|
||||
|
||||
return (new MailMessage)
|
||||
->locale($locale)
|
||||
->subject(__('profile.retention.warning_subject', [], $locale))
|
||||
->line(__('profile.retention.line1', ['name' => $this->tenant->name], $locale))
|
||||
->line(__('profile.retention.line2', ['date' => $formattedDate], $locale))
|
||||
->line(__('profile.retention.line3', [], $locale))
|
||||
->action(__('profile.retention.action', [], $locale), url('/login'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user