refactor: move location from the dish to its offers

This commit is contained in:
Michel Jonathan Schmitz
2019-02-22 10:02:11 +01:00
parent ac08d226e9
commit d2eeaeffd8
9 changed files with 102 additions and 51 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 StApps
* Copyright (C) 2018-2019 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
@@ -12,7 +12,6 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {SCThingInPlace} from '../base/ThingInPlace';
import {
SCAcademicPriceGroup,
SCThingThatCanBeOffered,
@@ -30,8 +29,10 @@ import {SCTranslations} from '../types/i18n';
* A dish without references
*/
export interface SCDishWithoutReferences
extends SCThingWithCategoriesWithoutReferences<SCDishCategories,
SCThingWithCategoriesSpecificValues>,
extends SCThingWithCategoriesWithoutReferences<
SCDishCategories,
SCThingWithCategoriesSpecificValues
>,
SCThingThatCanBeOffered<SCAcademicPriceGroup> {
/**
* Additives of the dish
@@ -69,7 +70,7 @@ export interface SCDishWithoutReferences
*
* @validatable
*/
export interface SCDish extends SCDishWithoutReferences, SCThingInPlace {
export interface SCDish extends SCDishWithoutReferences {
/**
* Dishes ("Beilagen") that are served with the dish (if only certain supplement dishes can be taken with a dish)
*/
@@ -87,8 +88,8 @@ export interface SCDish extends SCDishWithoutReferences, SCThingInPlace {
}
export interface SCDishTranslatableProperties
extends SCThingWithCategoriesTranslatableProperties, SCThingThatCanBeOfferedTranslatableProperties {
}
extends SCThingWithCategoriesTranslatableProperties,
SCThingThatCanBeOfferedTranslatableProperties {}
/**
* Dish meta data
@@ -121,7 +122,7 @@ export interface SCDishCharacteristic {
* A list of categories for dishes
*/
export type SCDishCategories =
'appetizer'
| 'appetizer'
| 'salad'
| 'main dish'
| 'dessert'