Skip to content

Event Programs — Technical Map

Route / page map

FamilyMain page / shell
AccumulationAccumulationEvent.tsx, AccumulationEventCreate.tsx, AccumulationEventDetail.tsx, AccumulationEventCustomerDetail.tsx
Lucky drawLuckyDrawEvent.tsx, LuckyDrawEventCreate.tsx, LuckyDrawEventDetail.tsx, LuckyDrawEventCustomerDetail.tsx
Gift eventGiftEvent.tsx, GiftEventCreate.tsx, GiftEventDetail.tsx

Data / component model

FamilyTechnical signals
AccumulationAccumulation*Form, AccumulationLevel*, AccumulationStatus, threshold/reward-based progression
Lucky drawwheels, rewards, reward_wheel_results, reward_wheel_claims, receive popup/components
Gift eventevent_gift_groups, event_reward_conditions, event_notification_configs, popup/reward/noti builders

GraphQL / model map

SurfaceQuery/model chính
Shared eventevent, event_customer, reward_claim fragments trong event.graphql
Lucky drawwheel/reward aggregates, customer detail, claim history
Gift eventnested insert/update qua useInsertEventWithDetailsMutation, notification config payloads
Event filesfiles, popup assets, reward media

Rủi ro / Findings kỹ thuật

MứcFinding
CaoNhiều route event create/update/detail trong module.ts dùng permissions: [] thay vì role list rõ ràng; enforcement thực tế phụ thuộc vào cách app xử lý moduleId = event_management.
CaoGiftEventCreate.tsx mount cho cả create và update route, nhưng source hiện chỉ thấy nhánh create khi !route.params.id; nhánh update không hoàn thiện trong file này.
Trung bìnhEvent FE giữ rất nhiều business HTML/template generator ngay trong types.ts (AccumulationRuleGenerate, LuckyDrawRuleGenerate, GiftEventRuleGenerate), làm presentation logic và business rule narrative bị trộn.
Trung bìnhLucky draw và gift event có component tree sâu, nhiều popup/list/header/body riêng; đây là domain có coupling UI rất cao và khó refactor theo lát cắt nhỏ.