feat: Initialize core application structure including authentication, role-based dashboards, service task management, and integration workflows.
This commit is contained in:
40
app/Notifications/ProcessCompletedNotification.php
Normal file
40
app/Notifications/ProcessCompletedNotification.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use App\Models\IntegrationRequest;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
class ProcessCompletedNotification extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public function __construct(public IntegrationRequest $integration)
|
||||
{
|
||||
}
|
||||
|
||||
public function via(object $notifiable): array
|
||||
{
|
||||
return ['database']; // Keeping it simple for now, can add 'mail'
|
||||
}
|
||||
|
||||
public function toMail(object $notifiable): MailMessage
|
||||
{
|
||||
return (new MailMessage)
|
||||
->line('L\'intégration de ' . $this->integration->agent->first_name . ' ' . $this->integration->agent->last_name . ' est terminée.')
|
||||
->action('Voir la demande', route('integrations.show', $this->integration));
|
||||
}
|
||||
|
||||
public function toArray(object $notifiable): array
|
||||
{
|
||||
return [
|
||||
'title' => 'Processus terminé',
|
||||
'message' => 'L\'intégration de ' . $this->integration->agent->first_name . ' ' . $this->integration->agent->last_name . ' est complète.',
|
||||
'integration_id' => $this->integration->id,
|
||||
'type' => 'process_completed',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user