Rechic DPMS — User Manual

v1.0

Chương 10 — Phụ lục

Phần này tổng hợp thông tin tham chiếu: RBAC matrix, file storage, vận hành cho IT.

RBAC Matrix

Mỗi user có một role được tự động sinh từ {department}_{position} (ví dụ supply_manager, kho_staff). IT luôn là it_super_admin.

Phòng ban Manager Staff Intern Quyền chính
BODapprove_demand_po, approve_payment, view all
Demandcreate_demand_po, edit_demand_po
Supplycreate_factory_po, confirm_factory_po, create_payment
Accountingmark_paid_payment, upload invoice
Khoreceive_warehouse
ITTất cả → it_super_adminMọi quyền (super admin), manage_users, import_master_data

User Resource (/admin/users) chỉ visible cho IT. Khi tạo/sửa user, IT chọn department + position; hệ thống tự sync Spatie role tương ứng qua User::spatieRoleName().

File Storage (MinIO)

Hệ thống lưu file lên MinIO (S3-compatible) ở bucket rechic-dpms:

Path Loại Giới hạn
sku-images/JPEG/PNG/WebP≤ 5 MB/file
invoices/PDF≤ 10 MB/file
master-data-imports/{Y}/{m}/XLSXTheo Excel

MinIO Console: http://localhost:9001 (chỉ IT truy cập). Credentials trong .env.

Master Data Import — known limitations

Scheduled Commands — chi tiết

Tham chiếu Chương 9 — Scheduled Jobs. Các lệnh được register trong routes/console.php; queue worker container rechic_dpms2_queue chạy worker cho job channel.

Vận hành (cho IT)

Tài liệu kỹ thuật

Spec và plan chi tiết của từng tính năng được lưu tại docs/superpowers/specs/docs/superpowers/plans/. Toàn bộ code conventions trong CLAUDE.md.