masaruk Logo

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_arlabel_enenum_valuecolor_uidescriptionallowed_transitions
قيد التنفيذPendingPENDINGOrangeBooking submitted, awaiting paymentCONFIRMED, CANCELLED
مؤكدةConfirmedCONFIRMEDGreenPayment completed, booking confirmedCOMPLETED, CANCELLED
ملغاهCancelledCANCELLEDRed/PinkBooking cancelled-
قادمةUpcomingUPCOMINGBlue/TealConfirmed + trip date in futureCOMPLETED
مكتملةCompletedCOMPLETEDGreyTrip 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 '-'