8c774d075d
- Notificaciones (DB): asignación de incidencia (IssueAssigned), asignación de tarea (IssueTaskAssigned), comentario (IssueCommented) y cambio de estado (IssueStatusChanged) a reporter+asignado excluyendo al actor. - Plantillas de checklist: tabla issue_checklist_templates + modelo, gestor CRUD (IssueChecklistManager, ruta projects.issues.checklists) y "Aplicar plantilla" en el detalle (alta masiva de tareas). - Alertas de vencimiento: columna overdue_notified_at + scope overdue, comando issues:notify-overdue (programado a diario) que avisa al asignado una sola vez; badge "vencidas" en la tabla y resaltado por tarea en el detalle. - Reporte desde el mapa: botón "Incidencia" en el panel del feature seleccionado → formulario con feature pre-vinculado (IssueForm lee ?feature=). Tests: IssuesEnhancementsTest (7). Suite 57 passing (solo 2 pre-existentes sqlite). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
32 lines
850 B
PHP
32 lines
850 B
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use App\Models\IssueTask;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class IssueTaskOverdueNotification extends Notification
|
|
{
|
|
use Queueable;
|
|
|
|
public function __construct(public IssueTask $task) {}
|
|
|
|
public function via($notifiable): array
|
|
{
|
|
return ['database'];
|
|
}
|
|
|
|
public function toArray($notifiable): array
|
|
{
|
|
return [
|
|
'type' => 'issue_task_overdue',
|
|
'issue_id' => $this->task->issue_id,
|
|
'task_id' => $this->task->id,
|
|
'project_id' => $this->task->issue?->project_id,
|
|
'due_date' => $this->task->due_date?->toDateString(),
|
|
'message' => "Tarea vencida: '{$this->task->title}' (venció el {$this->task->due_date?->format('d/m/Y')})",
|
|
];
|
|
}
|
|
}
|