Beispiel #1
0
func GetTab(id uuid.UUID) *Tab {
	tab, ok := Tabs[id.String()]
	if !ok {
		return nil
	}
	return tab
}
Beispiel #2
0
func getTodoListGroup(tabID uuid.UUID) *todoListGroup {
	for _, list := range ChefTodoList {
		if list.TabID.String() == tabID.String() {
			return list
		}
	}
	return nil
}
Beispiel #3
0
func NewTab(id uuid.UUID, table int, staff string, drinks []OrderedItem, food []OrderedItem, open bool, siv float64) *Tab {
	mutex.Lock()
	defer mutex.Unlock()
	tab := &Tab{
		ID:                id,
		TableNumber:       table,
		WaitStaff:         staff,
		OutstandingDrinks: drinks,
		OutstandingFoods:  food,
		Open:              open,
		ServedItemsValue:  siv,
	}
	Tabs[id.String()] = tab
	return tab
}