Appearance
Settings Module
Mục đích
settings là trung tâm cấu hình lớn nhất của Diva. Module này gom cấu hình ứng dụng, cấu hình nội bộ, template nhắn tin, master data, ma trận phê duyệt, KPI, affiliate, inventory và các tham số vận hành dùng xuyên hệ thống.
Quy mô
- 91 FE pages
- 202 FE components
- 29 GraphQL files
- 7 compositions
- 4 stores
Actors & Permissions
| Nhóm chức năng | Roles chính | Scope |
|---|---|---|
| System configuration | ITLeader, ITStaff, HRLeader, BranchPOS, một số WarehouseRoles | System-wide |
| Internal configuration | ITLeader, ITStaff, HRLeader, BranchPOS, BOD, WarehouseRoles tùy route | Branch + internal |
| Approval settings | ITLeader, ITStaff, HRLeader, BOD theo từng loại request | Theo loại yêu cầu |
Feature Groups
| Group | Mô tả | Ví dụ pages |
|---|---|---|
| App Settings | Cấu hình app, order, appointment, customer/staff app, template nhắn tin | AppSettings*, AppSettingsSmsTemplate*, AppSettingsZnsTemplate*, AppSettingsNotificationTemplate* |
| Internal Org Config | Branch, department, inventory, service, region, role, group | InternalSetting, Regions*, RoleSetting, Inventory* |
| Time & Shift Config | Shift, work shift, holiday, annual leave, page shift | ShiftSetting, WorkShiftCreate, HolidaySetting, AnnualLeave, ShiftPage |
| Commission / Wallet / Prepaid | Commission, prepaid card, expiration, promotion wallet | CommissionSetting, PrepaidCard*, PromotionWallet |
| KPI / Affiliate / Reward | KPI config, achievement, affiliate policy, banners, bonus point | KpiSetting, Achievement, Affiliate*, AppHighlightFeature* |
| Workflow Metadata | Task tag, task status, subtask, project label, knowledge question | TaskTag*, TaskStatus*, SubTask*, ProjectLabel*, KnowledgeQuestion* |
| Permission & Review | Custom permission, dashboard report permission, approver matrix | CustomPermission*, DashboardReportPermission, ApproverPage |
Liên kết Modules
- user + ecommerce + wallet + report + cms + kpi + projects + timekeeping + complaint + affiliate — gần như toàn bộ hệ thống phụ thuộc vào settings như lớp cấu hình.
- notification — template cấu hình nằm tại settings nhưng runtime gửi nằm ở notification services
Backend Services
| Service | Vai trò |
|---|---|
| controller (Hasura) | CRUD cấu hình đa domain, expose GraphQL cho FE |
| ecommerce-api | Áp dụng commission, KPI, voucher, workflow config vào nghiệp vụ |
| wallet-api | Promotion wallet, commission-related settings |
| notification-v2-api / notification-api | ZNS/SMS/template execution side |
Databases
| DB | Phạm vi |
|---|---|
| default | app_setting, role, group, permission, internal config |
| ecommerce | commission, KPI, prepaid, voucher, complaint, workflow metadata |
| hrm | holiday, shift, request approver, time-related config |
| notification | notification template, SMS/ZNS template |
| project | workflow status, task tag, subtask, project label |
| wallet | promotion wallet, payment-related config |
Đặc điểm kiến trúc
- Đây là route tree lớn nhất trong FE hiện tại, có rất nhiều
redirectvà nested children. - Cấu hình được chia giữa
system_configurationvàinternal_configuration; cùng một module FE nhưng ownership dữ liệu trải trên nhiều database/service. - Một số route settings thực chất là nơi quản trị master data cho module khác, không phải nơi chạy nghiệp vụ trực tiếp.
- Với nhóm
Dynamic, một số màn hình settings bị khóa chỉnh sửa ở FE dù vẫn có thể đọc dữ liệu.
Domain Docs
- Canonical business docs:
- Compatibility index cũ: