Skip to content

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ăngRoles chínhScope
System configurationITLeader, ITStaff, HRLeader, BranchPOS, một số WarehouseRolesSystem-wide
Internal configurationITLeader, ITStaff, HRLeader, BranchPOS, BOD, WarehouseRoles tùy routeBranch + internal
Approval settingsITLeader, ITStaff, HRLeader, BOD theo từng loại requestTheo loại yêu cầu

Feature Groups

GroupMô tảVí dụ pages
App SettingsCấu hình app, order, appointment, customer/staff app, template nhắn tinAppSettings*, AppSettingsSmsTemplate*, AppSettingsZnsTemplate*, AppSettingsNotificationTemplate*
Internal Org ConfigBranch, department, inventory, service, region, role, groupInternalSetting, Regions*, RoleSetting, Inventory*
Time & Shift ConfigShift, work shift, holiday, annual leave, page shiftShiftSetting, WorkShiftCreate, HolidaySetting, AnnualLeave, ShiftPage
Commission / Wallet / PrepaidCommission, prepaid card, expiration, promotion walletCommissionSetting, PrepaidCard*, PromotionWallet
KPI / Affiliate / RewardKPI config, achievement, affiliate policy, banners, bonus pointKpiSetting, Achievement, Affiliate*, AppHighlightFeature*
Workflow MetadataTask tag, task status, subtask, project label, knowledge questionTaskTag*, TaskStatus*, SubTask*, ProjectLabel*, KnowledgeQuestion*
Permission & ReviewCustom permission, dashboard report permission, approver matrixCustomPermission*, DashboardReportPermission, ApproverPage

Liên kết Modules

Backend Services

ServiceVai 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-apiPromotion wallet, commission-related settings
notification-v2-api / notification-apiZNS/SMS/template execution side

Databases

DBPhạm vi
defaultapp_setting, role, group, permission, internal config
ecommercecommission, KPI, prepaid, voucher, complaint, workflow metadata
hrmholiday, shift, request approver, time-related config
notificationnotification template, SMS/ZNS template
projectworkflow status, task tag, subtask, project label
walletpromotion 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 redirect và nested children.
  • Cấu hình được chia giữa system_configurationinternal_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