From c06b93f6ad855d8182d4d46c13aa71113043c6ec Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Sun, 1 Dec 2024 22:26:41 +0200 Subject: [PATCH] warehouse locations --- components/location/LocationForm.js | 60 ++++++++++++++++-- components/sidebar.tsx | 23 +++++-- components/sidemenuData.js | 5 ++ content/i18n/bg.json | 3 +- pages/cart/locations/[id].tsx | 60 ++++++++++++++---- .../migration.sql | 2 + prisma/schema.prisma | 1 + public/content/warehouse/1.jpg | Bin 0 -> 239199 bytes public/content/warehouse/2.jpg | Bin 0 -> 3464112 bytes public/content/warehouse/3.jpg | Bin 0 -> 2614736 bytes public/content/warehouse/4.jpg | Bin 0 -> 2433065 bytes public/content/warehouse/5.jpg | Bin 0 -> 1973980 bytes public/content/warehouse/6.jpg | Bin 0 -> 882423 bytes 13 files changed, 129 insertions(+), 25 deletions(-) create mode 100644 prisma/migrations/20241201094139_location_on_main_menu/migration.sql create mode 100644 public/content/warehouse/1.jpg create mode 100644 public/content/warehouse/2.jpg create mode 100644 public/content/warehouse/3.jpg create mode 100644 public/content/warehouse/4.jpg create mode 100644 public/content/warehouse/5.jpg create mode 100644 public/content/warehouse/6.jpg diff --git a/components/location/LocationForm.js b/components/location/LocationForm.js index be36371..90fa4dc 100644 --- a/components/location/LocationForm.js +++ b/components/location/LocationForm.js @@ -9,6 +9,7 @@ import FileUploadWithPreview from 'components/FileUploadWithPreview '; import ProtectedRoute, { serverSideAuth } from "../../components/protectedRoute"; import { UserRole } from "@prisma/client"; +import { Input } from '@mui/base'; const common = require('src/helpers/common'); @@ -67,6 +68,7 @@ export default function LocationForm() { address: "", isActive: true, }); + const [isRawHtml, setIsRawHtml] = useState(false); // const [isEdit, setIsEdit] = useState(false); @@ -178,6 +180,13 @@ export default function LocationForm() { + {/* is on main menu */} +
+
+ + +
+
{/* backupLocation */}
@@ -238,12 +247,50 @@ export default function LocationForm() { - + + + +
+ + {isRawHtml && <> + +