- Add Task model with subtasks, priorities, status transitions, dates, hours - Add Comment polymorphic model for tasks/issues/projects - Livewire components: TaskManager (list+filters), TaskForm (modal), TaskDetail, TaskKanban (drag&drop), TaskCalendar (FullCalendar) - TaskPolicy with permissions (view/create/edit/delete/assign/manage all) - Notifications: assigned, status change, overdue, comment added - Daily overdue notification job scheduled - Dashboard widget unifies IssueTask + Task - i18n: en/es/fr/ru (393 keys each) - Routes, navigation, offline sync support - 101 tests passing, Pint compliant on new files
32 lines
974 B
PHP
32 lines
974 B
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Notifications\Notification;
|
|
use App\Models\Inspection;
|
|
|
|
class InspectionDeletedNotification extends Notification
|
|
{
|
|
use Queueable;
|
|
|
|
public function __construct(public Inspection $inspection, public string $deletedBy) {}
|
|
|
|
public function via($notifiable): array
|
|
{
|
|
return ['database'];
|
|
}
|
|
|
|
public function toArray($notifiable): array
|
|
{
|
|
return [
|
|
'type' => 'inspection_deleted',
|
|
'inspection_id' => $this->inspection->id,
|
|
'project_id' => $this->inspection->project_id,
|
|
'feature_name' => $this->inspection->feature?->name ?? '—',
|
|
'template_name' => $this->inspection->template?->name ?? '—',
|
|
'deleted_by' => $this->deletedBy,
|
|
'message' => "Inspección eliminada en '{$this->inspection->feature?->name}' por {$this->deletedBy}",
|
|
];
|
|
}
|
|
} |