diff --git a/app/components/cards/drink.card.tsx b/app/components/cards/drink.card.tsx index 6e3436d..81468ab 100644 --- a/app/components/cards/drink.card.tsx +++ b/app/components/cards/drink.card.tsx @@ -13,16 +13,16 @@ function DrinkCard(arg:Arguments) { var link = "/inventory/"; switch (arg.drink.type) { - case DrinkType.Beer: + case "Beer": link += "beer/"; break; - case DrinkType.Wine: + case "Wine": link += "wine/"; break; - case DrinkType.Soda: + case "Soda": link += "soda/"; break; - case DrinkType.Cocktail: + case "Cocktail": link += "cocktail/"; break; } diff --git a/app/models/types.tsx b/app/models/types.tsx index 704d74b..a220172 100644 --- a/app/models/types.tsx +++ b/app/models/types.tsx @@ -32,15 +32,15 @@ export function isDrinkWithStyle(drink:DrinkComposite) : drink is WineWithStyle export function containerTypeToString(type: ContainerType){ switch(type){ - case ContainerType.BeerBottle: + case "BeerBottle": return "Beer"; - case ContainerType.Can: + case "Can": return "Can"; - case ContainerType.Carton: + case "Carton": return "Carton"; - case ContainerType.PlasticBottle: + case "PlasticBottle": return "PET"; - case ContainerType.WineBottle: + case "WineBottle": return "Wine"; } } \ No newline at end of file diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx index 2857896..ea68a42 100644 --- a/app/routes/_index.tsx +++ b/app/routes/_index.tsx @@ -19,11 +19,11 @@ export async function loader({ let user = session.get("user"); // Admin - if(user.type == UserType.Admin){ + if(user.type == "Admin"){ return redirect("/admin"); } - if(user.type == UserType.Scanner){ + if(user.type == "Scanner"){ return redirect("/scan"); } }