From 3fdc93ef288693fcecd8d5066aff29b6e82bba20 Mon Sep 17 00:00:00 2001 From: Jonasz Bigda Date: Sat, 26 Sep 2020 15:20:38 +0200 Subject: [PATCH] web client v0.4 (edit restaurant info) --- .VSCodeCounter/2020-09-24_20-19-08/details.md | 104 ++++++++ .../2020-09-24_20-19-08/results.csv | 91 +++++++ .VSCodeCounter/2020-09-24_20-19-08/results.md | 37 +++ .../2020-09-24_20-19-08/results.txt | 129 ++++++++++ src/Services.js | 13 + src/components/Dialogs/EditRestaurant.js | 46 ++-- src/components/Dialogs/NewRestaurant.js | 110 ++++---- .../EditRestaurant/EditRestaurantInfo.js | 240 ++++++++++++++++++ .../EditRestaurant/EditRestaurantLocation.js | 9 + .../EditRestaurant/EditRestaurantLunch.js | 9 + .../EditRestaurant/EditRestaurantMenu.js | 9 + .../EditRestaurant/EditRestaurantPhoto.js | 9 + .../EditRestaurantSubscription.js | 9 + src/components/Input/InputWorkingHours.js | 53 ++++ .../Input/InputWorkingHoursSingle.js | 61 +++++ src/styles/EditRestaurant.scss | 44 ++++ src/styles/NewRestaurant.scss | 4 + 17 files changed, 884 insertions(+), 93 deletions(-) create mode 100644 .VSCodeCounter/2020-09-24_20-19-08/details.md create mode 100644 .VSCodeCounter/2020-09-24_20-19-08/results.csv create mode 100644 .VSCodeCounter/2020-09-24_20-19-08/results.md create mode 100644 .VSCodeCounter/2020-09-24_20-19-08/results.txt create mode 100644 src/components/EditRestaurant/EditRestaurantInfo.js create mode 100644 src/components/EditRestaurant/EditRestaurantLocation.js create mode 100644 src/components/EditRestaurant/EditRestaurantLunch.js create mode 100644 src/components/EditRestaurant/EditRestaurantMenu.js create mode 100644 src/components/EditRestaurant/EditRestaurantPhoto.js create mode 100644 src/components/EditRestaurant/EditRestaurantSubscription.js create mode 100644 src/components/Input/InputWorkingHours.js create mode 100644 src/components/Input/InputWorkingHoursSingle.js diff --git a/.VSCodeCounter/2020-09-24_20-19-08/details.md b/.VSCodeCounter/2020-09-24_20-19-08/details.md new file mode 100644 index 0000000..648819e --- /dev/null +++ b/.VSCodeCounter/2020-09-24_20-19-08/details.md @@ -0,0 +1,104 @@ +# Details + +Date : 2020-09-24 20:19:08 + +Directory d:\WORK\Menui\web_client + +Total : 89 files, 19220 codes, 82 comments, 370 blanks, all 19672 lines + +[summary](results.md) + +## Files +| filename | language | code | comment | blank | total | +| :--- | :--- | ---: | ---: | ---: | ---: | +| [README.md](/README.md) | Markdown | 37 | 0 | 32 | 69 | +| [package-lock.json](/package-lock.json) | JSON | 14,753 | 0 | 1 | 14,754 | +| [package.json](/package.json) | JSON | 48 | 0 | 1 | 49 | +| [public/index.html](/public/index.html) | HTML | 16 | 19 | 1 | 36 | +| [public/manifest.json](/public/manifest.json) | JSON | 25 | 0 | 1 | 26 | +| [src/App.js](/src/App.js) | JavaScript | 93 | 0 | 4 | 97 | +| [src/App.scss](/src/App.scss) | SCSS | 59 | 0 | 8 | 67 | +| [src/Design.scss](/src/Design.scss) | SCSS | 9 | 7 | 1 | 17 | +| [src/Services.js](/src/Services.js) | JavaScript | 31 | 0 | 5 | 36 | +| [src/actions/index.js](/src/actions/index.js) | JavaScript | 223 | 0 | 20 | 243 | +| [src/actions/toggles.js](/src/actions/toggles.js) | JavaScript | 110 | 0 | 17 | 127 | +| [src/components/Dialogs.js](/src/components/Dialogs.js) | JavaScript | 9 | 0 | 2 | 11 | +| [src/components/Dialogs/EditRestaurant.js](/src/components/Dialogs/EditRestaurant.js) | JavaScript | 169 | 1 | 6 | 176 | +| [src/components/Dialogs/ForgotPassword.js](/src/components/Dialogs/ForgotPassword.js) | JavaScript | 146 | 1 | 8 | 155 | +| [src/components/Dialogs/LoginDialog.js](/src/components/Dialogs/LoginDialog.js) | JavaScript | 157 | 1 | 9 | 167 | +| [src/components/Dialogs/NewRestaurant.js](/src/components/Dialogs/NewRestaurant.js) | JavaScript | 500 | 4 | 16 | 520 | +| [src/components/Dialogs/RegisterDialog.js](/src/components/Dialogs/RegisterDialog.js) | JavaScript | 328 | 4 | 13 | 345 | +| [src/components/Dialogs/Regulamin.js](/src/components/Dialogs/Regulamin.js) | JavaScript | 52 | 0 | 2 | 54 | +| [src/components/Dialogs/RegulaminDialog.js](/src/components/Dialogs/RegulaminDialog.js) | JavaScript | 65 | 0 | 5 | 70 | +| [src/components/Dialogs/ResetPassword.js](/src/components/Dialogs/ResetPassword.js) | JavaScript | 175 | 1 | 9 | 185 | +| [src/components/Dialogs/Settings.js](/src/components/Dialogs/Settings.js) | JavaScript | 151 | 0 | 3 | 154 | +| [src/components/EditRestaurant/EditRestaurantInfo.js](/src/components/EditRestaurant/EditRestaurantInfo.js) | JavaScript | 100 | 0 | 4 | 104 | +| [src/components/EditRestaurant/EditRestaurantLocation.js](/src/components/EditRestaurant/EditRestaurantLocation.js) | JavaScript | 8 | 0 | 2 | 10 | +| [src/components/EditRestaurant/EditRestaurantLunch.js](/src/components/EditRestaurant/EditRestaurantLunch.js) | JavaScript | 8 | 0 | 2 | 10 | +| [src/components/EditRestaurant/EditRestaurantMenu.js](/src/components/EditRestaurant/EditRestaurantMenu.js) | JavaScript | 8 | 0 | 2 | 10 | +| [src/components/EditRestaurant/EditRestaurantPhoto.js](/src/components/EditRestaurant/EditRestaurantPhoto.js) | JavaScript | 8 | 0 | 2 | 10 | +| [src/components/EditRestaurant/EditRestaurantSubscription.js](/src/components/EditRestaurant/EditRestaurantSubscription.js) | JavaScript | 8 | 0 | 2 | 10 | +| [src/components/Input/ButtonPrimary.js](/src/components/Input/ButtonPrimary.js) | JavaScript | 20 | 0 | 3 | 23 | +| [src/components/Input/ButtonSecondary.js](/src/components/Input/ButtonSecondary.js) | JavaScript | 21 | 0 | 3 | 24 | +| [src/components/Input/CustomTextInput.js](/src/components/Input/CustomTextInput.js) | JavaScript | 35 | 0 | 4 | 39 | +| [src/components/Input/ImageUpload.js](/src/components/Input/ImageUpload.js) | JavaScript | 56 | 0 | 6 | 62 | +| [src/components/Input/InputGoogleMaps.js](/src/components/Input/InputGoogleMaps.js) | JavaScript | 42 | 0 | 6 | 48 | +| [src/components/Input/SearchPanel.js](/src/components/Input/SearchPanel.js) | JavaScript | 54 | 0 | 5 | 59 | +| [src/components/Output/CardDish.js](/src/components/Output/CardDish.js) | JavaScript | 30 | 3 | 3 | 36 | +| [src/components/Output/CardRestaurant.js](/src/components/Output/CardRestaurant.js) | JavaScript | 43 | 0 | 4 | 47 | +| [src/components/Output/Contact.js](/src/components/Output/Contact.js) | JavaScript | 56 | 0 | 3 | 59 | +| [src/components/Output/DishList.js](/src/components/Output/DishList.js) | JavaScript | 34 | 0 | 7 | 41 | +| [src/components/Output/DishesCategory.js](/src/components/Output/DishesCategory.js) | JavaScript | 38 | 0 | 4 | 42 | +| [src/components/Output/Footer.js](/src/components/Output/Footer.js) | JavaScript | 10 | 0 | 2 | 12 | +| [src/components/Output/InfoDialog.js](/src/components/Output/InfoDialog.js) | JavaScript | 36 | 0 | 4 | 40 | +| [src/components/Output/ListItemRestaurant.js](/src/components/Output/ListItemRestaurant.js) | JavaScript | 64 | 0 | 4 | 68 | +| [src/components/Output/Pictograms.js](/src/components/Output/Pictograms.js) | JavaScript | 63 | 1 | 4 | 68 | +| [src/components/Output/PictogramsSeparate.js](/src/components/Output/PictogramsSeparate.js) | JavaScript | 99 | 1 | 5 | 105 | +| [src/components/Output/Restaurant.js](/src/components/Output/Restaurant.js) | JavaScript | 48 | 0 | 3 | 51 | +| [src/components/Output/SearchResults.js](/src/components/Output/SearchResults.js) | JavaScript | 29 | 0 | 3 | 32 | +| [src/components/Output/Social.js](/src/components/Output/Social.js) | JavaScript | 30 | 0 | 2 | 32 | +| [src/components/Output/logoMain.js](/src/components/Output/logoMain.js) | JavaScript | 11 | 0 | 3 | 14 | +| [src/components/PrivateRoute.js](/src/components/PrivateRoute.js) | JavaScript | 23 | 0 | 3 | 26 | +| [src/components/TopBar.js](/src/components/TopBar.js) | JavaScript | 170 | 0 | 6 | 176 | +| [src/components/UserMenu.js](/src/components/UserMenu.js) | JavaScript | 92 | 0 | 5 | 97 | +| [src/index.js](/src/index.js) | JavaScript | 31 | 3 | 6 | 40 | +| [src/index.scss](/src/index.scss) | SCSS | 20 | 0 | 4 | 24 | +| [src/public/i_alcohol.svg](/src/public/i_alcohol.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_card.svg](/src/public/i_card.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_delivery.svg](/src/public/i_delivery.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_eggs.svg](/src/public/i_eggs.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_gluten.svg](/src/public/i_gluten.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_glutenFree.svg](/src/public/i_glutenFree.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_lactose.svg](/src/public/i_lactose.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_lactoseFree.svg](/src/public/i_lactoseFree.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_peanuts.svg](/src/public/i_peanuts.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_pets.svg](/src/public/i_pets.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_seaFood.svg](/src/public/i_seaFood.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_sesame.svg](/src/public/i_sesame.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_soy.svg](/src/public/i_soy.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_vegan.svg](/src/public/i_vegan.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/i_vegetarian.svg](/src/public/i_vegetarian.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/logo_mint.svg](/src/public/logo_mint.svg) | XML | 1 | 0 | 0 | 1 | +| [src/public/logo_white.svg](/src/public/logo_white.svg) | XML | 1 | 0 | 0 | 1 | +| [src/reducers/appMode.js](/src/reducers/appMode.js) | JavaScript | 17 | 0 | 2 | 19 | +| [src/reducers/autoComplete.js](/src/reducers/autoComplete.js) | JavaScript | 11 | 0 | 2 | 13 | +| [src/reducers/data.js](/src/reducers/data.js) | JavaScript | 149 | 0 | 3 | 152 | +| [src/reducers/dishes.js](/src/reducers/dishes.js) | JavaScript | 13 | 0 | 2 | 15 | +| [src/reducers/index.js](/src/reducers/index.js) | JavaScript | 21 | 0 | 3 | 24 | +| [src/reducers/restaurant.js](/src/reducers/restaurant.js) | JavaScript | 11 | 0 | 2 | 13 | +| [src/reducers/searchQuery.js](/src/reducers/searchQuery.js) | JavaScript | 11 | 0 | 2 | 13 | +| [src/reducers/searchResults.js](/src/reducers/searchResults.js) | JavaScript | 11 | 0 | 2 | 13 | +| [src/serviceWorker.js](/src/serviceWorker.js) | JavaScript | 98 | 31 | 13 | 142 | +| [src/setupTests.js](/src/setupTests.js) | JavaScript | 1 | 4 | 1 | 6 | +| [src/styles/Dialogs.scss](/src/styles/Dialogs.scss) | SCSS | 22 | 0 | 4 | 26 | +| [src/styles/DishList.scss](/src/styles/DishList.scss) | SCSS | 45 | 0 | 7 | 52 | +| [src/styles/EditRestaurant.scss](/src/styles/EditRestaurant.scss) | SCSS | 38 | 0 | 7 | 45 | +| [src/styles/Footer.scss](/src/styles/Footer.scss) | SCSS | 8 | 0 | 2 | 10 | +| [src/styles/NewRestaurant.scss](/src/styles/NewRestaurant.scss) | SCSS | 49 | 0 | 7 | 56 | +| [src/styles/Pictograms.scss](/src/styles/Pictograms.scss) | SCSS | 29 | 0 | 4 | 33 | +| [src/styles/Restaurant.scss](/src/styles/Restaurant.scss) | SCSS | 81 | 0 | 8 | 89 | +| [src/styles/SearchPanel.scss](/src/styles/SearchPanel.scss) | SCSS | 8 | 0 | 2 | 10 | +| [src/styles/SearchResults.scss](/src/styles/SearchResults.scss) | SCSS | 69 | 1 | 7 | 77 | +| [src/styles/TopBar.scss](/src/styles/TopBar.scss) | SCSS | 60 | 0 | 10 | 70 | + +[summary](results.md) \ No newline at end of file diff --git a/.VSCodeCounter/2020-09-24_20-19-08/results.csv b/.VSCodeCounter/2020-09-24_20-19-08/results.csv new file mode 100644 index 0000000..772093a --- /dev/null +++ b/.VSCodeCounter/2020-09-24_20-19-08/results.csv @@ -0,0 +1,91 @@ +"filename", "language", "Markdown", "SCSS", "JavaScript", "XML", "HTML", "JSON", "comment", "blank", "total" +"d:\WORK\Menui\web_client\README.md", "Markdown", 37, 0, 0, 0, 0, 0, 0, 32, 69 +"d:\WORK\Menui\web_client\package-lock.json", "JSON", 0, 0, 0, 0, 0, 14753, 0, 1, 14754 +"d:\WORK\Menui\web_client\package.json", "JSON", 0, 0, 0, 0, 0, 48, 0, 1, 49 +"d:\WORK\Menui\web_client\public\index.html", "HTML", 0, 0, 0, 0, 16, 0, 19, 1, 36 +"d:\WORK\Menui\web_client\public\manifest.json", "JSON", 0, 0, 0, 0, 0, 25, 0, 1, 26 +"d:\WORK\Menui\web_client\src\App.js", "JavaScript", 0, 0, 93, 0, 0, 0, 0, 4, 97 +"d:\WORK\Menui\web_client\src\App.scss", "SCSS", 0, 59, 0, 0, 0, 0, 0, 8, 67 +"d:\WORK\Menui\web_client\src\Design.scss", "SCSS", 0, 9, 0, 0, 0, 0, 7, 1, 17 +"d:\WORK\Menui\web_client\src\Services.js", "JavaScript", 0, 0, 31, 0, 0, 0, 0, 5, 36 +"d:\WORK\Menui\web_client\src\actions\index.js", "JavaScript", 0, 0, 223, 0, 0, 0, 0, 20, 243 +"d:\WORK\Menui\web_client\src\actions\toggles.js", "JavaScript", 0, 0, 110, 0, 0, 0, 0, 17, 127 +"d:\WORK\Menui\web_client\src\components\Dialogs.js", "JavaScript", 0, 0, 9, 0, 0, 0, 0, 2, 11 +"d:\WORK\Menui\web_client\src\components\Dialogs\EditRestaurant.js", "JavaScript", 0, 0, 169, 0, 0, 0, 1, 6, 176 +"d:\WORK\Menui\web_client\src\components\Dialogs\ForgotPassword.js", "JavaScript", 0, 0, 146, 0, 0, 0, 1, 8, 155 +"d:\WORK\Menui\web_client\src\components\Dialogs\LoginDialog.js", "JavaScript", 0, 0, 157, 0, 0, 0, 1, 9, 167 +"d:\WORK\Menui\web_client\src\components\Dialogs\NewRestaurant.js", "JavaScript", 0, 0, 500, 0, 0, 0, 4, 16, 520 +"d:\WORK\Menui\web_client\src\components\Dialogs\RegisterDialog.js", "JavaScript", 0, 0, 328, 0, 0, 0, 4, 13, 345 +"d:\WORK\Menui\web_client\src\components\Dialogs\Regulamin.js", "JavaScript", 0, 0, 52, 0, 0, 0, 0, 2, 54 +"d:\WORK\Menui\web_client\src\components\Dialogs\RegulaminDialog.js", "JavaScript", 0, 0, 65, 0, 0, 0, 0, 5, 70 +"d:\WORK\Menui\web_client\src\components\Dialogs\ResetPassword.js", "JavaScript", 0, 0, 175, 0, 0, 0, 1, 9, 185 +"d:\WORK\Menui\web_client\src\components\Dialogs\Settings.js", "JavaScript", 0, 0, 151, 0, 0, 0, 0, 3, 154 +"d:\WORK\Menui\web_client\src\components\EditRestaurant\EditRestaurantInfo.js", "JavaScript", 0, 0, 100, 0, 0, 0, 0, 4, 104 +"d:\WORK\Menui\web_client\src\components\EditRestaurant\EditRestaurantLocation.js", "JavaScript", 0, 0, 8, 0, 0, 0, 0, 2, 10 +"d:\WORK\Menui\web_client\src\components\EditRestaurant\EditRestaurantLunch.js", "JavaScript", 0, 0, 8, 0, 0, 0, 0, 2, 10 +"d:\WORK\Menui\web_client\src\components\EditRestaurant\EditRestaurantMenu.js", "JavaScript", 0, 0, 8, 0, 0, 0, 0, 2, 10 +"d:\WORK\Menui\web_client\src\components\EditRestaurant\EditRestaurantPhoto.js", "JavaScript", 0, 0, 8, 0, 0, 0, 0, 2, 10 +"d:\WORK\Menui\web_client\src\components\EditRestaurant\EditRestaurantSubscription.js", "JavaScript", 0, 0, 8, 0, 0, 0, 0, 2, 10 +"d:\WORK\Menui\web_client\src\components\Input\ButtonPrimary.js", "JavaScript", 0, 0, 20, 0, 0, 0, 0, 3, 23 +"d:\WORK\Menui\web_client\src\components\Input\ButtonSecondary.js", "JavaScript", 0, 0, 21, 0, 0, 0, 0, 3, 24 +"d:\WORK\Menui\web_client\src\components\Input\CustomTextInput.js", "JavaScript", 0, 0, 35, 0, 0, 0, 0, 4, 39 +"d:\WORK\Menui\web_client\src\components\Input\ImageUpload.js", "JavaScript", 0, 0, 56, 0, 0, 0, 0, 6, 62 +"d:\WORK\Menui\web_client\src\components\Input\InputGoogleMaps.js", "JavaScript", 0, 0, 42, 0, 0, 0, 0, 6, 48 +"d:\WORK\Menui\web_client\src\components\Input\SearchPanel.js", "JavaScript", 0, 0, 54, 0, 0, 0, 0, 5, 59 +"d:\WORK\Menui\web_client\src\components\Output\CardDish.js", "JavaScript", 0, 0, 30, 0, 0, 0, 3, 3, 36 +"d:\WORK\Menui\web_client\src\components\Output\CardRestaurant.js", "JavaScript", 0, 0, 43, 0, 0, 0, 0, 4, 47 +"d:\WORK\Menui\web_client\src\components\Output\Contact.js", "JavaScript", 0, 0, 56, 0, 0, 0, 0, 3, 59 +"d:\WORK\Menui\web_client\src\components\Output\DishList.js", "JavaScript", 0, 0, 34, 0, 0, 0, 0, 7, 41 +"d:\WORK\Menui\web_client\src\components\Output\DishesCategory.js", "JavaScript", 0, 0, 38, 0, 0, 0, 0, 4, 42 +"d:\WORK\Menui\web_client\src\components\Output\Footer.js", "JavaScript", 0, 0, 10, 0, 0, 0, 0, 2, 12 +"d:\WORK\Menui\web_client\src\components\Output\InfoDialog.js", "JavaScript", 0, 0, 36, 0, 0, 0, 0, 4, 40 +"d:\WORK\Menui\web_client\src\components\Output\ListItemRestaurant.js", "JavaScript", 0, 0, 64, 0, 0, 0, 0, 4, 68 +"d:\WORK\Menui\web_client\src\components\Output\Pictograms.js", "JavaScript", 0, 0, 63, 0, 0, 0, 1, 4, 68 +"d:\WORK\Menui\web_client\src\components\Output\PictogramsSeparate.js", "JavaScript", 0, 0, 99, 0, 0, 0, 1, 5, 105 +"d:\WORK\Menui\web_client\src\components\Output\Restaurant.js", "JavaScript", 0, 0, 48, 0, 0, 0, 0, 3, 51 +"d:\WORK\Menui\web_client\src\components\Output\SearchResults.js", "JavaScript", 0, 0, 29, 0, 0, 0, 0, 3, 32 +"d:\WORK\Menui\web_client\src\components\Output\Social.js", "JavaScript", 0, 0, 30, 0, 0, 0, 0, 2, 32 +"d:\WORK\Menui\web_client\src\components\Output\logoMain.js", "JavaScript", 0, 0, 11, 0, 0, 0, 0, 3, 14 +"d:\WORK\Menui\web_client\src\components\PrivateRoute.js", "JavaScript", 0, 0, 23, 0, 0, 0, 0, 3, 26 +"d:\WORK\Menui\web_client\src\components\TopBar.js", "JavaScript", 0, 0, 170, 0, 0, 0, 0, 6, 176 +"d:\WORK\Menui\web_client\src\components\UserMenu.js", "JavaScript", 0, 0, 92, 0, 0, 0, 0, 5, 97 +"d:\WORK\Menui\web_client\src\index.js", "JavaScript", 0, 0, 31, 0, 0, 0, 3, 6, 40 +"d:\WORK\Menui\web_client\src\index.scss", "SCSS", 0, 20, 0, 0, 0, 0, 0, 4, 24 +"d:\WORK\Menui\web_client\src\public\i_alcohol.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_card.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_delivery.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_eggs.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_gluten.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_glutenFree.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_lactose.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_lactoseFree.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_peanuts.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_pets.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_seaFood.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_sesame.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_soy.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_vegan.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\i_vegetarian.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\logo_mint.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\public\logo_white.svg", "XML", 0, 0, 0, 1, 0, 0, 0, 0, 1 +"d:\WORK\Menui\web_client\src\reducers\appMode.js", "JavaScript", 0, 0, 17, 0, 0, 0, 0, 2, 19 +"d:\WORK\Menui\web_client\src\reducers\autoComplete.js", "JavaScript", 0, 0, 11, 0, 0, 0, 0, 2, 13 +"d:\WORK\Menui\web_client\src\reducers\data.js", "JavaScript", 0, 0, 149, 0, 0, 0, 0, 3, 152 +"d:\WORK\Menui\web_client\src\reducers\dishes.js", "JavaScript", 0, 0, 13, 0, 0, 0, 0, 2, 15 +"d:\WORK\Menui\web_client\src\reducers\index.js", "JavaScript", 0, 0, 21, 0, 0, 0, 0, 3, 24 +"d:\WORK\Menui\web_client\src\reducers\restaurant.js", "JavaScript", 0, 0, 11, 0, 0, 0, 0, 2, 13 +"d:\WORK\Menui\web_client\src\reducers\searchQuery.js", "JavaScript", 0, 0, 11, 0, 0, 0, 0, 2, 13 +"d:\WORK\Menui\web_client\src\reducers\searchResults.js", "JavaScript", 0, 0, 11, 0, 0, 0, 0, 2, 13 +"d:\WORK\Menui\web_client\src\serviceWorker.js", "JavaScript", 0, 0, 98, 0, 0, 0, 31, 13, 142 +"d:\WORK\Menui\web_client\src\setupTests.js", "JavaScript", 0, 0, 1, 0, 0, 0, 4, 1, 6 +"d:\WORK\Menui\web_client\src\styles\Dialogs.scss", "SCSS", 0, 22, 0, 0, 0, 0, 0, 4, 26 +"d:\WORK\Menui\web_client\src\styles\DishList.scss", "SCSS", 0, 45, 0, 0, 0, 0, 0, 7, 52 +"d:\WORK\Menui\web_client\src\styles\EditRestaurant.scss", "SCSS", 0, 38, 0, 0, 0, 0, 0, 7, 45 +"d:\WORK\Menui\web_client\src\styles\Footer.scss", "SCSS", 0, 8, 0, 0, 0, 0, 0, 2, 10 +"d:\WORK\Menui\web_client\src\styles\NewRestaurant.scss", "SCSS", 0, 49, 0, 0, 0, 0, 0, 7, 56 +"d:\WORK\Menui\web_client\src\styles\Pictograms.scss", "SCSS", 0, 29, 0, 0, 0, 0, 0, 4, 33 +"d:\WORK\Menui\web_client\src\styles\Restaurant.scss", "SCSS", 0, 81, 0, 0, 0, 0, 0, 8, 89 +"d:\WORK\Menui\web_client\src\styles\SearchPanel.scss", "SCSS", 0, 8, 0, 0, 0, 0, 0, 2, 10 +"d:\WORK\Menui\web_client\src\styles\SearchResults.scss", "SCSS", 0, 69, 0, 0, 0, 0, 1, 7, 77 +"d:\WORK\Menui\web_client\src\styles\TopBar.scss", "SCSS", 0, 60, 0, 0, 0, 0, 0, 10, 70 +"Total", "-", 37, 497, 3827, 17, 16, 14826, 82, 370, 19672 \ No newline at end of file diff --git a/.VSCodeCounter/2020-09-24_20-19-08/results.md b/.VSCodeCounter/2020-09-24_20-19-08/results.md new file mode 100644 index 0000000..74bcb0e --- /dev/null +++ b/.VSCodeCounter/2020-09-24_20-19-08/results.md @@ -0,0 +1,37 @@ +# Summary + +Date : 2020-09-24 20:19:08 + +Directory d:\WORK\Menui\web_client + +Total : 89 files, 19220 codes, 82 comments, 370 blanks, all 19672 lines + +[details](details.md) + +## Languages +| language | files | code | comment | blank | total | +| :--- | ---: | ---: | ---: | ---: | ---: | +| JSON | 3 | 14,826 | 0 | 3 | 14,829 | +| JavaScript | 54 | 3,827 | 55 | 263 | 4,145 | +| SCSS | 13 | 497 | 8 | 71 | 576 | +| Markdown | 1 | 37 | 0 | 32 | 69 | +| XML | 17 | 17 | 0 | 0 | 17 | +| HTML | 1 | 16 | 19 | 1 | 36 | + +## Directories +| path | files | code | comment | blank | total | +| :--- | ---: | ---: | ---: | ---: | ---: | +| . | 89 | 19,220 | 82 | 370 | 19,672 | +| public | 2 | 41 | 19 | 2 | 62 | +| src | 84 | 4,341 | 63 | 334 | 4,738 | +| src\actions | 2 | 333 | 0 | 37 | 370 | +| src\components | 39 | 2,996 | 17 | 179 | 3,192 | +| src\components\Dialogs | 9 | 1,743 | 12 | 71 | 1,826 | +| src\components\EditRestaurant | 6 | 140 | 0 | 14 | 154 | +| src\components\Input | 6 | 228 | 0 | 27 | 255 | +| src\components\Output | 14 | 591 | 5 | 51 | 647 | +| src\public | 17 | 17 | 0 | 0 | 17 | +| src\reducers | 8 | 244 | 0 | 18 | 262 | +| src\styles | 10 | 409 | 1 | 58 | 468 | + +[details](details.md) \ No newline at end of file diff --git a/.VSCodeCounter/2020-09-24_20-19-08/results.txt b/.VSCodeCounter/2020-09-24_20-19-08/results.txt new file mode 100644 index 0000000..94615c4 --- /dev/null +++ b/.VSCodeCounter/2020-09-24_20-19-08/results.txt @@ -0,0 +1,129 @@ +Date : 2020-09-24 20:19:08 +Directory : d:\WORK\Menui\web_client +Total : 89 files, 19220 codes, 82 comments, 370 blanks, all 19672 lines + +Languages ++------------+------------+------------+------------+------------+------------+ +| language | files | code | comment | blank | total | ++------------+------------+------------+------------+------------+------------+ +| JSON | 3 | 14,826 | 0 | 3 | 14,829 | +| JavaScript | 54 | 3,827 | 55 | 263 | 4,145 | +| SCSS | 13 | 497 | 8 | 71 | 576 | +| Markdown | 1 | 37 | 0 | 32 | 69 | +| XML | 17 | 17 | 0 | 0 | 17 | +| HTML | 1 | 16 | 19 | 1 | 36 | ++------------+------------+------------+------------+------------+------------+ + +Directories ++--------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+ +| path | files | code | comment | blank | total | ++--------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+ +| . | 89 | 19,220 | 82 | 370 | 19,672 | +| public | 2 | 41 | 19 | 2 | 62 | +| src | 84 | 4,341 | 63 | 334 | 4,738 | +| src\actions | 2 | 333 | 0 | 37 | 370 | +| src\components | 39 | 2,996 | 17 | 179 | 3,192 | +| src\components\Dialogs | 9 | 1,743 | 12 | 71 | 1,826 | +| src\components\EditRestaurant | 6 | 140 | 0 | 14 | 154 | +| src\components\Input | 6 | 228 | 0 | 27 | 255 | +| src\components\Output | 14 | 591 | 5 | 51 | 647 | +| src\public | 17 | 17 | 0 | 0 | 17 | +| src\reducers | 8 | 244 | 0 | 18 | 262 | +| src\styles | 10 | 409 | 1 | 58 | 468 | ++--------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+ + +Files ++--------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+ +| filename | language | code | comment | blank | total | ++--------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+ +| d:\WORK\Menui\web_client\README.md | Markdown | 37 | 0 | 32 | 69 | +| d:\WORK\Menui\web_client\package-lock.json | JSON | 14,753 | 0 | 1 | 14,754 | +| d:\WORK\Menui\web_client\package.json | JSON | 48 | 0 | 1 | 49 | +| d:\WORK\Menui\web_client\public\index.html | HTML | 16 | 19 | 1 | 36 | +| d:\WORK\Menui\web_client\public\manifest.json | JSON | 25 | 0 | 1 | 26 | +| d:\WORK\Menui\web_client\src\App.js | JavaScript | 93 | 0 | 4 | 97 | +| d:\WORK\Menui\web_client\src\App.scss | SCSS | 59 | 0 | 8 | 67 | +| d:\WORK\Menui\web_client\src\Design.scss | SCSS | 9 | 7 | 1 | 17 | +| d:\WORK\Menui\web_client\src\Services.js | JavaScript | 31 | 0 | 5 | 36 | +| d:\WORK\Menui\web_client\src\actions\index.js | JavaScript | 223 | 0 | 20 | 243 | +| d:\WORK\Menui\web_client\src\actions\toggles.js | JavaScript | 110 | 0 | 17 | 127 | +| d:\WORK\Menui\web_client\src\components\Dialogs.js | JavaScript | 9 | 0 | 2 | 11 | +| d:\WORK\Menui\web_client\src\components\Dialogs\EditRestaurant.js | JavaScript | 169 | 1 | 6 | 176 | +| d:\WORK\Menui\web_client\src\components\Dialogs\ForgotPassword.js | JavaScript | 146 | 1 | 8 | 155 | +| d:\WORK\Menui\web_client\src\components\Dialogs\LoginDialog.js | JavaScript | 157 | 1 | 9 | 167 | +| d:\WORK\Menui\web_client\src\components\Dialogs\NewRestaurant.js | JavaScript | 500 | 4 | 16 | 520 | +| d:\WORK\Menui\web_client\src\components\Dialogs\RegisterDialog.js | JavaScript | 328 | 4 | 13 | 345 | +| d:\WORK\Menui\web_client\src\components\Dialogs\Regulamin.js | JavaScript | 52 | 0 | 2 | 54 | +| d:\WORK\Menui\web_client\src\components\Dialogs\RegulaminDialog.js | JavaScript | 65 | 0 | 5 | 70 | +| d:\WORK\Menui\web_client\src\components\Dialogs\ResetPassword.js | JavaScript | 175 | 1 | 9 | 185 | +| d:\WORK\Menui\web_client\src\components\Dialogs\Settings.js | JavaScript | 151 | 0 | 3 | 154 | +| d:\WORK\Menui\web_client\src\components\EditRestaurant\EditRestaurantInfo.js | JavaScript | 100 | 0 | 4 | 104 | +| d:\WORK\Menui\web_client\src\components\EditRestaurant\EditRestaurantLocation.js | JavaScript | 8 | 0 | 2 | 10 | +| d:\WORK\Menui\web_client\src\components\EditRestaurant\EditRestaurantLunch.js | JavaScript | 8 | 0 | 2 | 10 | +| d:\WORK\Menui\web_client\src\components\EditRestaurant\EditRestaurantMenu.js | JavaScript | 8 | 0 | 2 | 10 | +| d:\WORK\Menui\web_client\src\components\EditRestaurant\EditRestaurantPhoto.js | JavaScript | 8 | 0 | 2 | 10 | +| d:\WORK\Menui\web_client\src\components\EditRestaurant\EditRestaurantSubscription.js | JavaScript | 8 | 0 | 2 | 10 | +| d:\WORK\Menui\web_client\src\components\Input\ButtonPrimary.js | JavaScript | 20 | 0 | 3 | 23 | +| d:\WORK\Menui\web_client\src\components\Input\ButtonSecondary.js | JavaScript | 21 | 0 | 3 | 24 | +| d:\WORK\Menui\web_client\src\components\Input\CustomTextInput.js | JavaScript | 35 | 0 | 4 | 39 | +| d:\WORK\Menui\web_client\src\components\Input\ImageUpload.js | JavaScript | 56 | 0 | 6 | 62 | +| d:\WORK\Menui\web_client\src\components\Input\InputGoogleMaps.js | JavaScript | 42 | 0 | 6 | 48 | +| d:\WORK\Menui\web_client\src\components\Input\SearchPanel.js | JavaScript | 54 | 0 | 5 | 59 | +| d:\WORK\Menui\web_client\src\components\Output\CardDish.js | JavaScript | 30 | 3 | 3 | 36 | +| d:\WORK\Menui\web_client\src\components\Output\CardRestaurant.js | JavaScript | 43 | 0 | 4 | 47 | +| d:\WORK\Menui\web_client\src\components\Output\Contact.js | JavaScript | 56 | 0 | 3 | 59 | +| d:\WORK\Menui\web_client\src\components\Output\DishList.js | JavaScript | 34 | 0 | 7 | 41 | +| d:\WORK\Menui\web_client\src\components\Output\DishesCategory.js | JavaScript | 38 | 0 | 4 | 42 | +| d:\WORK\Menui\web_client\src\components\Output\Footer.js | JavaScript | 10 | 0 | 2 | 12 | +| d:\WORK\Menui\web_client\src\components\Output\InfoDialog.js | JavaScript | 36 | 0 | 4 | 40 | +| d:\WORK\Menui\web_client\src\components\Output\ListItemRestaurant.js | JavaScript | 64 | 0 | 4 | 68 | +| d:\WORK\Menui\web_client\src\components\Output\Pictograms.js | JavaScript | 63 | 1 | 4 | 68 | +| d:\WORK\Menui\web_client\src\components\Output\PictogramsSeparate.js | JavaScript | 99 | 1 | 5 | 105 | +| d:\WORK\Menui\web_client\src\components\Output\Restaurant.js | JavaScript | 48 | 0 | 3 | 51 | +| d:\WORK\Menui\web_client\src\components\Output\SearchResults.js | JavaScript | 29 | 0 | 3 | 32 | +| d:\WORK\Menui\web_client\src\components\Output\Social.js | JavaScript | 30 | 0 | 2 | 32 | +| d:\WORK\Menui\web_client\src\components\Output\logoMain.js | JavaScript | 11 | 0 | 3 | 14 | +| d:\WORK\Menui\web_client\src\components\PrivateRoute.js | JavaScript | 23 | 0 | 3 | 26 | +| d:\WORK\Menui\web_client\src\components\TopBar.js | JavaScript | 170 | 0 | 6 | 176 | +| d:\WORK\Menui\web_client\src\components\UserMenu.js | JavaScript | 92 | 0 | 5 | 97 | +| d:\WORK\Menui\web_client\src\index.js | JavaScript | 31 | 3 | 6 | 40 | +| d:\WORK\Menui\web_client\src\index.scss | SCSS | 20 | 0 | 4 | 24 | +| d:\WORK\Menui\web_client\src\public\i_alcohol.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_card.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_delivery.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_eggs.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_gluten.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_glutenFree.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_lactose.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_lactoseFree.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_peanuts.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_pets.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_seaFood.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_sesame.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_soy.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_vegan.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\i_vegetarian.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\logo_mint.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\public\logo_white.svg | XML | 1 | 0 | 0 | 1 | +| d:\WORK\Menui\web_client\src\reducers\appMode.js | JavaScript | 17 | 0 | 2 | 19 | +| d:\WORK\Menui\web_client\src\reducers\autoComplete.js | JavaScript | 11 | 0 | 2 | 13 | +| d:\WORK\Menui\web_client\src\reducers\data.js | JavaScript | 149 | 0 | 3 | 152 | +| d:\WORK\Menui\web_client\src\reducers\dishes.js | JavaScript | 13 | 0 | 2 | 15 | +| d:\WORK\Menui\web_client\src\reducers\index.js | JavaScript | 21 | 0 | 3 | 24 | +| d:\WORK\Menui\web_client\src\reducers\restaurant.js | JavaScript | 11 | 0 | 2 | 13 | +| d:\WORK\Menui\web_client\src\reducers\searchQuery.js | JavaScript | 11 | 0 | 2 | 13 | +| d:\WORK\Menui\web_client\src\reducers\searchResults.js | JavaScript | 11 | 0 | 2 | 13 | +| d:\WORK\Menui\web_client\src\serviceWorker.js | JavaScript | 98 | 31 | 13 | 142 | +| d:\WORK\Menui\web_client\src\setupTests.js | JavaScript | 1 | 4 | 1 | 6 | +| d:\WORK\Menui\web_client\src\styles\Dialogs.scss | SCSS | 22 | 0 | 4 | 26 | +| d:\WORK\Menui\web_client\src\styles\DishList.scss | SCSS | 45 | 0 | 7 | 52 | +| d:\WORK\Menui\web_client\src\styles\EditRestaurant.scss | SCSS | 38 | 0 | 7 | 45 | +| d:\WORK\Menui\web_client\src\styles\Footer.scss | SCSS | 8 | 0 | 2 | 10 | +| d:\WORK\Menui\web_client\src\styles\NewRestaurant.scss | SCSS | 49 | 0 | 7 | 56 | +| d:\WORK\Menui\web_client\src\styles\Pictograms.scss | SCSS | 29 | 0 | 4 | 33 | +| d:\WORK\Menui\web_client\src\styles\Restaurant.scss | SCSS | 81 | 0 | 8 | 89 | +| d:\WORK\Menui\web_client\src\styles\SearchPanel.scss | SCSS | 8 | 0 | 2 | 10 | +| d:\WORK\Menui\web_client\src\styles\SearchResults.scss | SCSS | 69 | 1 | 7 | 77 | +| d:\WORK\Menui\web_client\src\styles\TopBar.scss | SCSS | 60 | 0 | 10 | 70 | +| Total | | 19,220 | 82 | 370 | 19,672 | ++--------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+ \ No newline at end of file diff --git a/src/Services.js b/src/Services.js index 7de2014..da43606 100644 --- a/src/Services.js +++ b/src/Services.js @@ -29,6 +29,19 @@ export function prepareTags(tags) { return outTags; } +export function decodeTags(tags) { + let outTags = []; + if (tags.cardPayments === true) outTags.push("Płatność kartą"); + if (tags.petFriendly === true) outTags.push("Lubimy zwierzaki"); + if (tags.glutenFree === true) outTags.push("Bezglutenowe"); + if (tags.vegan === true) outTags.push("Wegańskie"); + if (tags.vegetarian === true) outTags.push("Wegetariańskie"); + if (tags.alcohol === true) outTags.push("Podajemy alkohol"); + if (tags.delivery === true) outTags.push("Dowozimy"); + + return outTags; +} + export const openInNewTab = (url) => { const newWindow = window.open(url, "_blank", "noopener,noreferrer"); if (newWindow) newWindow.opener = null; diff --git a/src/components/Dialogs/EditRestaurant.js b/src/components/Dialogs/EditRestaurant.js index ce388e8..abdb79e 100644 --- a/src/components/Dialogs/EditRestaurant.js +++ b/src/components/Dialogs/EditRestaurant.js @@ -14,6 +14,13 @@ import RestaurantMenuIcon from "@material-ui/icons/RestaurantMenu"; import FastfoodIcon from "@material-ui/icons/Fastfood"; import AddIcon from "@material-ui/icons/Add"; import Badge from "@material-ui/core/Badge"; +//-------------- +import EditRestaurantInfo from "../EditRestaurant/EditRestaurantInfo"; +import EditRestaurantLocation from "../EditRestaurant/EditRestaurantLocation"; +import EditRestaurantLunch from "../EditRestaurant/EditRestaurantLunch"; +import EditRestaurantMenu from "../EditRestaurant/EditRestaurantMenu"; +import EditRestaurantPhoto from "../EditRestaurant/EditRestaurantPhoto"; +import EditRestaurantSubscription from "../EditRestaurant/EditRestaurantSubscription"; const useStyles = makeStyles((theme) => ({ main: { @@ -31,7 +38,7 @@ const useStyles = makeStyles((theme) => ({ }, secondary: { "& .MuiListItemText-secondary": { - color: "#7b7b7b", + color: "#868686", fontSize: "13px", }, }, @@ -103,6 +110,7 @@ export default function EditRestaurant(props) { @@ -156,36 +164,12 @@ export default function EditRestaurant(props) { - {tab === 0 && ( -
-

Informacje

-
- )} - {tab === 1 && ( -
-

Subskrypcja

-
- )} - {tab === 2 && ( -
-

Zdjęcie

-
- )} - {tab === 3 && ( -
-

Lokalizacja

-
- )} - {tab === 4 && ( -
-

Menu

-
- )} - {tab === 5 && ( -
-

Lunch menu

-
- )} + {tab === 0 && } + {tab === 1 && } + {tab === 2 && } + {tab === 3 && } + {tab === 4 && } + {tab === 5 && } ); } diff --git a/src/components/Dialogs/NewRestaurant.js b/src/components/Dialogs/NewRestaurant.js index 469510a..c13a28b 100644 --- a/src/components/Dialogs/NewRestaurant.js +++ b/src/components/Dialogs/NewRestaurant.js @@ -22,6 +22,7 @@ import InfoDialog from "../Output/InfoDialog"; import { prepareTags } from "../../Services.js"; import axios from "axios"; import { useSelector } from "react-redux"; +import InputWorkingHours from "../Input/InputWorkingHours"; // ICONS import FastfoodIcon from "@material-ui/icons/Fastfood"; import LocationCityIcon from "@material-ui/icons/LocationCity"; @@ -35,9 +36,11 @@ import ButtonPrimary from "../Input/ButtonPrimary"; const useStyles = makeStyles((theme) => ({ root: { + margin: "auto", textAlign: "center", + maxHeight: "700px", "& .MuiPaper-root": { - minWidth: "30%", + width: "auto", backgroundColor: "#262626", color: "#bbbbbb", }, @@ -70,15 +73,6 @@ const useStyles = makeStyles((theme) => ({ color: "#bbbbbb", }, }, - timePicker: { - margin: theme.spacing(2), - "& .MuiInputBase-root": { - color: "#bbbbbb", - }, - "& .MuiInputLabel-root": { - color: "#bbbbbb", - }, - }, stepLabel: { "& .MuiStepLabel-label": { color: "#bbbbbb", @@ -97,14 +91,23 @@ export default function NewRestaurant() { coordinates: [52.354293, 19.42377], placesId: "", imgURL: "", - hoursFrom: "07:00", - hoursTo: "23:00", + workingHours: { + pn: "8:00 - 22:00", + wt: "8:00 - 22:00", + sr: "8:00 - 22:00", + cz: "8:00 - 22:00", + pt: "8:00 - 22:00", + sb: "8:00 - 22:00", + nd: "8:00 - 22:00", + }, description: "", tags: [], phone: "", - facebook: "", - instagram: "", - www: "", + links: { + facebook: "", + instagram: "", + www: "", + }, nameError: false, cityError: false, adressError: false, @@ -141,12 +144,10 @@ export default function NewRestaurant() { coordinates: state.coordinates, placesId: state.placesId, imgURL: state.imgURL, - workingHours: `${state.hoursFrom} - ${state.hoursTo}`, + workingHours: state.workingHours, description: state.description, tags: formattedTags, - facebook: state.facebook, - instagram: state.instagram, - www: state.www, + links: state.links, phone: state.phone, hidden: false, }; @@ -345,37 +346,11 @@ export default function NewRestaurant() { ), }} /> - - setState({ ...state, hoursFrom: event.target.value }) + + setState({ ...state, workingHours: hours }) } - variant="outlined" - value={state.hoursFrom} - className={styles.timePicker} - InputLabelProps={{ - shrink: true, - }} - inputProps={{ - step: 300, // 5 min - }} - /> - - setState({ ...state, hoursTo: event.target.value }) - } - variant="outlined" - value={state.hoursTo} - className={styles.timePicker} - InputLabelProps={{ - shrink: true, - }} - inputProps={{ - step: 300, // 5 min - }} />
- setState({ ...state, facebook: event.target.value }) + setState({ + ...state, + links: { ...state.links, facebook: event.target.value }, + }) } InputProps={{ startAdornment: ( @@ -450,9 +428,12 @@ export default function NewRestaurant() { className={styles.textInput} label="Instagram" variant="outlined" - value={state.instagram} + value={state.links.instagram} onChange={(event) => - setState({ ...state, instagram: event.target.value }) + setState({ + ...state, + links: { ...state.links, instagram: event.target.value }, + }) } InputProps={{ startAdornment: ( @@ -466,9 +447,12 @@ export default function NewRestaurant() { className={styles.textInput} label="www" variant="outlined" - value={state.www} + value={state.links.www} onChange={(event) => - setState({ ...state, www: event.target.value }) + setState({ + ...state, + links: { ...state.links, www: event.target.value }, + }) } InputProps={{ startAdornment: ( @@ -505,13 +489,15 @@ export default function NewRestaurant() { /> )} - {activeStep !== 0 && ( - - )} - +
+ {activeStep !== 0 && ( + + )} + +
diff --git a/src/components/EditRestaurant/EditRestaurantInfo.js b/src/components/EditRestaurant/EditRestaurantInfo.js new file mode 100644 index 0000000..8a3235e --- /dev/null +++ b/src/components/EditRestaurant/EditRestaurantInfo.js @@ -0,0 +1,240 @@ +import React, { useState } from "react"; +import ButtonPrimary from "../Input/ButtonPrimary"; +import ButtonSecondary from "../Input/ButtonSecondary"; +import TextField from "@material-ui/core/TextField"; +import { makeStyles } from "@material-ui/core/styles"; +import InputWorkingHours from "../Input/InputWorkingHours"; +import Autocomplete from "@material-ui/lab/Autocomplete"; +import InputAdornment from "@material-ui/core/InputAdornment"; +import PhoneIcon from "@material-ui/icons/Phone"; +import FacebookIcon from "@material-ui/icons/Facebook"; +import InstagramIcon from "@material-ui/icons/Instagram"; +import LanguageIcon from "@material-ui/icons/Language"; +import Divider from "@material-ui/core/Divider"; +import { decodeTags } from "../../Services"; + +const useStyles = makeStyles((theme) => ({ + textInput: { + margin: theme.spacing(2), + "& .MuiInputBase-root": { + color: "#bbbbbb", + }, + "& .MuiInputLabel-root": { + color: "#bbbbbb", + }, + }, + textInputFullWidth: { + marginTop: theme.spacing(2), + marginBottom: theme.spacing(2), + "& .MuiInputBase-root": { + color: "#bbbbbb", + }, + "& .MuiInputLabel-root": { + color: "#bbbbbb", + }, + "$ .MuiFormHelperText-root": { + color: "#bbbbbb", + }, + }, +})); + +const calculateCharLeft = (from) => { + return 400 - from.length; +}; + +export default function EditRestaurantInfo(props) { + const initialState = { + name: props.restaurant.name, + city: props.restaurant.city, + adress: props.restaurant.adress, + description: props.restaurant.description, + phone: props.restaurant.phone, + hidden: props.restaurant.hidden, + links: props.restaurant.links, + tags: decodeTags(props.restaurant.tags), + workingHours: props.restaurant.workingHours, + charleft: calculateCharLeft(props.restaurant.description), + }; + const [state, setState] = useState(initialState); + const styles = useStyles(); + const handleDescriptionChange = (event) => { + let stringLength = event.target.value.length; + let charleft = 400 - stringLength; + setState({ ...state, description: event.target.value, charLeft: charleft }); + }; + const availableTags = [ + "Płatność kartą", + "Lubimy zwierzaki", + "Bezglutenowe", + "Wegańskie", + "Wegetariańskie", + "Podajemy alkohol", + "Dowozimy", + ]; + + return ( +
+
+
+

Podstawowe dane

+ +
+
+ + setState({ ...state, name: event.target.value }) + } + InputLabelProps={{ shrink: true }} + label="Nazwa lokalu" + variant="outlined" + /> +
+ + setState({ ...state, city: event.target.value })} + InputLabelProps={{ shrink: true }} + label="Miasto" + variant="outlined" + /> + + setState({ ...state, adress: event.target.value }) + } + InputLabelProps={{ shrink: true }} + label="Adres" + variant="outlined" + /> +
+ + setState({ ...state, tags: values })} + renderInput={(params) => ( + + )} + /> +
+
+

Godziny otwarcia

+ +
+ setState({ ...state, workingHours: hours })} + hours={state.workingHours} + /> +
+

Dane kontaktowe

+ +
+ + setState({ ...state, phone: event.target.value }) + } + InputProps={{ + startAdornment: ( + + + + ), + }} + /> + + setState({ + ...state, + links: { ...state.links, facebook: event.target.value }, + }) + } + InputProps={{ + startAdornment: ( + + + + ), + }} + /> + + setState({ + ...state, + links: { ...state.links, instagram: event.target.value }, + }) + } + InputProps={{ + startAdornment: ( + + + + ), + }} + /> + + setState({ + ...state, + links: { ...state.links, www: event.target.value }, + }) + } + InputProps={{ + startAdornment: ( + + + + ), + }} + /> +
+
+ + +
+
+ ); +} diff --git a/src/components/EditRestaurant/EditRestaurantLocation.js b/src/components/EditRestaurant/EditRestaurantLocation.js new file mode 100644 index 0000000..e4fb2c5 --- /dev/null +++ b/src/components/EditRestaurant/EditRestaurantLocation.js @@ -0,0 +1,9 @@ +import React from "react"; + +export default function EditRestaurantLocation(props) { + return ( +
+

Localization

+
+ ); +} diff --git a/src/components/EditRestaurant/EditRestaurantLunch.js b/src/components/EditRestaurant/EditRestaurantLunch.js new file mode 100644 index 0000000..3993e3f --- /dev/null +++ b/src/components/EditRestaurant/EditRestaurantLunch.js @@ -0,0 +1,9 @@ +import React from "react"; + +export default function EditRestaurantLunch(props) { + return ( +
+

Lunch

+
+ ); +} diff --git a/src/components/EditRestaurant/EditRestaurantMenu.js b/src/components/EditRestaurant/EditRestaurantMenu.js new file mode 100644 index 0000000..149df41 --- /dev/null +++ b/src/components/EditRestaurant/EditRestaurantMenu.js @@ -0,0 +1,9 @@ +import React from "react"; + +export default function EditRestaurantMenu(props) { + return ( +
+

Menu

+
+ ); +} diff --git a/src/components/EditRestaurant/EditRestaurantPhoto.js b/src/components/EditRestaurant/EditRestaurantPhoto.js new file mode 100644 index 0000000..72e9f17 --- /dev/null +++ b/src/components/EditRestaurant/EditRestaurantPhoto.js @@ -0,0 +1,9 @@ +import React from "react"; + +export default function EditRestaurantPhoto(props) { + return ( +
+

Phottttto

+
+ ); +} diff --git a/src/components/EditRestaurant/EditRestaurantSubscription.js b/src/components/EditRestaurant/EditRestaurantSubscription.js new file mode 100644 index 0000000..c296558 --- /dev/null +++ b/src/components/EditRestaurant/EditRestaurantSubscription.js @@ -0,0 +1,9 @@ +import React from "react"; + +export default function EditRestaurantSubscription(props) { + return ( +
+

Subscription

+
+ ); +} diff --git a/src/components/Input/InputWorkingHours.js b/src/components/Input/InputWorkingHours.js new file mode 100644 index 0000000..4db7fcb --- /dev/null +++ b/src/components/Input/InputWorkingHours.js @@ -0,0 +1,53 @@ +import React from "react"; +import InputWorkingHoursSingle from "./InputWorkingHoursSingle"; + +export default function InputWorkingHours(props) { + return ( +
+
+ props.setHours({ ...props.hours, pn: value })} + day="Poniedziałek" + /> + props.setHours({ ...props.hours, wt: value })} + day="Wtorek" + /> + props.setHours({ ...props.hours, sr: value })} + day="Środa" + /> + props.setHours({ ...props.hours, cz: value })} + day="Czwartek" + /> + props.setHours({ ...props.hours, pt: value })} + day="Piątek" + /> + props.setHours({ ...props.hours, sb: value })} + day="Sobota" + /> + props.setHours({ ...props.hours, nd: value })} + day="Niedziela" + /> +
+
+ ); +} diff --git a/src/components/Input/InputWorkingHoursSingle.js b/src/components/Input/InputWorkingHoursSingle.js new file mode 100644 index 0000000..2151847 --- /dev/null +++ b/src/components/Input/InputWorkingHoursSingle.js @@ -0,0 +1,61 @@ +import React from "react"; +import TextField from "@material-ui/core/TextField"; +import Checkbox from "@material-ui/core/Checkbox"; +import FormControlLabel from "@material-ui/core/FormControlLabel"; +import { makeStyles } from "@material-ui/core/styles"; + +const useStyles = makeStyles((theme) => ({ + timePicker: { + "& .MuiInputBase-root": { + color: "#bbbbbb", + }, + "& .MuiInputLabel-root": { + color: "#bbbbbb", + }, + }, + checkbox: { + marginLeft: theme.spacing(1), + "& .MuiFormControlLabel-label": { + color: "#979797", + fontSize: "14px", + }, + }, +})); + +export default function InputWorkingHoursSingle(props) { + const handleChangeValue = (event) => { + props.changeValue(event.target.value); + }; + const handleCheckbox = () => { + if (!props.nieczynne) { + props.changeValue(""); + } else { + props.changeValue("8:00 - 22:00"); + } + }; + + const classes = useStyles(); + return ( +
+
{props.day}
+ + + } + label="Zamknięte" + /> +
+ ); +} diff --git a/src/styles/EditRestaurant.scss b/src/styles/EditRestaurant.scss index d656f00..ba962fb 100644 --- a/src/styles/EditRestaurant.scss +++ b/src/styles/EditRestaurant.scss @@ -21,7 +21,51 @@ } .editRestaurant-tab { + padding: 16px; display: flex; flex-flow: column; + justify-content: space-between; width: 100%; + max-height: 600px; + overflow: auto; +} + +.editRestaurant-doubleColumn { + display: grid; + grid-template-columns: 1fr 1fr; +} + +.editRestaurant-bottom { + align-self: flex-end; +} + +.editRestaurant-fullWidth { + padding: 0px 16px 0px 16px; + grid-column-start: 1; + grid-column-end: 3; +} + +.editRestaurant-sectiontitle { + grid-column-start: 1; + grid-column-end: 3; + margin-bottom: 16px; +} + +.workingHours-container { + border: 1px solid #1f1f1f; + border-radius: 6px; + padding-top: 12px; + padding-bottom: 12px; + padding-left: 8px; +} + +.workingHours-day { + display: grid; + grid-template-columns: 1fr 3fr 1fr; + h5 { + align-self: center; + font-weight: 400; + font-size: 16px; + margin: auto 6px auto 6px; + } } diff --git a/src/styles/NewRestaurant.scss b/src/styles/NewRestaurant.scss index ddc3deb..78dd73c 100644 --- a/src/styles/NewRestaurant.scss +++ b/src/styles/NewRestaurant.scss @@ -53,3 +53,7 @@ .input-image + label:hover { background-color: #fd9800; } + +.newRestaurant-bottom { + display: inline-block; +}