feat: Initialize core application structure including authentication, role-based dashboards, service task management, and integration workflows.

This commit is contained in:
jeremy bayse
2026-02-16 09:30:23 +01:00
commit af060a8847
208 changed files with 26822 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Notifications;
use App\Models\ServiceTask;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class ServiceTaskValidatedNotification extends Notification implements ShouldQueue
{
use Queueable;
public function __construct(public ServiceTask $serviceTask)
{
}
public function via(object $notifiable): array
{
return ['database', 'mail'];
}
public function toMail(object $notifiable): MailMessage
{
$agentName = $this->serviceTask->integrationRequest->agent->first_name . ' ' . $this->serviceTask->integrationRequest->agent->last_name;
$serviceName = $this->serviceTask->service->name;
return (new MailMessage)
->subject("Tâche validée : {$serviceName} - {$agentName}")
->greeting("Bonjour {$notifiable->name},")
->line("Le service **{$serviceName}** a validé sa tâche pour l'agent **{$agentName}**.")
->action('Voir la demande', route('integrations.show', $this->serviceTask->integrationRequest))
->line('Merci d\'utiliser notre application.');
}
public function toArray(object $notifiable): array
{
return [
'service_task_id' => $this->serviceTask->id,
'integration_request_id' => $this->serviceTask->integration_request_id,
'message' => "Le service {$this->serviceTask->service->name} a validé sa tâche.",
'type' => 'task_validated',
];
}
}