Magic bullshit
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
import { FeatureRequest, PizzaOrder } from "./Types";
|
||||
import { FeatureRequest, Locations, PizzaOrder } from "./Types";
|
||||
|
||||
export type ILocationKey = {
|
||||
locationKey: keyof typeof Locations,
|
||||
}
|
||||
|
||||
export type IDayIndex = {
|
||||
dayIndex?: number,
|
||||
}
|
||||
|
||||
export type AddChoiceRequest = IDayIndex & {
|
||||
locationIndex: number,
|
||||
export type AddChoiceRequest = IDayIndex & ILocationKey & {
|
||||
foodIndex?: number,
|
||||
}
|
||||
|
||||
export type RemoveChoicesRequest = IDayIndex & {
|
||||
locationIndex: number,
|
||||
}
|
||||
export type RemoveChoicesRequest = IDayIndex & ILocationKey;
|
||||
|
||||
export type RemoveChoiceRequest = IDayIndex & {
|
||||
locationIndex: number,
|
||||
export type RemoveChoiceRequest = IDayIndex & ILocationKey & {
|
||||
foodIndex: number,
|
||||
}
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ export type FoodChoices = {
|
||||
}
|
||||
|
||||
export type Choices = {
|
||||
[location: string]: {
|
||||
[location in keyof typeof Locations]?: {
|
||||
[login: string]: FoodChoices
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/** Velikost konkrétní pizzy */
|
||||
@@ -88,7 +88,7 @@ export type DayData = {
|
||||
}
|
||||
|
||||
/** Veškerá data pro zobrazení na klientovi. */
|
||||
export type ClientData extends DayData = {
|
||||
export type ClientData = DayData & {
|
||||
todayWeekIndex?: number, // index dnešního dne v týdnu (0-6)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user