Skip to content

Instantly share code, notes, and snippets.

@iKlsR
Created August 27, 2025 18:14
Show Gist options
  • Select an option

  • Save iKlsR/01b50d0932043c10ef423e6a872c74d9 to your computer and use it in GitHub Desktop.

Select an option

Save iKlsR/01b50d0932043c10ef423e6a872c74d9 to your computer and use it in GitHub Desktop.
# Trip Status Flow
# Trip Status Flow
PENDING
CONFIRM -> CONFIRMED
CANCEL -> CANCELLED
CONFIRMED
START_TRIP -> IN_PROGRESS
CANCEL -> CANCELLED
IN_PROGRESS
COMPLETE_TRIP -> COMPLETED
CANCEL -> CANCELLED
COMPLETED
# Final state - no transitions
CANCELLED
RETRY -> PENDING
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment