heyitsmass / BayView

The next generation reservation tracking and notification system
https://bayview.dev
MIT License
1 stars 2 forks source link

ItineraryFlow state methods #79

Closed sonicspeed123 closed 11 months ago

sonicspeed123 commented 1 year ago

Description

new State's were added to allow for other flowstates. get_next_state() base functionality was created get_previous_state() base functionality was created visit_state() base functionality was created

current implementation of get_next and get_previous will return the expected state based on the current state in a linear fashion. ex, if the object's current state is updated, get_next will return updated and get_previous will return reserving.

Notes for edge cases: if the current state is login, get_previous will return login if the current state is archived, get_next will return archived

Motivation and Context

Pull request made for issue: https://github.com/heyitsmass/BayView/issues/30

Screenshot:

Additional Notes

currently we return a value of type FlowState in get_next/get_previous_state(), If needed, we can adjust it so that we return an actual State object instead.

Types of changes

Checklist:

Requested Changes:

I'd like to ask if we can add a new potential value for FlowState, that being "null" to allow for our edge cases to refer to those instead of themselves to help avoid confusion.

vercel[bot] commented 1 year ago

Someone is attempting to deploy a commit to the bayview Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 12 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bay-view ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 17, 2023 11:13pm