Files
L-Ami-Fiduciaire/app/Mail/NudgeNotificationMail.php
Saad Zoubir 8f39bd9b73 fix: resolve permission toggle persistence, nudge terminology, and bulk action bugs (Bugs #2-5)
- Fix togglePermission() to always include all permission keys with false defaults
- Add migration to backfill null/empty Manager permissions with config defaults
- Rename nudge UI text from "Relance" to "Notification"/"Notifier" across 8 files
- Fix select-all checkbox and show checkboxes on all declaration rows
- Remove en_attente_client status restriction from BulkNotificationController

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 13:40:30 +01:00

44 lines
1.2 KiB
PHP

<?php
namespace App\Mail;
use App\Models\Declaration;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class NudgeNotificationMail extends Mailable
{
use Queueable, SerializesModels;
public function __construct(
public Declaration $declaration,
public User $sender,
) {}
public function envelope(): Envelope
{
return new Envelope(
subject: 'Notification - '.($this->declaration->title ?? 'Sans titre'),
);
}
public function content(): Content
{
return new Content(
markdown: 'emails.nudge-notification',
with: [
'senderName' => $this->sender->name,
'clientName' => $this->declaration->client?->name,
'declarationType' => $this->declaration->type?->value,
'dueDate' => $this->declaration->due_date?->format('d/m/Y'),
'url' => route('declarations.show', $this->declaration),
'firmName' => $this->declaration->workspace?->name,
]
);
}
}