Appearance
Event Programs — Technical Map
Route / page map
| Family | Main page / shell |
|---|---|
| Accumulation | AccumulationEvent.tsx, AccumulationEventCreate.tsx, AccumulationEventDetail.tsx, AccumulationEventCustomerDetail.tsx |
| Lucky draw | LuckyDrawEvent.tsx, LuckyDrawEventCreate.tsx, LuckyDrawEventDetail.tsx, LuckyDrawEventCustomerDetail.tsx |
| Gift event | GiftEvent.tsx, GiftEventCreate.tsx, GiftEventDetail.tsx |
Data / component model
| Family | Technical signals |
|---|---|
| Accumulation | Accumulation*Form, AccumulationLevel*, AccumulationStatus, threshold/reward-based progression |
| Lucky draw | wheels, rewards, reward_wheel_results, reward_wheel_claims, receive popup/components |
| Gift event | event_gift_groups, event_reward_conditions, event_notification_configs, popup/reward/noti builders |
GraphQL / model map
| Surface | Query/model chính |
|---|---|
| Shared event | event, event_customer, reward_claim fragments trong event.graphql |
| Lucky draw | wheel/reward aggregates, customer detail, claim history |
| Gift event | nested insert/update qua useInsertEventWithDetailsMutation, notification config payloads |
| Event files | files, popup assets, reward media |
Rủi ro / Findings kỹ thuật
| Mức | Finding |
|---|---|
| Cao | Nhiề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. |
| Cao | GiftEventCreate.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ình | Event 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ình | Lucky 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ỏ. |