Status Mapping Template
Standard template for documenting all statuses used across MASARUK
1. Purpose
This document defines a standard template for documenting all statuses (states) used across MASARUK, and how they map between:
- Arabic UI labels (as shown to users)
- English descriptive labels
- Internal enum values
- Colors in the UI
- Meaning and allowed transitions
The actual complete mappings are in 03-domain-model/statuses-and-lifecycles.md. This file serves as a reference pattern.
2. Template Structure
2.1 Status Group Header
- Status Group Name (English): e.g., Booking Status
- Arabic Context Name: e.g., حالة الحجز
- Enum Type Name: e.g., BOOKING_STATUS
- Related Entity/Entities: e.g., Booking
2.2 Status Mapping Table
- ui_label_ar — The Arabic label as it appears in the UI, verbatim
- label_en — Human-readable English description
- enum_value — The enum value used in code/DB/API
- color_ui — The color used for badges/indicators
- description — Short explanation of status meaning
- allowed_transitions — List of enum values status can move to
3. Example: Booking Status
This is illustrative and does not replace the authoritative mapping.
| ui_label_ar | label_en | enum_value | color_ui | description | allowed_transitions |
|---|---|---|---|---|---|
| قيد التنفيذ | Pending | PENDING | Orange | Booking submitted, awaiting payment | CONFIRMED, CANCELLED |
| مؤكدة | Confirmed | CONFIRMED | Green | Payment completed, booking confirmed | COMPLETED, CANCELLED |
| ملغاه | Cancelled | CANCELLED | Red/Pink | Booking cancelled | - |
| قادمة | Upcoming | UPCOMING | Blue/Teal | Confirmed + trip date in future | COMPLETED |
| مكتملة | Completed | COMPLETED | Grey | Trip has ended | - |
4. Guidelines
- Always include the exact Arabic label from the UI
- Never translate or rephrase the Arabic text
- Use UPPER_SNAKE_CASE for enum values
- Color names should match the UI design system
- Document all allowed transitions for lifecycle management
- Mark terminal states (no transitions) with '-'