Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/customer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"axios": "^0.19.0",
"axios-hooks": "^1.7.2",
"connected-react-router": "^6.6.1",
"normalizr": "^3.6.0",
"query-string": "^6.10.1",
"ramda": "^0.26.1",
"react": "^16.12.0",
Expand All @@ -58,6 +59,7 @@
"@types/fs-extra": "^8.0.1",
"@types/jest": "^24.0.0",
"@types/node": "^12.0.0",
"@types/normalizr": "^2.0.18",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"@types/react-gtm-module": "^2.0.0",
Expand Down
16 changes: 8 additions & 8 deletions packages/customer/public/data/show/menu/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"index": 0,
"language": "en",
"restaurant": "demo",
"restaurant": "show",
"section": "STARTERS",
"dishName": "Beef tartare",
"dishDescription": "With onion, pickled cucumber, mushrooms and yolk, served with bread",
Expand All @@ -12,7 +12,7 @@
{
"index": 1,
"language": "en",
"restaurant": "demo",
"restaurant": "show",
"section": "STARTERS",
"dishName": "Mexican nachos",
"dishDescription": "Served with sultry beef",
Expand All @@ -22,7 +22,7 @@
{
"index": 2,
"language": "en",
"restaurant": "demo",
"restaurant": "show",
"section": "SOUPS",
"dishName": "Beef guts",
"dishDescription": "According to a family recipe",
Expand All @@ -32,7 +32,7 @@
{
"index": 3,
"language": "en",
"restaurant": "demo",
"restaurant": "show",
"section": "SOUPS",
"dishName": "Beetroot",
"dishDescription": "Served with a meat croquette",
Expand All @@ -42,7 +42,7 @@
{
"index": 4,
"language": "en",
"restaurant": "demo",
"restaurant": "show",
"section": "MAIN DISHES",
"dishName": "Oven trout",
"dishDescription": "Served with grilled vegetables",
Expand All @@ -52,7 +52,7 @@
{
"index": 5,
"language": "en",
"restaurant": "demo",
"restaurant": "show",
"section": "MAIN DISHES",
"dishName": "Dumplings - 10 pcs",
"dishVariantPrice": 14,
Expand All @@ -61,10 +61,10 @@
{
"index": 6,
"language": "en",
"restaurant": "demo",
"restaurant": "show",
"section": "MAIN DISHES",
"dishName": "Dumplings - 10 pcs",
"dishVariantPrice": 14,
"dishVariantName": "with meat"
}
]
]
48 changes: 21 additions & 27 deletions packages/customer/public/index.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="robots" content="noindex" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
/>
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Zamawiaj w restauracjach szybko i wygodnie"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>menuo</title>
<link
href="https://fonts.googleapis.com/css?family=Megrim&display=swap"
rel="stylesheet"
/>
</head>
<meta name="”robots”" content="”noindex”" />
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>

<head>
<meta charset="utf-8" />
<meta name="robots" content="noindex" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Zamawiaj w restauracjach szybko i wygodnie" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>menuo</title>
<link href="https://fonts.googleapis.com/css?family=Megrim&display=swap" rel="stylesheet" />
</head>
<meta name="”robots”" content="”noindex”" />

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>

</html>
12 changes: 6 additions & 6 deletions packages/customer/src/pages/Menu/components/MenuSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export interface MenuSectionDispatchProps {

export interface MenuSectionProps
extends MenuSectionOwnProps,
MenuSectionStateProps,
MenuSectionDispatchProps,
WithStyles {}
MenuSectionStateProps,
MenuSectionDispatchProps,
WithStyles { }

const capitalize = (s: string) => s.charAt(0).toUpperCase() + s.slice(1)

Expand Down Expand Up @@ -84,9 +84,9 @@ export const MenuSection: FC<MenuSectionProps> = ({
// const id = variant.entry._id
const count = basket.filter(
(entry: any) =>
entry.dish === variant.entry.dishName &&
(entry.variant === variant.entry.dishVariantName ||
(!entry.variant && !variant.entry.dishVariantName)),
entry.dish === dish.name &&
(entry.variant === variant.name ||
(!entry.variant && !variant.name)),
).length
const variantText =
(variant.name ? variant.name + ' - ' : '') +
Expand Down
5 changes: 3 additions & 2 deletions packages/shared/interfaces/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,24 @@ export interface IRestaurant {
export type IMenu = ISection[]

export interface ISection {
id: string
name: string
description?: string
dishes: IDish[]
}

export interface IDish {
id: string
name: string
description?: string
variants: IVariant[]
}

export interface IVariant {
_id: string
id: string
price: number
name?: string
description?: string
entry: MenuEntry
}

// DB
Expand Down
Loading