Skip to content

OrderModel #4

@shannah

Description

@shannah

Conceptually there needs to be an OrderModel with the details of the order. This would include which dishes are being ordered, quantities, and add-on choices for the dish.

This will affect some aspect of the views. For example, the DishAddOnView has a boolean property isSelected that you track internally in the view and update when the button is selected/deselected. This state should be stored inside a model. Depending on how you want to design the model, you might have a "selected" property in the DishAddOn model and just bind on that.

If you find yourself adding state variables inside a View class (other than just to help with determining if it is in-sync with the model), then it is an indication that the model needs to be adjusted to store that state instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions