feat: AfterSales CRM - SOP compliant real-estate customer care system

- Departments + cross-department transfer workflow
- Role-based closing (staff→resolved, manager→closed) with proof_of_resolution
- Private file storage with collection system + temporary signed URLs
- Dashboard: resolved tickets table, stats, handler performance bar chart
- Spatie RBAC (admin/manager/staff)
- Notifications: TicketTransferred, TicketClosed (database + mail)
- Pest tests: 8 tests, 21 assertions
- Docker production-ready (Dockerfile + compose + entrypoint)
This commit is contained in:
2026-04-27 05:29:48 +00:00
parent 8ad7826f56
commit 887765bbd7
134 changed files with 17416 additions and 45 deletions

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Notifications;
use App\Models\Feedback;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class TicketClosed extends Notification
{
use Queueable;
public function __construct(
public Feedback $feedback,
public User $actor,
) {}
public function via(object $notifiable): array
{
return ['database', 'mail'];
}
public function toMail(object $notifiable): MailMessage
{
return (new MailMessage)
->subject(__('Ticket #{id} đã được đóng', ['id' => $this->feedback->id]))
->line(__('Ticket: :title', ['title' => $this->feedback->title]))
->line(__('Đóng bởi: :name', ['name' => $this->actor->name]))
->action(__('Xem Ticket'), url('/admin/feedbacks/' . $this->feedback->id . '/edit'));
}
public function toDatabase(object $notifiable): array
{
return [
'message' => __('Ticket #{id} ":title" đã được đóng bởi :actor.', [
'id' => $this->feedback->id,
'title' => $this->feedback->title,
'actor' => $this->actor->name,
]),
'feedback_id' => $this->feedback->id,
'actor_name' => $this->actor->name,
];
}
}