diff --git a/AGENTS.md b/AGENTS.md index 471126cd..a370858e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -92,13 +92,14 @@ minicrm/ │ └── Providers/Filament/ │ └── AdminPanelProvider.php ├── resources/views/filament/resources/feedback/ -│ └── similar-cases.blade.php +│ ├── similar-cases.blade.php +│ └── attachment-links.blade.php # Modal listing attachments with signed download URLs ├── database/ │ ├── migrations/ │ └── seeders/AfterSalesSeeder.php # includes departments, logs, attachments ├── tests/ │ ├── Feature/ -│ │ ├── ClosingPermissionTest.php # 3 tests: staff forbid, no-evidence, with-evidence +│ │ ├── ClosingPermissionTest.php # 4 tests: staff forbid, no-evidence, with-evidence, cross-dept │ │ └── TransferFlowTest.php # 2 tests: successful + missing reason │ └── Pest.php ├── storage/app/private/feedback-attachments/ # Private disk upload directory @@ -204,6 +205,7 @@ feedback_interactions, feedback_tags, feedback_feedback_tag, products, customers ### Dashboard Widgets (NEW) - ResolvedTicketsWidget: table of resolved tickets awaiting closure (manager: filtered to own department) - AvgProcessingTimeWidget: 4 stats (resolved count, avg time, pending count, escalated count) +- HandlerPerformanceWidget: bar chart of avg processing time per handler ## Navigation Structure @@ -218,7 +220,7 @@ Dashboard └── Tags (tag, sort=default) ``` -Dashboard widgets: ResolvedTicketsWidget, AvgProcessingTimeWidget (admin/manager only) +Dashboard widgets: ResolvedTicketsWidget, AvgProcessingTimeWidget, HandlerPerformanceWidget (admin/manager only) ## RBAC (Role-Based Access Control) - Spatie diff --git a/PROGRESS.md b/PROGRESS.md index 76e3aa16..05e0266e 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -2,7 +2,7 @@ ## Trạng thái: Hoàn thành SOP — 8 giai đoạn + bug fix + polish -Đã test: Tất cả routes HTTP 200, Pest 7/7 tests pass ✓ +Đã test: Tất cả routes HTTP 200, Pest 8/8 tests (21 assertions) pass ✓ Tham chiếu: `SOP_des.md` — Bản đặc tả hệ thống After-Sale CRM ## Công nghệ @@ -51,8 +51,8 @@ Tham chiếu: `SOP_des.md` — Bản đặc tả hệ thống After-Sale CRM - [x] `AvgProcessingTimeWidget`: 4 stats (resolved count, avg time, pending, escalated) ### Giai đoạn 6: Testing -- [x] Pest cài đặt + 5 test scenarios -- [x] `ClosingPermissionTest`: 3 tests (staff 403, no evidence 422, with evidence OK) +- [x] Pest cài đặt + 6 test scenarios +- [x] `ClosingPermissionTest`: 4 tests (staff 403, no evidence 422, with evidence OK, cross-department 403) - [x] `TransferFlowTest`: 2 tests (success + missing reason) ### Giai đoạn 7: Seeder @@ -106,7 +106,7 @@ cd /home/phuongtc/vibecode/minicrm php artisan migrate:fresh --seed php artisan serve # Mở http://localhost:8000/admin -php artisan test # 8 tests, 21 assertions +php artisan test # 8 tests (21 assertions) ``` ## Hướng dẫn cho AI Agent khác