class MenuViewModel : AndroidViewModel
MenuViewModel VenueNext
Created on 3/8/19. Copyright © 2019 VenueNext Inc. All rights reserved.
<init> |
MenuViewModel VenueNext MenuViewModel(application: Application) |
categories |
var categories: List<Category>? |
currentEvent |
var currentEvent: Event? |
currentItem |
var currentItem: Item? |
currentMenu |
var currentMenu: Menu? |
events |
var events: List<Event>? |
items |
var items: List<Item>? |
modifierCategories |
var modifierCategories: List<Category>? |
toMenuId |
UUID will be set when the user navigates to a Menu as the first screen. var toMenuId: String? |
getClosestVariantForItem |
fun getClosestVariantForItem(item: Item?): Variant? |
getItems |
fun getItems(: String): Deferred<List<Item>> |
getOrderTotal |
fun getOrderTotal(cart: Cart): Deferred<Order?> |
populateEventListForSelection |
fun populateEventListForSelection(): ArrayList<Any>? |
reloadMenuItems |
fun reloadMenuItems(: Menu): Deferred<Unit> |
removeInvalidItems |
fun removeInvalidItems(items: List<Item>): List<Item>? |
syncCategories |
fun syncCategories(: Menu, result: GetMenuItemsResult?): Deferred<Unit> |
syncEvents |
fun syncEvents(: Menu, result: GetMenuItemsResult?): Deferred<Unit> |
syncItems |
fun syncItems(: Menu, result: GetMenuItemsResult?): Deferred<Unit> |
syncModifierCategories |
fun syncModifierCategories(: Menu, result: GetMenuItemsResult?): Deferred<Unit> |
updateMenu |
fun updateMenu(: Menu, result: GetMenuItemsResult?): Deferred<Unit> |