Index: anch
===================================================================
--- branch	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,126 +1,0 @@
-See 'git help <command>' to read about a specific subcommand
-
-Main Porcelain Commands
-   add                     Add file contents to the index
-   am                      Apply a series of patches from a mailbox
-   archive                 Create an archive of files from a named tree
-   bisect                  Use binary search to find the commit that introduced a bug
-   branch                  List, create, or delete branches
-   bundle                  Move objects and refs by archive
-   checkout                Switch branches or restore working tree files
-   cherry-pick             Apply the changes introduced by some existing commits
-   citool                  Graphical alternative to git-commit
-   clean                   Remove untracked files from the working tree
-   clone                   Clone a repository into a new directory
-   commit                  Record changes to the repository
-   describe                Give an object a human readable name based on an available ref
-   diff                    Show changes between commits, commit and working tree, etc
-   fetch                   Download objects and refs from another repository
-   format-patch            Prepare patches for e-mail submission
-   gc                      Cleanup unnecessary files and optimize the local repository
-   gitk                    The Git repository browser
-   grep                    Print lines matching a pattern
-   gui                     A portable graphical interface to Git
-   init                    Create an empty Git repository or reinitialize an existing one
-   log                     Show commit logs
-   maintenance             Run tasks to optimize Git repository data
-   merge                   Join two or more development histories together
-   mv                      Move or rename a file, a directory, or a symlink
-   notes                   Add or inspect object notes
-   pull                    Fetch from and integrate with another repository or a local branch
-   push                    Update remote refs along with associated objects
-   range-diff              Compare two commit ranges (e.g. two versions of a branch)
-   rebase                  Reapply commits on top of another base tip
-   reset                   Reset current HEAD to the specified state
-   restore                 Restore working tree files
-   revert                  Revert some existing commits
-   rm                      Remove files from the working tree and from the index
-   scalar                  A tool for managing large Git repositories
-   shortlog                Summarize 'git log' output
-   show                    Show various types of objects
-   sparse-checkout         Reduce your working tree to a subset of tracked files
-   stash                   Stash the changes in a dirty working directory away
-   status                  Show the working tree status
-   submodule               Initialize, update or inspect submodules
-   switch                  Switch branches
-   tag                     Create, list, delete or verify a tag object signed with GPG
-   worktree                Manage multiple working trees
-
-Ancillary Commands / Manipulators
-   config                  Get and set repository or global options
-   fast-export             Git data exporter
-   fast-import             Backend for fast Git data importers
-   filter-branch           Rewrite branches
-   mergetool               Run merge conflict resolution tools to resolve merge conflicts
-   pack-refs               Pack heads and tags for efficient repository access
-   prune                   Prune all unreachable objects from the object database
-   reflog                  Manage reflog information
-   remote                  Manage set of tracked repositories
-   repack                  Pack unpacked objects in a repository
-   replace                 Create, list, delete refs to replace objects
-
-Ancillary Commands / Interrogators
-   annotate                Annotate file lines with commit information
-   blame                   Show what revision and author last modified each line of a file
-   bugreport               Collect information for user to file a bug report
-   count-objects           Count unpacked number of objects and their disk consumption
-   diagnose                Generate a zip archive of diagnostic information
-   difftool                Show changes using common diff tools
-   fsck                    Verifies the connectivity and validity of the objects in the database
-   gitweb                  Git web interface (web frontend to Git repositories)
-   help                    Display help information about Git
-   instaweb                Instantly browse your working repository in gitweb
-   merge-tree              Perform merge without touching index or working tree
-   rerere                  Reuse recorded resolution of conflicted merges
-   show-branch             Show branches and their commits
-   verify-commit           Check the GPG signature of commits
-   verify-tag              Check the GPG signature of tags
-   version                 Display version information about Git
-   whatchanged             Show logs with difference each commit introduces
-
-Interacting with Others
-   archimport              Import a GNU Arch repository into Git
-   cvsexportcommit         Export a single commit to a CVS checkout
-   cvsimport               Salvage your data out of another SCM people love to hate
-   cvsserver               A CVS server emulator for Git
-   imap-send               Send a collection of patches from stdin to an IMAP folder
-   p4                      Import from and submit to Perforce repositories
-   quiltimport             Applies a quilt patchset onto the current branch
-   request-pull            Generates a summary of pending changes
-   send-email              Send a collection of patches as emails
-   svn                     Bidirectional operation between a Subversion repository and Git
-
-Low-level Commands / Manipulators
-   apply                   Apply a patch to files and/or to the index
-   checkout-index          Copy files from the index to the working tree
-   commit-graph            Write and verify Git commit-graph files
-   commit-tree             Create a new commit object
-   hash-object             Compute object ID and optionally creates a blob from a file
-   index-pack              Build pack index file for an existing packed archive
-   merge-file              Run a three-way file merge
-   merge-index             Run a merge for files needing merging
-   mktag                   Creates a tag object with extra validation
-   mktree                  Build a tree-object from ls-tree formatted text
-   multi-pack-index        Write and verify multi-pack-indexes
-   pack-objects            Create a packed archive of objects
-   prune-packed            Remove extra objects that are already in pack files
-   read-tree               Reads tree information into the index
-   symbolic-ref            Read, modify and delete symbolic refs
-   unpack-objects          Unpack objects from a packed archive
-   update-index            Register file contents in the working tree to the index
-   update-ref              Update the object name stored in a ref safely
-   write-tree              Create a tree object from the current index
-
-Low-level Commands / Interrogators
-   cat-file                Provide content or type and size information for repository objects
-   cherry                  Find commits yet to be applied to upstream
-   diff-files              Compares files in the working tree and the index
-   diff-index              Compare a tree to the working tree or index
-   diff-tree               Compares the content and mode of blobs found via two tree objects
-   for-each-ref            Output information on each ref
-   for-each-repo           Run a Git command on a list of repositories
-   get-tar-commit-id       Extract commit ID from an archive created using git-archive
-   ls-files                Show information about files in the index and the working tree
-   ls-remote               List references in a remote repository
-   ls-tree                 List the contents of a tree object
-   merge-base     
Index: my-react-app/package-lock.json
===================================================================
--- my-react-app/package-lock.json	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/package-lock.json	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -14,7 +14,5 @@
         "axios": "^1.6.7",
         "bootstrap": "^5.3.2",
-        "jwt-decode": "^4.0.0",
         "react": "^18.2.0",
-        "react-bootstrap-datetimepicker": "^0.0.22",
         "react-dom": "^18.2.0",
         "react-router-dom": "^6.22.0",
@@ -5770,18 +5768,4 @@
       }
     },
-    "node_modules/babel-runtime": {
-      "version": "5.8.38",
-      "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-5.8.38.tgz",
-      "integrity": "sha512-KpgoA8VE/pMmNCrnEeeXqFG24TIH11Z3ZaimIhJWsin8EbfZy3WzFKUTIan10ZIDgRVvi9EkLbruJElJC9dRlg==",
-      "dependencies": {
-        "core-js": "^1.0.0"
-      }
-    },
-    "node_modules/babel-runtime/node_modules/core-js": {
-      "version": "1.2.7",
-      "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
-      "integrity": "sha512-ZiPp9pZlgxpWRu0M+YWbm6+aQ84XEfH1JRXvfOc/fILWI0VKhLC2LX13X1NYq4fULzLMq7Hfh43CSo2/aIaUPA==",
-      "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js."
-    },
     "node_modules/balanced-match": {
       "version": "1.0.2",
@@ -6182,9 +6166,4 @@
       "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz",
       "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ=="
-    },
-    "node_modules/classnames": {
-      "version": "2.5.1",
-      "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz",
-      "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow=="
     },
     "node_modules/clean-css": {
@@ -12289,12 +12268,4 @@
       }
     },
-    "node_modules/jwt-decode": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz",
-      "integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==",
-      "engines": {
-        "node": ">=18"
-      }
-    },
     "node_modules/keyv": {
       "version": "4.5.4",
@@ -12742,12 +12713,4 @@
       "bin": {
         "mkdirp": "bin/cmd.js"
-      }
-    },
-    "node_modules/moment": {
-      "version": "2.30.1",
-      "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
-      "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
-      "engines": {
-        "node": "*"
       }
     },
@@ -14923,17 +14886,4 @@
       "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
     },
-    "node_modules/react-bootstrap-datetimepicker": {
-      "version": "0.0.22",
-      "resolved": "https://registry.npmjs.org/react-bootstrap-datetimepicker/-/react-bootstrap-datetimepicker-0.0.22.tgz",
-      "integrity": "sha512-1va2drwnGtjBtK38TKHS7cJ2lYjjPDYOJwbUaam1ctpdxhPbYLyjg8ahrflLjqIQQCsUTmPJg0W4NopbUoGKlw==",
-      "dependencies": {
-        "babel-runtime": "^5.6.18",
-        "classnames": "^2.1.2",
-        "moment": "^2.8.2"
-      },
-      "peerDependencies": {
-        "react": ">=0.14"
-      }
-    },
     "node_modules/react-dev-utils": {
       "version": "12.0.1",
Index: my-react-app/package.json
===================================================================
--- my-react-app/package.json	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/package.json	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -9,7 +9,5 @@
     "axios": "^1.6.7",
     "bootstrap": "^5.3.2",
-    "jwt-decode": "^4.0.0",
     "react": "^18.2.0",
-    "react-bootstrap-datetimepicker": "^0.0.22",
     "react-dom": "^18.2.0",
     "react-router-dom": "^6.22.0",
Index: my-react-app/src/App.js
===================================================================
--- my-react-app/src/App.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/src/App.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,6 +1,8 @@
-import {BrowserRouter as Router, Navigate, Route, Routes, useNavigate} from 'react-router-dom';
-
+import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
+import Customers from './components/Customers';
 import Layout from "./components/Layout";
-import React, {useContext, useEffect, useState} from 'react';
+import React, {useEffect, useState} from 'react';
+import CustomerFormContainer from "./components/CustomerFormContainer";
+import CustomerDetails from "./components/CustomerDetails";
 import ErrorPage from "./components/ErrorPage";
 import Restaurants from "./components/Restaurants";
@@ -9,28 +11,6 @@
 import ReservationConfirmation from "./components/ReservationConfirmation";
 import ReservationEdit from "./components/ReservationEdit";
-import axios from "axios";
-import { CuisineContext } from './components/CuisineContext';
-import RestaurantInfo from "./components/RestaurantInfo";
-import AuthForm from "./components/AuthForm";
-import AppContent from "./components/AppContent";
-import ReservationHistory from "./components/ReservationHistory";
-import AuthContent from "./components/AuthContent";
-import MenuList from "./components/MenuList";
-import ReadOnlyMenuList from "./components/ReadOnlyMenuList";
-
-const ProtectedRoute = ({ element, isAuthenticated }) => {
-    return isAuthenticated ? element : <Navigate to="/login" />;
-};
 
 const App = () => {
-    const [isAuthenticated, setIsAuthenticated] = useState(false);
-
-    useEffect(() => {
-        const token = localStorage.getItem('token');
-        if (token) {
-            setIsAuthenticated(true);
-        }
-    }, []);
-
     return (
         <Router>
@@ -38,24 +18,23 @@
                 <Routes>
                     <Route path="/" element={<Home />} />
-                    <Route path="/restaurants" element={<ProtectedRoute isAuthenticated={isAuthenticated} element={<Restaurants />} />} />
-                    <Route path="/restaurants/:id" element={<ProtectedRoute isAuthenticated={isAuthenticated} element={<RestaurantDetails />} />} />
-                    <Route path="/reservations" element={<ProtectedRoute isAuthenticated={isAuthenticated} element={<Reservations />} />} />
-                    <Route path="/reservationConfirmation/:tableNumber/:timeSlot/:restaurantId" element={<ProtectedRoute isAuthenticated={isAuthenticated} element={<ReservationConfirmation />} />} />
-                    <Route path="/reservations/reservationEdit/:reservationId" element={<ProtectedRoute isAuthenticated={isAuthenticated} element={<ReservationEdit />} />} />
-                    <Route path="/reservations-past" element={<ProtectedRoute isAuthenticated={isAuthenticated} element={<ReservationHistory />} />} />
-                    <Route path="/login" element={<AuthForm setIsAuthenticated={setIsAuthenticated} />} />
-
-                    <Route path="/error" element={<ErrorPage />} />
+                    <Route path="/customers" element={<Customers />} />
+                    <Route path="/customers/add" element={<CustomerFormContainer/>} />
+                    <Route path="/customers/:id" element={<CustomerDetails />} />
+                    <Route path="/customers/edit/:id" element={<CustomerFormContainer/>} />
+                    <Route path="/restaurants" element={<Restaurants />} />
+                    <Route path="/restaurants/:id" element={<RestaurantDetails />} />
+                    <Route path="/reservations" element={<Reservations />} />
+                    <Route path="/reservationConfirmation/:tableNumber/:timeSlot/:restaurantId" element={<ReservationConfirmation />} />
+                    <Route path="/reservations/reservationEdit/:reservationId" element={<ReservationEdit />} />
+                    <Route path="/error" element={<ErrorPage/>}/>
                 </Routes>
             </Layout>
         </Router>
     );
-};
+}
 
 
 const Home = () => {
-    const navigate = useNavigate();
-
-    const todayDate = new Date().toISOString().split('T')[0];
+    const todayDate = new Date().toISOString().split('T')[0]; // Get today's date in 'YYYY-MM-DD' format
 
     const [date, setDate] = useState(todayDate);
@@ -64,10 +43,4 @@
     const [searchValue, setSearchValue] = useState('');
     const [timeSlots, setTimeSlots] = useState([]);
-    let [filteredRestaurants, setFilteredRestaurants] = useState([]);
-
-    const cuisineTypes = useContext(CuisineContext);
-    const [showCuisineSearch, setShowCuisineSearch] = useState(true);
-
-    const [formatedDateTime, setFormatedDateTime] = useState('')
 
     useEffect(() => {
@@ -77,24 +50,15 @@
             const isToday = selectedDate.toDateString() === today.toDateString();
 
-            let startHour = 9;
-            let startMinute = 0;
-            if (isToday) {
-                const currentHour = today.getHours();
-                const currentMinute = today.getMinutes();
-                if (currentHour > 9 || (currentHour === 9 && currentMinute >= 0)) {
-                    startHour = currentHour;
-                    startMinute = Math.ceil(currentMinute / 15) * 15;
-                }
-            }
+            const startHour = isToday ? today.getHours() : 9;
+            const startMinute = isToday ? Math.ceil(today.getMinutes() / 15) * 15 : 0;
 
-            const startTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), selectedDate.getDate(), startHour, startMinute);
+            let currentTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), selectedDate.getDate(), startHour, startMinute);
             const endTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), selectedDate.getDate(), 23, 30);
 
             const slots = [];
-            let currentTime = new Date(startTime);
             while (currentTime <= endTime) {
                 const option = currentTime.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false });
                 slots.push(option);
-                currentTime.setMinutes(currentTime.getMinutes() + 15);
+                currentTime.setMinutes(currentTime.getMinutes() + 15); // Increment by 15 minutes
             }
 
@@ -102,8 +66,4 @@
         }
     }, [date]);
-
-    const handleGoToRestaurant = (restaurantId) => {
-        navigate(`/restaurants/${restaurantId}`);
-    };
 
     const handleDateChange = (e) => {
@@ -123,168 +83,22 @@
     };
 
-    const handleSubmit = async (e) => {
+    const handleSubmit = (e) => {
         e.preventDefault();
-        const [year, month, day] = date.split("-");
-        let formattedDateTime;
-
-        if (selectedTime) {
-            const [selectedHours, selectedMinutes] = selectedTime.split(":");
-            if (!isNaN(selectedHours) && !isNaN(selectedMinutes)) {
-                const dateTime = new Date(Date.UTC(year, month - 1, day, selectedHours, selectedMinutes));
-                formattedDateTime = dateTime.toISOString().slice(0, 16).replace('T', ' ');
-                setFormatedDateTime(formattedDateTime);
-            }
-        } else {
-            const now = new Date();
-            const currentTime = now.getHours() * 60 + now.getMinutes();
-            const nextSlot = timeSlots.find(slot => {
-                const [hours, minutes] = slot.split(":");
-                const slotTime = parseInt(hours) * 60 + parseInt(minutes);
-                return slotTime > currentTime;
-            });
-
-            formattedDateTime = nextSlot ? `${date} ${nextSlot}` : `${date} ${timeSlots[0]}`;
-        }
-
-        const data = {
-            dateTime: formattedDateTime,
-            partySize: numPeople,
-            search: searchValue
-        };
-
-        try {
-            const response = await axios.post('http://localhost:8081/api/search', data);
-            const filteredRestaurants = response.data;
-            setFilteredRestaurants(filteredRestaurants);
-            console.log(filteredRestaurants)
-            setShowCuisineSearch(false);
-        } catch (error) {
-            console.error('Error:', error);
-        }
+        console.log(date);
+        console.log(selectedTime);
+        console.log(numPeople);
+        console.log(searchValue);
     };
 
-    const handleSearchByCuisine = async (cuisine) => {
-        const cuisineName = cuisine.replace('Searching by cuisine: ', '');
-        try {
-            const response = await axios.post(`http://localhost:8081/api/search/shortcut/${cuisineName}`, cuisineName);
-            setFilteredRestaurants(response.data)
-            console.log(response.data)
-        } catch (error) {
-            console.error('Error searching by cuisine:', error);
-        }
-        setShowCuisineSearch(false);
-    };
-    const parseTime = (timeString) => {
-        const [hours, minutes] = timeString.trim().split(':').map(Number);
-        return new Date().setHours(hours, minutes, 0, 0);
-    };
-    const roundToNextQuarter = (date) => {
-        const minutes = date.getMinutes();
-        const roundedMinutes = Math.floor(minutes / 15) * 15;
-        date.setMinutes(roundedMinutes, 0, 0);
-        return date;
-    };
-
-    const shouldMoveToNextDay = (currentTime, endTime) => {
-        return (endTime - currentTime) <= 2 * 60 * 60 * 1000;
-    };
-    const generateTimeSlots = (operatingHours) => {
-        const timeSlots = [];
-        const [startTimeStr, endTimeStr] = operatingHours.split('-').map((time) => time.trim());
-
-        const startTime = parseTime(startTimeStr);
-        let endTime = parseTime(endTimeStr);
-
-        const currentTime = new Date().getTime();
-        if (shouldMoveToNextDay(currentTime, endTime)) {
-            endTime += 24 * 60 * 60 * 1000;
-        }
-
-        let currentTimeSlot = new Date(startTime);
-        currentTimeSlot = roundToNextQuarter(currentTimeSlot);
-
-        while (currentTimeSlot.getTime() < endTime) {
-            timeSlots.push(currentTimeSlot.toISOString());
-            currentTimeSlot.setMinutes(currentTimeSlot.getMinutes() + 15);
-        }
-
-        return timeSlots;
-    };
-
-    const today = new Date();
-    const year = today.getFullYear();
-    const month = String(today.getMonth() + 1).padStart(2, '0');
-    const day = String(today.getDate()).padStart(2, '0');
-    const formattedDate = `${year}-${month}-${day}`;
-
-    const handleTimeSlotClick = (table, timeSlot, restaurant) => {
-        const tableNumber = table.id;
-        const formattedTimeSlot = timeSlot;
-        const restaurantId = restaurant.restaurantId;
-
-        const encodedTableNumber = encodeURIComponent(tableNumber);
-        const encodedTimeSlot = encodeURIComponent(formattedTimeSlot);
-        const encodedRestaurantId = encodeURIComponent(restaurantId);
-
-        navigate(`/reservationConfirmation/${encodedTableNumber}/${encodedTimeSlot}/${encodedRestaurantId}`);
-    };
-
-    const renderTimeSlots = (tablesList, restaurant) => {
-        const currentTime = new Date().getTime();
-        let renderedTimeSlots = {};
-
-        if (tablesList.length === 0) {
-            return <p>No tables available for reservations at this restaurant.</p>;
-        }
-
-        return tablesList.flatMap((table) => {
-            const tableTimeSlots = generateTimeSlots(restaurant.operatingHours);
-
-            if (!renderedTimeSlots[table.capacity]) {
-                renderedTimeSlots[table.capacity] = 0;
-                return (
-                    <div key={table.capacity}>
-                        <h3>Table for {table.capacity} guests</h3>
-                        {tableTimeSlots.map((timeSlot, index) => {
-                            const timeSlotTime = new Date(timeSlot).getTime();
-
-                            if (timeSlotTime > currentTime && renderedTimeSlots[table.capacity] < 3) {
-                                renderedTimeSlots[table.capacity]++;
-                                const timeSlotDateTime = new Date(timeSlot);
-                                const formattedTime = timeSlotDateTime.toLocaleTimeString([], {
-                                    hour: '2-digit',
-                                    minute: '2-digit'
-                                });
-
-                                return (
-                                    <button
-                                        key={index}
-                                        className="btn btn-primary me-2 mb-2"
-                                        onClick={() => handleTimeSlotClick(table, timeSlot, restaurant)}
-                                    >
-                                        {formattedTime} {}
-                                    </button>
-                                );
-                                <br/>
-                            } else {
-                                return null;
-                            }
-                        })}
-                    </div>
-                );
-            } else {
-                return null;
-            }
-        });
-    };
-
+    const today = new Date().toISOString().split('T')[0];
 
     return (
         <div className="container">
-            <h2 className="display-1">Rezerviraj masa</h2>
+            <h2>Home</h2>
+            <p>Welcome to My Awesome App!</p>
             <form className="row g-2 align-items-center" onSubmit={handleSubmit}>
                 <div className="col-auto">
                     <input className="form-control me-2" type="date" value={date} onChange={handleDateChange}
-                           min={formattedDate}/>
+                           min={today}/>
                 </div>
                 <div className="col-auto">
@@ -309,6 +123,6 @@
                         placeholder="Restaurant or Cuisine"
                         aria-label="Search"
-                        value={searchValue}
-                        onChange={handleInputChange}
+                        value={searchValue} // Set the value of the input field
+                        onChange={handleInputChange} // Call the event handler on change
                     />
                 </div>
@@ -316,54 +130,4 @@
                     <button className="btn btn-outline-success" type="submit">Search</button>
                 </div>
-
-                <div className="border-0">
-                    {filteredRestaurants.map((restaurant) => (
-                        <div key={restaurant.id} className="card mb-3">
-                            <div className="card-body">
-                                <div className="row">
-
-                                    <div className="col-md-4">
-                                        <RestaurantInfo key={restaurant.id} restaurant={restaurant}/>
-                                        <div className="d-flex flex-wrap">
-                                            {restaurant.tablesList && restaurant.tablesList.length > 0 ? (
-                                                renderTimeSlots(restaurant.tablesList, restaurant)
-                                            ) : (
-                                                <p>No tables available for reservations at this restaurant</p>
-                                            )}
-                                        </div>
-                                        <button
-                                            className="btn btn-secondary mt-3"
-                                            onClick={() => handleGoToRestaurant(restaurant.restaurantId)}
-                                        >
-                                            Go to Restaurant
-                                        </button>
-                                    </div>
-
-
-                                    <div className="col-md-8">
-                                        <ReadOnlyMenuList restaurantId={restaurant.restaurantId}/>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    ))}
-                </div>
-
-
-                {showCuisineSearch && (
-                    <div className="mb-3">
-                        <h2 className="display-2">Search by cuisine type</h2>
-                        <ul className="list-group">
-                            {cuisineTypes.map((cuisine, index) => (
-                                <li key={index} className="list-group-item">
-                                    <button type="button" className="btn btn-outline-primary"
-                                            onClick={() => handleSearchByCuisine(cuisine)}>
-                                        {cuisine}
-                                    </button>
-                                </li>
-                            ))}
-                        </ul>
-                    </div>
-                )}
             </form>
         </div>
@@ -371,3 +135,4 @@
 }
 
+
 export default App;
Index: -react-app/src/axios_helper.js
===================================================================
--- my-react-app/src/axios_helper.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,32 +1,0 @@
-import axios from "axios";
-import data from "bootstrap/js/src/dom/data";
-axios.defaults.baseURL = 'http://localhost:8081'
-axios.defaults.headers.post["Content-Type"] = 'application/json'
-
-export const getAuthToken = () => {
-    return window.localStorage.getItem("token");
-}
-
-export const request = (method, url, data) => {
-    let headers = {};
-    if(getAuthToken() !== null && getAuthToken() !== "null") {
-        headers = {"Authorization" : `Bearer ${getAuthToken()}`};
-    }
-
-    return axios({
-        method: method,
-        url: url,
-        data: data ? JSON.stringify(data) : null,
-        headers
-    })
-}
-
-export const setAuthToken = (token) => {
-    if (token) {
-        axios.defaults.headers.common['Authorization'] = `Bearer ${token}`;
-        localStorage.setItem('token', token);
-    } else {
-        delete axios.defaults.headers.common['Authorization'];
-        localStorage.removeItem('token');
-    }
-};
Index: -react-app/src/components/AppContent.js
===================================================================
--- my-react-app/src/components/AppContent.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,126 +1,0 @@
-import React from "react";
-import axios from "axios";
-import WelcomeContent from "./WelcomeContent";
-import AuthContent from "./AuthContent";
-import LoginForm from "./LoginForm";
-import AuthForm from "./AuthForm";
-import Buttons from './Buttons';
-import restaurants from "./Restaurants";
-
-class AppContent extends React.Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            componentToShow: "welcome",
-            isAuthenticated: false,
-            user: null,
-            loading: false
-        };
-    }
-
-    componentDidMount() {
-        const token = localStorage.getItem('token');
-        console.log(token);
-        if (token) {
-            this.setAuthToken(token);
-            this.setState({ componentToShow: "restaurants", isAuthenticated: true });
-        }
-    }
-
-    fetchUserDetails = (token) => {
-        console.log("Fetching User Details...");
-        axios.get("/api/user")
-            .then((response) => {
-                this.setState({
-                    user: response.data,
-                    componentToShow: "restaurants",
-                    isAuthenticated: true
-                });
-            })
-            .catch((error) => {
-                console.error("Failed to fetch user details:", error);
-            });
-    };
-
-    login = () => {
-        this.setState({ componentToShow: "login" });
-    }
-
-    logout = () => {
-        localStorage.removeItem('token');
-        this.setAuthToken(null);
-        this.setState({ componentToShow: "welcome", isAuthenticated: false });
-    }
-
-    onLogin = (e, email, password) => {
-        e.preventDefault();
-
-        axios.post("/api/login", { email, password })
-            .then((response) => {
-                const token = response.data.token;
-                localStorage.setItem('token', token);
-                console.log("Login Token:", token);
-                this.setAuthToken(token);
-                this.fetchUserDetails(token);
-            })
-            .catch((error) => {
-                console.error("Login failed:", error);
-                this.setState({ componentToShow: "welcome" });
-            });
-    };
-
-    onRegister = (e, firstName, lastName, email, password) => {
-        e.preventDefault();
-        axios.post("/api/register", { firstName, lastName, email, password })
-            .then((response) => {
-                const token = response.data.token;
-                localStorage.setItem('token', token);
-                console.log(token);
-                this.setAuthToken(token);
-                this.fetchUserDetails(token);
-            })
-            .catch((error) => {
-                this.setState({ componentToShow: "welcome" });
-                console.error(error);
-            });
-    };
-
-    setAuthToken = (token) => {
-        if (token) {
-            axios.defaults.headers.common["Authorization"] = `Bearer ${token}`;
-        } else {
-            delete axios.defaults.headers.common["Authorization"];
-        }
-    };
-
-    render() {
-        if (this.state.isAuthenticated) {
-            return (
-                <div>
-                    <Buttons login={this.login} logout={this.logout} />
-                    <AuthContent />
-                </div>
-            );
-        }
-
-        return (
-            <div>
-                <Buttons login={this.login} logout={this.logout} />
-                {this.state.componentToShow === "welcome" && <WelcomeContent />}
-                {this.state.componentToShow === "login" && <LoginForm onLogin={this.onLogin} onRegister={this.onRegister} />}
-            </div>
-        );
-        // return (
-        //     <div>
-        //         <Buttons login={this.login} logout={this.logout} />
-        //         {this.state.componentToShow === "welcome" && <WelcomeContent />}
-        //         {this.state.componentToShow === "restaurants" && <AuthContent />}
-        //         {this.state.componentToShow === "login" && <LoginForm onLogin={this.onLogin} onRegister={this.onRegister} />}
-        //         {this.state.loading && <div>Loading...</div>} {/* Show loading state */}
-        //     </div>
-        // );
-    }
-}
-
-
-export default AppContent;
Index: -react-app/src/components/AppContext.js
===================================================================
--- my-react-app/src/components/AppContext.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,11 +1,0 @@
-import * as React from "react";
-import WelcomeContent from './WelcomeContent'
-export default class AppContext extends React.Component {
-    render() {
-        return (
-            <div>
-                <WelcomeContent/>
-            </div>
-        )
-    }
-}
Index: -react-app/src/components/AuthContent.js
===================================================================
--- my-react-app/src/components/AuthContent.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,48 +1,0 @@
-import * as React from 'react';
-import { request } from "../axios_helper";
-
-export default class AuthContent extends React.Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            data: []
-        };
-    }
-
-    // componentDidMount() {
-    //     request(
-    //         "GET",
-    //         "/api/restaurants",
-    //         []
-    //     ).then((response) => {
-    //         this.setState({ data: response.data });
-    //     });
-    // }
-    componentDidMount() {
-        const token = localStorage.getItem('token');
-        console.log("Stored Token on Reload:", token);
-
-        if (token) {
-            this.setAuthToken(token);
-            this.fetchUserDetails(token);
-        } else {
-            console.log("No token found. Redirecting to login.");
-            this.setState({ componentToShow: "login", isAuthenticated: false });
-        }
-    }
-
-    render() {
-        return (
-            <div>
-                {this.state.data && this.state.data.map((restaurant) => (
-                    <div key={restaurant.restaurantId}>
-                        <p>Name: {restaurant.name}</p>
-                        <p>Cuisine Type: {restaurant.cuisineType}</p>
-                        <p>Address: {restaurant.address}</p>
-                        <p>User: {}</p>
-                    </div>
-                ))}
-            </div>
-        );
-    }
-}
Index: -react-app/src/components/AuthForm.js
===================================================================
--- my-react-app/src/components/AuthForm.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,204 +1,0 @@
-import React, { useState } from 'react';
-import axios from 'axios';
-import { useNavigate } from 'react-router-dom';
-import 'bootstrap/dist/css/bootstrap.min.css';
-import classNames from 'classnames';
-import MembershipsEnum from './MembershipsEnum';
-
-const AuthForm = () => {
-    const navigate = useNavigate();
-    const [activeTab, setActiveTab] = useState('login');
-    const [credentials, setCredentials] = useState({
-        firstName: '',
-        lastName: '',
-        email: '',
-        password: '',
-        phone: '',
-        address: '',
-        membershipLevel: ''
-    });
-    const [error, setError] = useState('');
-
-    const handleChange = (e) => {
-        const { name, value } = e.target;
-        setCredentials({ ...credentials, [name]: value });
-    };
-
-    const handleLogin = async (e) => {
-        e.preventDefault();
-        try {
-            const response = await axios.post('http://localhost:8081/api/login', {
-                email: credentials.email,
-                password: credentials.password
-            });
-
-            const { token } = response.data;
-            localStorage.setItem('token', token);
-            navigate('/');
-        } catch (err) {
-            setError('Login failed. Please check your credentials.');
-        }
-    };
-
-    const handleRegister = async (e) => {
-        e.preventDefault();
-        try {
-            await axios.post('http://localhost:8081/api/register', {
-                firstName: credentials.firstName,
-                lastName: credentials.lastName,
-                email: credentials.email,
-                password: credentials.password,
-                phone: credentials.phone,
-                address: credentials.address,
-                membershipLevel: credentials.membershipLevel
-            });
-            setActiveTab('login');
-            alert('Registration successful. Please log in.');
-        } catch (err) {
-            setError('Registration failed. Please try again.');
-        }
-    };
-
-    return (
-        <div className="container mt-5">
-            <ul className="nav nav-pills nav-justified mb-3">
-                <li className="nav-item">
-                    <button
-                        className={classNames('nav-link', { active: activeTab === 'login' })}
-                        onClick={() => setActiveTab('login')}
-                    >
-                        Login
-                    </button>
-                </li>
-                <li className="nav-item">
-                    <button
-                        className={classNames('nav-link', { active: activeTab === 'register' })}
-                        onClick={() => setActiveTab('register')}
-                    >
-                        Register
-                    </button>
-                </li>
-            </ul>
-
-            {activeTab === 'login' && (
-                <form onSubmit={handleLogin}>
-                    <div className="form-outline mb-4">
-                        <input
-                            type="email"
-                            name="email"
-                            className="form-control"
-                            placeholder="Email"
-                            value={credentials.email}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                    <div className="form-outline mb-4">
-                        <input
-                            type="password"
-                            name="password"
-                            className="form-control"
-                            placeholder="Password"
-                            value={credentials.password}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                    {error && <div className="text-danger mb-3">{error}</div>}
-                    <button type="submit" className="btn btn-primary w-100">Login</button>
-                </form>
-            )}
-
-            {activeTab === 'register' && (
-                <form onSubmit={handleRegister}>
-                    <div className="form-outline mb-4">
-                        <input
-                            type="text"
-                            name="firstName"
-                            className="form-control"
-                            placeholder="First Name"
-                            value={credentials.firstName}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                    <div className="form-outline mb-4">
-                        <input
-                            type="text"
-                            name="lastName"
-                            className="form-control"
-                            placeholder="Last Name"
-                            value={credentials.lastName}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                    <div className="form-outline mb-4">
-                        <input
-                            type="email"
-                            name="email"
-                            className="form-control"
-                            placeholder="Email"
-                            value={credentials.email}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                    <div className="form-outline mb-4">
-                        <input
-                            type="password"
-                            name="password"
-                            className="form-control"
-                            placeholder="Password"
-                            value={credentials.password}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                    <div className="form-outline mb-4">
-                        <input
-                            type="text"
-                            name="phone"
-                            className="form-control"
-                            placeholder="Phone"
-                            value={credentials.phone}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                    <div className="form-outline mb-4">
-                        <input
-                            type="text"
-                            name="address"
-                            className="form-control"
-                            placeholder="Address"
-                            value={credentials.address}
-                            onChange={handleChange}
-                            required
-                        />
-                    </div>
-                    <div className="form-outline mb-4">
-                        <select
-                            name="membershipLevel"
-                            className="form-control"
-                            value={credentials.membershipLevel}
-                            onChange={handleChange}
-                            required
-                        >
-                            <option value="">Select Membership Type</option>
-                            {MembershipsEnum().map((membership, index) => (
-                                <option key={index} value={membership}>
-                                    {membership}
-                                </option>
-                            ))}
-                        </select>
-                    </div>
-                    {error && <div className="text-danger mb-3">{error}</div>}
-                    <button type="submit" className="btn btn-success w-100">Register</button>
-                </form>
-            )}
-        </div>
-    );
-};
-
-export default AuthForm;
Index: -react-app/src/components/Buttons.js
===================================================================
--- my-react-app/src/components/Buttons.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,12 +1,0 @@
-import * as React from "react";
-
-export default function Buttons(props) {
-    return (
-        <div className="row">
-            <div className="col-md-12 text-center" style={{marginTop:"30px"}}>
-                <button onClick={props.login}>Login</button>
-                <button onClick={props.logout}>Logout</button>
-            </div>
-        </div>
-    )
-}
Index: -react-app/src/components/CuisineContext.js
===================================================================
--- my-react-app/src/components/CuisineContext.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,26 +1,0 @@
-import React, { createContext, useState, useEffect } from 'react';
-import axios from 'axios';
-
-export const CuisineContext = createContext();
-
-export const CuisineProvider = ({ children }) => {
-    const [cuisineTypes, setCuisineTypes] = useState([]);
-
-    useEffect(() => {
-        const fetchCuisineTypes = async () => {
-            try {
-                const response = await axios.get('http://localhost:8081/api/cuisineTypes');
-                setCuisineTypes(response.data);
-            } catch (error) {
-                console.error('Error fetching cuisine types:', error);
-            }
-        };
-        fetchCuisineTypes();
-    }, []);
-
-    return (
-        <CuisineContext.Provider value={cuisineTypes}>
-            {children}
-        </CuisineContext.Provider>
-    );
-};
Index: my-react-app/src/components/CustomerDetails.js
===================================================================
--- my-react-app/src/components/CustomerDetails.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ my-react-app/src/components/CustomerDetails.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,40 @@
+import React, { useEffect, useState } from 'react';
+import axios from 'axios';
+import { useParams } from 'react-router-dom';
+
+const CustomerDetails = () => {
+    const { id } = useParams();
+    const [customer, setCustomer] = useState(null);
+
+    useEffect(() => {
+        const fetchCustomer = async () => {
+            try {
+                const response = await axios.get(`http://localhost:8080/api/customers/${id}`);
+                setCustomer(response.data);
+            } catch (error) {
+                console.error('Error fetching customer:', error);
+            }
+        };
+
+        fetchCustomer();
+    }, [id]);
+
+    if (!customer) {
+        return <div>Loading...</div>;
+    }
+
+    return (
+        <div>
+            <h2>Customer Details</h2>
+            <p className="card-text"><strong>Email:</strong> {customer.email}</p>
+            <p className="card-text"><strong>Phone:</strong> {customer.phone}</p>
+            <p className="card-text"><strong>Address:</strong> {customer.address}</p>
+            <p className="card-text"><strong>Membership
+                Level:</strong> {customer.membershipLevel}</p>
+            <p className="card-text"><strong>Registration
+                Date:</strong> {new Date(customer.registrationDate).toLocaleString()}</p>
+        </div>
+    );
+}
+
+export default CustomerDetails;
Index: my-react-app/src/components/CustomerFormContainer.js
===================================================================
--- my-react-app/src/components/CustomerFormContainer.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ my-react-app/src/components/CustomerFormContainer.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,77 @@
+// CustomerFormContainer.js
+import React, { useState, useEffect } from 'react';
+import axios from 'axios';
+import CustomerForm from './CustomersForm';
+import MembershipsEnum from "./MembershipsEnum";
+import {useNavigate, useParams} from "react-router-dom";
+
+const CustomerFormContainer = () => {
+    const navigate = useNavigate();
+    const [formData, setFormData] = useState({
+        firstName: '',
+        lastName: '',
+        email: '',
+        password: '',
+        phone: '',
+        address: '',
+        membershipLevel: MembershipsEnum()[0]
+    });
+
+    const { id } = useParams();
+    const [customer, setCustomer] = useState(null);
+
+    useEffect(() => {
+        if (id) {
+            // Fetch customer data only if in edit mode
+            const fetchCustomer = async () => {
+                try {
+                    const response = await axios.get(`http://localhost:8080/api/customers/${id}`);
+                    const customerData = response.data;
+                    setFormData({
+                        firstName: customerData.firstName || '',
+                        lastName: customerData.lastName || '',
+                        email: customerData.email || '',
+                        password: '', // For security reasons, the password field should not be pre-filled
+                        phone: customerData.phone || '',
+                        address: customerData.address || '',
+                        membershipLevel: customerData.membershipLevel || MembershipsEnum()[0]
+                    });
+                } catch (error) {
+                    console.error('Error fetching customer:', error);
+                }
+            };
+
+            fetchCustomer();
+        }
+    }, [id]);
+
+    const handleChange = (e) => {
+        setFormData({ ...formData, [e.target.name]: e.target.value });
+    };
+
+    const handleSubmit = async (e) => {
+        e.preventDefault();
+        try {
+            if (customer) {
+                await axios.put(`http://localhost:8080/api/customers/edit/${customer.id}`, formData);
+            } else {
+                await axios.post("http://localhost:8080/api/customers", formData);
+            }
+            navigate("/customers");
+        } catch (error) {
+            navigate("/error");
+        }
+    };
+
+    return (
+        <CustomerForm
+            formData={formData}
+            handleChange={handleChange}
+            handleSubmit={handleSubmit}
+            membershipOptions={MembershipsEnum()}
+            isEdit={!!customer} // Pass a boolean indicating whether it's an update
+        />
+    );
+};
+
+export default CustomerFormContainer;
Index: my-react-app/src/components/Customers.js
===================================================================
--- my-react-app/src/components/Customers.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ my-react-app/src/components/Customers.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,75 @@
+import 'bootstrap/dist/css/bootstrap.min.css';
+import React, {useEffect, useState} from "react";
+import axios from "axios";
+import { Link } from 'react-router-dom';
+import { useNavigate } from 'react-router-dom';
+
+
+const Customers = () => {
+    const [customers, setCustomers] = useState([]);
+    const navigate = useNavigate();
+
+    useEffect(() => {
+        const fetchCustomers = async () => {
+            try {
+                const response = await axios.get("http://localhost:8080/api/customers");
+                setCustomers(response.data);
+            } catch (error) {
+                console.error("Error fetching customers: ", error);
+            }
+        };
+
+        fetchCustomers()
+    }, []);
+
+    const handleDetailClick = (customerId) => {
+        navigate(`/customers/${customerId}`);
+    }
+
+    const handleEditClick = (customerId) => {
+        navigate(`/customers/edit/${customerId}`);
+    }
+
+    const handleDeleteClick = async (customerId) => {
+        try {
+            await axios.delete(`http://localhost:8080/api/customers/delete/${customerId}`);
+            setCustomers(customers.filter(customer => customer.customerID !== customerId));
+            alert('Reservation canceled successfully');
+        } catch (error) {
+            console.error("Error + " + error);
+            alert("An error occurred while deleting");
+        }
+    }
+
+    return (
+        <div className="container mt-4">
+            <h1 className="mb-4">Customer List</h1>
+            <div className="row row-cols-1 row-cols-md-3 g-4">
+                {customers
+                    .filter(customer => customer.role !== 'admin')
+                    .map((customer) => (
+                        <div className="col" key={customer.customerId}>
+                            <div className="card h-100">
+                                <div className="card-body">
+                                    <h5 className="card-title">{customer.fullName}</h5>
+                                    <p className="card-text"><strong>Email:</strong> {customer.email}</p>
+                                    <p className="card-text"><strong>Phone:</strong> {customer.phone}</p>
+                                    <p className="card-text"><strong>Address:</strong> {customer.address}</p>
+                                    <p className="card-text"><strong>Membership
+                                        Level:</strong> {customer.membershipLevel}</p>
+                                    <p className="card-text"><strong>Registration
+                                        Date:</strong> {new Date(customer.registrationDate).toLocaleString()}</p>
+                                </div>
+                                <button onClick={() => handleDetailClick(customer.customerId)}>View Details</button>
+                                <button onClick={() => handleEditClick(customer.customerId)}>Edit</button>
+                                <button onClick={() => handleDeleteClick(customer.customerId)}>DELETE</button>
+                            </div>
+                        </div>
+                    ))}
+            </div>
+        </div>
+    );
+
+}
+
+export default Customers;
Index: my-react-app/src/components/CustomersForm.js
===================================================================
--- my-react-app/src/components/CustomersForm.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ my-react-app/src/components/CustomersForm.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,110 @@
+import React from 'react';
+import MembershipsEnum from "./MembershipsEnum";
+
+const CustomersForm = ({ formData, handleChange, handleSubmit, membershipOptions, isEdit}) => {
+    return (
+        <div>
+            <form onSubmit={handleSubmit} method="post">
+                <div>
+                    <label htmlFor="firstName">First Name</label>
+                    <div>
+                        <input
+                            type="text"
+                            id="firstName"
+                            name="firstName"
+                            value={formData.firstName}
+                            onChange={handleChange}
+                            required
+                        />
+                    </div>
+                </div>
+                <div>
+                    <label htmlFor="lastName">Last Name</label>
+                    <div>
+                        <input
+                            type="text"
+                            id="lastName"
+                            name="lastName"
+                            value={formData.lastName}
+                            onChange={handleChange}
+                            required
+                        />
+                    </div>
+                </div>
+                <div>
+                    <label htmlFor="email">Email</label>
+                    <div>
+                        <input
+                            type="email"
+                            id="email"
+                            name="email"
+                            value={formData.email}
+                            onChange={handleChange}
+                            required
+                        />
+                    </div>
+                </div>
+                <div>
+                    <label htmlFor="password">Password</label>
+                    <div>
+                        <input
+                            type="password"
+                            id="password"
+                            name="password"
+                            value={formData.password}
+                            onChange={handleChange}
+                            required
+                        />
+                    </div>
+                </div>
+                <div>
+                    <label htmlFor="phone">Phone</label>
+                    <div>
+                        <input
+                            type="text"
+                            id="phone"
+                            name="phone"
+                            value={formData.phone}
+                            onChange={handleChange}
+                            required
+                        />
+                    </div>
+                </div>
+                <div>
+                    <label htmlFor="address">Address</label>
+                    <div>
+                        <input
+                            type="text"
+                            id="address"
+                            name="address"
+                            value={formData.address}
+                            onChange={handleChange}
+                            required
+                        />
+                    </div>
+                </div>
+                <div>
+                    <label htmlFor="membershipLevel">Membership Type</label>
+                    <div>
+                        <select
+                            id="membershipLevel"
+                            name="membershipLevel"
+                            value={formData.membershipLevel}
+                            onChange={handleChange}
+                            required
+                        >
+                            {MembershipsEnum().map((membership, index) => (
+                                <option key={index} value={membership}>
+                                    {membership}
+                                </option>
+                            ))}
+                        </select>
+                    </div>
+                </div>
+                <button type="submit">{isEdit ? 'Update' : 'Register'}</button>
+            </form>
+        </div>
+    );
+};
+
+export default CustomersForm;
Index: my-react-app/src/components/ErrorPage.js
===================================================================
--- my-react-app/src/components/ErrorPage.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/src/components/ErrorPage.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,2 +1,3 @@
+// ErrorPage.js
 import React from 'react';
 
@@ -6,4 +7,5 @@
             <h1>Oops! Something went wrong.</h1>
             <p>Please try again later or contact support.</p>
+            {/* Add any additional content or error-specific messages */}
         </div>
     );
Index: my-react-app/src/components/Header.js
===================================================================
--- my-react-app/src/components/Header.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/src/components/Header.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,45 +1,6 @@
-import React, {useEffect, useState} from 'react';
-import { Link, useNavigate } from 'react-router-dom';
-import {jwtDecode} from "jwt-decode";
-import axios from "axios";
+import React from 'react';
+import { Link } from 'react-router-dom';
 
 const Header = () => {
-    const navigate = useNavigate();
-    const [user, setUser] = useState({});
-    const isLoggedIn = localStorage.getItem('token');
-
-    const handleLogout = () => {
-        localStorage.removeItem("token");
-        localStorage.removeItem("user");
-        setUser(null);
-        navigate("/login");
-
-    };
-
-    useEffect(() => {
-        const fetchUser = async () => {
-            try {
-                const token = localStorage.getItem("token");
-                if (!token) return;
-
-                const storedUser = localStorage.getItem("user");
-                if (storedUser) {
-                    setUser(JSON.parse(storedUser));
-                    return;
-                }
-
-                const decodedToken = jwtDecode(token);
-                const userId = decodedToken.iss;
-
-                const { data } = await axios.get(`http://localhost:8081/api/user/${userId}`);
-                setUser(data);
-                localStorage.setItem("user", JSON.stringify(data));
-            } catch (error) {
-                console.error("Error fetching user:", error);
-            }
-        };
-        fetchUser();
-    }, [isLoggedIn]);
-
     return (
         <header className="header navbar navbar-expand-lg navbar-light bg-light">
@@ -54,4 +15,10 @@
                         </li>
                         <li className="nav-item">
+                            <Link className="nav-link" to="/customers">Customers</Link>
+                        </li>
+                        <li className="nav-item">
+                            <Link className="nav-link" to="/customers/add">Add Customer</Link>
+                        </li>
+                        <li className="nav-item">
                             <Link className="nav-link" to="/restaurants">Restaurants</Link>
                         </li>
@@ -59,16 +26,4 @@
                             <Link className="nav-link" to="/reservations">Reservations</Link>
                         </li>
-                        <li className="nav-item">
-                            <Link className="nav-link" to="/reservations-past">Reservation history</Link>
-                        </li>
-                        <form className="form-inline mt-2 mt-md-0 ml-3">
-                            {isLoggedIn ? (
-                                <button className="btn btn-outline-danger ml-3" onClick={handleLogout}>
-                                    Logout {user?.firstName}
-                                </button>
-                            ) : (
-                                <Link className="btn btn-outline-info ml-3" to="/login">Login</Link>
-                            )}
-                        </form>
                     </ul>
                 </div>
Index: my-react-app/src/components/Layout.js
===================================================================
--- my-react-app/src/components/Layout.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/src/components/Layout.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,2 +1,3 @@
+// Layout.js
 import React from 'react';
 import Header from './Header';
Index: -react-app/src/components/Login.js
===================================================================
--- my-react-app/src/components/Login.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,62 +1,0 @@
-import React, { useState } from 'react';
-import axios from 'axios';
-import {useNavigate} from "react-router-dom";
-
-const Login = ({ onLogin }) => {
-    const navigate = useNavigate();
-    const [credentials, setCredentials] = useState({ username: '', password: '' });
-    const [error, setError] = useState('');
-
-    const handleChange = (e) => {
-        const { name, value } = e.target;
-        setCredentials({ ...credentials, [name]: value });
-    };
-
-    const handleSubmit = async (e) => {
-        e.preventDefault();
-        try {
-            const response = await axios.post('http://localhost:8081/api/login', {
-                email: credentials.username,
-                password: credentials.password
-            });
-            const { token } = response.data;
-
-            localStorage.setItem('token', token);
-
-            navigate("/")
-        } catch (error) {
-            console.error('Login failed:', error);
-            setError('Login failed. Please check your credentials and try again.');
-        }
-    };
-
-    return (
-        <div>
-            <h2>Login</h2>
-            <form onSubmit={handleSubmit}>
-                <div>
-                    <label>Username:</label>
-                    <input
-                        type="text"
-                        name="username"
-                        value={credentials.username}
-                        onChange={handleChange}
-                    />
-                </div>
-                <div>
-                    <label>Password:</label>
-                    <input
-                        type="password"
-                        name="password"
-                        value={credentials.password}
-                        onChange={handleChange}
-                    />
-                </div>
-                {error && <div style={{ color: 'red' }}>{error}</div>}
-                <button type="submit">Login</button>
-            </form>
-        </div>
-    );
-};
-
-export default Login;
Index: -react-app/src/components/LoginForm.js
===================================================================
--- my-react-app/src/components/LoginForm.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,109 +1,0 @@
-import * as React from "react";
-import bootstrap from 'bootstrap/dist/css/bootstrap.min.css'
-import classNames from 'classnames';
-
-export default class LoginForm extends React.Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            active: "login",
-            firstName: "",
-            lastName: "",
-            email: "",
-            password: "",
-            onLogin: props.onLogin,
-            onRegister: props.onRegister
-        }
-    }
-
-    onChangeHandler = (e) => {
-        let name = e.target.name;
-        let value = e.target.value;
-        this.setState({[name]: value})
-    }
-
-    onSubmitLogin = (e) => {
-        this.state.onLogin(e, this.state.email, this.state.password);
-    }
-
-    onSubmitRegister = (e) => {
-        this.state.onRegister(
-            e,
-            this.state.firstName,
-            this.state.lastName,
-            this.state.email,
-            this.state.password)
-    }
-
-    render() {
-        return (
-            <div className="row justify-content-center">
-                <div className="col-4">
-                    <ul className="nav nav-pills nav-justified mb-3" id="ex1" role="tablist">
-                        <li className="nav-item" role="presentation">
-                            <button className={classNames("nav-link", this.state.active === "login" ? "active" : "")}
-                                    id="tab-login" onClick={() => this.setState({active: "login"})}>Login
-                            </button>
-                        </li>
-                        <li className="nav-item" role="presentation">
-                            <button className={classNames("nav-link", this.state.active === "register" ? "active" : "")}
-                                    id="tab-register" onClick={() => this.setState({active: "register"})}>Register
-                            </button>
-                        </li>
-                    </ul>
-
-                    <div className="tab-content">
-                        <div
-                            className={classNames("tab-pane", "fade", this.state.active === "login" ? "show active" : "")}
-                            id="pills-login">
-                            <form onSubmit={this.onSubmitLogin}>
-                                <div className="form-outline mb-4">
-                                    <input type="email" id="email" name="email" className="form-control"
-                                           onChange={this.onChangeHandler}/>
-                                    <label className="form-label" htmlFor="email">Email</label>
-                                </div>
-                                <div className="form-outline mb-4">
-                                    <input type="password" id="loginPassword" name="password" className="form-control"
-                                           onChange={this.onChangeHandler}/>
-                                    <label className="form-label" htmlFor="loginPassword">Password</label>
-                                </div>
-
-                                <button type="submit" className="btn btn-primary btn-block mb-4">Sign In</button>
-                            </form>
-                        </div>
-
-                        <div
-                            className={classNames("tab-pane", "fade", this.state.active === "register" ? "show active" : "")}
-                            id="pills-register">
-                            <form onSubmit={this.onSubmitRegister}>
-                                <div className="form-outline mb-4">
-                                    <input type="text" id="firstName" name="firstName" className="form-control"
-                                           onChange={this.onChangeHandler}/>
-                                    <label className="form-label" htmlFor="firstName">First Name</label>
-                                </div>
-                                <div className="form-outline mb-4">
-                                    <input type="text" id="lastName" name="lastName" className="form-control"
-                                           onChange={this.onChangeHandler}/>
-                                    <label className="form-label" htmlFor="lastName">Last Name</label>
-                                </div>
-                                <div className="form-outline mb-4">
-                                    <input type="email" id="email" name="email" className="form-control"
-                                           onChange={this.onChangeHandler}/>
-                                    <label className="form-label" htmlFor="email">Email</label>
-                                </div>
-                                <div className="form-outline mb-4">
-                                    <input type="password" id="loginPassword" name="password" className="form-control"
-                                           onChange={this.onChangeHandler}/>
-                                    <label className="form-label" htmlFor="loginPassword">Password</label>
-                                </div>
-
-                                <button type="submit" className="btn btn-primary btn-block mb-4">Register</button>
-                            </form>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        );
-
-    }
-}
Index: my-react-app/src/components/MembershipsEnum.js
===================================================================
--- my-react-app/src/components/MembershipsEnum.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/src/components/MembershipsEnum.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -3,5 +3,21 @@
 
 const MembershipsEnum = () => {
-    return ['GOLD', 'PLATINUM', 'STANDARD'];
+    const [memberships, setMemberships] = useState([]);
+
+    useEffect(() => {
+        const fetchMemberships = async () => {
+            try {
+                const response = await axios.get('http://localhost:8080/api/memberships');
+                // Assuming the response.data is an array of enum values
+                setMemberships(response.data);
+            } catch (error) {
+                console.error('Error fetching enum data:', error);
+            }
+        };
+
+        fetchMemberships();
+    }, []);
+
+    return memberships;
 };
 
Index: -react-app/src/components/MenuList.js
===================================================================
--- my-react-app/src/components/MenuList.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,110 +1,0 @@
-import React, { useState, useEffect } from 'react';
-import axios from 'axios';
-import 'bootstrap/dist/css/bootstrap.min.css';
-
-const MenuList = ({ restaurantId, onPreOrderChange, setPreOrderedItems, preOrderedItems }) => {
-    const [menuItems, setMenuItems] = useState([]);
-    const [preOrder, setPreOrder] = useState([]);
-
-    const handleItemSelect = (item) => {
-        setPreOrderedItems(prevItems => [...prevItems, item]);
-    };
-
-    const handleItemToggle = (item) => {
-        setPreOrderedItems(prevItems => {
-            const exists = prevItems.find(i => i.id === item.id);
-            if (exists) {
-                return prevItems.filter(i => i.id !== item.id);
-            } else {
-                return [...prevItems, item];
-            }
-        });
-    };
-
-    useEffect(() => {
-        const fetchMenu = async () => {
-            try {
-                const response = await axios.get(`http://localhost:8081/api/restaurant-menu/${restaurantId}`);
-                setMenuItems(response.data);
-            } catch (err) {
-                console.error('Failed to fetch menu:', err);
-            }
-        };
-        if (restaurantId) {
-            fetchMenu();
-        }
-    }, [restaurantId]);
-
-    const handleAddToPreOrder = (item) => {
-        const existingItem = preOrder.find((i) => i.menuID === item.menuID);
-
-        let updatedPreOrder;
-        if (existingItem) {
-            updatedPreOrder = preOrder.map((i) =>
-                i.menuID === item.menuID ? { ...i, quantity: i.quantity + 1 } : i
-            );
-        } else {
-            updatedPreOrder = [...preOrder, { ...item, quantity: 1 }];
-        }
-
-        setPreOrder(updatedPreOrder);
-        setPreOrderedItems(updatedPreOrder);
-    };
-
-    const calculateTotal = () => {
-        return preOrder.reduce((acc, item) => acc + item.price * item.quantity, 0).toFixed(2);
-    };
-
-    return (
-        <div className="container mt-4">
-            {menuItems.length > 0 && <h3 className="text-center">Menu</h3>}
-            <div className="row">
-                {menuItems.map((item) => (
-                    <div key={item.menuID} className="col-md-4 mb-4">
-                        <div className="card h-100 shadow-sm">
-                            <div className="card-body d-flex flex-column">
-                                <h5 className="card-title">{item.itemName}</h5>
-                                <p className="card-text">{item.description}</p>
-                                <h6 className="card-subtitle mb-2 text-muted">${item.price.toFixed(2)}</h6>
-
-                                {item.tags && item.tags.length > 0 && (
-                                    <div className="mb-2">
-                                        {item.tags.map((tag) => (
-                                            <span key={tag.id} className="badge bg-secondary me-1">
-                                        {tag.tagName}: {tag.tagValue}
-                                    </span>
-                                        ))}
-                                    </div>
-                                )}
-
-                                <button
-                                    className="btn btn-outline-success mt-auto"
-                                    onClick={() => handleAddToPreOrder(item)}
-                                >
-                                    Add to Pre-Order
-                                </button>
-                            </div>
-                        </div>
-                    </div>
-                ))}
-            </div>
-
-            {preOrder.length > 0 && (
-                <div className="mt-5">
-                    <h4>Pre-Order Summary</h4>
-                    <ul className="list-group">
-                        {preOrder.map((item) => (
-                            <li key={item.menuID} className="list-group-item d-flex justify-content-between align-items-center">
-                                {item.itemName} (x{item.quantity})
-                                <span>${(item.price * item.quantity).toFixed(2)}</span>
-                            </li>
-                        ))}
-                    </ul>
-                    <h5 className="mt-3">Total: ${calculateTotal()}</h5>
-                </div>
-            )}
-        </div>
-    );
-};
-
-export default MenuList;
Index: -react-app/src/components/ReadOnlyMenuList.js
===================================================================
--- my-react-app/src/components/ReadOnlyMenuList.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,87 +1,0 @@
-import React, { useState, useEffect } from 'react';
-import axios from 'axios';
-import 'bootstrap/dist/css/bootstrap.min.css';
-
-const ITEMS_PER_PAGE = 6;
-
-const ReadOnlyMenuList = ({ restaurantId }) => {
-    const [menuItems, setMenuItems] = useState([]);
-    const [currentPage, setCurrentPage] = useState(1);
-
-    useEffect(() => {
-        const fetchMenu = async () => {
-            try {
-                const response = await axios.get(`http://localhost:8081/api/restaurant-menu/${restaurantId}`);
-                setMenuItems(response.data);
-                setCurrentPage(1);
-            } catch (err) {
-                console.error('Failed to fetch menu:', err);
-            }
-        };
-
-        if (restaurantId) {
-            fetchMenu();
-        }
-    }, [restaurantId]);
-
-    const indexOfLastItem = currentPage * ITEMS_PER_PAGE;
-    const indexOfFirstItem = indexOfLastItem - ITEMS_PER_PAGE;
-    const currentItems = menuItems.slice(indexOfFirstItem, indexOfLastItem);
-    const totalPages = Math.ceil(menuItems.length / ITEMS_PER_PAGE);
-
-    const handlePageChange = (pageNumber) => {
-        setCurrentPage(pageNumber);
-    };
-
-    return (
-        <div className="container mt-4">
-            {menuItems.length > 0 && <h3 className="text-center">Menu</h3>}
-            <div className="row">
-                {currentItems.map((item) => (
-                    <div key={item.menuID} className="col-md-6 mb-4">
-                        <div className="card h-100 shadow-sm">
-                            <div className="card-body d-flex flex-column">
-                                <h5 className="card-title">{item.itemName}</h5>
-                                <p className="card-text">{item.description}</p>
-                                <h6 className="card-subtitle mb-2 text-muted">${item.price.toFixed(2)}</h6>
-
-                                {item.tags && item.tags.length > 0 && (
-                                    <div className="mb-2">
-                                        {item.tags.map((tag) => (
-                                            <span key={tag.id} className="badge bg-secondary me-1">
-                                        {tag.tagName}: {tag.tagValue}
-                                    </span>
-                                        ))}
-                                    </div>
-                                )}
-                            </div>
-                        </div>
-                    </div>
-                ))}
-            </div>
-
-            {totalPages > 1 && (
-                <nav className="d-flex justify-content-center">
-                    <ul className="pagination">
-                        {Array.from({ length: totalPages }, (_, index) => (
-                            <li
-                                key={index + 1}
-                                className={`page-item ${currentPage === index + 1 ? 'active' : ''}`}
-                            >
-                                <button
-                                    type="button"
-                                    className="page-link"
-                                    onClick={() => handlePageChange(index + 1)}
-                                >
-                                    {index + 1}
-                                </button>
-                            </li>
-                        ))}
-                    </ul>
-                </nav>
-            )}
-        </div>
-    );
-};
-
-export default ReadOnlyMenuList;
Index: my-react-app/src/components/ReservationConfirmation.js
===================================================================
--- my-react-app/src/components/ReservationConfirmation.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/src/components/ReservationConfirmation.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -3,16 +3,9 @@
 import axios from 'axios';
 import { useNavigate } from 'react-router-dom';
-import { useLocation } from 'react-router-dom';
-import { jwtDecode } from "jwt-decode";
-import {request} from "../axios_helper";
-import restaurants from "./Restaurants";
 
 const ReservationConfirmation = () => {
     const navigate = useNavigate();
 
-    const location = useLocation();
-    const preOrderedItems = location.state?.preOrderedItems || [];
     const [restaurant, setRestaurant] = useState({});
-    const [user, setUser] = useState({});
     const [table, setTable] = useState({});
     const [reservationDateTime, setReservationDateTime] = useState('');
@@ -21,77 +14,46 @@
     const { tableNumber, timeSlot, restaurantId } = useParams();
 
-    const adjustedTimeSlot = new Date(new Date(timeSlot).getTime() + 60 * 60 * 1000).toISOString();
     useEffect(() => {
-        const fetchDetails = async () => {
+        const fetchTableDetails = async () => {
             try {
-                const tableResponse = await axios.get(`http://localhost:8081/api/tables/${tableNumber}`);
+                const tableResponse = await axios.get(`http://localhost:8080/api/tables/${tableNumber}`);
                 setTable(tableResponse.data);
-                const restaurantResponse = await axios.get(`http://localhost:8081/api/restaurants/${restaurantId}`);
+
+                const restaurantResponse = await axios.get(`http://localhost:8080/api/restaurants/${restaurantId}`);
                 setRestaurant(restaurantResponse.data);
-
-                const token = localStorage.getItem("token");
-                if (!token) {
-                    console.error("No token found");
-                    return;
-                }
-                const decodedToken = jwtDecode(token);
-                const userId = decodedToken.iss;
-
-                const userResponse = await axios.get(`http://localhost:8081/api/user/${userId}`);
-                setUser(userResponse.data);
             } catch (error) {
-                console.error('Error fetching table or restaurant details:', error);
+                console.error('Error fetching table details:', error);
             }
         };
-        fetchDetails();
+        fetchTableDetails();
     }, [tableNumber, restaurantId]);
 
     const handleSubmit = async (e) => {
         e.preventDefault();
+        // Handle form submission here
+        try {
+            // Check if restaurant and table are valid
+            if (!restaurant || !table) {
+                console.error("Restaurant or table is missing.");
+                return;
+            }
 
-        const payload = {
-            reservationID: 0,
-            userEmail: user.email,
-            rating: parseFloat(restaurant.rating) || null,
-            tableNumber: parseInt(table.id, 10),
-            restaurantId: restaurant.restaurantId,
-            reservationDateTime: adjustedTimeSlot,
-            partySize: parseInt(partySize, 10),
-            status: 'Reserved',
-            specialRequests: specialRequests.trim(),
-            paymentStatus: 'Pending',
-            preOrderedItems: preOrderedItems.map(item => ({
-                preorderedItemName: item.itemName,
-                quantity: item.quantity,
-                price: item.price,
-                menuID: item.menuID
-            }))
-        };
-
-
-        try {
-            const response = await axios.post('http://localhost:8081/api/reservations', payload, {
-                headers: {
-                    'Content-Type': 'application/json'
-                }
+            const response = await axios.post(`http://localhost:8080/api/reservations`, {
+                restaurant: restaurant, // Assuming restaurant has an 'id' property
+                table: table, // Assuming table has an 'id' property
+                checkInTime: timeSlot, // Fill in as needed
+                partySize: partySize,
+                specialRequests: specialRequests
             });
+            // Handle successful reservation creation
+            // console.log("Reservation created:", response.data);
             navigate("/reservations")
         } catch (error) {
-            if (error.response) {
-                alert('The selected time slot is no longer available. Please choose another time.');
-            } else {
-                alert('Network error. Please check your internet connection.');
-            }
+            console.error("Error creating reservation:", error);
         }
     };
 
-    const calculateCheckOutTime = (checkInTime) => {
-        const checkIn = new Date(checkInTime);
-        checkIn.setHours(checkIn.getHours() + 2);
-        return checkIn.toISOString();
-    };
-
     const initialRemainingTime = localStorage.getItem('remainingTime') || 300;
-    const [remainingTime, setRemainingTime] = useState(parseInt(initialRemainingTime, 10));
+    const [remainingTime, setRemainingTime] = useState(parseInt(initialRemainingTime));
 
     useEffect(() => {
@@ -99,5 +61,5 @@
             setRemainingTime((prevTime) => {
                 const newTime = prevTime - 1;
-                localStorage.setItem('remainingTime', newTime.toString());
+                localStorage.setItem('remainingTime', newTime.toString()); // Update remaining time in localStorage
                 return newTime;
             });
@@ -108,10 +70,10 @@
 
     useEffect(() => {
+        // Reset remaining time if it reaches zero
         if (remainingTime <= 0) {
             localStorage.removeItem('remainingTime');
-            alert("Time has expired. Please try reserving again.");
-            navigate('/restaurants');
+            // Optionally, handle releasing the hold on the table
         }
-    }, [remainingTime, navigate]);
+    }, [remainingTime]);
 
     const formatTime = (timeInSeconds) => {
@@ -120,17 +82,4 @@
         return `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
     };
-
-    const formatTimeSlot = (timeSlot) => {
-        const utcDate = new Date(timeSlot);
-        const localDate = new Date(utcDate.toLocaleString("en-US", { timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone }));
-        const formattedDate = localDate.toLocaleDateString();
-        const formattedTime = localDate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
-        return `${formattedDate} - ${formattedTime}`;
-    };
-
-    const grandTotal = preOrderedItems.reduce((acc, item) => acc + item.price * item.quantity, 0).toFixed(2);
-    const itemQuantityString = preOrderedItems
-        .map(item => `${item.itemName}:${item.quantity}`)
-        .join(',');
 
     return (
@@ -147,60 +96,29 @@
                                 <h5 className="card-title">Reservation Details</h5>
                                 <p className="card-text">
-                                    <strong>Restaurant:</strong> {restaurant.name || 'Loading...'} <br />
-                                    <strong>Cuisine type:</strong> {restaurant.cuisineType || 'Loading...'} <br />
-                                    <strong>Selected Time Slot:</strong> {formatTimeSlot(timeSlot)} <br />
-                                    <strong>Party size:</strong>{' '}
-                                    <input
-                                        type="number"
-                                        max={table.capacity}
-                                        value={partySize}
-                                        onChange={(e) => setPartySize(e.target.value)}
-                                    />
-                                    <strong>Table size:</strong> {table.capacity} <br />
-                                    <strong>Special Requests:</strong>{' '}
-                                    <input
-                                        type="text"
-                                        value={specialRequests}
-                                        onChange={(e) => setSpecialRequests(e.target.value)}
-                                    />
-                                    <br />
+                                    <strong>Restaurant:</strong> {restaurant.name || 'Loading...'} <br/>
+                                    <strong>Cuisine type:</strong> {restaurant.cuisineType || 'Loading...'} <br/>
+                                    <strong>Selected Time Slot:</strong> {timeSlot} <br/>
+                                    <strong>Party size:</strong> <input type="number" max={table.capacity}
+                                                                        value={partySize}
+                                                                        onChange={(e) => setPartySize(e.target.value)}/>
+                                    <strong>Table size:</strong> {table.capacity} <br/>
+                                    <strong>Special Requests:</strong> <input type="text" value={specialRequests}
+                                                                              onChange={(e) => setSpecialRequests(e.target.value)}/><br/>
                                 </p>
                                 <p className="card-text text-success">
-                                    <strong>
-                                        Check-in Time: Grace period of 15 minutes +/- the slot. For more information, call the restaurant.
-                                    </strong>
-                                    <br />
+                                    <strong>Check-in Time: grace period of 15 minutes +- the slot, for more call the
+                                        restaurant</strong><br/>
                                 </p>
-                                {preOrderedItems.length > 0 ? (
-                                    <div className="row">
-                                        {preOrderedItems.map((item) => (
-                                            <div key={item.menuID} className="col-md-4 mb-4">
-                                                <div className="list-group shadow-sm p-3">
-                                                    <p className="item"><strong>Item:</strong> {item.itemName}</p>
-                                                    <p className="item"><strong>Price:</strong> ${item.price.toFixed(2)}</p>
-                                                    <p className="item"><strong>Quantity:</strong> {item.quantity}</p>
-                                                    <p className="item"><strong>Total:</strong> ${(item.price * item.quantity).toFixed(2)}</p>
-                                                </div>
-                                            </div>
-                                        ))}
-
-                                        <div className="col-12 mt-4">
-                                            <div className="list-group shadow-sm p-4 text-center">
-                                                <h4>Grand Total: ${grandTotal}</h4>
-                                            </div>
-                                        </div>
-                                    </div>
-                                ) : (
-                                    <p>No pre-ordered items.</p>
-                                )}
                             </div>
                             <div className="card-footer">
                                 <button type="submit" className="btn btn-primary">Submit</button>
-                                <a href="/restaurants" className="btn btn-secondary mx-2">Back to Restaurants</a>
-                                <a href="/" className="btn btn-secondary">Back to Home</a>
+                            </div>
+                            <div className="col-md-6">
+                                <a href="/restaurants" className="btn btn-primary">Back to Home</a>
                             </div>
                         </form>
                     </div>
                 </div>
+
             </div>
         </div>
Index: my-react-app/src/components/ReservationEdit.js
===================================================================
--- my-react-app/src/components/ReservationEdit.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/src/components/ReservationEdit.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -3,25 +3,15 @@
 import {useNavigate, useParams} from 'react-router-dom';
 import StarRating from "./StarRating";
-import {jwtDecode} from "jwt-decode";
 
 const ReservationEdit = () => {
     const navigate = useNavigate();
-    const { reservationId } = useParams();
+
     const [isLoading, setIsLoading] = useState(true);
+    const { reservationId } = useParams(); // Extract reservationId from URL params
     const [formData, setFormData] = useState({});
-    const [tableNumber, setTableNumber] = useState({});
     const [table, setTable] = useState({});
     const [restaurant, setRestaurant] = useState({});
-    const [restaurantId, setRestaurantId] = useState({});
     const [timeSlots, setTimeSlots] = useState([]);
     const [filteredTimeSlots, setFilteredTimeSlots] = useState([]);
-    const [checkInTime, setCheckInTime] = useState([]);
-    const [tableReservations, setTableReservations] = useState([]);
-
-    const timeSlotInterval = 15;
-
-    const [selectedDate, setSelectedDate] = useState('');
-    const [selectedTime, setSelectedTime] = useState('');
-    const [timeOptions, setTimeOptions] = useState([]);
 
     useEffect(() => {
@@ -29,16 +19,9 @@
             try {
                 setIsLoading(true);
-                const response = await axios.get(`http://localhost:8081/api/reservations/${reservationId}`);
-                setCheckInTime(response.data.reservationDateTime);
-                setFormData(response.data);
-
-                setRestaurantId(response.data.restaurantId);
-                const restaurantResponse = await axios.get(`http://localhost:8081/api/restaurants/${response.data.restaurantId}`);
-                setRestaurant(restaurantResponse.data);
-
-                setTableNumber(response.data.tableNumber);
-                const tableResponse = await axios.get(`http://localhost:8081/api/tables/${response.data.tableNumber}`);
-                setTable(tableResponse.data)
-
+                const response = await axios.get(`http://localhost:8080/api/reservations/${reservationId}`);
+                setFormData(response.data); // Set form data with reservation data
+                setTable(response.data.table);
+                setRestaurant(response.data.restaurant);
+                setTimeSlots(response.data.table.timeSlots);
                 setIsLoading(false);
             } catch (error) {
@@ -50,76 +33,32 @@
 
     useEffect(() => {
-        const fetchTableReservations = async () => {
-            try {
-                const response = await axios.get(`http://localhost:8081/api/table-reservations/${table.tableId}`);
-                setTableReservations(response.data);
-                setIsLoading(false);
-            } catch (error) {
-                console.error('Error fetching table reservations:', error);
-            }
-        };
+        if (!table || !restaurant) return; // If table or restaurant is not loaded, return early
 
-        if (table?.tableId) {
-            fetchTableReservations();
-        }
-    }, [table]);
+        const currentTime = new Date();
 
-    useEffect(() => {
-        if (table?.restaurant?.operatingHours && selectedDate) {
-            const options = generateTimeOptions(table.restaurant.operatingHours);
-            setTimeOptions(options);
-        }
-    }, [table, selectedDate]);
-
+        const filteredSlots = timeSlots.filter(timeSlot => new Date(timeSlot) >= currentTime);
+        setFilteredTimeSlots(filteredSlots);
+    }, [table, restaurant]);
 
     const handleInputChange = (e) => {
         const { name, value } = e.target;
 
-        if (name === 'partySize') {
-            const valueAsNumber = Math.min(value, table?.capacity);
-            setFormData(prevState => ({
-                ...prevState,
-                [name]: valueAsNumber
-            }));
+        // Check if the changed input is the time slot select element
+        if (name === 'selectedTimeSlot') {
+            // Update the formData with the selected time slot value
+            setFormData({ ...formData, checkInTime: value });
         } else {
-            setFormData(prevState => ({
-                ...prevState,
-                [name]: value
-            }));
+            // For other input fields, update formData as usual
+            setFormData({ ...formData, [name]: value });
         }
     };
 
-
     const handleSubmit = async (e) => {
         e.preventDefault();
-
         try {
-            const token = localStorage.getItem("token");
-            if (!token) {
-                console.error("No token found");
-                return;
-            }
-
-            const decodedToken = jwtDecode(token);
-            const userId = decodedToken.iss;
-
-            const updatedReservationData = {
-                ...formData,
-                reservationDateTime: `${selectedDate}T${selectedTime}`,
-                checkInTime: checkInTime,
-                reservationID: reservationId,
-            };
-            await axios.post(
-                `http://localhost:8081/api/reservations/${reservationId}/${userId}`,
-                updatedReservationData,
-                {
-                    headers: {
-                        'Content-Type': 'application/json',
-                    }
-                }
-            );
-            console.log(updatedReservationData)
-
-            navigate(`/reservations`);
+            // Send updated reservation data to the server
+            await axios.post(`http://localhost:8080/api/reservations/${reservationId}`, formData);
+            // Redirect or show success message
+            navigate(`/reservations`)
         } catch (error) {
             console.error('Error updating reservation:', error);
@@ -134,65 +73,7 @@
     };
 
-    const today = new Date();
-    const year = today.getFullYear();
-    const month = String(today.getMonth() + 1).padStart(2, '0');
-    const day = String(today.getDate()).padStart(2, '0');
-    const formattedDate = `${year}-${month}-${day}`;
-
-    const generateTimeOptions = (operatingHours) => {
-        const now = new Date();
-        const selectedDateObj = new Date(selectedDate);
-        const isToday = selectedDateObj.toDateString() === now.toDateString();
-
-        let options = [];
-        for (const hours of operatingHours.split(',')) {
-            const [start, end] = hours.trim().split('-');
-            const startTime = new Date(selectedDateObj);
-            const endTime = new Date(selectedDateObj);
-            const [startHour, startMinute] = start.split(':').map(Number);
-            const [endHour, endMinute] = end.split(':').map(Number);
-            startTime.setHours(startHour, startMinute, 0);
-            endTime.setHours(endHour, endMinute, 0);
-
-            if (isToday && startTime < now) {
-                startTime.setTime(roundToNext15Minutes(now).getTime());
-            }
-
-            if (endTime <= now) {
-                setNoAvailableMessage('No available time due to closing.');
-                continue;
-            }
-
-            while (startTime <= endTime) {
-                options.push(startTime.toTimeString().slice(0, 5));
-                startTime.setMinutes(startTime.getMinutes() + 15);
-            }
-        }
-
-        return options.length ? options : ['No available time'];
-    };
-
-    const roundToNext15Minutes = (date) => {
-        const ms = 1000 * 60 * 15;
-        const roundedTime = new Date(Math.ceil(date.getTime() / ms) * ms);
-
-        if (roundedTime.getTime() === date.getTime()) {
-            roundedTime.setMinutes(roundedTime.getMinutes() + 15);
-        }
-
-        return roundedTime;
-    };
-
-    useEffect(() => {
-        if (restaurant?.operatingHours && selectedDate) {
-            const options = generateTimeOptions(restaurant.operatingHours);
-            setTimeOptions(options);
-        }
-    }, [restaurant, selectedDate]);
-
-
     return (
         <div className="container">
-            {isLoading ? (
+            {isLoading ? ( // Conditional rendering based on loading state
                 <p>Loading...</p>
             ) : (
@@ -200,67 +81,34 @@
                     <h1>Edit Reservation</h1>
                     <div className="card-body">
-                        <h2 className="card-title">
-                            {restaurant?.name}
-                            <StarRating key={restaurant?.id} rating={restaurant?.rating || 0}/>
+                        <h2>
+                            {restaurant.name} <StarRating key={restaurant.id} rating={restaurant.rating}/>
                         </h2>
-                        <p className="card-text">Operating Hours: {restaurant?.operatingHours}</p>
-                        <p className="card-text">Address: Ul. {restaurant?.address}</p>
+                        <p className="card-text">{restaurant.cuisineType}</p>
+                        <p className="card-text">{restaurant.operatingHours}</p>
+                        <p className="card-text">Ul. {restaurant.address}</p>
                         <br/>
                     </div>
                     <form onSubmit={handleSubmit}>
                         <div className="mb-3">
-                            <label>Select Date:</label>
-                            <input
-                                type="date"
-                                className="form-control mt-2"
-                                onChange={(event) => setSelectedDate(event.target.value)}
-                                value={selectedDate}
-                                min={formattedDate}
-                            />
-
-                            <label>Select Time:</label>
-                            <select
-                                className="form-select mt-2"
-                                onChange={(event) => setSelectedTime(event.target.value)}
-                                value={selectedTime}
-                                disabled={!selectedDate}
-                            >
-                                <option value="">Select Time</option>
-                                {timeOptions.map((time, index) => (
-                                    <option key={index} value={time}>
-                                        {time}
-                                    </option>
+                            <label htmlFor="checkInTime" className="form-label">Check-in Time</label>
+                            <select className="form-select mt-2" aria-label="Select Time Slot"
+                                    name="selectedTimeSlot" // Add name attribute
+                                    onChange={handleInputChange}>
+                                <option value="">Select Time Slot</option>
+                                {filteredTimeSlots.map((timeSlot, index) => (
+                                    <option key={index} value={timeSlot}>{formatTimeSlot(timeSlot)}</option>
                                 ))}
                             </select>
-                            <label className="text-danger">
-                                Current check-in time: {formatTimeSlot(checkInTime)}
-                            </label>
                         </div>
                         <div className="mb-3">
                             <label htmlFor="partySize" className="form-label">Party Size</label>
-                            <input
-                                type="number"
-                                className="form-control"
-                                id="partySize"
-                                name="partySize"
-                                max={table?.capacity}
-                                min={1}
-                                value={formData.partySize || ''}
-                                onChange={handleInputChange}
-                            />
-                            <label className="text-danger">
-                                Table capacity: {table?.capacity}
-                            </label>
+                            <input type="number" className="form-control" id="partySize" name="partySize"
+                                   max={table.capacity}
+                                   value={formData.partySize || ''} onChange={handleInputChange}/>
                         </div>
                         <div className="mb-3">
-                            <label htmlFor="specialRequests" className="form-label">Special Requests</label>
-                            <input
-                                type="text"
-                                className="form-control"
-                                id="specialRequests"
-                                name="specialRequests"
-                                value={formData.specialRequests || ''}
-                                onChange={handleInputChange}
-                            />
+                        <label htmlFor="specialRequests" className="form-label">Special Requests</label>
+                            <input type="text" className="form-control" id="specialRequests" name="specialRequests"
+                                   value={formData.specialRequests || ''} onChange={handleInputChange}/>
                         </div>
                         <button type="submit" className="btn btn-primary">Submit</button>
@@ -270,4 +118,5 @@
         </div>
     );
+
 };
 
Index: -react-app/src/components/ReservationHistory.js
===================================================================
--- my-react-app/src/components/ReservationHistory.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,295 +1,0 @@
-import React, { useEffect, useState } from "react";
-import { jwtDecode } from "jwt-decode";
-import axios from "axios";
-import 'bootstrap/dist/css/bootstrap.min.css';
-import 'bootstrap/dist/js/bootstrap.bundle.min';
-
-const ReservationHistory = () => {
-    const [reservations, setReservations] = useState([]);
-    const [filteredReservations, setFilteredReservations] = useState([]);
-    const [selectedReservation, setSelectedReservation] = useState(null);
-    const [loading, setLoading] = useState(true);
-    const [error, setError] = useState(null);
-
-    const [restaurantFilter, setRestaurantFilter] = useState("");
-    const [tableFilter, setTableFilter] = useState("");
-    const [partySizeFilter, setPartySizeFilter] = useState("");
-    const [statusFilter, setStatusFilter] = useState("");
-    const [cancellationReasonFilter, setCancellationReasonFilter] = useState("");
-    const [startDate, setStartDate] = useState("");
-    const [endDate, setEndDate] = useState("");
-
-    useEffect(() => {
-        const fetchReservations = async () => {
-            try {
-                const token = localStorage.getItem("token");
-                if (!token) {
-                    setError("User not authenticated.");
-                    setLoading(false);
-                    return;
-                }
-
-                const decodedToken = jwtDecode(token);
-                const userId = decodedToken.iss;
-
-                const response = await axios.get(
-                    `http://localhost:8081/api/past-reservations/${userId}`,
-                    {
-                        headers: { Authorization: `Bearer ${token}` },
-                    }
-                );
-
-                setReservations(response.data);
-                setFilteredReservations(response.data);
-            } catch (err) {
-                setError("Failed to fetch reservations.");
-            } finally {
-                setLoading(false);
-            }
-        };
-
-        fetchReservations();
-    }, []);
-
-    useEffect(() => {
-        let tempReservations = reservations;
-
-        if (restaurantFilter) {
-            tempReservations = tempReservations.filter(res =>
-                res.restaurant?.name.toLowerCase().includes(restaurantFilter.toLowerCase())
-            );
-        }
-        if (tableFilter) {
-            tempReservations = tempReservations.filter(res =>
-                res.table?.id?.toString() === tableFilter
-            );
-        }
-        if (partySizeFilter) {
-            tempReservations = tempReservations.filter(res =>
-                res.partySize?.toString() === partySizeFilter
-            );
-        }
-        if (statusFilter) {
-            tempReservations = tempReservations.filter(res =>
-                res.status.toLowerCase().includes(statusFilter.toLowerCase())
-            );
-        }
-        if (cancellationReasonFilter) {
-            tempReservations = tempReservations.filter(res =>
-                (res.cancellationReason || "None").toLowerCase().includes(cancellationReasonFilter.toLowerCase())
-            );
-        }
-        if (startDate && endDate) {
-            const start = new Date(startDate);
-            const end = new Date(endDate);
-
-            tempReservations = tempReservations.filter(res => {
-                const reservationDate = new Date(res.reservationDateTime);
-                return reservationDate >= start && reservationDate <= end;
-            });
-        }
-
-        setFilteredReservations(tempReservations);
-    }, [
-        restaurantFilter,
-        tableFilter,
-        partySizeFilter,
-        statusFilter,
-        cancellationReasonFilter,
-        startDate,
-        endDate,
-        reservations
-    ]);
-
-    const resetFilters = () => {
-        setRestaurantFilter("");
-        setTableFilter("");
-        setPartySizeFilter("");
-        setStatusFilter("");
-        setCancellationReasonFilter("");
-        setStartDate("");
-        setEndDate("");
-    };
-
-    if (loading) return <div>Loading...</div>;
-    if (error) return <div className="alert alert-danger">{error}</div>;
-
-    const formatDateTime = (dateString) => {
-        if (!dateString) return "N/A";
-        const date = new Date(dateString);
-        return date.toLocaleString("en-GB", {
-            day: "2-digit",
-            month: "short",
-            year: "numeric",
-            hour: "2-digit",
-            minute: "2-digit",
-        });
-    };
-
-    return (
-        <div className="container mt-5">
-            <h3 className="mb-4 text-center">Past Reservations</h3>
-
-            <div className="row mb-4 align-items-end">
-                <div className="col-md-2">
-                    <input
-                        type="text"
-                        className="form-control"
-                        placeholder="Filter by Restaurant"
-                        value={restaurantFilter}
-                        onChange={(e) => setRestaurantFilter(e.target.value)}
-                    />
-                </div>
-                <div className="col-md-2">
-                    <input
-                        type="number"
-                        className="form-control"
-                        placeholder="Filter by Table ID"
-                        value={tableFilter}
-                        onChange={(e) => setTableFilter(e.target.value)}
-                    />
-                </div>
-                <div className="col-md-4 d-flex gap-2">
-                    <input
-                        type="date"
-                        className="form-control"
-                        value={startDate}
-                        onChange={(e) => setStartDate(e.target.value)}
-                    />
-                    <input
-                        type="date"
-                        className="form-control"
-                        value={endDate}
-                        onChange={(e) => setEndDate(e.target.value)}
-                    />
-                </div>
-                <div className="col-md-2">
-                    <input
-                        type="number"
-                        className="form-control"
-                        placeholder="Party Size"
-                        value={partySizeFilter}
-                        onChange={(e) => setPartySizeFilter(e.target.value)}
-                    />
-                </div>
-                <div className="col-md-2">
-                    <select
-                        value={statusFilter}
-                        onChange={(e) => setStatusFilter(e.target.value)}
-                        className="form-control"
-                    >
-                        <option value="">Filter by Status</option>
-                        <option value="successful">Successful</option>
-                        <option value="canceled">Canceled</option>
-                    </select>
-                </div>
-                <div className="col-md-2 mt-2">
-                    <input
-                        type="text"
-                        className="form-control"
-                        placeholder="Cancellation Reason"
-                        value={cancellationReasonFilter}
-                        onChange={(e) => setCancellationReasonFilter(e.target.value)}
-                    />
-                </div>
-                <div className="col-md-2 mt-2">
-                    <button
-                        onClick={resetFilters}
-                        className="btn btn-outline-secondary w-100"
-                    >
-                        Reset Filters
-                    </button>
-                </div>
-            </div>
-
-            <div className="table-responsive">
-                <table className="table table-striped table-hover table-bordered align-middle">
-                    <thead className="table-dark text-center">
-                    <tr>
-                        <th>#</th>
-                        <th>Restaurant</th>
-                        <th>Table</th>
-                        <th>Check In Date</th>
-                        <th>Reserved on</th>
-                        <th>Party Size</th>
-                        <th>Special Requests</th>
-                        <th>Status</th>
-                        <th>Cancellation Reason</th>
-                    </tr>
-                    </thead>
-                    <tbody>
-                    {filteredReservations.length > 0 ? (
-                        filteredReservations.map((res, index) => (
-                            <tr key={res.id} onClick={() => setSelectedReservation(res)} style={{ cursor: "pointer" }}>
-                                <td>{index + 1}</td>
-                                <td>{res.restaurant?.name || "N/A"}</td>
-                                <td>{res.table?.id || "N/A"}</td>
-                                <td>{formatDateTime(res.checkInDate)}</td>
-                                <td>{new Date(res.reservationDateTime).toLocaleString()}</td>
-                                <td>{res.partySize}</td>
-                                <td>{res.specialRequests || "None"}</td>
-                                <td>{res.status}</td>
-                                <td>{res.cancellationReason || "None"}</td>
-                            </tr>
-                        ))
-                    ) : (
-                        <tr>
-                            <td colSpan="9" className="text-center">No reservations found.</td>
-                        </tr>
-                    )}
-                    </tbody>
-                </table>
-            </div>
-
-            {/* Modal for reservation details */}
-            {selectedReservation && (
-                <div className="modal fade show d-block" tabIndex="-1" style={{ backgroundColor: "rgba(0,0,0,0.5)" }} onClick={() => setSelectedReservation(null)}>
-                    <div className="modal-dialog modal-lg" onClick={(e) => e.stopPropagation()}>
-                        <div className="modal-content">
-                            <div className="modal-header">
-                                <h5 className="modal-title">Reservation Details</h5>
-                                <button type="button" className="btn-close" onClick={() => setSelectedReservation(null)}></button>
-                            </div>
-                            <div className="modal-body">
-                                <h6>🍽️ Restaurant Info</h6>
-                                <p><strong>Name:</strong> {selectedReservation.restaurant?.name}</p>
-                                <p><strong>Address:</strong> {selectedReservation.restaurant?.address}</p>
-                                <p><strong>Phone:</strong> {selectedReservation.restaurant?.phone}</p>
-                                <p><strong>Rating:</strong> {selectedReservation.restaurant?.rating} ⭐</p>
-                                <p><strong>Cuisine:</strong> {selectedReservation.restaurant?.cuisineType}</p>
-                                <p><strong>Hours:</strong> {selectedReservation.restaurant?.operatingHours}</p>
-                                {selectedReservation.restaurant?.website && (
-                                    <p><strong>Website:</strong> <a href={`https://${selectedReservation.restaurant.website}`} target="_blank" rel="noopener noreferrer">{selectedReservation.restaurant.website}</a></p>
-                                )}
-
-                                <hr />
-
-                                <h6>🪑 Table Info</h6>
-                                <p><strong>Location:</strong> {selectedReservation.table?.location}</p>
-                                <p><strong>Capacity:</strong> {selectedReservation.table?.capacity}</p>
-                                <p><strong>Smoking Area:</strong> {selectedReservation.table?.smokingArea ? "Yes" : "No"}</p>
-                                <p><strong>Description:</strong> {selectedReservation.table?.description}</p>
-                                <p><strong>Reservation Duration:</strong> {selectedReservation.table?.reservationDurationHours} hours</p>
-
-                                <hr />
-
-                                <h6>📋 Reservation Info</h6>
-                                <p><strong>Check-In Date:</strong> {formatDateTime(selectedReservation.checkInDate)}</p>
-                                <p><strong>Reserved on:</strong> {new Date(selectedReservation.reservationDateTime).toLocaleString()}</p>
-                                <p><strong>Party Size:</strong> {selectedReservation.partySize}</p>
-                                <p><strong>Special Requests:</strong> {selectedReservation.specialRequests || "None"}</p>
-                                <p><strong>Status:</strong> {selectedReservation.status}</p>
-                                <p><strong>Cancellation Reason:</strong> {selectedReservation.cancellationReason || "None"}</p>
-                            </div>
-                            <div className="modal-footer">
-                                <button className="btn btn-secondary" onClick={() => setSelectedReservation(null)}>Close</button>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            )}
-        </div>
-    );
-};
-
-export default ReservationHistory;
Index: my-react-app/src/components/Reservations.js
===================================================================
--- my-react-app/src/components/Reservations.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/src/components/Reservations.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,13 +1,11 @@
-import React, {useState, useEffect, useContext} from 'react';
+import React, { useState, useEffect } from 'react';
 import axios from 'axios';
 import 'bootstrap/dist/css/bootstrap.min.css';
 import {useNavigate} from "react-router-dom";
-import {jwtDecode} from "jwt-decode";
-import {RestaurantContext} from "./RestaurantContext";
 
 
 const Reservations = () => {
     const navigate = useNavigate();
-    const { restaurants } = useContext(RestaurantContext);
+
     const [reservations, setReservations] = useState([]);
 
@@ -15,13 +13,5 @@
         const fetchReservations = async () => {
             try {
-                const token = localStorage.getItem("token");
-                if (!token) {
-                    console.error("No token found");
-                    return;
-                }
-                const decodedToken = jwtDecode(token);
-                const userId = decodedToken.iss;
-
-                const response = await axios.get(`http://localhost:8081/api/reservations/by/${userId}`);
+                const response = await axios.get('http://localhost:8080/api/reservations'); // Adjust URL as needed
                 setReservations(response.data);
             } catch (error) {
@@ -41,5 +31,5 @@
     const handleCancelReservation = async (reservationID) => {
         try {
-            await axios.delete(`http://localhost:8081/api/reservations/delete/${reservationID}`);
+            await axios.delete(`http://localhost:8080/api/reservations/delete/${reservationID}`);
             setReservations(reservations.filter(reservation => reservation.reservationID !== reservationID));
             alert('Reservation canceled successfully!');
@@ -49,82 +39,49 @@
         }
     };
+
+
     return (
         <div className="container">
+            <h2>Reservations</h2>
             <div className="row">
-                {reservations.length === 0 ? (
-                    <div className="text-center mt-5">
-                        <h4>No active reservations</h4>
-                        <p>Looking for a place to dine? Check out our <a href="/restaurants" className="text-primary">restaurants</a>.</p>
-                    </div>
-                ) : (
-                    reservations.map(reservation => (
-                        <div key={reservation.reservationID} className="col-md-4 mb-4">
-                            <div className="card h-100">
-                                <div className="card-body">
-                                    <h5 className="card-title">Reservation ID: {reservation.reservationID}</h5>
-                                    <p className="card-text">
-                                        Restaurant: {
-                                        restaurants.find(r => r.restaurantId === reservation.restaurantId)?.name || "Not specified"
-                                    }
-                                    </p>
-
-                                    <p className="card-text">Table
-                                        Number: {reservation?.tableNumber || "Not specified"}</p>
-                                    <p className="card-text">
-                                        Reservation Date: {reservation.checkInTime ?
-                                        new Date(reservation.checkInTime).toLocaleDateString('en-US', {
-                                            weekday: 'long', year: 'numeric', month: 'long', day: 'numeric'
-                                        }) :
-                                        "Not specified"}
-                                    </p>
-                                    <p className="card-text">
-                                        Reservation Time: {reservation.checkInTime ?
-                                        new Date(reservation.checkInTime).toLocaleTimeString('en-US', {
-                                            hour: 'numeric', minute: 'numeric', hour12: true
-                                        }) :
-                                        "Not specified"}
-                                    </p>
-                                    <p className="card-text">Reservation made on: {reservation.reservationDateTime ?
-                                        new Date(reservation.reservationDateTime).toLocaleTimeString('en-US', {
-                                            hour: 'numeric', minute: 'numeric', hour12: true
-                                        }) :
-                                        "Not specified"}  {reservation.reservationDateTime ?
-                                        new Date(reservation.reservationDateTime).toLocaleDateString('en-US', {
-                                            weekday: 'long', year: 'numeric', month: 'long', day: 'numeric'
-                                        }) :
-                                        "Not specified"} </p>
-                                    <p className="card-text">Party Size: {reservation.partySize || "Not specified"}</p>
-                                    {reservation.preOrderedItems && reservation.preOrderedItems.length > 0 ? (
-                                        <div className="mt-3">
-                                            <h5 className="text-primary">Pre-Ordered Items:</h5>
-                                            <ul className="list-group mb-3">
-                                                {reservation.preOrderedItems.map((item, index) => (
-                                                    <li key={index} className="list-group-item d-flex justify-content-between align-items-center">
-                                                        <span><strong>{item?.preorderedItemName}</strong> × {item.quantity}</span>
-                                                        <span className="badge bg-success rounded-pill">${(item.price * item.quantity).toFixed(2)}</span>
-                                                    </li>
-                                                ))}
-                                            </ul>
-
-                                            <div className="alert alert-info text-center" role="alert">
-                                                <h5>Grand Total: ${reservation.preOrderedItems.reduce((acc, item) => acc + (item.quantity * item.price), 0).toFixed(2)}</h5>
-                                            </div>
-                                        </div>
-                                    ) : (
-                                        <p>No pre-ordered items.</p>
-                                    )}
-                                    <p className="card-text text-danger">Special Requests: {reservation.specialRequests || "None"}</p>
-                                    <p className="card-text">Status: {reservation.status || "Pending"}</p>
-                                    <p className="card-text text-danger">Grace period of 15 minutes +-</p>
-                                    <div className="d-flex justify-content-between mt-3">
-                                        <button
-                                            className="btn btn-warning"
-                                            onClick={() => handleEditReservation(reservation.reservationID)}>
-                                            Edit Reservation
+                {reservations.map(reservation => (
+                    <div key={reservation.reservationID} className="col-md-4 mb-4">
+                        <div className="card">
+                            <div className="card-body">
+                                <div className="card-title">Reservation ID: {reservation.reservationID}</div>
+                                <div className="card-text">Restaurant: {reservation.restaurant.name}</div>
+                                <div className="card-text">Table Number: {reservation.table.id}</div>
+                                {/* Format reservation date and time */}
+                                <div className="card-text">Reservation
+                                    Date: {new Date(reservation.checkInTime).toLocaleDateString('en-US', {
+                                        weekday: 'long',
+                                        year: 'numeric',
+                                        month: 'long',
+                                        day: 'numeric'
+                                    })}</div>
+                                <div className="card-text">Reservation
+                                    Time: {new Date(reservation.checkInTime).toLocaleTimeString('en-US', {
+                                        hour: 'numeric',
+                                        minute: 'numeric',
+                                        hour12: true
+                                    })}</div>
+                                {/* End of formatted date and time */}
+                                <div className="card-text">Party Size: {reservation.partySize}</div>
+                                <div className="card-text text-danger">Special
+                                    Requests: {reservation.specialRequests}</div>
+                                <div className="card-text">Status: {reservation.status}</div>
+                                <div className="card-text text-danger">Grace period of 15 minutes +-</div>
+                                <br/>
+                                <div className="row">
+                                    <div className="col">
+                                        <button className="danger text-bg-warning border-0"
+                                                onClick={() => handleEditReservation(reservation.reservationID)}>Edit
+                                            Reservation
                                         </button>
-                                        <button
-                                            className="btn btn-danger"
-                                            onClick={() => handleCancelReservation(reservation.reservationID)}>
-                                            Cancel Reservation
+                                    </div>
+                                    <div className="col">
+                                        <button className="danger text-bg-danger border-0"
+                                                onClick={() => handleCancelReservation(reservation.reservationID)}>Cancel
+                                            Reservation
                                         </button>
                                     </div>
@@ -132,11 +89,12 @@
                             </div>
                         </div>
-                    ))
-                )}
+                    </div>
+                ))}
             </div>
         </div>
     );
+    p
+
 };
 
 export default Reservations;
-
Index: -react-app/src/components/RestaurantCard.js
===================================================================
--- my-react-app/src/components/RestaurantCard.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,22 +1,0 @@
-import React from 'react';
-import StarRating from './StarRating';
-
-const RestaurantCard = ({ restaurant, onDetailClick }) => {
-    return (
-        <div className="col-md-4 mb-4">
-            <div className="card">
-                <div className="card-body">
-                    <h5 className="card-title">
-                        {restaurant.name} <StarRating rating={restaurant.rating} />
-                    </h5>
-                    <p className="card-text">{restaurant.cuisineType}</p>
-                    <p className="card-text">{restaurant.operatingHours}</p>
-                    <p className="card-text">Ul. {restaurant.address}</p>
-                </div>
-                <button onClick={() => onDetailClick(restaurant.restaurantId)} className="btn btn-primary">View Details</button>
-            </div>
-        </div>
-    );
-};
-
-export default RestaurantCard;
Index: -react-app/src/components/RestaurantContext.js
===================================================================
--- my-react-app/src/components/RestaurantContext.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,27 +1,0 @@
-import React, { createContext, useState, useEffect } from 'react';
-import axios from 'axios';
-
-export const RestaurantContext = createContext();
-
-export const RestaurantProvider = ({ children }) => {
-    const [restaurants, setRestaurants] = useState([]);
-
-    useEffect(() => {
-        if (restaurants.length > 0) return;
-        const fetchRestaurants = async () => {
-            try {
-                const response = await axios.get('http://localhost:8081/api/restaurants');
-                setRestaurants(response.data);
-            } catch (error) {
-                console.error('Error fetching restaurants:', error);
-            }
-        };
-        fetchRestaurants();
-    }, []);
-
-    return (
-        <RestaurantContext.Provider value={{ restaurants }}>
-            {children}
-        </RestaurantContext.Provider>
-    );
-};
Index: my-react-app/src/components/RestaurantDetails.js
===================================================================
--- my-react-app/src/components/RestaurantDetails.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/src/components/RestaurantDetails.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -5,18 +5,15 @@
 import { useParams } from 'react-router-dom';
 import StarRating from "./StarRating";
-import MenuList from "./MenuList";
-
 
 const RestaurantDetails = () => {
     const navigate = useNavigate();
+
     const { id } = useParams();
-    const [preOrderedItems, setPreOrderedItems] = useState([]);
-
     const [restaurant, setRestaurant] = useState(null);
     const [selectedTableId, setSelectedTableId] = useState('');
-    const [selectedDate, setSelectedDate] = useState('');
-    const [selectedTime, setSelectedTime] = useState('');
-    const [timeOptions, setTimeOptions] = useState([]);
+    const [selectedTimeSlot, setSelectedTimeSlot] = useState('');
     const [selectedTable, setSelectedTable] = useState(null);
+    const [filteredTimeSlots, setFilteredTimeSlots] = useState([]);
+    const [selectedCapacity, setSelectedCapacity] = useState(''); // Define selectedCapacity state
 
     useEffect(() => {
@@ -24,5 +21,5 @@
             try {
                 if (!id) return;
-                const response = await axios.get(`http://localhost:8081/api/restaurants/${id}`);
+                const response = await axios.get(`http://localhost:8080/api/restaurants/${id}`);
                 setRestaurant(response.data);
             } catch (error) {
@@ -35,9 +32,9 @@
 
     useEffect(() => {
-        if (!selectedTableId) return;
+        if (!selectedTableId) return; // If no table is selected, return early
 
         const fetchTableDetails = async () => {
             try {
-                const response = await axios.get(`http://localhost:8081/api/tables/${selectedTableId}`);
+                const response = await axios.get(`http://localhost:8080/api/tables/${selectedTableId}`);
                 setSelectedTable(response.data);
             } catch (error) {
@@ -49,76 +46,43 @@
     }, [selectedTableId]);
 
-    const today = new Date();
-    const year = today.getFullYear();
-    const month = String(today.getMonth() + 1).padStart(2, '0');
-    const day = String(today.getDate()).padStart(2, '0');
-    const formattedDate = `${year}-${month}-${day}`;
-    const parseOperatingHours = (operatingHours) => {
-        const [start, end] = operatingHours.split('-');
-        const [startHour, startMinute] = start.split(':').map(Number);
-        const [endHour, endMinute] = end.split(':').map(Number);
+    useEffect(() => {
+        if (!selectedTable || !restaurant) return; // If table or restaurant is not loaded, return early
 
-        const startTime = new Date();
-        startTime.setHours(startHour, startMinute, 0, 0);
+        // Filter time slots based on the selected table
+        const currentTime = new Date();
+        const filteredSlots = selectedTable.timeSlots.filter(timeSlot => new Date(timeSlot) >= currentTime);
+        setFilteredTimeSlots(filteredSlots);
+    }, [selectedTable, restaurant]);
 
-        const endTime = new Date();
-        endTime.setHours(endHour < startHour ? endHour + 24 : endHour, endMinute, 0, 0);
 
-        return { startTime, endTime };
+    const formatTimeSlot = (timeSlot) => {
+        const date = new Date(timeSlot);
+        const formattedDate = date.toLocaleDateString();
+        const formattedTime = date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
+        return `${formattedDate} - ${formattedTime}`;
     };
 
-    const generateTimeOptions = (operatingHours) => {
-        const { startTime, endTime } = parseOperatingHours(operatingHours);
-        const now = new Date();
-
-        const selectedDateObj = new Date(selectedDate);
-        const isToday = selectedDateObj.toDateString() === now.toDateString();
-
-        let currentTime = isToday ? roundToNext15Minutes(new Date()) : new Date(startTime);
-
-        const options = [];
-        while (currentTime <= endTime) {
-            options.push(currentTime.toTimeString().slice(0, 5));
-            currentTime = new Date(currentTime.getTime() + 15 * 60 * 1000);
-        }
-
-        return options;
+    const handleTableSelect = (event) => {
+        const selectedTableId = event.target.value;
+        setSelectedTableId(selectedTableId);
     };
 
-    useEffect(() => {
-        if (restaurant && selectedDate) {
-            const options = generateTimeOptions(restaurant.operatingHours);
-            setTimeOptions(options);
-        }
-    }, [restaurant, selectedDate]);
-
-    const handleTableSelect = (event) => {
-        setSelectedTableId(event.target.value);
+    const handleTimeSlotSelect = (event) => {
+        const selectedTimeSlot = event.target.value;
+        setSelectedTimeSlot(selectedTimeSlot);
     };
 
-    const handleReservationConfirmation = () => {
-        const encodedTableId = encodeURIComponent(selectedTableId);
-        const encodedDateTime = encodeURIComponent(`${selectedDate}T${selectedTime}`);
-        const encodedRestaurantId = encodeURIComponent(restaurant.restaurantId);
+    const handleReservationConfirmation = (restaurant) => {
+        const tableNumber = selectedTableId;
+        const formattedTimeSlot = selectedTimeSlot;
+        const restaurantId = restaurant.restaurantId;
 
-        const totalPrice = preOrderedItems.reduce((acc, item) => acc + item.price * item.quantity, 0).toFixed(2);
+        const encodedTableNumber = encodeURIComponent(tableNumber);
+        const encodedTimeSlot = encodeURIComponent(formattedTimeSlot);
+        const encodedRestaurantId = encodeURIComponent(restaurantId);
 
-        navigate(`/reservationConfirmation/${encodedTableId}/${encodedDateTime}/${encodedRestaurantId}`, {
-            state: {
-                preOrderedItems: preOrderedItems,
-                totalPrice: totalPrice,
-            }
-        });
+        navigate(`/reservationConfirmation/${encodedTableNumber}/${encodedTimeSlot}/${encodedRestaurantId}`);
     };
 
-    const roundToNext15Minutes = (date) => {
-        const minutes = date.getMinutes();
-        const remainder = minutes % 15;
-        if (remainder === 0) return date;
-
-        date.setMinutes(minutes + 15 - remainder);
-        date.setSeconds(0, 0);
-        return date;
-    };
 
     return (
@@ -127,5 +91,5 @@
                 <>
                     <h2 className="card-title">
-                        {restaurant.name} <StarRating key={restaurant.id} rating={restaurant.rating} />
+                        {restaurant.name} <StarRating key={restaurant.id} rating={restaurant.rating}/>
                     </h2>
                     <div className="restaurant-details">
@@ -134,63 +98,30 @@
                         <p>Address: {restaurant.address}</p>
                         <p>Phone: {restaurant.phone}</p>
-                        <p>
-                            Website: <a href={restaurant.website}>{restaurant.website}</a>
-                        </p>
+                        <p>Website: <a href={restaurant.website}>{restaurant.website}</a></p>
                         <p>Social Media Links: {restaurant.socialMediaLinks}</p>
 
                         <label>Select Table:</label>
-                        <select
-                            className="form-select"
-                            aria-label="Select Table"
-                            onChange={handleTableSelect}
-                            value={selectedTableId}
-                        >
+                        <select className="form-select" aria-label="Select Table" onChange={handleTableSelect}
+                                value={selectedTableId}>
                             <option value="">Select Table</option>
-                            {restaurant.tablesList.map((table) => (
-                                <option key={table.id} value={table.id}>
-                                    {`Capacity: ${table.capacity} - ${table.location}`}
-                                </option>
+                            {restaurant.tablesList.map((table, index) => (
+                                <option key={index}
+                                        value={table.id}>{`Capacity: ${table.capacity} - ${table.location}`}</option>
                             ))}
                         </select>
-
                         {selectedTable && (
                             <>
-                                <label>Select Date:</label>
-                                <input
-                                    type="date"
-                                    className="form-control mt-2"
-                                    onChange={(event) => setSelectedDate(event.target.value)}
-                                    value={selectedDate}
-                                    min={formattedDate}
-                                    onKeyDown={(e) => e.preventDefault()}
-                                />
-                                {!selectedDate && <p style={{ color: "red" }}>Please select a valid date.</p>}
-
-                                <label>Select Time:</label>
-                                <select
-                                    className="form-select mt-2"
-                                    onChange={(event) => setSelectedTime(event.target.value)}
-                                    value={selectedTime}
-                                    disabled={!selectedDate}
-                                >
-                                    <option value="">Select Time</option>
-                                    {timeOptions.map((time, index) => (
-                                        <option key={index} value={time}>
-                                            {time}
-                                        </option>
+                                <label>Select Time Slot:</label>
+                                <select className="form-select mt-2" aria-label="Select Time Slot" onChange={handleTimeSlotSelect}>
+                                    <option value="">Select Time Slot</option>
+                                    {filteredTimeSlots.map((timeSlot, index) => (
+                                        <option key={index} value={timeSlot}>{formatTimeSlot(timeSlot)}</option>
                                     ))}
                                 </select>
                             </>
                         )}
-                        <MenuList
-                            restaurantId={restaurant.restaurantId}
-                            setPreOrderedItems={setPreOrderedItems}
-                            preOrderedItems={preOrderedItems}
-                        />
-                        <br />
-                        <button
-                            className="btn btn-primary"
-                            onClick={handleReservationConfirmation}
-                            disabled={!selectedTableId || !selectedDate || !selectedTime}>
+                        <br/>
+                        {/* Add a button to trigger reservation confirmation */}
+                        <button className="btn btn-primary" onClick={() => handleReservationConfirmation(restaurant)}>
                             Confirm Reservation
                         </button>
Index: my-react-app/src/components/RestaurantInfo.js
===================================================================
--- my-react-app/src/components/RestaurantInfo.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/src/components/RestaurantInfo.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,5 +1,4 @@
 import React from 'react';
 import StarRating from "./StarRating";
-import MenuList from "./MenuList";
 
 const RestaurantInfo = ({ restaurant }) => {
@@ -9,8 +8,7 @@
                 {restaurant.name} <StarRating key={restaurant.id} rating={restaurant.rating}/>
             </h2>
-            <p className="card-text">{restaurant.cuisineType}</p>
-            <p className="card-text">{restaurant.operatingHours}</p>
-            <p className="card-text">Ul. {restaurant.address}</p>
-            <MenuList restaurantId={restaurant.id} />
+            <p className="card-text">{restaurant.cuisineType}</p> {/* Assuming cuisineType is provided */}
+            <p className="card-text">{restaurant.operatingHours}</p> {/* Assuming operatingHours is provided */}
+            <p className="card-text">Ul. {restaurant.address}</p> {/* Assuming address is provided */}
         </div>
     );
Index: my-react-app/src/components/Restaurants.js
===================================================================
--- my-react-app/src/components/Restaurants.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/src/components/Restaurants.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,61 +1,28 @@
-import React, {useState, useEffect, useContext} from 'react';
+import React, { useState, useEffect } from 'react';
+import axios from 'axios';
 import 'bootstrap/dist/css/bootstrap.min.css';
 import StarRating from './StarRating';
 import { useNavigate } from 'react-router-dom';
-import {RestaurantContext} from "./RestaurantContext";
-import {Alert} from "bootstrap";
-
-const parseTime = (timeString) => {
-    const [hours, minutes] = timeString.trim().split(':').map(Number);
-    return new Date().setHours(hours, minutes, 0, 0);
-};
-
-const roundToNextQuarter = (date) => {
-    const minutes = date.getMinutes();
-    const roundedMinutes = Math.floor(minutes / 15) * 15;
-    date.setMinutes(roundedMinutes, 0, 0);
-    return date;
-};
-
-const shouldMoveToNextDay = (currentTime, endTime) => {
-    return (endTime - currentTime) <= 2 * 60 * 60 * 1000;
-};
 
 const Restaurants = () => {
     const [restaurants, setRestaurants] = useState([]);
     const navigate = useNavigate();
-    const restaurantContext = useContext(RestaurantContext);
 
     useEffect(() => {
-        setRestaurants(restaurantContext.restaurants);
-    }, [restaurantContext]);
+        const fetchRestaurants = async () => {
+            try {
+                const response = await axios.get('http://localhost:8080/api/restaurants');
+                setRestaurants(response.data);
+            } catch (error) {
+                console.error('Error fetching restaurants:', error);
+            }
+        };
 
-
-    const generateTimeSlots = (operatingHours) => {
-        const timeSlots = [];
-        const [startTimeStr, endTimeStr] = operatingHours.split('-').map((time) => time.trim());
-
-        const startTime = parseTime(startTimeStr);
-        let endTime = parseTime(endTimeStr);
-
-        const currentTime = new Date().getTime();
-        if (shouldMoveToNextDay(currentTime, endTime)) {
-            endTime += 24 * 60 * 60 * 1000;
-        }
-
-        let currentTimeSlot = new Date(startTime);
-        currentTimeSlot = roundToNextQuarter(currentTimeSlot);
-
-        while (currentTimeSlot.getTime() < endTime) {
-            timeSlots.push(currentTimeSlot.toISOString());
-            currentTimeSlot.setMinutes(currentTimeSlot.getMinutes() + 15);
-        }
-
-        return timeSlots;
-    };
+        fetchRestaurants();
+    }, []);
 
     const handleDetailClick = (restaurantId) => {
         navigate(`/restaurants/${restaurantId}`);
-    };
+    }
 
     const handleTimeSlotClick = (table, timeSlot, restaurant) => {
@@ -64,49 +31,40 @@
         const restaurantId = restaurant.restaurantId;
 
-        const encodedTableNumber = encodeURIComponent(tableNumber);
+        const encodedTableNumber = encodeURI(tableNumber);
         const encodedTimeSlot = encodeURIComponent(formattedTimeSlot);
         const encodedRestaurantId = encodeURIComponent(restaurantId);
 
         navigate(`/reservationConfirmation/${encodedTableNumber}/${encodedTimeSlot}/${encodedRestaurantId}`);
-    };
+    }
 
     const renderTimeSlots = (tablesList, restaurant) => {
         const currentTime = new Date().getTime();
-        let renderedTimeSlots = {};
+        let renderedTimeSlots = {}; // Object to store rendered slots for each table capacity
 
-        if (tablesList.length === 0) {
-            return <p>No tables available for reservations at this restaurant.</p>;
-        }
-
-        return tablesList.flatMap((table) => {
-            const tableTimeSlots = generateTimeSlots(restaurant.operatingHours);
-
+        return tablesList.flatMap(table => {
+            // Render capacity header when encountering a new capacity
             if (!renderedTimeSlots[table.capacity]) {
                 renderedTimeSlots[table.capacity] = 0;
                 return (
                     <div key={table.capacity}>
-                        <h3>Table for {table.capacity} guests</h3>
-                        {tableTimeSlots.map((timeSlot, index) => {
+                        <h3>Table for: {table.capacity}</h3>
+                        {table.timeSlots.map((timeSlot, index) => {
                             const timeSlotTime = new Date(timeSlot).getTime();
+                            const tableCapacity = table.capacity;
 
-                            if (timeSlotTime > currentTime && renderedTimeSlots[table.capacity] < 3) {
-                                renderedTimeSlots[table.capacity]++;
+                            // Check if the time slot is after the current time and limit to 3 slots
+                            if (timeSlotTime > currentTime && renderedTimeSlots[tableCapacity] < 3) {
+                                renderedTimeSlots[tableCapacity]++;
                                 const timeSlotDateTime = new Date(timeSlot);
-                                const formattedTime = timeSlotDateTime.toLocaleTimeString([], {
-                                    hour: '2-digit',
-                                    minute: '2-digit'
-                                });
+                                const formattedTime = timeSlotDateTime.toLocaleTimeString();
+                                const formattedDateTime = timeSlotDateTime.toLocaleString(); // Format for both date and time
 
                                 return (
-                                    <button
-                                        key={index}
-                                        className="btn btn-primary me-2 mb-2"
-                                        onClick={() => handleTimeSlotClick(table, timeSlot, restaurant)}
-                                    >
-                                        {formattedTime} {}
+                                    <button key={index} className="btn btn-primary me-2 mb-2" onClick={() => handleTimeSlotClick(table, timeSlot, restaurant)}>
+                                        {formattedDateTime} {/* Display both date and time */}
                                     </button>
                                 );
                             } else {
-                                return null;
+                                return null; // Render nothing if the condition is not met
                             }
                         })}
@@ -114,8 +72,11 @@
                 );
             } else {
+                // If capacity has been rendered, return null to avoid duplicate rendering
                 return null;
             }
         });
-    };
+
+    }
+
 
     return (
@@ -124,25 +85,18 @@
             <div className="row">
                 {restaurants.map((restaurant) => (
-                    <div key={restaurant.restaurantId} className="col-md-4 mb-4">
+                    <div key={restaurant.id} className="col-md-4 mb-4">
                         <div className="card">
                             <div className="card-body">
                                 <h5 className="card-title">
-                                    {restaurant.name}
+                                    {restaurant.name} <StarRating key={restaurant.id} rating={restaurant.rating}/>
                                 </h5>
                                 <p className="card-text">{restaurant.cuisineType}</p>
                                 <p className="card-text">{restaurant.operatingHours}</p>
                                 <p className="card-text">Ul. {restaurant.address}</p>
-
-                                {restaurant.tablesList && restaurant.tablesList.length > 0 ? (
-                                    <div className="d-flex flex-wrap">
-                                        {renderTimeSlots(restaurant.tablesList, restaurant)}
-                                    </div>
-                                ) : (
-                                    <p>No tables available for reservations at this restaurant.</p>
-                                )}
+                                <div className="d-flex flex-wrap">
+                                    {renderTimeSlots(restaurant.tablesList.flatMap((table) => table), restaurant)}
+                                </div>
                             </div>
-                            <button onClick={() => handleDetailClick(restaurant.restaurantId)} className="btn btn-primary">
-                                View Details
-                            </button>
+                            <button onClick={() => handleDetailClick(restaurant.restaurantId)} className="btn btn-primary">View Details</button>
                         </div>
                     </div>
Index: my-react-app/src/components/StarRating.js
===================================================================
--- my-react-app/src/components/StarRating.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/src/components/StarRating.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -2,6 +2,9 @@
 
 const StarRating = ({ rating }) => {
+    // Convert the rating to a number between 0 and 5
     const normalizedRating = Math.min(Math.max(0, rating), 5);
+    // Calculate the number of filled stars
     const filledStars = Math.floor(normalizedRating);
+    // Calculate the number of half stars
     const hasHalfStar = normalizedRating - filledStars >= 0.5;
 
@@ -9,11 +12,9 @@
         <div>
             {[...Array(filledStars)].map((_, index) => (
-                <span key={`filled-${index}`} className="star">&#9733;</span>
+                <span key={index} className="star">&#9733;</span>
             ))}
-
-            {hasHalfStar && <span className="star half">&#9733;</span>}
-
+            {hasHalfStar && <span className="star">&#9734;</span>}
             {[...Array(5 - filledStars - (hasHalfStar ? 1 : 0))].map((_, index) => (
-                <span key={`empty-${index}`} className="star">&#9734;</span>
+                <span key={filledStars + index + 1} className="star">&#9734;</span>
             ))}
         </div>
@@ -22,3 +23,2 @@
 
 export default StarRating;
-
Index: -react-app/src/components/WelcomeContent.js
===================================================================
--- my-react-app/src/components/WelcomeContent.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,12 +1,0 @@
-import * as React from "react";
-
-export default class WelcomeContent extends React.Component {
-    render() {
-        return (
-            <div>
-                <h1>Welcome</h1>
-                <p>Login to see</p>
-            </div>
-        )
-    }
-}
Index: my-react-app/src/index.js
===================================================================
--- my-react-app/src/index.js	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ my-react-app/src/index.js	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -3,15 +3,9 @@
 import './index.css';
 import App from './App';
-import { CuisineProvider } from './components/CuisineContext';
-import {RestaurantProvider} from "./components/RestaurantContext";
 
 const root = ReactDOM.createRoot(document.getElementById('root'));
 root.render(
-    <React.StrictMode>
-        <CuisineProvider>
-            <RestaurantProvider>
-                    <App />
-            </RestaurantProvider>
-        </CuisineProvider>
-    </React.StrictMode>
+  <React.StrictMode>
+    <App />
+  </React.StrictMode>
 );
Index: package-lock.json
===================================================================
--- package-lock.json	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ package-lock.json	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -6,5 +6,4 @@
     "": {
       "dependencies": {
-        "classnames": "^2.5.1",
         "react-router-dom": "^6.22.1",
         "swagger-ui-express": "^5.0.0",
Index: package.json
===================================================================
--- package.json	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ package.json	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,5 +1,4 @@
 {
   "dependencies": {
-    "classnames": "^2.5.1",
     "react-router-dom": "^6.22.1",
     "swagger-ui-express": "^5.0.0",
Index: pom.xml
===================================================================
--- pom.xml	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ pom.xml	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -53,10 +53,4 @@
 		</dependency>
 		<dependency>
-			<groupId>org.modelmapper</groupId>
-			<artifactId>modelmapper</artifactId>
-			<version>3.1.0</version> <!-- Check for the latest version -->
-		</dependency>
-
-		<dependency>
 			<groupId>org.thymeleaf.extras</groupId>
 			<artifactId>thymeleaf-extras-springsecurity6</artifactId>
@@ -73,9 +67,4 @@
 			<version>3.2.1</version>
 			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>io.jsonwebtoken</groupId>
-			<artifactId>jjwt</artifactId>
-			<version>0.9.1</version>
 		</dependency>
 		<dependency>
@@ -103,22 +92,4 @@
 			<artifactId>spring-boot-starter-data-rest</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>org.mapstruct</groupId>
-			<artifactId>mapstruct</artifactId>
-			<version>1.4.2.Final</version> <!-- Replace with the latest version -->
-		</dependency>
-
-		<dependency>
-			<groupId>com.auth0</groupId>
-			<artifactId>java-jwt</artifactId>
-			<version>4.3.0</version>
-		</dependency>
-
-		<dependency>
-			<groupId>javax.xml.bind</groupId>
-			<artifactId>jaxb-api</artifactId>
-			<version>2.3.1</version>
-		</dependency>
-
 	</dependencies>
 
Index: src/main/java/com/example/rezevirajmasa/demo/bootstrap/DataInitialization.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/bootstrap/DataInitialization.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ src/main/java/com/example/rezevirajmasa/demo/bootstrap/DataInitialization.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,108 @@
+//package com.example.rezevirajmasa.demo.bootstrap;
+//
+//import com.example.rezevirajmasa.demo.model.Reservation;
+//import com.example.rezevirajmasa.demo.model.Restaurant;
+//import com.example.rezevirajmasa.demo.model.TableEntity;
+//import com.example.rezevirajmasa.demo.service.ReservationService;
+//import com.example.rezevirajmasa.demo.service.RestaurantService;
+//import com.example.rezevirajmasa.demo.service.TableService;
+//import jakarta.annotation.PostConstruct;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.boot.ApplicationArguments;
+//import org.springframework.stereotype.Component;
+//
+//import java.time.LocalDate;
+//import java.time.LocalDateTime;
+//import java.time.LocalTime;
+//import java.time.format.DateTimeFormatter;
+//import java.util.ArrayList;
+//import java.util.List;
+//
+//@Component
+//public class DataInitialization {
+//    private final RestaurantService restaurantService;
+//    private final TableService tableService;
+//    private final ReservationService reservationService;
+//
+//    public DataInitialization(RestaurantService restaurantService, TableService tableService, ReservationService reservationService) {
+//        this.restaurantService = restaurantService;
+//        this.tableService = tableService;
+//        this.reservationService = reservationService;
+//    }
+//
+////    @PostConstruct
+//    public void initData() {
+//        for(Restaurant restaurant : restaurantService.listall()) {
+//            extendTimeSlotsIndefinitely(restaurant);
+//        }
+//    }
+//
+//    private void extendTimeSlotsIndefinitely(Restaurant restaurant) {
+//        while (true) {
+//            String[] hours = restaurant.getOperatingHours().split("-");
+//            LocalTime startTime = LocalTime.parse(hours[0], DateTimeFormatter.ofPattern("HH:mm"));
+//            LocalTime endTime = LocalTime.parse(hours[1], DateTimeFormatter.ofPattern("HH:mm"));
+//
+//            // Get the current date and time
+//            LocalDateTime currentDateTime = LocalDateTime.now().with(startTime);
+//
+//            // Calculate the end date (current date + 3 days)
+//            LocalDateTime endDate = LocalDateTime.now().with(endTime).plusDays(3);
+//
+//            List<TableEntity> tables = restaurant.getTablesList();
+//            for (TableEntity table : tables) {
+//                List<LocalDateTime> existingTimeSlots = table.getTimeSlots();
+//                List<Reservation> existingReservations = reservationService.findReservationsByTableAndDateRange(table, currentDateTime, endDate);
+//                List<LocalDateTime> newTimeSlots = generateTimeSlots(currentDateTime, endDate, existingReservations, existingTimeSlots, startTime, endTime);
+//                existingTimeSlots.addAll(newTimeSlots);
+//                tableService.saveTable(table);
+//            }
+//
+//            // Sleep for a period before generating time slots again
+//            try {
+//                // Sleep for 24 hours
+//                Thread.sleep(24 * 60 * 60 * 1000);
+//            } catch (InterruptedException e) {
+//                // Handle interrupted exception
+//                break;
+//            }
+//        }
+//    }
+//
+//    private List<LocalDateTime> generateTimeSlots(LocalDateTime startDate, LocalDateTime endDate, List<Reservation> existingReservations, List<LocalDateTime> existingTimeSlots, LocalTime startTime, LocalTime endTime) {
+//        List<LocalDateTime> timeSlots = new ArrayList<>();
+//        LocalDateTime currentDateTime = startDate;
+//        LocalTime currentTime = startTime;
+//        LocalDate currentDate = LocalDate.now(); // Get the current date
+//
+//        // Generate time slots until the end date
+//        while (currentDateTime.isBefore(endDate)) {
+//            // Ensure the current date is within the restaurant's opening hours
+//            if (currentDateTime.toLocalTime().isBefore(startTime)) {
+//                currentDateTime = currentDateTime.plusDays(1).with(startTime); // Move to the next day and set the start time
+//                continue; // Skip generating time slots for this day
+//            }
+//
+//            final LocalDateTime currentTimeSlotStart = currentDateTime; // Declare a final local variable
+//
+//            // Check if the current time slot overlaps with existing reservations
+//            boolean overlapsReservations = existingReservations.stream()
+//                    .anyMatch(reservation -> isOverlapping(currentTimeSlotStart, currentTimeSlotStart.plusMinutes(15), reservation.getCheckInTime(), reservation.getCheckOutTime()));
+//            boolean overlapsExistingTimeSlots = existingTimeSlots.stream()
+//                    .anyMatch(existingSlot -> isOverlapping(currentTimeSlotStart, currentTimeSlotStart.plusMinutes(15), existingSlot, existingSlot.plusMinutes(15)));
+//
+//            if (!overlapsReservations && !overlapsExistingTimeSlots) {
+//                timeSlots.add(currentDateTime);
+//            }
+//
+//            // Move to the next time slot (add 15 minutes
+//            currentDateTime = currentDateTime.plusMinutes(15);
+//        }
+//
+//        return timeSlots;
+//    }
+//
+//    private boolean isOverlapping(LocalDateTime start1, LocalDateTime end1, LocalDateTime start2, LocalDateTime end2) {
+//        return start1.isBefore(end2) && start2.isBefore(end1);
+//    }
+//}
Index: src/main/java/com/example/rezevirajmasa/demo/bootstrap/ReservationInitializer.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/bootstrap/ReservationInitializer.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ src/main/java/com/example/rezevirajmasa/demo/bootstrap/ReservationInitializer.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,48 @@
+package com.example.rezevirajmasa.demo.bootstrap;
+
+import com.example.rezevirajmasa.demo.model.Reservation;
+import com.example.rezevirajmasa.demo.model.Restaurant;
+import com.example.rezevirajmasa.demo.service.ReservationHistoryService;
+import com.example.rezevirajmasa.demo.service.ReservationService;
+import org.springframework.stereotype.Component;
+
+import jakarta.annotation.PostConstruct;
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Component
+public class ReservationInitializer {
+    private final ReservationHistoryService reservationHistoryService;
+    private final ReservationService reservationService;
+
+    public ReservationInitializer(ReservationHistoryService reservationHistoryService, ReservationService reservationService) {
+        this.reservationHistoryService = reservationHistoryService;
+        this.reservationService = reservationService;
+    }
+
+    @PostConstruct
+    public void initializePastReservations() {
+        LocalDateTime currentTime = LocalDateTime.now();
+        List<Reservation> reservationsToMove = reservationService.findReservationsToMove(currentTime);
+
+        List<Restaurant.ReservationHistory> reservationHistories = reservationsToMove.stream()
+                .map(reservation -> new Restaurant.ReservationHistory(
+                        reservation.getCustomer(),
+                        reservation.getTable(),
+                        reservation.getRestaurant(),
+                        reservation.getReservationDateTime(),
+                        reservation.getPartySize(),
+                        reservation.getSpecialRequests(),
+                        "Done",
+                        null, // You can set cancellation reason if needed, it's not clear from the code provided
+                        reservation.getCheckInTime() // Use currentTime for check-in date
+                ))
+                .collect(Collectors.toList());
+
+        reservationHistoryService.moveReservationsToPast(reservationHistories);
+
+        reservationsToMove.forEach(reservation -> reservationService.deleteReservation(reservation.getReservationID()));
+    }
+
+}
Index: src/main/java/com/example/rezevirajmasa/demo/bootstrap/TimeSlotManagementService.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/bootstrap/TimeSlotManagementService.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ src/main/java/com/example/rezevirajmasa/demo/bootstrap/TimeSlotManagementService.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,81 @@
+package com.example.rezevirajmasa.demo.bootstrap;
+
+import com.example.rezevirajmasa.demo.model.Reservation;
+import com.example.rezevirajmasa.demo.model.Restaurant;
+import com.example.rezevirajmasa.demo.model.TableEntity;
+import com.example.rezevirajmasa.demo.repository.ReservationRepository;
+import com.example.rezevirajmasa.demo.repository.TableRepository;
+import jakarta.annotation.PostConstruct;
+import jakarta.annotation.PreDestroy;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cglib.core.Local;
+import org.springframework.stereotype.Component;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Component
+public class TimeSlotManagementService  {
+    @Autowired
+    private TableRepository tableRepository;
+    @Autowired
+    private ReservationRepository reservationRepository;
+
+    @PostConstruct
+    public void initializeTimeSlots() {
+        LocalDate startDate = LocalDate.now();
+        initializeTimeSlotsForNextDays(startDate);
+    }
+
+    private void initializeTimeSlotsForNextDays(LocalDate startDate) {
+        LocalDate currentDate = startDate;
+        for (int i = 0; i < 3; i++) {
+            Iterable<TableEntity> tableEntities = tableRepository.findAll();
+            for (TableEntity tableEntity : tableEntities) {
+                initializeTimeSlotsForTable(tableEntity, currentDate);
+                tableRepository.save(tableEntity);
+            }
+            currentDate = currentDate.plusDays(1);
+        }
+    }
+
+    private void initializeTimeSlotsForTable(TableEntity tableEntity, LocalDate date) {
+        // Get existing time slots for the table
+        List<LocalDateTime> existingTimeSlots = tableEntity.getTimeSlots().stream()
+                .filter(slot -> slot.toLocalDate().isEqual(date)) // Filter time slots for the specified date
+                .toList();
+
+        // If existing time slots are not null and not empty, return without initializing new ones
+        if (!existingTimeSlots.isEmpty()) {
+            return;
+        }
+
+        Restaurant restaurant = tableEntity.getRestaurant();
+        String[] hours = restaurant.getOperatingHours().split("-");
+        LocalTime startTime = LocalTime.parse(hours[0], DateTimeFormatter.ofPattern("HH:mm"));
+        LocalTime endTime = LocalTime.parse(hours[1], DateTimeFormatter.ofPattern("HH:mm"));
+
+        List<LocalDateTime> reservationCheckIns = getReservationCheckInsAfterNow(date);
+
+        tableEntity.initializeTimeSlots(startTime, endTime, Collections.singletonList(date), reservationCheckIns);
+    }
+
+    private List<LocalDateTime> getReservationCheckInsAfterNow(LocalDate date) {
+        LocalDateTime currentTime = LocalDateTime.now();
+        List<Reservation> reservations = reservationRepository.findByCheckInTimeAfterAndCheckInTimeBefore(
+                LocalDateTime.of(date, LocalTime.MIN), LocalDateTime.of(date, LocalTime.MAX));
+        List<LocalDateTime> checkIns = new ArrayList<>();
+        for (Reservation reservation : reservations) {
+            if (reservation.getCheckInTime().isAfter(currentTime)) {
+                checkIns.add(reservation.getCheckInTime());
+            }
+        }
+        return checkIns;
+    }
+}
Index: c/main/java/com/example/rezevirajmasa/demo/component/ReservationScheduler.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/component/ReservationScheduler.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,20 +1,0 @@
-package com.example.rezevirajmasa.demo.component;
-
-import com.example.rezevirajmasa.demo.service.ReservationService;
-import jakarta.annotation.PostConstruct;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-@Component
-public class ReservationScheduler {
-    private final ReservationService reservationService;
-
-    public ReservationScheduler(ReservationService reservationService) {
-        this.reservationService = reservationService;
-    }
-
-    @PostConstruct
-    void runOnStartup() {
-        reservationService.findReservationsToMove();
-    }
-}
Index: c/main/java/com/example/rezevirajmasa/demo/config/ModelMapperConfig.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/config/ModelMapperConfig.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,34 +1,0 @@
-package com.example.rezevirajmasa.demo.config;
-
-import com.example.rezevirajmasa.demo.dto.ReservationDTO;
-import com.example.rezevirajmasa.demo.dto.RestaurantDTO;
-import com.example.rezevirajmasa.demo.dto.TableDTO;
-import com.example.rezevirajmasa.demo.model.Reservation;
-import com.example.rezevirajmasa.demo.model.Restaurant;
-import com.example.rezevirajmasa.demo.model.TableEntity;
-import org.modelmapper.ModelMapper;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-public class ModelMapperConfig {
-    @Bean
-    public ModelMapper modelMapper() {
-        ModelMapper modelMapper = new ModelMapper();
-
-        modelMapper.typeMap(Restaurant.class, RestaurantDTO.class).addMappings(mapper -> {
-            mapper.map(Restaurant::getTablesList, RestaurantDTO::setTablesList);
-        });
-
-        modelMapper.typeMap(TableEntity.class, TableDTO.class).addMappings(mapper -> {
-            mapper.map(TableEntity::getReservations, TableDTO::setReservations);
-        });
-
-        modelMapper.typeMap(Reservation.class, ReservationDTO.class).addMappings(mapper -> {
-            mapper.map(Reservation::getReservationStatus, ReservationDTO::setReservationStatus);
-            mapper.map(Reservation::getPaymentStatus, ReservationDTO::setPaymentStatus);
-        });
-
-        return modelMapper;
-    }
-}
Index: c/main/java/com/example/rezevirajmasa/demo/config/PasswordEncoder.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/config/PasswordEncoder.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,13 +1,0 @@
-package com.example.rezevirajmasa.demo.config;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-import org.springframework.stereotype.Component;
-
-@Component
-public class PasswordEncoder {
-    @Bean
-    public org.springframework.security.crypto.password.PasswordEncoder passwordEncoder() {
-        return new BCryptPasswordEncoder();
-    }
-}
Index: c/main/java/com/example/rezevirajmasa/demo/config/RestExceptionHandler.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/config/RestExceptionHandler.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,25 +1,0 @@
-package com.example.rezevirajmasa.demo.config;
-
-import com.example.rezevirajmasa.demo.dto.ErrorDto;
-import com.example.rezevirajmasa.demo.model.exceptions.AppException;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.converter.HttpMessageNotWritableException;
-import org.springframework.web.bind.annotation.ControllerAdvice;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-@ControllerAdvice
-public class RestExceptionHandler {
-    @ExceptionHandler(value = {AppException.class})
-    @ResponseBody
-    public ResponseEntity<ErrorDto> handleException(AppException ex) {
-        return ResponseEntity.status(ex.getCode())
-                .body(ErrorDto.builder().message(ex.getMessage()).build());
-    }
-
-    @ExceptionHandler(HttpMessageNotWritableException.class)
-    public ResponseEntity<String> handleHttpMessageNotWritableException(HttpMessageNotWritableException ex) {
-        return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("An error occurred while processing the response.");
-    }
-}
Index: src/main/java/com/example/rezevirajmasa/demo/config/SecurityConfig.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/config/SecurityConfig.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/config/SecurityConfig.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,11 +1,7 @@
 package com.example.rezevirajmasa.demo.config;
 
-import com.example.rezevirajmasa.demo.model.exceptions.CustomerAuthenticationEntryPoint;
-import com.example.rezevirajmasa.demo.web.filters.JwtAuthFilter;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.http.HttpMethod;
 import org.springframework.security.authentication.AuthenticationManager;
-import org.springframework.security.config.Customizer;
 import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
@@ -13,20 +9,11 @@
 import org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer;
 import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
-import org.springframework.security.config.http.SessionCreationPolicy;
 import org.springframework.security.core.userdetails.UserDetailsService;
 import org.springframework.security.web.SecurityFilterChain;
-import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
-import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
 import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
-import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.context.annotation.Configuration;
 import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.web.SecurityFilterChain;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
-import java.util.List;
 
 @Configuration
@@ -34,11 +21,7 @@
 public class SecurityConfig implements WebMvcConfigurer {
     private final UserDetailsService userDetailsService;
-    private final CustomerAuthenticationEntryPoint customerAuthenticationEntryPoint;
-    private final UserAuthProvider userAuthProvider;
 
-    public SecurityConfig(UserDetailsService userDetailsService, CustomerAuthenticationEntryPoint customerAuthenticationEntryPoint, UserAuthProvider userAuthProvider) {
+    public SecurityConfig(UserDetailsService userDetailsService) {
         this.userDetailsService = userDetailsService;
-        this.customerAuthenticationEntryPoint = customerAuthenticationEntryPoint;
-        this.userAuthProvider = userAuthProvider;
     }
 
@@ -51,20 +34,32 @@
     public void addCorsMappings(CorsRegistry registry) {
         registry.addMapping("/**")
-                .allowedOrigins("http://localhost:3000")
-                .allowedMethods("GET", "POST", "PUT", "DELETE")
-                .allowedHeaders("*")
-                .allowCredentials(true)
-                .maxAge(3600L);
+                .allowedOrigins("http://localhost:3000") // Allow requests from this origin
+                .allowedMethods("GET", "POST", "PUT", "DELETE") // Allow these HTTP methods
+                .allowedHeaders("*"); // Allow all headers
     }
 
     @Bean
-    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
+    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception  {
+
         http
                 .csrf(AbstractHttpConfigurer::disable)
-                .authorizeHttpRequests(auth -> auth
-                        .requestMatchers("/api/auth/**").permitAll()
-                        .requestMatchers("/api/user/**", "/api/cuisineTypes", "/api/restaurants").authenticated()
+                .authorizeHttpRequests( (requests) -> requests
+                        .requestMatchers(AntPathRequestMatcher.antMatcher("/"), AntPathRequestMatcher.antMatcher("/restaurants"))
+                        .permitAll()
+                        .anyRequest()
+                        .hasAnyRole("ADMIN", "USER")
                 )
-                .sessionManagement(sess -> sess.sessionCreationPolicy(SessionCreationPolicy.STATELESS));
+                .formLogin((form) -> form
+                        .permitAll()
+                        .failureUrl("/login?error=BadCredentials")
+                        .defaultSuccessUrl("/restaurants", true)
+                )
+                .logout((logout) -> logout
+                        .logoutUrl("/logout")
+                        .clearAuthentication(true)
+                        .invalidateHttpSession(true)
+                        .deleteCookies("JSESSIONID")
+                        .logoutSuccessUrl("/")
+                );
 
         return http.build();
@@ -79,50 +74,2 @@
     }
 }
-//
-//import com.example.rezevirajmasa.demo.web.filters.JwtAuthFilter;
-//import org.springframework.context.annotation.Bean;
-//import org.springframework.context.annotation.Configuration;
-//import org.springframework.security.authentication.AuthenticationManager;
-//import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
-//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-//import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-//import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
-//import org.springframework.security.config.http.SessionCreationPolicy;
-//import org.springframework.security.core.userdetails.UserDetailsService;
-//import org.springframework.security.web.SecurityFilterChain;
-//import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
-//
-//@Configuration
-//@EnableWebSecurity
-//public class SecurityConfig {
-//
-//    private final UserDetailsService userDetailsService;
-////    private final UserAuthProvider userAuthProvider;
-//    private final JwtAuthFilter jwtAuthFilter;
-//
-//    public SecurityConfig(UserDetailsService userDetailsService) {
-//        this.userDetailsService = userDetailsService;
-////        this.userAuthProvider = userAuthProvider;
-//        this.jwtAuthFilter = new JwtAuthFilter(userAuthProvider);
-//    }
-//
-//    @Bean
-//    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
-//        http
-//                .csrf(AbstractHttpConfigurer::disable)
-//                .sessionManagement(sess -> sess.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
-//                .authorizeHttpRequests((requests) -> requests
-//                        .requestMatchers("/api/login", "/api/register").permitAll()
-//                        .anyRequest().authenticated())
-//                .addFilterBefore(jwtAuthFilter, UsernamePasswordAuthenticationFilter.class);
-//
-//        return http.build();
-//    }
-//
-//    @Bean
-//    public AuthenticationManager authenticationManager(HttpSecurity http) throws Exception {
-//        AuthenticationManagerBuilder authenticationManagerBuilder = http.getSharedObject(AuthenticationManagerBuilder.class);
-//        authenticationManagerBuilder.userDetailsService(userDetailsService);
-//        return authenticationManagerBuilder.build();
-//    }
-//}
Index: c/main/java/com/example/rezevirajmasa/demo/config/UserAuthProvider.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/config/UserAuthProvider.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,80 +1,0 @@
-package com.example.rezevirajmasa.demo.config;
-
-import com.auth0.jwt.JWT;
-import com.auth0.jwt.JWTVerifier;
-import com.auth0.jwt.algorithms.Algorithm;
-import com.auth0.jwt.interfaces.DecodedJWT;
-import com.example.rezevirajmasa.demo.dto.UserDto;
-import com.example.rezevirajmasa.demo.service.UserService;
-import io.jsonwebtoken.Claims;
-import io.jsonwebtoken.Jwts;
-import jakarta.annotation.PostConstruct;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.stereotype.Component;
-
-import java.util.*;
-import java.util.function.Function;
-
-@RequiredArgsConstructor
-@Component
-public class UserAuthProvider {
-    @Value("${security.jwt.token.secret-key:secret:value}")
-    private String secretKey;
-
-    private final UserService userService;
-
-    @PostConstruct
-    protected void init() {
-        secretKey = Base64.getEncoder().encodeToString(secretKey.getBytes());
-    }
-
-    public String generateToken(UserDetails userDetails){
-        Map<String, Object> claims = new HashMap<>();
-        return createToken(userDetails.getUsername());
-    }
-
-    public String createToken(String login) {
-        Date now = new Date();
-        Date validity = new Date(now.getTime() + 3_600_000);
-        return JWT.create()
-                .withIssuer(login)
-                .withIssuedAt(now)
-                .withExpiresAt(validity)
-                .sign(Algorithm.HMAC256(secretKey));
-    }
-
-    public Authentication validateToken(String token) {
-        JWTVerifier verifier = JWT.require(Algorithm.HMAC256(secretKey)).build();
-
-        DecodedJWT decoded = verifier.verify(token);
-
-        UserDto user = userService.findByEmail(decoded.getIssuer());
-
-        return new UsernamePasswordAuthenticationToken(user, null, Collections.emptyList());
-    }
-
-    public String extractUsername(String token) {
-        return extractClaim(token, Claims::getSubject);
-    }
-
-    public Date extractExpiration(String token) {
-        return extractClaim(token, Claims::getExpiration);
-    }
-
-    public <T> T extractClaim(String token, Function<Claims, T> claimsResolver) {
-        final Claims claims = extractAllClaims(token);
-        return claimsResolver.apply(claims);
-    }
-
-    private Claims extractAllClaims(String token) {
-        return Jwts.parser().setSigningKey(secretKey).parseClaimsJws(token).getBody();
-    }
-
-    private Boolean isTokenExpired(String token) {
-        return extractExpiration(token).before(new Date());
-    }
-}
Index: c/main/java/com/example/rezevirajmasa/demo/config/security/SecurityConstants.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/config/security/SecurityConstants.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,9 +1,0 @@
-package com.example.rezevirajmasa.demo.config.security;
-
-public class SecurityConstants {
-    public static final String SECRET = "s3cr3tt0k3n";
-    public static final long EXPIRATION_TIME = 864_000_000; // 10 days
-    public static final String TOKEN_PREFIX = "Bearer ";
-    public static final String HEADER_STRING = "Authorization";
-
-}
Index: c/main/java/com/example/rezevirajmasa/demo/dto/CredentialsDto.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/dto/CredentialsDto.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,15 +1,0 @@
-package com.example.rezevirajmasa.demo.dto;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-@Data
-public class CredentialsDto {
-    private String email;
-    private char[] password;
-}
Index: src/main/java/com/example/rezevirajmasa/demo/dto/CustomerDTO.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/dto/CustomerDTO.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/dto/CustomerDTO.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -2,22 +2,12 @@
 
 import com.example.rezevirajmasa.demo.model.MembershipLevel;
-import com.example.rezevirajmasa.demo.model.Role;
-import lombok.Getter;
-import lombok.Setter;
 
-import java.sql.Date;
-import java.sql.Timestamp;
-
-@Setter
-@Getter
 public class CustomerDTO {
-    private Long customerId;
     private String firstName;
     private String lastName;
     private String email;
+    private String password;
     private String phone;
     private String address;
     private MembershipLevel membershipLevel;
-//    private Date registrationDate;
-    private Role role;
 }
Index: c/main/java/com/example/rezevirajmasa/demo/dto/ErrorDto.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/dto/ErrorDto.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,12 +1,0 @@
-package com.example.rezevirajmasa.demo.dto;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-
-@AllArgsConstructor
-@Builder
-@Data
-public class ErrorDto {
-    private String message;
-}
Index: c/main/java/com/example/rezevirajmasa/demo/dto/PreorderedItemDto.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/dto/PreorderedItemDto.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,26 +1,0 @@
-package com.example.rezevirajmasa.demo.dto;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import java.math.BigDecimal;
-
-@Setter
-@Getter
-public class PreorderedItemDto {
-    private String preorderedItemName;
-    private Integer quantity;
-    private BigDecimal price;
-    private Long menuID;
-
-    public PreorderedItemDto() {
-    }
-
-    public PreorderedItemDto(String preorderedItemName, Integer quantity, BigDecimal price, Long menuID) {
-        this.preorderedItemName = preorderedItemName;
-        this.quantity = quantity;
-        this.price = price;
-        this.menuID = menuID;
-    }
-
-}
Index: c/main/java/com/example/rezevirajmasa/demo/dto/ReservationDTO.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/dto/ReservationDTO.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,119 +1,0 @@
-package com.example.rezevirajmasa.demo.dto;
-
-import com.example.rezevirajmasa.demo.model.PreorderedItem;
-import com.example.rezevirajmasa.demo.model.Reservation;
-import com.example.rezevirajmasa.demo.model.Restaurant;
-import lombok.Setter;
-
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-import java.util.List;
-import java.util.stream.Collectors;
-
-@Setter
-public class ReservationDTO {
-    private Long reservationID;
-    private String userEmail;
-    private BigDecimal rating;
-    private Long tableNumber;
-    private LocalDateTime reservationDateTime;
-    private LocalDateTime checkInTime;
-    private Long restaurantId;
-    private int partySize;
-    private String reservationStatus;
-    private String specialRequests;
-    private String paymentStatus;
-    private List<PreorderedItemDto> preOrderedItems;
-
-    public ReservationDTO() {
-    }
-
-    public ReservationDTO(Long reservationID, String userEmail, BigDecimal rating, Long tableNumber,
-                          LocalDateTime reservationDateTime, LocalDateTime checkInTime, Long restaurantId,
-                          int partySize, String reservationStatus, String specialRequests,
-                          String paymentStatus, List<PreorderedItemDto> preOrderedItems) {
-        this.reservationID = reservationID;
-        this.userEmail = userEmail;
-        this.rating = rating;
-        this.tableNumber = tableNumber;
-        this.reservationDateTime = reservationDateTime;
-        this.checkInTime = checkInTime;
-        this.restaurantId = restaurantId;
-        this.partySize = partySize;
-        this.reservationStatus = reservationStatus;
-        this.specialRequests = specialRequests;
-        this.paymentStatus = paymentStatus;
-        this.preOrderedItems = preOrderedItems;
-    }
-
-    public ReservationDTO(Reservation reservation) {
-        this.reservationID = reservation.getReservationID();
-        this.userEmail = reservation.getUser().getEmail();
-        this.rating = reservation.getRestaurant().getRating();
-        this.tableNumber = reservation.getTable().getId();
-        this.reservationDateTime = reservation.getReservationDateTime();
-        this.checkInTime = reservation.getCheckInTime();
-        this.restaurantId = reservation.getRestaurant().getRestaurantId();
-        this.partySize = reservation.getPartySize();
-        this.reservationStatus = reservation.getReservationStatus();
-        this.specialRequests = reservation.getSpecialRequests();
-        this.paymentStatus = reservation.getPaymentStatus();
-
-        this.preOrderedItems = reservation.getPreOrderedItems().stream()
-                .map(preorderedItem -> new PreorderedItemDto(
-                        preorderedItem.getPreorderedItemName(),
-                        preorderedItem.getQuantity(),
-                        preorderedItem.getPrice(),
-                        preorderedItem.getMenu().getMenuID()))
-                .collect(Collectors.toList());
-    }
-
-    public Long getReservationID() {
-        return reservationID;
-    }
-
-    public String getUserEmail() {
-        return userEmail;
-    }
-
-    public BigDecimal getRating() {
-        return rating;
-    }
-
-    public Long getTableNumber() {
-        return tableNumber;
-    }
-
-    public LocalDateTime getReservationDateTime() {
-        return reservationDateTime;
-    }
-
-    public LocalDateTime getCheckInTime() {
-        return checkInTime;
-    }
-
-    public Long getRestaurantId() {
-        return restaurantId;
-    }
-
-    public int getPartySize() {
-        return partySize;
-    }
-
-    public String getStatus() {
-        return reservationStatus;
-    }
-
-    public String getSpecialRequests() {
-        return specialRequests;
-    }
-
-    public String getPaymentStatus() {
-        return paymentStatus;
-    }
-
-    public List<PreorderedItemDto> getPreOrderedItems() {
-        return preOrderedItems;
-    }
-
-}
Index: c/main/java/com/example/rezevirajmasa/demo/dto/RestaurantDTO.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/dto/RestaurantDTO.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,127 +1,0 @@
-package com.example.rezevirajmasa.demo.dto;
-
-import com.example.rezevirajmasa.demo.model.Restaurant;
-
-import java.util.List;
-
-public class RestaurantDTO {
-    private Long restaurantId;
-    private String name;
-    private String cuisineType;
-    private String address;
-    private String phone;
-    private String operatingHours;
-    private String website;
-    private String socialMediaLinks;
-    private Double rating;
-    private List<TableDTO> tablesList;
-
-    public RestaurantDTO() {
-    }
-
-    public RestaurantDTO(Long restaurantId, String name, String cuisineType, String address, String phone, String operatingHours, String website, String socialMediaLinks, Double rating, List<TableDTO> tablesList) {
-        this.restaurantId = restaurantId;
-        this.name = name;
-        this.cuisineType = cuisineType;
-        this.address = address;
-        this.phone = phone;
-        this.operatingHours = operatingHours;
-        this.website = website;
-        this.socialMediaLinks = socialMediaLinks;
-        this.rating = rating;
-        this.tablesList = tablesList;
-    }
-
-//    public RestaurantDTO(Restaurant restaurant) {
-//        this.restaurantId = restaurant.getRestaurantId();
-//        this.name = restaurant.getName();
-//        this.cuisineType = restaurant.getCuisineType();
-//        this.address = restaurant.getAddress();
-//        this.phone = restaurant.getPhone();
-//        this.operatingHours = restaurant.getOperatingHours();
-//        this.website = restaurant.getWebsite();
-//        this.socialMediaLinks = restaurant.getSocialMediaLinks();
-//        this.rating = restaurant.getRating().doubleValue();
-//        this.tablesList = restaurant.getTablesList();
-//    }
-
-    public Long getRestaurantId() {
-        return restaurantId;
-    }
-
-    public void setRestaurantId(Long restaurantId) {
-        this.restaurantId = restaurantId;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getCuisineType() {
-        return cuisineType;
-    }
-
-    public void setCuisineType(String cuisineType) {
-        this.cuisineType = cuisineType;
-    }
-
-    public String getAddress() {
-        return address;
-    }
-
-    public void setAddress(String address) {
-        this.address = address;
-    }
-
-    public String getPhone() {
-        return phone;
-    }
-
-    public void setPhone(String phone) {
-        this.phone = phone;
-    }
-
-    public String getOperatingHours() {
-        return operatingHours;
-    }
-
-    public void setOperatingHours(String operatingHours) {
-        this.operatingHours = operatingHours;
-    }
-
-    public String getWebsite() {
-        return website;
-    }
-
-    public void setWebsite(String website) {
-        this.website = website;
-    }
-
-    public String getSocialMediaLinks() {
-        return socialMediaLinks;
-    }
-
-    public void setSocialMediaLinks(String socialMediaLinks) {
-        this.socialMediaLinks = socialMediaLinks;
-    }
-
-    public Double getRating() {
-        return rating;
-    }
-
-    public void setRating(Double rating) {
-        this.rating = rating;
-    }
-
-    public List<TableDTO> getTablesList() {
-        return tablesList;
-    }
-
-    public void setTablesList(List<TableDTO> tablesList) {
-        this.tablesList = tablesList;
-    }
-}
Index: c/main/java/com/example/rezevirajmasa/demo/dto/SignUpDto.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/dto/SignUpDto.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,20 +1,0 @@
-package com.example.rezevirajmasa.demo.dto;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-@Data
-public class SignUpDto {
-    private String firstName;
-    private String lastName;
-    private String email;
-    private char[] password;
-    private String phone;
-    private String address;
-    private String membershipLevel;
-}
Index: c/main/java/com/example/rezevirajmasa/demo/dto/TableDTO.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/dto/TableDTO.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,73 +1,0 @@
-package com.example.rezevirajmasa.demo.dto;
-
-import lombok.NoArgsConstructor;
-
-import java.util.List;
-
-@NoArgsConstructor
-    public class TableDTO {
-        private Long id;
-        private Integer capacity;
-        private String location;
-        private String description;
-        private Integer reservationDurationHours;
-        private List<ReservationDTO> reservations;
-
-    public TableDTO(Long id, Integer capacity, String location, String description, Integer reservationDurationHours, List<ReservationDTO> reservations) {
-        this.id = id;
-        this.capacity = capacity;
-        this.location = location;
-        this.description = description;
-        this.reservationDurationHours = reservationDurationHours;
-        this.reservations = reservations;
-    }
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Integer getCapacity() {
-        return capacity;
-    }
-
-    public void setCapacity(Integer capacity) {
-        this.capacity = capacity;
-    }
-
-    public String getLocation() {
-        return location;
-    }
-
-    public void setLocation(String location) {
-        this.location = location;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public Integer getReservationDurationHours() {
-        return reservationDurationHours;
-    }
-
-    public void setReservationDurationHours(Integer reservationDurationHours) {
-        this.reservationDurationHours = reservationDurationHours;
-    }
-
-    public List<ReservationDTO> getReservations() {
-        return reservations;
-    }
-
-    public void setReservations(List<ReservationDTO> reservations) {
-        this.reservations = reservations;
-    }
-}
-
Index: c/main/java/com/example/rezevirajmasa/demo/dto/UserDto.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/dto/UserDto.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,21 +1,0 @@
-package com.example.rezevirajmasa.demo.dto;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-@Data
-public class UserDto {
-    private Long id;
-    private String firstName;
-    private String lastName;
-    private String email;
-    private String token;
-    private String phone;
-    private String address;
-    private String membershipLevel;
-}
Index: c/main/java/com/example/rezevirajmasa/demo/mappers/UserMapper.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/mappers/UserMapper.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,19 +1,0 @@
-package com.example.rezevirajmasa.demo.mappers;
-
-
-import com.example.rezevirajmasa.demo.dto.SignUpDto;
-import com.example.rezevirajmasa.demo.dto.UserDto;
-import com.example.rezevirajmasa.demo.model.User;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mapping;
-
-@Mapper(componentModel = "spring")
-public interface UserMapper {
-    UserDto toUserDto(User user);
-
-    @Mapping(target = "password", ignore = true)
-    User signUpToUser(SignUpDto userDto);
-
-    SignUpDto toSignUpDto(UserDto userDto);
-    User toUser(UserDto userDto);
-}
Index: c/main/java/com/example/rezevirajmasa/demo/mappers/UserMapperImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/mappers/UserMapperImpl.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,77 +1,0 @@
-package com.example.rezevirajmasa.demo.mappers;
-
-import com.example.rezevirajmasa.demo.dto.SignUpDto;
-import com.example.rezevirajmasa.demo.dto.UserDto;
-import com.example.rezevirajmasa.demo.model.MembershipLevel;
-import com.example.rezevirajmasa.demo.model.User;
-import org.springframework.stereotype.Component;
-
-import java.util.Arrays;
-
-@Component
-public class UserMapperImpl implements UserMapper {
-
-    @Override
-    public UserDto toUserDto(User user) {
-        if (user == null) {
-            return null;
-        }
-
-        UserDto userDto = new UserDto();
-        userDto.setId(user.getUserId());
-        userDto.setFirstName(user.getFirstName());
-        userDto.setLastName(user.getLastName());
-        userDto.setEmail(user.getEmail());
-
-        return userDto;
-    }
-
-    @Override
-    public User signUpToUser(SignUpDto userDto) {
-        if (userDto == null) {
-            return null;
-        }
-
-        User user = new User();
-        user.setEmail(userDto.getEmail());
-        user.setFirstName(userDto.getFirstName());
-        user.setLastName(userDto.getLastName());
-        user.setPassword(Arrays.toString(userDto.getPassword()));
-
-        return user;
-    }
-
-    @Override
-    public SignUpDto toSignUpDto(UserDto userDto) {
-        if (userDto == null) {
-            return null;
-        }
-
-        SignUpDto signUpDto = new SignUpDto();
-        signUpDto.setEmail(userDto.getEmail());
-        signUpDto.setFirstName(userDto.getFirstName());
-        signUpDto.setLastName(userDto.getLastName());
-
-        signUpDto.setPassword(new char[0]);
-
-        return signUpDto;
-    }
-
-    @Override
-    public User toUser(UserDto userDto) {
-        if(userDto == null) {
-            return null;
-        }
-
-        User user = new User();
-        user.setLastName(userDto.getLastName());
-        user.setFirstName(userDto.getFirstName());
-        user.setPhone(userDto.getPhone());
-        user.setMembershipLevel(MembershipLevel.valueOf(userDto.getMembershipLevel()));
-        user.setAddress(userDto.getAddress());
-        user.setEmail(userDto.getEmail());
-        user.setUserId(userDto.getId());
-
-        return user;
-    }
-}
Index: src/main/java/com/example/rezevirajmasa/demo/model/Customer.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/Customer.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ src/main/java/com/example/rezevirajmasa/demo/model/Customer.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,155 @@
+package com.example.rezevirajmasa.demo.model;
+
+import jakarta.persistence.*;
+
+import java.util.Date;
+
+@Entity
+@Table(name = "customers")
+public class Customer {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "CustomerID")
+    private Long customerId;
+
+    @Column(name = "FirstName", length = 50)
+    private String firstName;
+
+    @Column(name = "LastName", length = 50)
+    private String lastName;
+
+    @Column(name = "Email", length = 100, unique = true)
+    private String email;
+
+    @Column(name = "Password", length = 100)
+    private String password;
+
+    @Enumerated(EnumType.STRING)
+    private Role role;
+
+    @Column(name = "Phone", length = 20)
+    private String phone;
+
+    @Column(name = "Address", columnDefinition = "TEXT")
+    private String address;
+
+    @Enumerated(EnumType.STRING)
+    @Column(name = "MembershipLevel", length = 20)
+    private MembershipLevel membershipLevel;
+
+    @Column(name = "RegistrationDate", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
+    @Temporal(TemporalType.TIMESTAMP)
+    private Date registrationDate;
+
+    public Customer(Long customerId, String firstName, String lastName, String email, String phone, String address, MembershipLevel membershipLevel, Date registrationDate, Role role) {
+        this.setCustomerId(customerId);
+        this.setFirstName(firstName);
+        this.setLastName(lastName);
+        this.setEmail(email);
+        this.setPhone(phone);
+        this.setAddress(address);
+        this.setMembershipLevel(membershipLevel);
+        this.setRegistrationDate(registrationDate);
+        this.setRole(Role.ROLE_USER);
+    }
+
+    public Customer() {
+
+    }
+
+    public Role getRole() {
+        return role;
+    }
+
+    public void setRole(Role role) {
+        this.role = role;
+    }
+
+    public String getFullName() {
+        return firstName + " " + lastName;
+    }
+    public Long getCustomerId() {
+        return customerId;
+    }
+
+    public void setCustomerId(Long customerId) {
+        this.customerId = customerId;
+    }
+
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    public String getLastName() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public Date getRegistrationDate() {
+        return registrationDate;
+    }
+    public MembershipLevel getMembershipLevel() {
+        return membershipLevel;
+    }
+
+    public void setMembershipLevel(MembershipLevel membershipLevel) {
+        this.membershipLevel = membershipLevel;
+    }
+    public void setRegistrationDate(Date registrationDate) {
+        this.registrationDate = registrationDate;
+    }
+
+    @Override
+    public String toString() {
+        return "Customer{" +
+                "customerId=" + customerId +
+                ", firstName='" + firstName + '\'' +
+                ", lastName='" + lastName + '\'' +
+                ", email='" + email + '\'' +
+                ", phone='" + phone + '\'' +
+                ", address='" + address + '\'' +
+                ", membershipLevel=" + membershipLevel +
+                ", registrationDate=" + registrationDate +
+                '}';
+    }
+}
Index: src/main/java/com/example/rezevirajmasa/demo/model/Menu.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/Menu.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/model/Menu.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,55 +1,45 @@
 package com.example.rezevirajmasa.demo.model;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
 import jakarta.persistence.*;
-import lombok.Data;
 
 import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
 
 @Entity
 @Table(name = "menus")
-@Data
 public class Menu {
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "menu_id")
+    @Column(name = "MenuID")
     private Long menuID;
 
     @ManyToOne
-    @JoinColumn(name = "restaurant_id", nullable = false)
-    @JsonIgnore
+    @JoinColumn(name = "RestaurantID", nullable = false)
     private Restaurant restaurant;
 
-    @Column(name = "item_name", length = 100)
+    @Column(name = "ItemName", length = 100)
     private String itemName;
 
-    @Column(name = "menuCategory", length = 50)
-    private String menuCategory;
+    @Column(name = "Category", length = 50)
+    private String category;
 
-    @Column(name = "price", precision = 8, scale = 2)
+    @Column(name = "Price", precision = 8, scale = 2)
     private BigDecimal price;
 
-    @Column(name = "description")
+    @Column(name = "Description")
     private String description;
 
-    @OneToMany(mappedBy = "menu", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
-    private List<MenuTag> tags = new ArrayList<>();
-
-    @OneToMany(mappedBy = "menu", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
-    private List<PriceHistory> priceHistoryList = new ArrayList<>();
+    @Column(name = "DietaryInformation", columnDefinition = "JSONB")
+    private String dietaryInformation;
 
     public Menu() {
     }
 
-    public Menu(Long menuID, Restaurant restaurant, String itemName, String category, BigDecimal price, String description, List<MenuTag> tags) {
-        this.menuID = menuID;
+    public Menu(Restaurant restaurant, String itemName, String category, BigDecimal price, String description, String dietaryInformation) {
         this.restaurant = restaurant;
         this.itemName = itemName;
-        this.menuCategory = category;
+        this.category = category;
         this.price = price;
         this.description = description;
-        this.tags = tags;
+        this.dietaryInformation = dietaryInformation;
     }
 }
Index: c/main/java/com/example/rezevirajmasa/demo/model/MenuTag.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/MenuTag.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,34 +1,0 @@
-package com.example.rezevirajmasa.demo.model;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import jakarta.persistence.*;
-import lombok.Data;
-
-@Entity
-@Table(name = "menu_tags")
-@Data
-public class MenuTag {
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    private Long menuTagId;
-
-    @ManyToOne(fetch = FetchType.LAZY)
-    @JoinColumn(name = "menu_id", nullable = false)
-    @JsonIgnore
-    private Menu menu;
-
-    @Column(name = "tag_name", nullable = false)
-    private String tagName;
-
-    @Column(name = "tag_value", nullable = false)
-    private String tagValue;
-
-    public MenuTag() {}
-
-    public MenuTag(Menu menu, String tagName, String tagValue) {
-        this.menu = menu;
-        this.tagName = tagName;
-        this.tagValue = tagValue;
-    }
-}
-
Index: c/main/java/com/example/rezevirajmasa/demo/model/PreorderedItem.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/PreorderedItem.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,39 +1,0 @@
-package com.example.rezevirajmasa.demo.model;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import jakarta.persistence.*;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-
-import java.math.BigDecimal;
-
-@Entity
-@Table(name = "reservation_preordered_items")
-@Getter
-@Setter
-@NoArgsConstructor
-@AllArgsConstructor
-public class PreorderedItem {
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    private Long preorderedItemId;
-
-    private String preorderedItemName;
-
-    private Integer quantity;
-
-    @Column(name = "price_at_order", precision = 8, scale = 2, nullable = false)
-    private BigDecimal price;
-
-    @JsonIgnore
-    @ManyToOne
-    @JoinColumn(name = "reservation_id", nullable = false)
-    private Reservation reservation;
-
-    @ManyToOne
-    @JoinColumn(name = "menu_id", nullable = false)
-    private Menu menu;
-}
Index: c/main/java/com/example/rezevirajmasa/demo/model/PriceHistory.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/PriceHistory.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,35 +1,0 @@
-package com.example.rezevirajmasa.demo.model;
-
-import jakarta.persistence.*;
-import lombok.Data;
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-
-@Entity
-@Table(name = "price_history")
-@Data
-public class PriceHistory {
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    @Column(name = "price_history_id")
-    private Long priceHistoryID;
-
-    @ManyToOne
-    @JoinColumn(name = "menu_id", nullable = false)
-    private Menu menu;
-
-    @Column(name = "old_price", precision = 8, scale = 2, nullable = false)
-    private BigDecimal oldPrice;
-
-    @Column(name = "change_date", nullable = false)
-    private LocalDateTime changeDate;
-
-    public PriceHistory() {}
-
-    public PriceHistory(Menu menu, BigDecimal oldPrice, LocalDateTime changeDate) {
-        this.menu = menu;
-        this.oldPrice = oldPrice;
-        this.changeDate = changeDate;
-    }
-}
Index: src/main/java/com/example/rezevirajmasa/demo/model/Reservation.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/Reservation.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/model/Reservation.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,21 +1,11 @@
 package com.example.rezevirajmasa.demo.model;
 
-import com.example.rezevirajmasa.demo.dto.PreorderedItemDto;
-import com.fasterxml.jackson.annotation.JsonBackReference;
-import com.fasterxml.jackson.annotation.JsonManagedReference;
 import jakarta.persistence.*;
-import lombok.Data;
-import lombok.Getter;
-import lombok.Setter;
 
-import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
-import java.util.ArrayList;
-import java.util.List;
 
 @Entity
 @Table(name = "reservations")
-@Data
 public class Reservation {
 
@@ -26,11 +16,9 @@
 
     @ManyToOne
-    @JoinColumn(name = "UserID")
-    @JsonBackReference(value = "user-reservations")
-    private User user;
+    @JoinColumn(name = "CustomerID")
+    private Customer customer;
 
     @ManyToOne
     @JoinColumn(name = "TableNumber", nullable = false)
-    @JsonBackReference
     private TableEntity table;
 
@@ -48,18 +36,17 @@
     private String specialRequests;
 
-    @Column(name = "Status", length = 20, nullable = false)
-    private String reservationStatus;
+    @Column(name = "Status", length = 20, nullable = false, columnDefinition = "VARCHAR default 'Pending'")
+    private String status;
 
     @Column(name = "CheckInTime")
     private LocalDateTime checkInTime;
 
-    @Getter
     @Column(name = "CheckOutTime")
     private LocalDateTime checkOutTime;
 
-    @OneToMany(mappedBy = "reservation", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.LAZY)
-    private List<PreorderedItem> preOrderedItems = new ArrayList<>();
+//    @Column(name = "TotalAmount", precision = 8, scale = 2)
+//    private BigDecimal totalAmount;//rezervacija so depozit ako e
 
-    @Column(name = "PaymentStatus", length = 20, nullable = false, columnDefinition = "VARCHAR default 'Unpaid'")
+    @Column(name = "Pa`ymentStatus", length = 20, nullable = false, columnDefinition = "VARCHAR default 'Unpaid'")
     private String paymentStatus;
 
@@ -68,8 +55,11 @@
     }
 
+    // Constructors, getters, setters, and other methods...
+
     @PrePersist
     private void prePersist() {
-        if (reservationStatus == null) {
-            reservationStatus = "Pending";
+        // Set default values or perform any pre-persistence logic if needed
+        if (status == null) {
+            status = "Pending";
         }
         if (paymentStatus == null) {
@@ -78,12 +68,12 @@
     }
 
-    public Reservation(User user, TableEntity table, Restaurant restaurant, LocalDateTime reservationDateTime, int partySize, String specialRequests, String status, LocalDateTime checkInTime, LocalDateTime checkOutTime, String paymentStatus) {
+    public Reservation(Customer customer, TableEntity table, Restaurant restaurant, LocalDateTime reservationDateTime, int partySize, String specialRequests, String status, LocalDateTime checkInTime, LocalDateTime checkOutTime, String paymentStatus) {
+//        this.customer = customer;
         this.table = table;
-        this.user = user;
         this.restaurant = restaurant;
         this.reservationDateTime = reservationDateTime;
         this.partySize = partySize;
         this.specialRequests = specialRequests;
-        this.reservationStatus = status;
+        this.status = status;
         this.checkInTime = checkInTime;
         this.checkOutTime = checkOutTime;
@@ -91,4 +81,91 @@
     }
 
+    public Long getReservationID() {
+        return reservationID;
+    }
+
+    public void setReservationID(Long reservationID) {
+        this.reservationID = reservationID;
+    }
+
+    public Customer getCustomer() {
+        return customer;
+    }
+
+    public void setCustomer(Customer customer) {
+        this.customer = customer;
+    }
+
+    public TableEntity getTable() {
+        return table;
+    }
+
+    public void setTable(TableEntity table) {
+        this.table = table;
+    }
+
+    public Restaurant getRestaurant() {
+        return restaurant;
+    }
+
+    public void setRestaurant(Restaurant restaurant) {
+        this.restaurant = restaurant;
+    }
+
+    public LocalDateTime getReservationDateTime() {
+        return reservationDateTime;
+    }
+
+    public void setReservationDateTime(LocalDateTime reservationDateTime) {
+        this.reservationDateTime = reservationDateTime;
+    }
+
+    public int getPartySize() {
+        return partySize;
+    }
+
+    public void setPartySize(int partySize) {
+        this.partySize = partySize;
+    }
+
+    public String getSpecialRequests() {
+        return specialRequests;
+    }
+
+    public void setSpecialRequests(String specialRequests) {
+        this.specialRequests = specialRequests;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public LocalDateTime getCheckInTime() {
+        return checkInTime;
+    }
+
+    public void setCheckInTime(LocalDateTime checkInTime) {
+        this.checkInTime = checkInTime;
+    }
+
+    public LocalDateTime getCheckOutTime() {
+        return checkOutTime;
+    }
+
+    public void setCheckOutTime(LocalDateTime checkOutTime) {
+        this.checkOutTime = checkOutTime;
+    }
+
+    public String getPaymentStatus() {
+        return paymentStatus;
+    }
+
+    public void setPaymentStatus(String paymentStatus) {
+        this.paymentStatus = paymentStatus;
+    }
 
     @Override
@@ -96,5 +173,5 @@
         return "Reservation{" +
                 "reservationID=" + reservationID +
-                ", customer=" + user +
+                ", customer=" + customer +
                 ", table=" + table +
                 ", restaurant=" + restaurant +
@@ -102,5 +179,5 @@
                 ", partySize=" + partySize +
                 ", specialRequests='" + specialRequests + '\'' +
-                ", status='" + reservationStatus + '\'' +
+                ", status='" + status + '\'' +
                 ", checkInTime=" + checkInTime +
                 ", checkOutTime=" + checkOutTime +
Index: src/main/java/com/example/rezevirajmasa/demo/model/Restaurant.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/Restaurant.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/model/Restaurant.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -12,4 +12,5 @@
 @Table(name = "restaurants")
 public class Restaurant {
+
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
@@ -42,5 +43,5 @@
 
     @JsonManagedReference
-    @OneToMany(mappedBy = "restaurant", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+    @OneToMany(mappedBy = "restaurant", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
     private List<TableEntity> tablesList;
 
@@ -146,9 +147,9 @@
         @Id
         @GeneratedValue(strategy = GenerationType.IDENTITY)
-        private Long reservationHistoryId;
+        private Long id;
 
         @ManyToOne
         @JoinColumn(name = "customer_id")
-        private User user;
+        private Customer customer;
 
         @ManyToOne
@@ -158,5 +159,5 @@
         @ManyToOne
         @JoinColumn(name = "restaurant_id")
-        private Restaurant restaurant;
+        private Restaurant restaurant; // Add this field
 
         @Column(name = "reservation_datetime")
@@ -170,14 +171,14 @@
 
         @Column(name = "status")
-        private String reservationStatus;
+        private String status; // Completed, Canceled, etc.
 
         @Column(name = "cancellation_reason")
         private String cancellationReason;
 
-        @Column(name = "check_in_date")
+        @Column(name = "check_in_date") // Add this field
         private LocalDateTime checkInDate;
 
-        public ReservationHistory(User user, TableEntity table, Restaurant restaurant, LocalDateTime reservationDateTime, int partySize, String specialRequests, String status, String cancellationReason, LocalDateTime checkInDate) {
-            this.user = user;
+        public ReservationHistory(Customer customer, TableEntity table, Restaurant restaurant, LocalDateTime reservationDateTime, int partySize, String specialRequests, String status, String cancellationReason, LocalDateTime checkInDate) {
+            this.customer = customer;
             this.table = table;
             this.restaurant = restaurant;
@@ -185,5 +186,5 @@
             this.partySize = partySize;
             this.specialRequests = specialRequests;
-            this.reservationStatus = status;
+            this.status = status;
             this.cancellationReason = cancellationReason;
             this.checkInDate = checkInDate;
@@ -194,17 +195,17 @@
 
         public Long getId() {
-            return reservationHistoryId;
+            return id;
         }
 
         public void setId(Long id) {
-            this.reservationHistoryId = id;
-        }
-
-        public User getUser() {
-            return user;
-        }
-
-        public void setUser(User user) {
-            this.user = user;
+            this.id = id;
+        }
+
+        public Customer getCustomer() {
+            return customer;
+        }
+
+        public void setCustomer(Customer customer) {
+            this.customer = customer;
         }
 
@@ -242,9 +243,9 @@
 
         public String getStatus() {
-            return reservationStatus;
+            return status;
         }
 
         public void setStatus(String status) {
-            this.reservationStatus = status;
+            this.status = status;
         }
 
@@ -276,6 +277,6 @@
         public String toString() {
             return "ReservationHistory{" +
-                    "id=" + reservationHistoryId +
-                    ", user=" + user +
+                    "id=" + id +
+                    ", customer=" + customer +
                     ", table=" + table +
                     ", restaurant=" + restaurant +
@@ -283,5 +284,5 @@
                     ", partySize=" + partySize +
                     ", specialRequests='" + specialRequests + '\'' +
-                    ", status='" + reservationStatus + '\'' +
+                    ", status='" + status + '\'' +
                     ", cancellationReason='" + cancellationReason + '\'' +
                     ", checkInDate=" + checkInDate +
Index: src/main/java/com/example/rezevirajmasa/demo/model/RestaurantMenu.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/RestaurantMenu.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ src/main/java/com/example/rezevirajmasa/demo/model/RestaurantMenu.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,40 @@
+package com.example.rezevirajmasa.demo.model;
+
+import jakarta.persistence.*;
+
+import java.io.Serializable;
+
+@Entity
+@Table(name = "restaurantMenus")
+public class RestaurantMenu {
+    @EmbeddedId
+    private RestaurantMenuId id;
+
+    @ManyToOne
+    @MapsId("restaurantID")
+    @JoinColumn(name = "RestaurantID", nullable = false)
+    private Restaurant restaurant;
+
+    @ManyToOne
+    @MapsId("menuID")
+    @JoinColumn(name = "MenuID", nullable = false)
+    private Menu menu;
+
+    public RestaurantMenu(Restaurant restaurant, Menu menu) {
+        this.restaurant = restaurant;
+        this.menu = menu;
+    }
+
+    public RestaurantMenu() {
+    }
+
+    @Embeddable
+    public static class RestaurantMenuId implements Serializable {
+
+        @Column(name = "RestaurantID")
+        private Long restaurantID;
+
+        @Column(name = "MenuID")
+        private Long menuID;
+    }
+}
Index: src/main/java/com/example/rezevirajmasa/demo/model/TableEntity.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/TableEntity.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/model/TableEntity.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -2,9 +2,5 @@
 
 import com.fasterxml.jackson.annotation.JsonBackReference;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonManagedReference;
 import jakarta.persistence.*;
-import lombok.Getter;
-import lombok.Setter;
 import org.springframework.web.bind.annotation.ModelAttribute;
 
@@ -19,6 +15,4 @@
 
 @Entity
-@Getter
-@Setter
 @Table(name = "tables")
 public class TableEntity {
@@ -29,5 +23,5 @@
 
     @JsonBackReference
-    @ManyToOne(fetch = FetchType.LAZY)
+    @ManyToOne(fetch = FetchType.EAGER)
     @JoinColumn(name = "RestaurantID")
     private Restaurant restaurant;
@@ -36,6 +30,6 @@
     private int capacity;
 
-    @Column(name = "tableLocation")
-    private String tableLocation;
+    @Column(name = "Location")
+    private String location;
 
     @Column(name = "IsSmokingArea")
@@ -45,57 +39,98 @@
     private String description;
 
+    @ElementCollection(fetch = FetchType.EAGER)
+    @CollectionTable(name = "table_time_slots", joinColumns = @JoinColumn(name = "table_id"))
+    @Column(name = "time_slot", columnDefinition = "timestamp without time zone")
+    @OrderBy("time_slot ASC")
+    private List<LocalDateTime> timeSlots = new ArrayList<>();
+
     @Column(name = "reservation_duration_hours", nullable = true)
     private int reservationDurationHours = 2;
-
-    @OneToMany(mappedBy = "table", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
-    @JsonIgnore
-    private List<Reservation> reservations = new ArrayList<>();
-
     public void cleanUnusedTimeSlots(LocalDate threeDaysAgo) {
-        reservations.removeIf(reservation -> reservation.getReservationDateTime().toLocalDate().isBefore(threeDaysAgo));
-    }
-
-    public boolean isAvailable(LocalDateTime desiredTimeSlot, int partySize) {
-        if (this.capacity < partySize) {
-            return false;
-        }
-
-        for (Reservation reservation : reservations) {
-            LocalDateTime startTime = reservation.getReservationDateTime();
-            LocalDateTime endTime = startTime.plusHours(reservation.getTable().getReservationDurationHours());
-
-            if ((desiredTimeSlot.isEqual(startTime) || desiredTimeSlot.isAfter(startTime))
+        // Iterate over the time slots and remove those that are in the past
+        timeSlots.removeIf(timeSlot -> timeSlot.isBefore(threeDaysAgo.atStartOfDay()));
+    }
+
+    public void addTimeSlot(LocalDateTime timeSlot) {
+        this.timeSlots.add(timeSlot);
+    }
+
+
+    @Transient
+    public boolean isAvailable(LocalDateTime desiredTimeSlot) {
+        if (timeSlots == null || timeSlots.isEmpty()) {
+            return true;
+        }
+
+        for (LocalDateTime reservedTimeSlot : timeSlots) {
+            LocalDateTime endTime = reservedTimeSlot.plusHours(reservationDurationHours);
+
+            // Check if the desired time slot overlaps with any existing reservation
+            if ((desiredTimeSlot.equals(reservedTimeSlot) || desiredTimeSlot.isAfter(reservedTimeSlot))
                     && desiredTimeSlot.isBefore(endTime)) {
-                return false;
+                return false; // Table is reserved for the desired time slot
             }
         }
 
-        return true;
-    }
-
-    public void addReservation(Reservation reservation) {
-        LocalDateTime startTime = reservation.getReservationDateTime();
-        LocalDateTime endTime = startTime.plusHours(reservation.getTable().getReservationDurationHours());
-        for (LocalDateTime timeSlot = startTime; timeSlot.isBefore(endTime); timeSlot = timeSlot.plusMinutes(15)) {
-
-        }
-        this.reservations.add(reservation);
-    }
-
-    public void removeReservation(Reservation reservation) {
-        LocalDateTime startTime = reservation.getReservationDateTime();
-        LocalDateTime endTime = startTime.plusHours(reservation.getTable().getReservationDurationHours());
-        for (LocalDateTime timeSlot = startTime; timeSlot.isBefore(endTime); timeSlot = timeSlot.plusMinutes(15)) {
-
-        }
-        this.reservations.remove(reservation);
-    }
-
-    public TableEntity(Restaurant restaurant, int capacity, String location, boolean isSmokingArea, String description, int reservationDurationHours) {
+        return true; // No conflicting reservations, table is available
+    }
+
+    public boolean hasTimeSlot(LocalDateTime dateTime) {
+        // Check if the given dateTime exists in the list of time slots
+        return timeSlots.contains(dateTime);
+    }
+
+    public List<LocalDateTime> initializeTimeSlots(LocalTime startTime, LocalTime endTime, List<LocalDate> dates, List<LocalDateTime> listOfUsedCheckIns) {
+        // Check if time slots are already initialized and cover all provided dates
+        List<LocalDate> generatedDates = timeSlots.stream()
+                .map(LocalDateTime::toLocalDate)
+                .distinct()
+                .toList();
+
+        if (generatedDates.containsAll(dates) && dates.containsAll(generatedDates)) {
+            System.out.println("Time slots already cover all provided dates.");
+            return timeSlots;
+        }
+
+        // Generate time slots for the remaining dates
+        for (LocalDate date : dates) {
+            if (!generatedDates.contains(date)) {
+                LocalTime currentTime = startTime;
+                while (currentTime.isBefore(LocalTime.of(23, 0))) {
+                    LocalDateTime currentDateTime = LocalDateTime.of(date, currentTime);
+                    boolean isUsed = false;
+                    if (listOfUsedCheckIns != null) {
+                        for (LocalDateTime checkIns : listOfUsedCheckIns) {
+                            if (checkIns.isEqual(currentDateTime)) {
+                                isUsed = true;
+                                break;
+                            }
+                        }
+                    }
+                    if (!isUsed) {
+                        timeSlots.add(currentDateTime);
+                        System.out.println("Added time slot: " + currentDateTime); // Debug output
+                    } else {
+                        // Remove conflicting time slots
+                        timeSlots.removeIf(x -> x.isAfter(currentDateTime.minusHours(2)) && x.isBefore(currentDateTime.plusHours(2)));
+                    }
+                    // Increment currentTime
+                    currentTime = currentTime.plusMinutes(15);
+                }
+            }
+        }
+
+        return timeSlots;
+    }
+
+
+
+    public TableEntity(Restaurant restaurant, int capacity, String location, boolean isSmokingArea, String description, List<LocalDateTime> timeSlots, int reservationDurationHours) {
         this.restaurant = restaurant;
         this.capacity = capacity;
-        this.tableLocation = location;
+        this.location = location;
         this.isSmokingArea = isSmokingArea;
         this.description = description;
+        this.timeSlots = timeSlots;
         this.reservationDurationHours = reservationDurationHours;
     }
@@ -103,3 +138,67 @@
     public TableEntity() {
     }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Restaurant getRestaurant() {
+        return restaurant;
+    }
+
+    public void setRestaurant(Restaurant restaurant) {
+        this.restaurant = restaurant;
+    }
+
+    public int getCapacity() {
+        return capacity;
+    }
+
+    public void setCapacity(int capacity) {
+        this.capacity = capacity;
+    }
+
+    public String getLocation() {
+        return location;
+    }
+
+    public void setLocation(String location) {
+        this.location = location;
+    }
+
+    public void setSmokingArea(Boolean isSmokingArea) {
+        this.isSmokingArea = isSmokingArea;
+    }
+
+    public void setSmokingArea(boolean smokingArea) {
+        isSmokingArea = smokingArea;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public List<LocalDateTime> getTimeSlots() {
+        return timeSlots;
+    }
+
+    public void setTimeSlots(List<LocalDateTime> timeSlots) {
+        this.timeSlots = timeSlots;
+    }
+
+    public int getReservationDurationHours() {
+        return reservationDurationHours;
+    }
+
+    public void setReservationDurationHours(int reservationDurationHours) {
+        this.reservationDurationHours = reservationDurationHours;
+    }
 }
Index: c/main/java/com/example/rezevirajmasa/demo/model/User.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/User.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,52 +1,0 @@
-package com.example.rezevirajmasa.demo.model;
-
-import com.fasterxml.jackson.annotation.JsonBackReference;
-import jakarta.persistence.*;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import org.springframework.web.bind.annotation.GetMapping;
-
-import java.util.Date;
-
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-@Data
-@Entity
-@Table(name = "app_user")
-public class User {
-
-    @Id
-    @GeneratedValue(strategy = GenerationType.IDENTITY)
-    private Long userId;
-
-    @Column(name = "first_name")
-    private String firstName;
-
-    @Column(name = "last_name")
-    private String lastName;
-
-    @Column(nullable = false)
-    private String email;
-
-    @Column(nullable = false)
-    private String password;
-
-    @Enumerated(EnumType.STRING)
-    private Role role;
-
-    @Column(name = "Phone", length = 20)
-    private String phone;
-
-    @Column(name = "Address", columnDefinition = "TEXT")
-    private String address;
-
-    @Enumerated(EnumType.STRING)
-    @Column(name = "MembershipLevel", length = 20)
-    private MembershipLevel membershipLevel;
-
-    @Column(name = "RegistrationDate", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
-    private Date registrationDate;
-}
Index: c/main/java/com/example/rezevirajmasa/demo/model/exceptions/AppException.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/exceptions/AppException.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,15 +1,0 @@
-package com.example.rezevirajmasa.demo.model.exceptions;
-
-import org.springframework.http.HttpStatus;
-
-public class AppException extends RuntimeException{
-    private final HttpStatus code;
-    public AppException(String message, HttpStatus code) {
-        super(message);
-        this.code = code;
-    }
-
-    public HttpStatus getCode() {
-        return code;
-    }
-}
Index: c/main/java/com/example/rezevirajmasa/demo/model/exceptions/CustomerAuthenticationEntryPoint.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/model/exceptions/CustomerAuthenticationEntryPoint.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,26 +1,0 @@
-package com.example.rezevirajmasa.demo.model.exceptions;
-
-import com.example.rezevirajmasa.demo.dto.ErrorDto;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import jakarta.servlet.ServletException;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.security.web.AuthenticationEntryPoint;
-import org.springframework.stereotype.Component;
-
-import java.io.IOException;
-
-@Component
-public class CustomerAuthenticationEntryPoint implements AuthenticationEntryPoint {
-    private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
-
-    @Override
-    public void commence(HttpServletRequest request, HttpServletResponse response, org.springframework.security.core.AuthenticationException authException) throws IOException, ServletException {
-        response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
-        response.setHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
-        OBJECT_MAPPER.writeValue(response.getOutputStream(), new ErrorDto("Unauthorized path"));
-    }
-
-}
Index: src/main/java/com/example/rezevirajmasa/demo/repository/CustomerRepository.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/repository/CustomerRepository.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ src/main/java/com/example/rezevirajmasa/demo/repository/CustomerRepository.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,8 @@
+package com.example.rezevirajmasa.demo.repository;
+
+import com.example.rezevirajmasa.demo.model.Customer;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface CustomerRepository extends JpaRepository<Customer, Long> {
+    Customer findByEmail(String email);
+}
Index: c/main/java/com/example/rezevirajmasa/demo/repository/MenuRepository.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/repository/MenuRepository.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,11 +1,0 @@
-package com.example.rezevirajmasa.demo.repository;
-
-import com.example.rezevirajmasa.demo.model.Menu;
-import com.example.rezevirajmasa.demo.model.Restaurant;
-import org.springframework.data.jpa.repository.JpaRepository;
-
-import java.util.List;
-
-public interface MenuRepository extends JpaRepository<Menu, Long> {
-    List<Menu> findAllByRestaurant(Restaurant restaurant);
-}
Index: c/main/java/com/example/rezevirajmasa/demo/repository/PriceHistoryRepository.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/repository/PriceHistoryRepository.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,7 +1,0 @@
-package com.example.rezevirajmasa.demo.repository;
-
-import com.example.rezevirajmasa.demo.model.PriceHistory;
-import org.springframework.data.jpa.repository.JpaRepository;
-
-public interface PriceHistoryRepository extends JpaRepository<PriceHistory, Long> {
-}
Index: src/main/java/com/example/rezevirajmasa/demo/repository/ReservationHistoryRepository.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/repository/ReservationHistoryRepository.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/repository/ReservationHistoryRepository.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,6 +1,8 @@
 package com.example.rezevirajmasa.demo.repository;
 
+import com.example.rezevirajmasa.demo.model.Customer;
+import com.example.rezevirajmasa.demo.model.Reservation;
 import com.example.rezevirajmasa.demo.model.Restaurant;
-import com.example.rezevirajmasa.demo.model.User;
+import org.springframework.cglib.core.Local;
 import org.springframework.data.jpa.repository.JpaRepository;
 
@@ -9,5 +11,6 @@
 
 public interface ReservationHistoryRepository extends JpaRepository<Restaurant.ReservationHistory, Long> {
-    List<Restaurant.ReservationHistory> findALlByUser(User user);
+    List<Restaurant.ReservationHistory> findAllByCustomer(Customer customer);
+    List<Restaurant.ReservationHistory> findByCheckInDateBeforeAndStatus(LocalDateTime currentTime, String scheduled);
     List<Restaurant.ReservationHistory> findAllByCheckInDateBefore(LocalDateTime currentTime);
 }
Index: src/main/java/com/example/rezevirajmasa/demo/repository/ReservationRepository.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/repository/ReservationRepository.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/repository/ReservationRepository.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,5 +1,8 @@
 package com.example.rezevirajmasa.demo.repository;
 
-import com.example.rezevirajmasa.demo.model.*;
+import com.example.rezevirajmasa.demo.model.Customer;
+import com.example.rezevirajmasa.demo.model.Reservation;
+import com.example.rezevirajmasa.demo.model.Restaurant;
+import com.example.rezevirajmasa.demo.model.TableEntity;
 import org.springframework.data.jpa.repository.JpaRepository;
 
@@ -8,5 +11,5 @@
 
 public interface ReservationRepository extends JpaRepository<Reservation, Long> {
-    List<Reservation> findALlByUserAndCheckInTimeAfter(User user, LocalDateTime now);
+    List<Reservation> findAllByCustomer(Customer customer);
     List<Reservation> findByTableAndCheckInTimeBetween(TableEntity table, LocalDateTime startTime, LocalDateTime endTime);
 
@@ -14,11 +17,3 @@
     List<Reservation> findAllByCheckInTimeBefore(LocalDateTime currentTime);
     List<Reservation> findByCheckInTimeAfterAndCheckInTimeBefore(LocalDateTime startTime, LocalDateTime endTime);
-    List<Reservation> findALlByUserAndCheckInTimeBefore(User user, LocalDateTime now);
-    List<Reservation> findAllByUser(User user);
-
-    List<Reservation> findAllByUserAndCheckInTimeAfter(User user, LocalDateTime now);
-
-    List<Reservation> findAllByUserAndCheckInTimeBefore(User user, LocalDateTime now);
-    List<Reservation> findAllByTableAndCheckInTime(TableEntity table, LocalDateTime now);
-    List<Reservation> findAllByRestaurantAndCheckInTimeAfter(Restaurant restaurant, LocalDateTime now);
 }
Index: src/main/java/com/example/rezevirajmasa/demo/repository/RestaurantRepository.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/repository/RestaurantRepository.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/repository/RestaurantRepository.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -4,14 +4,7 @@
 import com.example.rezevirajmasa.demo.model.TableEntity;
 import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.Query;
-import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
 public interface RestaurantRepository extends JpaRepository<Restaurant, Long> {
-    List<Restaurant> findAllByNameLikeIgnoreCase(String search);
-    List<Restaurant> findAllByCuisineTypeContaining(String search);
-    @Query("SELECT DISTINCT r.cuisineType FROM Restaurant r")
-    List<String> findAllCuisineTypes();
-    List<Restaurant> findAllByCuisineType(String cuisine);
 }
Index: src/main/java/com/example/rezevirajmasa/demo/repository/TableRepository.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/repository/TableRepository.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/repository/TableRepository.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -7,14 +7,9 @@
 import org.springframework.data.repository.query.Param;
 
-import java.time.LocalDateTime;
 import java.util.List;
 
 public interface TableRepository extends JpaRepository<TableEntity, Long> {
     List<TableEntity> findByRestaurant(Restaurant restaurant);
-    List<TableEntity> findAllByCapacityGreaterThanEqual(int capacity);
-    @Query("SELECT t FROM TableEntity t WHERE t.capacity >= :capacity AND NOT EXISTS (" +
-            "SELECT r FROM t.reservations r WHERE r.checkInTime <= :checkOutTime AND r.checkOutTime >= :checkInTime)")
-    List<TableEntity> findAvailableTables(@Param("checkInTime") LocalDateTime checkInTime,
-                                          @Param("checkOutTime") LocalDateTime checkOutTime,
-                                          @Param("capacity") int capacity);
+//    @Query("SELECT t FROM TableEntity t JOIN FETCH t.restaurant WHERE t.id = :id")
+//    TableEntity findTableEntityByIdWithRestaurant(@Param("id") Long id);
 }
Index: c/main/java/com/example/rezevirajmasa/demo/repository/UserRepository.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/repository/UserRepository.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,10 +1,0 @@
-package com.example.rezevirajmasa.demo.repository;
-
-import com.example.rezevirajmasa.demo.model.User;
-import org.springframework.data.jpa.repository.JpaRepository;
-
-import java.util.Optional;
-
-public interface UserRepository extends JpaRepository<User, Long> {
-    public Optional<User> findByEmail(String email);
-}
Index: src/main/java/com/example/rezevirajmasa/demo/service/CustomerService.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/CustomerService.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ src/main/java/com/example/rezevirajmasa/demo/service/CustomerService.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,21 @@
+package com.example.rezevirajmasa.demo.service;
+
+import ch.qos.logback.core.net.server.Client;
+import com.example.rezevirajmasa.demo.model.Customer;
+import com.example.rezevirajmasa.demo.model.MembershipLevel;
+import com.example.rezevirajmasa.demo.model.Reservation;
+import com.example.rezevirajmasa.demo.model.Role;
+
+import java.util.Date;
+import java.util.List;
+
+
+public interface CustomerService {
+    Customer registration(String firstName, String lastName, String email, String password, String phone, String address, MembershipLevel membershipLevel, Role role);
+    List<Customer> listAll();
+    Customer findByEmail(String email);
+    Customer findById(Long id);
+    Customer updateCustomer(Long id, String firstName, String lastName, String email, String password, String phone, String address, MembershipLevel membershipLevel);
+    Customer registration(Customer customer);
+    boolean deleteById(Long customerId);
+}
Index: c/main/java/com/example/rezevirajmasa/demo/service/MenuService.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/MenuService.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,12 +1,0 @@
-package com.example.rezevirajmasa.demo.service;
-
-import com.example.rezevirajmasa.demo.model.Menu;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-public interface MenuService {
-    public List<Menu> getMenuByRestaurantId(Long restaurantId);
-    public void updateMenuPrice(Long menuId, BigDecimal newPrice);
-    public Menu getMenuById(Long id);
-}
Index: src/main/java/com/example/rezevirajmasa/demo/service/ReservationHistoryService.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/ReservationHistoryService.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/service/ReservationHistoryService.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,7 +1,7 @@
 package com.example.rezevirajmasa.demo.service;
 
+import com.example.rezevirajmasa.demo.model.Customer;
 import com.example.rezevirajmasa.demo.model.Reservation;
 import com.example.rezevirajmasa.demo.model.Restaurant;
-import com.example.rezevirajmasa.demo.model.User;
 
 import java.time.LocalDateTime;
@@ -10,7 +10,6 @@
 public interface ReservationHistoryService {
     public void moveReservationToHistory(Reservation reservation, String status, String cancellationReason);
-//    public void moveReservationToCancelled(Reservation reservation, String status, String cancellationReason);
     public void moveReservationsToPast(List<Restaurant.ReservationHistory> reservationsToMove);
-    List<Restaurant.ReservationHistory> findByUser(User user);
+    List<Restaurant.ReservationHistory> findByCustomer(Customer customer);
     List<Restaurant.ReservationHistory> findAll();
     List<Restaurant.ReservationHistory> findReservationsToMove(LocalDateTime currentTime);
Index: c/main/java/com/example/rezevirajmasa/demo/service/ReservationSchedulerService.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/ReservationSchedulerService.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,34 +1,0 @@
-package com.example.rezevirajmasa.demo.service;
-
-import com.example.rezevirajmasa.demo.model.Reservation;
-import com.example.rezevirajmasa.demo.repository.ReservationRepository;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Service;
-
-import java.time.LocalDateTime;
-import java.util.List;
-
-@Service
-public class ReservationSchedulerService {
-
-    private final ReservationRepository reservationRepository;
-    private final ReservationHistoryService reservationHistoryService;
-
-    public ReservationSchedulerService(
-            ReservationRepository reservationRepository,
-            ReservationHistoryService reservationHistoryService) {
-        this.reservationRepository = reservationRepository;
-        this.reservationHistoryService = reservationHistoryService;
-    }
-
-    @Scheduled(cron = "0 0 0 * * ?")
-    public void archivePastReservations() {
-        LocalDateTime now = LocalDateTime.now();
-        List<Reservation> pastReservations = reservationRepository.findAllByCheckInTimeBefore(now);
-
-        for (Reservation reservation : pastReservations) {
-            reservationHistoryService.moveReservationToHistory(reservation, "Past", null);
-            reservationRepository.delete(reservation);
-        }
-    }
-}
Index: src/main/java/com/example/rezevirajmasa/demo/service/ReservationService.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/ReservationService.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/service/ReservationService.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,9 +1,8 @@
 package com.example.rezevirajmasa.demo.service;
 
-import com.example.rezevirajmasa.demo.dto.ReservationDTO;
-import com.example.rezevirajmasa.demo.dto.RestaurantDTO;
-import com.example.rezevirajmasa.demo.model.*;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.security.core.userdetails.UserDetails;
+import com.example.rezevirajmasa.demo.model.Customer;
+import com.example.rezevirajmasa.demo.model.Reservation;
+import com.example.rezevirajmasa.demo.model.Restaurant;
+import com.example.rezevirajmasa.demo.model.TableEntity;
 
 import java.time.LocalDateTime;
@@ -11,19 +10,13 @@
 
 public interface ReservationService {
-    public Reservation makeReservationRest(ReservationDTO reservation, User user, Restaurant restaurant);
+    public void makeReservation(Customer customer, TableEntity table, Restaurant restaurant, LocalDateTime localDateTime, LocalDateTime checkInTime, int partySize, String specialRequests);
+    public Reservation makeReservationRest(Reservation reservation);
     public List<Reservation> listAll();
-    public Reservation updateReservation(Long reservationId, ReservationDTO reservationDTO, User user);
-    public List<Reservation> reservationsForTable(TableEntity table);
     public Reservation findById(Long id);
     public Reservation getReservationById(Long reservationId);
     public boolean cancelReservation(Long reservationId);
-    public List<Reservation> findReservationByUser(User user);
-    public List<Reservation> findAllByUser(User user);
-    public List<Reservation> findReservationsByUserPast(User user);
+    public List<Reservation> findReservationByCustomer(Customer customer);
     public List<Reservation> findReservationsByTableAndDateRange(TableEntity table, LocalDateTime startDateTime, LocalDateTime endDateTime);
-    @Scheduled(cron = "0 0 0 * * ?")
-    void findReservationsToMove();
+    List<Reservation> findReservationsToMove(LocalDateTime currentTime);
     void deleteReservation(Long reservationID);
-
-    List<Reservation> findAllByRestaurant(Restaurant restaurant);
 }
Index: src/main/java/com/example/rezevirajmasa/demo/service/RestaurantService.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/RestaurantService.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/service/RestaurantService.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,29 +1,20 @@
 package com.example.rezevirajmasa.demo.service;
 
-import com.example.rezevirajmasa.demo.dto.RestaurantDTO;
 import com.example.rezevirajmasa.demo.model.Restaurant;
-import com.example.rezevirajmasa.demo.model.TableEntity;
 
 import java.math.BigDecimal;
 import java.time.LocalDate;
-import java.time.LocalDateTime;
 import java.util.List;
 
 public interface RestaurantService {
-    List<RestaurantDTO> listall();
-    List<Restaurant> listAll();
-    //    void save(String name, String cuisineType, String address, String phone, String operatingHours, String website, String socialMediaLinks, BigDecimal rating, List<Long> tablesList);
+    List<Restaurant> listall();
+//    void save(String name, String cuisineType, String address, String phone, String operatingHours, String website, String socialMediaLinks, BigDecimal rating, List<Long> tablesList);
 //    void save(String name, String cuisineType, String address, String phone, String operatingHours, String website, String socialMediaLinks, BigDecimal rating, int numberOfTables, int tableCapacity, String location, Boolean isSmokingArea, String description);
     void save(Restaurant restaurant, int numberOfTables, List<Integer> tableCapacities, List<String> tableLocations, List<String> tableSmokingAreas, List<String> tableDescriptions);
     Restaurant updateRestaurant(Long restaurantId, String name, String cuisineType, String address, String phone, String operatingHours, String website, String socialMediaLinks, BigDecimal rating, List<Long> tablesList);
     Restaurant deleteRestaurant(Long restaurantId);
-    RestaurantDTO findById(Long restaurantId);
-    Restaurant findByIdRestaurant(Long restaurantId);
+
+    Restaurant findById(Long restaurantId);
     List<Restaurant> listRestaurantBy(String search);
     List<Restaurant> getRestaurantsWithAvailableTimeSlotsForToday();
-    public List<Restaurant> findRestaurantsByDateTimeAndPartySize(LocalDateTime dateTime, int partySize, String search);
-//    public List<Restaurant> findRestaurantsBySearchParams(LocalDateTime dateTime, int partySize, String search);
-    public List<String> findALlCuisineTypes();
-    List<RestaurantDTO> findRestaurantsByCuisineType(String param);
-    public List<RestaurantDTO> findRestaurantsBySearchParams(LocalDateTime dateTime, int partySize, String search);
 }
Index: src/main/java/com/example/rezevirajmasa/demo/service/TableService.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/TableService.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/service/TableService.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,5 +1,4 @@
 package com.example.rezevirajmasa.demo.service;
 
-import com.example.rezevirajmasa.demo.dto.TableDTO;
 import com.example.rezevirajmasa.demo.model.Restaurant;
 import com.example.rezevirajmasa.demo.model.TableEntity;
@@ -13,7 +12,6 @@
 public interface TableService {
     List<TableEntity> listall();
-    TableDTO findById(Long id);
-    TableEntity findByIdTable(Long id);
-    void save(int numberOfTables, List<Integer> tableCapacities, List<String> tableLocations, List<String> tableSmokingAreas, List<String> tableDescriptions, Restaurant restaurant);
+    TableEntity findById(Long id);
+//    void save(int numberOfTables, List<Integer> tableCapacities, List<String> tableLocations, List<String> tableSmokingAreas, List<String> tableDescriptions, Restaurant restaurant);
     void deleteTimeSlotsForReservation(Long tableId, LocalDateTime reservationTime);
     void canceledTimeSlots(Long tableId, LocalDateTime reservationTime);
Index: c/main/java/com/example/rezevirajmasa/demo/service/UserService.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/UserService.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,16 +1,0 @@
-package com.example.rezevirajmasa.demo.service;
-
-import com.example.rezevirajmasa.demo.dto.CredentialsDto;
-import com.example.rezevirajmasa.demo.dto.SignUpDto;
-import com.example.rezevirajmasa.demo.dto.UserDto;
-import com.example.rezevirajmasa.demo.model.User;
-import lombok.RequiredArgsConstructor;
-
-
-public interface UserService {
-    public UserDto findByEmail(String email);
-    public User findByMail(String email);
-    public UserDto login(CredentialsDto credentialsDto);
-    public UserDto register(SignUpDto userDto);
-    public User findUserById(Long userId);
-}
Index: src/main/java/com/example/rezevirajmasa/demo/service/impl/CustomerServiceImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/CustomerServiceImpl.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ src/main/java/com/example/rezevirajmasa/demo/service/impl/CustomerServiceImpl.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,105 @@
+package com.example.rezevirajmasa.demo.service.impl;
+
+import com.example.rezevirajmasa.demo.model.Customer;
+import com.example.rezevirajmasa.demo.model.MembershipLevel;
+import com.example.rezevirajmasa.demo.model.Reservation;
+import com.example.rezevirajmasa.demo.model.Role;
+import com.example.rezevirajmasa.demo.model.exceptions.InvalidCustomerIdException;
+import com.example.rezevirajmasa.demo.repository.CustomerRepository;
+import com.example.rezevirajmasa.demo.service.CustomerService;
+import org.springframework.security.core.parameters.P;
+import org.springframework.security.core.userdetails.User;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.stereotype.Service;
+
+import javax.swing.text.html.Option;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.util.*;
+
+@Service
+public class CustomerServiceImpl implements CustomerService, UserDetailsService {
+    private final CustomerRepository customerRepository;
+
+    private final PasswordEncoder passwordEncoder;
+    public CustomerServiceImpl(CustomerRepository customerRepository, PasswordEncoder passwordEncoder) {
+        this.customerRepository = customerRepository;
+        this.passwordEncoder = passwordEncoder;
+    }
+
+    @Override
+    public Customer registration(String firstName, String lastName, String email, String password, String phone, String address, MembershipLevel membershipLevel, Role role) {
+        Customer customer = new Customer();
+        customer.setFirstName(firstName);
+        customer.setLastName(lastName);
+        customer.setEmail(email);
+        customer.setPassword(passwordEncoder.encode(password));
+        customer.setAddress(address);
+        customer.setPhone(phone);
+        customer.setMembershipLevel(membershipLevel);
+        customer.setRole(role);
+        customer.setRegistrationDate(Date.from(Instant.now()));
+        return customerRepository.save(customer);
+    }
+
+    @Override
+    public List<Customer> listAll() {
+        return customerRepository.findAll();
+    }
+
+    @Override
+    public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {
+        Customer customer = customerRepository.findByEmail(email);
+        if (customer == null) {
+            throw new UsernameNotFoundException("User not found with email: " + email);
+        }
+        return new org.springframework.security.core.userdetails.User(
+                customer.getEmail(),
+                customer.getPassword(),
+                Collections.singletonList(customer.getRole())
+        );
+    }
+
+    @Override
+    public Customer updateCustomer(Long id, String firstName, String lastName, String email, String password, String phone, String address, MembershipLevel membershipLevel) {
+        Customer customer = findById(id);
+        customer.setFirstName(firstName);
+        customer.setLastName(lastName);
+        customer.setEmail(email);
+        customer.setPassword(passwordEncoder.encode(password));
+        customer.setPhone(phone);
+        customer.setMembershipLevel(membershipLevel);
+        customer.setAddress(address);
+        return customerRepository.save(customer);
+    }
+
+    @Override
+    public Customer findByEmail(String email) {
+        return customerRepository.findByEmail(email);
+    }
+
+    @Override
+    public Customer findById(Long id) {
+        return customerRepository.findById(id).orElseThrow(InvalidCustomerIdException::new);
+    }
+
+    @Override
+    public Customer registration(Customer customer) {
+        return customerRepository.save(customer);
+    }
+
+    @Override
+    public boolean deleteById(Long customerId) {
+        Optional<Customer> optionalCustomer = customerRepository.findById(customerId);
+        if(optionalCustomer.isPresent()) {
+            Customer customer = optionalCustomer.get();
+            customerRepository.delete(customer);
+            return true;
+        } else {
+            return false;
+        }
+    }
+}
Index: c/main/java/com/example/rezevirajmasa/demo/service/impl/MenuServiceImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/MenuServiceImpl.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,55 +1,0 @@
-package com.example.rezevirajmasa.demo.service.impl;
-
-import com.example.rezevirajmasa.demo.model.Menu;
-import com.example.rezevirajmasa.demo.model.PriceHistory;
-import com.example.rezevirajmasa.demo.model.Restaurant;
-import com.example.rezevirajmasa.demo.repository.MenuRepository;
-import com.example.rezevirajmasa.demo.repository.PriceHistoryRepository;
-import com.example.rezevirajmasa.demo.service.MenuService;
-import com.example.rezevirajmasa.demo.service.RestaurantService;
-import org.openqa.selenium.InvalidArgumentException;
-import org.springframework.stereotype.Service;
-
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-import java.util.List;
-
-@Service
-public class MenuServiceImpl implements MenuService {
-    private final MenuRepository menuRepository;
-    private final RestaurantService restaurantService;
-
-    private final PriceHistoryRepository priceHistoryRepository;
-
-    public MenuServiceImpl(MenuRepository menuRepository, RestaurantService restaurantService, PriceHistoryRepository priceHistoryRepository) {
-        this.menuRepository = menuRepository;
-        this.restaurantService = restaurantService;
-        this.priceHistoryRepository = priceHistoryRepository;
-    }
-
-    @Override
-    public List<Menu> getMenuByRestaurantId(Long restaurantId) {
-        Restaurant restaurant = restaurantService.findByIdRestaurant(restaurantId);
-        return menuRepository.findAllByRestaurant(restaurant);
-    }
-
-    @Override
-    public void updateMenuPrice(Long menuId, BigDecimal newPrice) {
-        Menu menu = menuRepository.findById(menuId)
-                .orElseThrow(() -> new IllegalArgumentException("Menu not found"));
-
-        if (menu.getPrice() != null && !menu.getPrice().equals(newPrice)) {
-            PriceHistory priceHistory = new PriceHistory(menu, menu.getPrice(), LocalDateTime.now());
-            priceHistoryRepository.save(priceHistory);
-        }
-
-        menu.setPrice(newPrice);
-        menuRepository.save(menu);
-    }
-
-    @Override
-    public Menu getMenuById(Long id) {
-        return menuRepository.findById(id)
-                .orElseThrow(()->new InvalidArgumentException("Invalid id sent: " + id));
-    }
-}
Index: src/main/java/com/example/rezevirajmasa/demo/service/impl/ReservationHistoryServiceImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/ReservationHistoryServiceImpl.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/service/impl/ReservationHistoryServiceImpl.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,7 +1,7 @@
 package com.example.rezevirajmasa.demo.service.impl;
 
+import com.example.rezevirajmasa.demo.model.Customer;
 import com.example.rezevirajmasa.demo.model.Reservation;
 import com.example.rezevirajmasa.demo.model.Restaurant;
-import com.example.rezevirajmasa.demo.model.User;
 import com.example.rezevirajmasa.demo.repository.ReservationHistoryRepository;
 import com.example.rezevirajmasa.demo.service.ReservationHistoryService;
@@ -22,5 +22,5 @@
     public void moveReservationToHistory(Reservation reservation, String status, String cancellationReason) {
         Restaurant.ReservationHistory history = new Restaurant.ReservationHistory();
-        history.setUser(reservation.getUser());
+        history.setCustomer(reservation.getCustomer());
         history.setTable(reservation.getTable());
         history.setReservationDateTime(reservation.getReservationDateTime());
@@ -42,14 +42,16 @@
 
     @Override
-    public List<Restaurant.ReservationHistory> findByUser(User user) {
-        return reservationHistoryRepository.findALlByUser(user);
+    public List<Restaurant.ReservationHistory> findByCustomer(Customer customer) {
+        return reservationHistoryRepository.findAllByCustomer(customer);
     }
 
     @Override
     public void moveReservationsToPast(List<Restaurant.ReservationHistory> reservationsToMove) {
+        // Update the status of reservations to "Past"
         for (Restaurant.ReservationHistory reservation : reservationsToMove) {
             reservation.setStatus("Past");
         }
 
+        // Save the updated reservations
         reservationHistoryRepository.saveAll(reservationsToMove);
     }
Index: src/main/java/com/example/rezevirajmasa/demo/service/impl/ReservationImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/ReservationImpl.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/service/impl/ReservationImpl.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,22 +1,22 @@
 package com.example.rezevirajmasa.demo.service.impl;
 
-import com.example.rezevirajmasa.demo.dto.PreorderedItemDto;
-import com.example.rezevirajmasa.demo.dto.ReservationDTO;
-import com.example.rezevirajmasa.demo.mappers.UserMapper;
-import com.example.rezevirajmasa.demo.model.*;
+import com.example.rezevirajmasa.demo.model.Customer;
+import com.example.rezevirajmasa.demo.model.Reservation;
+import com.example.rezevirajmasa.demo.model.Restaurant;
+import com.example.rezevirajmasa.demo.model.TableEntity;
 import com.example.rezevirajmasa.demo.model.exceptions.InvalidReservationException;
 import com.example.rezevirajmasa.demo.model.exceptions.InvalidReservationIdException;
+import com.example.rezevirajmasa.demo.repository.CustomerRepository;
 import com.example.rezevirajmasa.demo.repository.ReservationRepository;
+import com.example.rezevirajmasa.demo.repository.RestaurantRepository;
 import com.example.rezevirajmasa.demo.repository.TableRepository;
-import com.example.rezevirajmasa.demo.service.MenuService;
-import com.example.rezevirajmasa.demo.service.ReservationHistoryService;
 import com.example.rezevirajmasa.demo.service.ReservationService;
-import com.example.rezevirajmasa.demo.service.UserService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 
+import javax.swing.text.html.Option;
 import java.time.LocalDateTime;
-import java.util.ArrayList;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
 import java.util.List;
 import java.util.Optional;
@@ -24,21 +24,12 @@
 @Service
 public class ReservationImpl implements ReservationService {
-
     @Autowired
     private TableRepository tableRepository;
     @Autowired
-    private ReservationHistoryService reservationHistoryService;
-    private final UserMapper userMapper;
+    private RestaurantRepository restaurantRepository;
     @Autowired
-    private UserService userService;
+    private CustomerRepository customerRepository;
     @Autowired
     private ReservationRepository reservationRepository;
-    @Autowired
-    @Lazy
-    private MenuService menuService;
-
-    public ReservationImpl(UserMapper userMapper) {
-        this.userMapper = userMapper;
-    }
 
     @Override
@@ -48,98 +39,37 @@
 
     @Override
-    public Reservation makeReservationRest(ReservationDTO reservationDTO, User user, Restaurant restaurant) {
-        Reservation reservation = new Reservation();
+    public void makeReservation(Customer customer, TableEntity table, Restaurant restaurant, LocalDateTime localDateTime, LocalDateTime checkInTime, int partySize, String specialRequests) {
+        if (!table.isAvailable(checkInTime)) {
+            // Handle unavailability (throw an exception, return a specific response, etc.)
+            throw new RuntimeException("Table not available for the specified time slot");
+        }
 
-        Optional<TableEntity> optionalTable = tableRepository.findById(reservationDTO.getTableNumber());
+        Reservation reservation =
+                new Reservation(customer, table, restaurant, LocalDateTime.now(), partySize, specialRequests, "Reserved", checkInTime, checkInTime.plusHours(2), null);
 
-        if (optionalTable.isPresent()) {
+//        // Update table status or perform additional logic if needed
+//        tableRepository.save(table);
+
+        // Save the reservation
+        reservationRepository.save(reservation);
+    }
+
+    @Override
+    public Reservation makeReservationRest(Reservation reservation) {
+        Optional<TableEntity> optionalTable = tableRepository.findById(reservation.getTable().getId());
+        if(optionalTable.isPresent()) {
             TableEntity table = optionalTable.get();
 
-            LocalDateTime startTime = reservationDTO.getReservationDateTime().plusHours(1);
-            LocalDateTime endTime = reservationDTO.getReservationDateTime().plusHours(3);
+            LocalDateTime startTime = reservation.getCheckInTime().minusHours(2);
+            LocalDateTime endTime = reservation.getCheckInTime().plusHours(2);
 
-            boolean hasConflict = table.getReservations().stream()
-                    .anyMatch(existingReservation -> {
-                        LocalDateTime existingStartTime = existingReservation.getCheckInTime();
-                        LocalDateTime existingEndTime = existingReservation.getCheckOutTime();
-
-                        boolean scenario1 = existingStartTime.isBefore(startTime) && existingEndTime.isAfter(startTime);
-
-                        boolean scenario2 = existingStartTime.isBefore(endTime) && existingEndTime.isAfter(startTime);
-
-                        boolean scenario3 = existingStartTime.isAfter(startTime) && existingEndTime.isBefore(endTime);
-
-                        boolean scenario4 = existingStartTime.isBefore(startTime) && existingEndTime.isAfter(endTime);
-
-                        return scenario1 || scenario2 || scenario3 || scenario4;
-                    });
-            if (hasConflict) {
-                throw new InvalidReservationException("Unsuccessful reservation -> time slot not available");
-            }
-
-            reservation.setTable(table);
-            reservation.setReservationDateTime(LocalDateTime.now());
-            reservation.setSpecialRequests(reservationDTO.getSpecialRequests());
-            reservation.setPartySize(reservationDTO.getPartySize());
-            reservation.setReservationStatus(reservationDTO.getStatus() != null ? reservationDTO.getStatus() : "Pending");
-            reservation.setPaymentStatus(reservationDTO.getPaymentStatus() != null ? reservationDTO.getPaymentStatus() : "Unpaid");
-            reservation.setUser(user);
-
-            List<PreorderedItem> preOrderedItems = new ArrayList<>();
-
-            for (PreorderedItemDto dtoItem : reservationDTO.getPreOrderedItems()) {
-                PreorderedItem item = new PreorderedItem();
-                item.setPreorderedItemName(dtoItem.getPreorderedItemName());
-                item.setQuantity(dtoItem.getQuantity());
-                item.setPrice(dtoItem.getPrice());
-                item.setReservation(reservation);
-
-                Menu menu = menuService.getMenuById(dtoItem.getMenuID());
-                item.setMenu(menu);
-
-                preOrderedItems.add(item);
-            }
-
-            reservation.setPreOrderedItems(preOrderedItems);
-            reservation.setRestaurant(restaurant);
-            reservation.setCheckInTime(reservationDTO.getReservationDateTime().plusHours(1));
-            reservation.setReservationDateTime(LocalDateTime.now());
-            reservation.setCheckOutTime(reservationDTO.getReservationDateTime().plusHours(3));
+            table.getTimeSlots().removeIf(
+                    x -> x.isAfter(startTime) && x.isBefore(endTime)
+            );
 
             return reservationRepository.save(reservation);
         } else {
-            throw new InvalidReservationException("Invalid table number -> table not found");
+            throw new InvalidReservationException("Unsuccessful reservation -> time slot not avalaible");
         }
-    }
-
-    @Override
-    public Reservation updateReservation(Long reservationId, ReservationDTO reservationDTO, User user) {
-        Reservation existingReservation = findById(reservationId);
-
-        if (!existingReservation.getCheckInTime().equals(reservationDTO.getReservationDateTime())) {
-            TableEntity table = existingReservation.getTable();
-            table.removeReservation(existingReservation);
-
-            LocalDateTime newStartTime = reservationDTO.getReservationDateTime().minusHours(2);
-            LocalDateTime newEndTime = reservationDTO.getReservationDateTime().plusHours(2);
-            boolean hasConflict = table.getReservations().stream()
-                    .anyMatch(r -> r.getCheckInTime().isAfter(newStartTime) && r.getCheckInTime().isBefore(newEndTime));
-
-            if (hasConflict) {
-                throw new InvalidReservationException("New time slot is not available.");
-            }
-
-            table.addReservation(existingReservation);
-        }
-
-        existingReservation.setCheckInTime(reservationDTO.getReservationDateTime());
-        existingReservation.setCheckOutTime(reservationDTO.getReservationDateTime().plusHours(2));
-        existingReservation.setReservationDateTime(LocalDateTime.now());
-        existingReservation.setPartySize(reservationDTO.getPartySize());
-        existingReservation.setSpecialRequests(reservationDTO.getSpecialRequests());
-        existingReservation.setReservationStatus(reservationDTO.getStatus() != null ? reservationDTO.getStatus() : existingReservation.getReservationStatus());
-        existingReservation.setPaymentStatus(reservationDTO.getPaymentStatus() != null ? reservationDTO.getPaymentStatus() : existingReservation.getPaymentStatus());
-
-        return reservationRepository.save(existingReservation);
     }
 
@@ -147,9 +77,4 @@
     public List<Reservation> listAll() {
         return reservationRepository.findAll();
-    }
-
-    @Override
-    public List<Reservation> reservationsForTable(TableEntity table) {
-        return reservationRepository.findAllByTableAndCheckInTime(table, LocalDateTime.now());
     }
 
@@ -166,30 +91,33 @@
             TableEntity table = reservation.getTable();
 
-            table.removeReservation(reservation);
+            LocalDateTime from = reservation.getCheckInTime().minusHours(2);
+            LocalDateTime till = reservation.getCheckInTime().plusHours(2);
 
-            reservationHistoryService.moveReservationToHistory(reservation, "Canceled", "Canceled by user");
+            String[] hours = table.getRestaurant().getOperatingHours().split("-");
+            LocalTime openingHourTime = LocalTime.parse(hours[0], DateTimeFormatter.ofPattern("HH:mm"));
+            LocalDateTime openingDateTime = openingHourTime.atDate(from.toLocalDate());
+            LocalTime closingHourTime = LocalTime.of(22,45);
+            LocalDateTime closingDateTime = closingHourTime.atDate(till.toLocalDate());
+            if(from.isBefore(openingDateTime)) {
+                from = openingDateTime;
+            }
+            if(till.isAfter(closingDateTime)) {
+                till = closingDateTime;
+            }
+            while (from.isBefore(reservation.getCheckInTime().plusHours(2))) {
+                table.addTimeSlot(from);
+                from = from.plusMinutes(15);
+            }
             reservationRepository.delete(reservation);
-
-            return true;
+            return true; // Return true indicating successful cancellation
         } else {
-            return false;
+            return false; // Return false indicating reservation with the given ID not found
         }
     }
 
-    @Override
-    public List<Reservation> findReservationByUser(User user) {
-        LocalDateTime now = LocalDateTime.now();
-        return reservationRepository.findAllByUserAndCheckInTimeAfter(user, now);
-    }
 
     @Override
-    public List<Reservation> findAllByUser(User user) {
-        return reservationRepository.findAllByUser(user);
-    }
-
-    @Override
-    public List<Reservation> findReservationsByUserPast(User user) {
-        LocalDateTime now = LocalDateTime.now();
-        return reservationRepository.findAllByUserAndCheckInTimeBefore(user, now);
+    public List<Reservation> findReservationByCustomer(Customer customer) {
+        return reservationRepository.findAllByCustomer(customer);
     }
 
@@ -200,10 +128,6 @@
 
     @Override
-    public void findReservationsToMove() {
-        List<Reservation> pastReservations = reservationRepository.findAllByCheckInTimeBefore(LocalDateTime.now());
-        for(Reservation reservation : pastReservations) {
-            reservationHistoryService.moveReservationToHistory(reservation, "successful", "/");
-            reservationRepository.delete(reservation);
-        }
+    public List<Reservation> findReservationsToMove(LocalDateTime currentTime) {
+        return reservationRepository.findAllByCheckInTimeBefore(currentTime);
     }
 
@@ -213,8 +137,3 @@
         reservationRepository.delete(reservation);
     }
-
-    @Override
-    public List<Reservation> findAllByRestaurant(Restaurant restaurant) {
-        return reservationRepository.findAllByRestaurantAndCheckInTimeAfter(restaurant, LocalDateTime.now());
-    }
 }
Index: src/main/java/com/example/rezevirajmasa/demo/service/impl/RestaurantServiceImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/RestaurantServiceImpl.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/service/impl/RestaurantServiceImpl.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,22 +1,15 @@
 package com.example.rezevirajmasa.demo.service.impl;
 
-import com.example.rezevirajmasa.demo.dto.ReservationDTO;
-import com.example.rezevirajmasa.demo.dto.RestaurantDTO;
-import com.example.rezevirajmasa.demo.dto.TableDTO;
-import com.example.rezevirajmasa.demo.model.Reservation;
 import com.example.rezevirajmasa.demo.model.Restaurant;
 import com.example.rezevirajmasa.demo.model.TableEntity;
-import com.example.rezevirajmasa.demo.model.User;
 import com.example.rezevirajmasa.demo.model.exceptions.InvalidRestaurantIdException;
 import com.example.rezevirajmasa.demo.repository.RestaurantRepository;
 import com.example.rezevirajmasa.demo.repository.TableRepository;
-import com.example.rezevirajmasa.demo.service.ReservationService;
 import com.example.rezevirajmasa.demo.service.RestaurantService;
 import com.example.rezevirajmasa.demo.service.TableService;
 import com.sun.tools.jconsole.JConsoleContext;
 import jakarta.transaction.Transactional;
-import org.openqa.selenium.InvalidArgumentException;
 import org.springframework.stereotype.Service;
-import org.modelmapper.ModelMapper;
+
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -38,42 +31,13 @@
     private final TableRepository tableRepository;
     private final TableService tableService;
-    private final ReservationService reservationService;
-    private ModelMapper modelMapper = new ModelMapper();
 
-    public RestaurantServiceImpl(RestaurantRepository restaurantRepository, TableRepository tableRepository, TableService tableService, ReservationService reservationService) {
+    public RestaurantServiceImpl(RestaurantRepository restaurantRepository, TableRepository tableRepository, TableService tableService) {
         this.restaurantRepository = restaurantRepository;
         this.tableRepository = tableRepository;
         this.tableService = tableService;
-        this.reservationService = reservationService;
     }
 
     @Override
-    public List<RestaurantDTO> listall() {
-        List<Restaurant> restaurants = restaurantRepository.findAll();
-
-        List<RestaurantDTO> restaurantDTOS = new ArrayList<>();
-
-        for (Restaurant restaurant : restaurants) {
-            RestaurantDTO restaurantDTO = modelMapper.map(restaurant, RestaurantDTO.class);
-            List<TableDTO> tableDTOS = new ArrayList<>();
-            for (TableEntity table : restaurant.getTablesList()) {
-                TableDTO tableDTO = modelMapper.map(table, TableDTO.class);
-                List<ReservationDTO> reservationDTOS = new ArrayList<>();
-                for (Reservation reservation : table.getReservations()) {
-                    ReservationDTO reservationDTO = modelMapper.map(reservation, ReservationDTO.class);
-
-                    reservationDTOS.add(reservationDTO);
-                }
-                tableDTO.setReservations(reservationDTOS);
-                tableDTOS.add(tableDTO);
-            }
-            restaurantDTO.setTablesList(tableDTOS);
-            restaurantDTOS.add(restaurantDTO);
-        }
-        return restaurantDTOS;
-    }
-
-    @Override
-    public List<Restaurant> listAll() {
+    public List<Restaurant> listall() {
         return restaurantRepository.findAll();
     }
@@ -87,8 +51,4 @@
     @Override
     public void save(Restaurant restaurant, int numberOfTables, List<Integer> tableCapacities, List<String> tableLocations, List<String> tableSmokingAreas, List<String> tableDescriptions) {
-        if (numberOfTables != tableCapacities.size() || numberOfTables != tableLocations.size() || numberOfTables != tableSmokingAreas.size() || numberOfTables != tableDescriptions.size()) {
-            throw new IllegalArgumentException("Mismatched table data. Number of tables does not match the size of the input lists.");
-        }
-
         restaurantRepository.save(restaurant);
         String[] hours = restaurant.getOperatingHours().split("-");
@@ -100,12 +60,19 @@
             LocalTime startTime = LocalTime.parse(hours[0], DateTimeFormatter.ofPattern("HH:mm"));
             LocalTime endTime = LocalTime.parse(hours[1], DateTimeFormatter.ofPattern("HH:mm"));
+            System.out.println("IsBefore: " + startTime.isBefore(endTime) + " and equals: " + startTime.equals(endTime));
 
             for (int i = 0; i < numberOfTables; i++) {
                 TableEntity table = new TableEntity();
+
+//                table.initializeTimeSlots(startTime, endTime);
+
                 table.setCapacity(tableCapacities.get(i));
-                table.setTableLocation(tableLocations.get(i));
-                table.setSmokingArea(tableSmokingAreas.get(i).equalsIgnoreCase("on"));
+                table.setLocation(tableLocations.get(i));
+
+                String smokingAreaString = tableSmokingAreas.get(i);
+                table.setSmokingArea(smokingAreaString.equalsIgnoreCase("on"));
                 table.setDescription(tableDescriptions.get(i));
                 table.setRestaurant(restaurant);
+
                 tableRepository.save(table);
             }
@@ -117,34 +84,7 @@
     }
     @Override
-    public RestaurantDTO findById(Long restaurantId) {
-        Restaurant restaurant = restaurantRepository.findById(restaurantId)
-                .orElseThrow(InvalidRestaurantIdException::new);
-
-        RestaurantDTO restaurantDTO = modelMapper.map(restaurant, RestaurantDTO.class);
-
-        List<TableDTO> tableDTOS = new ArrayList<>();
-        for (TableEntity table : restaurant.getTablesList()) {
-            TableDTO tableDTO = modelMapper.map(table, TableDTO.class);
-
-            List<ReservationDTO> reservationDTOS = new ArrayList<>();
-            for (Reservation reservation : table.getReservations()) {
-                ReservationDTO reservationDTO = modelMapper.map(reservation, ReservationDTO.class);
-                reservationDTOS.add(reservationDTO);
-            }
-
-            tableDTO.setReservations(reservationDTOS);
-            tableDTOS.add(tableDTO);
-        }
-
-        restaurantDTO.setTablesList(tableDTOS);
-
-        return restaurantDTO;
+    public Restaurant findById(Long restaurantId) {
+        return restaurantRepository.findById(restaurantId).orElseThrow(InvalidRestaurantIdException::new);
     }
-
-    @Override
-    public Restaurant findByIdRestaurant(Long restaurantId) {
-        return restaurantRepository.findById(restaurantId).orElseThrow(()-> new InvalidArgumentException("No restaurant with provided id"));
-    }
-
 
     @Override
@@ -175,4 +115,5 @@
     @Override
     public List<Restaurant> listRestaurantBy(String search) {
+        // Get all restaurants from the repository
         List<Restaurant> allRestaurants = restaurantRepository.findAll();
 
@@ -193,4 +134,5 @@
 
         for (Restaurant restaurant : restaurants) {
+            // Check if the restaurant has available time slots for today
             boolean hasAvailableTimeSlots = tableService.hasAvailableTimeSlotsForRestaurantAndDate(restaurant, today);
             if (hasAvailableTimeSlots) {
@@ -201,72 +143,3 @@
         return restaurantsWithAvailableTimeSlots;
     }
-
-    @Override
-    public List<Restaurant> findRestaurantsByDateTimeAndPartySize(LocalDateTime dateTime, int partySize, String search) {
-        LocalDateTime checkOutTime = dateTime.plusHours(2);
-        List<Restaurant> allRestaurants = restaurantRepository.findAll();
-
-        return allRestaurants.stream()
-                .filter(restaurant -> restaurant.getTablesList().stream()
-                        .anyMatch(table -> tableRepository.findAvailableTables(dateTime, checkOutTime, partySize)
-                                .contains(table)))
-                .filter(restaurant -> isMatch(restaurant, search))
-                .collect(Collectors.toList());
-    }
-
-    private boolean isMatch(Restaurant restaurant, String name) {
-        return name == null || name.isEmpty() || restaurant.getName().contains(name);
-    }
-
-    @Override
-    public List<RestaurantDTO> findRestaurantsBySearchParams(LocalDateTime dateTime, int partySize, String search) {
-        List<Restaurant> availableRestaurants = new ArrayList<>();
-
-        List<Restaurant> restaurantList;
-        if (search == null || search.isEmpty()) {
-            restaurantList = restaurantRepository.findAll();
-        } else {
-            String searchTerm = "%" + search + "%";
-            restaurantList = restaurantRepository.findAllByNameLikeIgnoreCase(searchTerm);
-
-            if (restaurantList.isEmpty()) {
-                restaurantList = restaurantRepository.findAllByCuisineTypeContaining(search);
-            }
-        }
-
-        for (Restaurant restaurant : restaurantList) {
-            boolean hasAvailableTable = restaurant.getTablesList().stream()
-                    .anyMatch(table -> table.isAvailable(dateTime, partySize));
-
-            if (hasAvailableTable) {
-                availableRestaurants.add(restaurant);
-            }
-        }
-
-        List<RestaurantDTO> restaurantDTOS = availableRestaurants.stream().map(this::convertToDto).toList();
-        return restaurantDTOS;
-    }
-
-    @Override
-    public List<String> findALlCuisineTypes() {
-        return restaurantRepository.findAllCuisineTypes();
-    }
-
-    @Override
-    public List<RestaurantDTO> findRestaurantsByCuisineType(String param) {
-        List<Restaurant> restaurants = restaurantRepository.findAllByCuisineType(param);
-        return restaurants.stream().map(this::convertToDto).toList();
-    }
-
-    public RestaurantDTO convertToDto(Restaurant restaurant) {
-        return modelMapper.map(restaurant, RestaurantDTO.class);
-    }
-
-    public TableDTO convertToDto(TableEntity table) {
-        return modelMapper.map(table, TableDTO.class);
-    }
-
-    public ReservationDTO convertToDto(Reservation reservation) {
-        return modelMapper.map(reservation, ReservationDTO.class);
-    }
 }
Index: src/main/java/com/example/rezevirajmasa/demo/service/impl/TableServiceImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/TableServiceImpl.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/service/impl/TableServiceImpl.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,18 +1,11 @@
 package com.example.rezevirajmasa.demo.service.impl;
 
-import com.example.rezevirajmasa.demo.dto.ReservationDTO;
-import com.example.rezevirajmasa.demo.dto.RestaurantDTO;
-import com.example.rezevirajmasa.demo.dto.TableDTO;
-import com.example.rezevirajmasa.demo.model.Reservation;
 import com.example.rezevirajmasa.demo.model.Restaurant;
 import com.example.rezevirajmasa.demo.model.TableEntity;
+import com.example.rezevirajmasa.demo.model.exceptions.InvalidRestaurantIdException;
 import com.example.rezevirajmasa.demo.model.exceptions.InvalidTableNumberException;
-import com.example.rezevirajmasa.demo.repository.ReservationRepository;
 import com.example.rezevirajmasa.demo.repository.RestaurantRepository;
 import com.example.rezevirajmasa.demo.repository.TableRepository;
 import com.example.rezevirajmasa.demo.service.TableService;
-import jakarta.persistence.Table;
-import org.modelmapper.ModelMapper;
-import org.openqa.selenium.InvalidArgumentException;
 import org.springframework.cglib.core.Local;
 import org.springframework.stereotype.Service;
@@ -25,5 +18,4 @@
 import java.time.chrono.ChronoLocalDateTime;
 import java.time.format.DateTimeFormatter;
-import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -33,11 +25,13 @@
     private final TableRepository tableRepository;
     private final RestaurantRepository restaurantRepository;
-    private final ReservationRepository reservationRepository;
-    private ModelMapper modelMapper = new ModelMapper();
 
-    public TableServiceImpl(TableRepository tableRepository, RestaurantRepository restaurantRepository, ReservationRepository reservationRepository) {
+    public TableServiceImpl(TableRepository tableRepository, RestaurantRepository restaurantRepository) {
         this.tableRepository = tableRepository;
         this.restaurantRepository = restaurantRepository;
-        this.reservationRepository = reservationRepository;
+    }
+
+    @Override
+    public TableEntity findById(Long id) {
+        return tableRepository.findById(id).orElseThrow(InvalidTableNumberException::new);
     }
 
@@ -47,34 +41,9 @@
     }
 
-    @Override
-    public TableDTO findById(Long id) {
-        TableEntity table = tableRepository.findById(id)
-                .orElseThrow(InvalidTableNumberException::new);
-
-        TableDTO tableDTO = modelMapper.map(table, TableDTO.class);
-
-        List<ReservationDTO> reservationDTOS = new ArrayList<>();
-        for (Reservation reservation : table.getReservations()) {
-            ReservationDTO reservationDTO = modelMapper.map(reservation, ReservationDTO.class);
-            reservationDTOS.add(reservationDTO);
-        }
-
-        tableDTO.setReservations(reservationDTOS);
-
-        return tableDTO;
-    }
-
-    @Override
-    public TableEntity findByIdTable(Long id) {
-        return tableRepository.findById(id).orElseThrow(() -> new InvalidArgumentException("Invalid table id"));
-    }
-
-
-    @Override
     public void save(int numberOfTables, List<Integer> tableCapacities, List<String> tableLocations, List<String> tableSmokingAreas, List<String> tableDescriptions, Restaurant restaurant) {
         for (int i = 0; i < numberOfTables; i++) {
             TableEntity table = new TableEntity();
             table.setCapacity(tableCapacities.get(i));
-            table.setTableLocation(tableLocations.get(i));
+            table.setLocation(tableLocations.get(i));
             table.setSmokingArea(Boolean.valueOf(tableSmokingAreas.get(i)));
             table.setDescription(tableDescriptions.get(i));
@@ -86,8 +55,13 @@
     @Override
     public void deleteTimeSlotsForReservation(Long tableId, LocalDateTime reservationTime) {
-        TableDTO tableDTO = findById(tableId);
-        TableEntity table = convertFromDTO(tableDTO);
-        LocalDate threeDaysAgo = LocalDate.now().minusDays(3);
-        table.cleanUnusedTimeSlots(threeDaysAgo);
+        LocalDateTime startTime = reservationTime.minusHours(2);
+        LocalDateTime endTime = reservationTime.plusHours(2);
+
+        TableEntity table = findById(tableId);
+        List<LocalDateTime> timeSlots = table.getTimeSlots();
+
+        timeSlots.removeIf(timeSlot -> timeSlot.isAfter(startTime) && timeSlot.isBefore(endTime));
+
+        table.setTimeSlots(timeSlots);
 
         tableRepository.saveAndFlush(table);
@@ -96,31 +70,27 @@
     @Override
     public void canceledTimeSlots(Long tableId, LocalDateTime reservationTime) {
-        TableDTO tableDTO = findById(tableId);
-        TableEntity table = convertFromDTO(tableDTO);
+        TableEntity table = findById(tableId);
+        List<LocalDateTime> timeSlots = table.getTimeSlots();
         LocalDateTime startTime = reservationTime.minusHours(1).minusMinutes(45);
         LocalDateTime endTime = reservationTime.plusHours(1).plusMinutes(45);
 
+        LocalDate localDate = reservationTime.toLocalDate();
+
         String[] hours = table.getRestaurant().getOperatingHours().split("-");
         LocalTime openingHourTime = LocalTime.parse(hours[0], DateTimeFormatter.ofPattern("HH:mm"));
-        LocalDateTime openingHour = openingHourTime.atDate(reservationTime.toLocalDate());
-        LocalDateTime closingHour = LocalTime.of(23, 45).atDate(reservationTime.toLocalDate());
 
-        if (startTime.isBefore(openingHour)) {
-            startTime = openingHour;
+        LocalDateTime openingHour = openingHourTime.atDate(localDate);
+        LocalDateTime closingHour = LocalTime.of(23, 45).atDate(localDate);
+        if(startTime.isBefore(openingHour)) {
+            startTime = LocalDateTime.from(openingHour);
         }
-
-        while (startTime.isBefore(endTime) || startTime.equals(endTime)) {
-            if (startTime.isAfter(closingHour) || startTime.equals(closingHour)) {
+        while(startTime.isBefore(endTime) || startTime.equals(endTime)) {
+            timeSlots.add(startTime);
+            startTime = startTime.plusMinutes(15);
+            if(startTime.isAfter(closingHour) || startTime.equals(closingHour)) {
                 break;
             }
-
-            Reservation reservation = new Reservation();
-            reservation.setReservationDateTime(startTime);
-            reservation.setTable(table);
-            reservationRepository.save(reservation);
-
-            startTime = startTime.plusMinutes(15);
         }
-
+        table.setTimeSlots(timeSlots);
         tableRepository.saveAndFlush(table);
     }
@@ -135,5 +105,4 @@
         return tableRepository.findById(number).orElseThrow(InvalidTableNumberException::new);
     }
-
     @Override
     public TableEntity deleteTable(Long number) {
@@ -147,8 +116,9 @@
         List<TableEntity> tables = tableRepository.findByRestaurant(restaurant);
 
+        // Iterate through each table to check for available time slots
         for (TableEntity table : tables) {
             boolean hasAvailableTimeSlots = hasAvailableTimeSlotsForTableAndDate(table, today);
             if (hasAvailableTimeSlots) {
-                return true;
+                return true; // If any table has available time slots, return true
             }
         }
@@ -158,29 +128,13 @@
 
     public boolean hasAvailableTimeSlotsForTableAndDate(TableEntity table, LocalDate date) {
-        for (Reservation reservation : table.getReservations()) {
-            LocalDateTime startTime = reservation.getReservationDateTime();
-            LocalDateTime endTime = startTime.plusHours(reservation.getTable().getReservationDurationHours());
+        List<LocalDateTime> timeSlots = table.getTimeSlots();
 
-            if (startTime.toLocalDate().equals(date) || endTime.toLocalDate().equals(date)) {
-                return false;
-            }
-        }
-        return true;
+        // Implement your logic to check if the table has available time slots for the given date
+        // This could involve querying the database for reservations for the given table and date,
+        // and checking if there are any open time slots.
+        // You may need to consider factors such as operating hours, existing reservations, etc.
+        // Return true if there are available time slots, false otherwise.
+        return false;
     }
 
-    public RestaurantDTO convertToDto(Restaurant restaurant) {
-        return modelMapper.map(restaurant, RestaurantDTO.class);
-    }
-
-    public TableDTO convertToDto(TableEntity table) {
-        return modelMapper.map(table, TableDTO.class);
-    }
-
-    public ReservationDTO convertToDto(Reservation reservation) {
-        return modelMapper.map(reservation, ReservationDTO.class);
-    }
-
-    public TableEntity convertFromDTO(TableDTO tableDTO) {
-        return modelMapper.map(tableDTO, TableEntity.class);
-    }
 }
Index: c/main/java/com/example/rezevirajmasa/demo/service/impl/TokenService.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/TokenService.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,34 +1,0 @@
-package com.example.rezevirajmasa.demo.service.impl;
-
-import com.example.rezevirajmasa.demo.config.security.SecurityConstants;
-import io.jsonwebtoken.Claims;
-import io.jsonwebtoken.ExpiredJwtException;
-import io.jsonwebtoken.Jwts;
-import io.jsonwebtoken.SignatureException;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-@Service
-public class TokenService {
-
-    public String getUserIdFromToken(String token) {
-        try {
-            String jwtToken = token.substring(7);
-
-            Claims claims = Jwts.parser()
-                    .setSigningKey(SecurityConstants.SECRET)
-                    .parseClaimsJws(jwtToken)
-                    .getBody();
-
-            return claims.getSubject();  // Assumes 'sub' claim contains user ID
-        } catch (ExpiredJwtException e) {
-            throw new RuntimeException("Token has expired", e);
-        } catch (SignatureException e) {
-            throw new RuntimeException("Invalid token signature", e);
-        } catch (IllegalArgumentException e) {
-            throw new RuntimeException("Invalid token format", e);
-        } catch (Exception e) {
-            throw new RuntimeException("Could not extract user ID from token", e);
-        }
-    }
-}
Index: c/main/java/com/example/rezevirajmasa/demo/service/impl/UserServiceImpl.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/service/impl/UserServiceImpl.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,94 +1,0 @@
-package com.example.rezevirajmasa.demo.service.impl;
-
-import com.example.rezevirajmasa.demo.dto.CredentialsDto;
-import com.example.rezevirajmasa.demo.dto.SignUpDto;
-import com.example.rezevirajmasa.demo.dto.UserDto;
-import com.example.rezevirajmasa.demo.mappers.UserMapper;
-import com.example.rezevirajmasa.demo.mappers.UserMapperImpl;
-import com.example.rezevirajmasa.demo.model.MembershipLevel;
-import com.example.rezevirajmasa.demo.model.Role;
-import com.example.rezevirajmasa.demo.model.User;
-import com.example.rezevirajmasa.demo.model.exceptions.AppException;
-import com.example.rezevirajmasa.demo.repository.UserRepository;
-import com.example.rezevirajmasa.demo.service.UserService;
-import lombok.RequiredArgsConstructor;
-import org.mapstruct.control.MappingControl;
-import org.openqa.selenium.InvalidArgumentException;
-import org.springframework.http.HttpStatus;
-import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.security.core.userdetails.UserDetailsService;
-import org.springframework.security.core.userdetails.UsernameNotFoundException;
-import org.springframework.security.crypto.password.PasswordEncoder;
-import org.springframework.stereotype.Service;
-import java.nio.CharBuffer;
-import java.sql.Date;
-import java.time.LocalDate;
-import java.util.Optional;
-
-@RequiredArgsConstructor
-@Service
-public class UserServiceImpl implements UserService, UserDetailsService {
-    private final UserRepository userRepository;
-    private final UserMapperImpl userMapper;
-    private final PasswordEncoder passwordEncoder;
-    @Override
-    public UserDto findByEmail(String email) {
-        User user = userRepository.findByEmail(email).orElseThrow(() -> new AppException(("Unknown user"), HttpStatus.NOT_FOUND));
-        return userMapper.toUserDto(user);
-    }
-
-    @Override
-    public User findByMail(String email) {
-        return userRepository.findByEmail(email).orElseThrow(() -> new AppException(("Unknown user"), HttpStatus.NOT_FOUND));
-    }
-
-    public UserDto login(CredentialsDto credentialsDto) {
-        User user = userRepository.findByEmail(credentialsDto.getEmail())
-                .orElseThrow(() -> new AppException("Unknown user", HttpStatus.NOT_FOUND));
-
-        if(passwordEncoder.matches(CharBuffer.wrap(credentialsDto.getPassword()), user.getPassword())) {
-            return userMapper.toUserDto(user);
-        }
-
-        throw new AppException("Invalid password", HttpStatus.BAD_REQUEST);
-    }
-
-    public UserDto register(SignUpDto userDto) {
-        Optional<User> optionalUser = userRepository.findByEmail(userDto.getEmail());
-        if(optionalUser.isPresent()) {
-            throw new AppException("Login already exists", HttpStatus.BAD_REQUEST);
-        }
-
-        User user = userMapper.signUpToUser(userDto);
-
-        user.setPassword(passwordEncoder.encode(CharBuffer.wrap(userDto.getPassword())));
-
-        user.setFirstName(userDto.getFirstName());
-        user.setLastName(userDto.getLastName());
-        user.setAddress(userDto.getAddress());
-        user.setPhone(userDto.getPhone());
-        user.setMembershipLevel(MembershipLevel.valueOf(userDto.getMembershipLevel()));
-        user.setRegistrationDate(Date.valueOf(LocalDate.now()));
-        user.setRole(Role.ROLE_USER);
-
-        User savedUser = userRepository.save(user);
-
-        return userMapper.toUserDto(savedUser);
-    }
-
-    @Override
-    public User findUserById(Long userId) {
-        return userRepository.findById(userId).orElseThrow(()->new InvalidArgumentException("Invalid user Id"));
-    }
-
-    @Override
-    public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {
-        User user = userRepository.findByEmail(email)
-                .orElseThrow(()-> new UsernameNotFoundException("User not found"));
-        return org.springframework.security.core.userdetails.User
-                .withUsername(user.getEmail())
-                .password(user.getPassword())
-                .authorities(user.getRole().name()) // adjust if needed
-                .build();
-    }
-}
Index: src/main/java/com/example/rezevirajmasa/demo/web/controller/CustomerController.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/web/controller/CustomerController.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ src/main/java/com/example/rezevirajmasa/demo/web/controller/CustomerController.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,47 @@
+package com.example.rezevirajmasa.demo.web.controller;
+
+import com.example.rezevirajmasa.demo.model.MembershipLevel;
+import com.example.rezevirajmasa.demo.model.Role;
+import com.example.rezevirajmasa.demo.service.CustomerService;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@Controller
+public class CustomerController {
+    private final CustomerService customerService;
+
+    public CustomerController(CustomerService customerService) {
+        this.customerService = customerService;
+    }
+
+    @GetMapping("/customers")
+    public String showCustomers(Model model) {
+        model.addAttribute("bodyContent", "customers");
+        model.addAttribute("customers", customerService.listAll());
+        model.addAttribute("memberships", MembershipLevel.values());
+        model.addAttribute("roles", Role.values());
+        return "index";
+    }
+    @GetMapping("/customers/add")
+    public String showAddForm(Model model) {
+        model.addAttribute("bodyContent", "CustomersForm");
+        model.addAttribute("memberships", MembershipLevel.values());
+        model.addAttribute("roles", Role.values());
+        return "index";
+    }
+    @PostMapping("/customers/add")
+    public String createCustomer(@RequestParam String firstName,
+                                 @RequestParam String lastName,
+                                 @RequestParam String email,
+                                 @RequestParam String password,
+                                 @RequestParam String phone,
+                                 @RequestParam String address,
+                                 @RequestParam MembershipLevel membershipLevel,
+                                 @RequestParam Role role) {
+        customerService.registration(firstName, lastName, email, password, phone, address, membershipLevel, role);
+        return "redirect:/customers";
+    }
+}
Index: src/main/java/com/example/rezevirajmasa/demo/web/controller/ReservationController.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/web/controller/ReservationController.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ src/main/java/com/example/rezevirajmasa/demo/web/controller/ReservationController.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,95 @@
+package com.example.rezevirajmasa.demo.web.controller;
+
+import com.example.rezevirajmasa.demo.model.*;
+import com.example.rezevirajmasa.demo.model.exceptions.ExpiredReservationException;
+import com.example.rezevirajmasa.demo.service.*;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.security.core.Authentication;
+import org.springframework.stereotype.Controller;
+import org.springframework.transaction.annotation.RestrictedTransactionalEventListenerFactory;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.*;
+
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Controller
+public class ReservationController {
+    private final ReservationService reservationService;
+    private final CustomerService customerService;
+    private final TableService tableService;
+    private final ReservationHistoryService reservationHistoryService;
+
+    public ReservationController(ReservationService reservationService, CustomerService customerService, TableService tableService, ReservationHistoryService reservationHistoryService) {
+        this.reservationService = reservationService;
+        this.customerService = customerService;
+        this.tableService = tableService;
+        this.reservationHistoryService = reservationHistoryService;
+    }
+
+    @GetMapping("/reservations")
+    public String showReservations(Model model, Authentication authentication) {
+        Customer customer = customerService.findByEmail(authentication.getName());
+        List<Reservation> reservationList;
+        if(customer.getRole().equals(Role.ROLE_ADMIN)) {
+            reservationList = reservationService.listAll();
+        } else {
+            reservationList = reservationService.findReservationByCustomer(customer);
+        }
+        model.addAttribute("bodyContent", "reservationList");
+        model.addAttribute("reservations", reservationList);
+        return "index";
+    }
+
+    @GetMapping("/reservations/edit/{reservationId}")
+    public String showEditReservation(@PathVariable Long reservationId, Model model) {
+        Reservation reservation = reservationService.findById(reservationId);
+        tableService.canceledTimeSlots(reservation.getTable().getId(), reservation.getCheckInTime());
+        model.addAttribute("reservation", reservation);
+        model.addAttribute("bodyContent", "reservationsEditForm");
+        return "index";
+    }
+
+    @PostMapping("/restaurants/{tableNumber}")
+    public String saveReservation(@PathVariable Long tableNumber,
+                                  @RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime reservationDateTime,
+                                  @RequestParam int partySize,
+                                  @RequestParam String specialRequests,
+                                  Authentication authentication){
+        TableEntity table = tableService.findById(tableNumber);
+        Restaurant restaurant = table.getRestaurant();
+
+        Customer customer = customerService.findByEmail(authentication.getName());
+
+        if(!table.isAvailable(reservationDateTime)) {
+            System.out.println("The slot is taken sorry, pick another :D");
+        }
+        tableService.deleteTimeSlotsForReservation(tableNumber, reservationDateTime);
+        reservationService.makeReservation(customer, table, restaurant, LocalDateTime.now(), reservationDateTime, partySize, specialRequests);
+        return "redirect:/reservations";
+    }
+
+    @RequestMapping("/reservations/edit/{reservationId}")
+    public String updateReservation(@PathVariable Long reservationId,
+                                    @RequestParam int partySize,
+                                    @RequestParam String specialRequests,
+                                    @RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime reservationDateTime) {
+        Reservation reservation = reservationService.findById(reservationId);
+        reservation.setPartySize(partySize);
+        reservation.setSpecialRequests(specialRequests);
+        reservation.setCheckInTime(reservationDateTime);
+        tableService.deleteTimeSlotsForReservation(reservation.getTable().getId(), reservationDateTime);
+        return "redirect:/reservations";
+    }
+
+    @PostMapping("/reservations/delete/{reservationId}")
+    public String deleteReservation(@PathVariable Long reservationId, @RequestParam String reason) {
+        Reservation reservation = reservationService.findById(reservationId);
+        tableService.canceledTimeSlots(reservation.getTable().getId(), reservation.getCheckInTime());
+        reservationService.cancelReservation(reservationId);
+        reservationHistoryService.moveReservationToHistory(reservation, "canceled", reason);
+        return "redirect:/reservation-history";
+    }
+}
Index: src/main/java/com/example/rezevirajmasa/demo/web/controller/ReservationHistoryController.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/web/controller/ReservationHistoryController.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/web/controller/ReservationHistoryController.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,11 +1,9 @@
 package com.example.rezevirajmasa.demo.web.controller;
 
-import com.example.rezevirajmasa.demo.dto.SignUpDto;
-import com.example.rezevirajmasa.demo.dto.UserDto;
-import com.example.rezevirajmasa.demo.mappers.UserMapper;
+import com.example.rezevirajmasa.demo.model.Customer;
 import com.example.rezevirajmasa.demo.model.Restaurant;
-import com.example.rezevirajmasa.demo.model.User;
+import com.example.rezevirajmasa.demo.model.Role;
+import com.example.rezevirajmasa.demo.service.CustomerService;
 import com.example.rezevirajmasa.demo.service.ReservationHistoryService;
-import com.example.rezevirajmasa.demo.service.UserService;
 import org.springframework.security.core.Authentication;
 import org.springframework.stereotype.Controller;
@@ -20,11 +18,9 @@
 public class ReservationHistoryController {
     private final ReservationHistoryService reservationHistoryService;
-    private final UserService userService;
-    private final UserMapper userMapper;
+    private final CustomerService customerService;
 
-    public ReservationHistoryController(ReservationHistoryService reservationHistoryService, UserService userService, UserMapper userMapper) {
+    public ReservationHistoryController(ReservationHistoryService reservationHistoryService, CustomerService customerService) {
         this.reservationHistoryService = reservationHistoryService;
-        this.userService = userService;
-        this.userMapper = userMapper;
+        this.customerService = customerService;
     }
 
@@ -32,16 +28,10 @@
     public String showPastReservations(Authentication authentication, Model model) {
         List<Restaurant.ReservationHistory> reservationHistoryList;
-        UserDto userDto = userService.findByEmail(authentication.getName());
-
-        SignUpDto signUpDto = userMapper.toSignUpDto(userDto);
-
-        User user = userMapper.signUpToUser(signUpDto);
-
-        reservationHistoryList = reservationHistoryService.findByUser(user);
-//        if(customer.getRole().equals(Role.ROLE_ADMIN)) {
-//            reservationHistoryList = reservationHistoryService.findAll();
-//        } else {
-//            reservationHistoryList = reservationHistoryService.findByUser(User user);
-//        }
+        Customer customer = customerService.findByEmail(authentication.getName());
+        if(customer.getRole().equals(Role.ROLE_ADMIN)) {
+            reservationHistoryList = reservationHistoryService.findAll();
+        } else {
+            reservationHistoryList = reservationHistoryService.findByCustomer(customer);
+        }
         model.addAttribute("historyReservations", reservationHistoryList);
         model.addAttribute("bodyContent", "pastReservations");
Index: src/main/java/com/example/rezevirajmasa/demo/web/controller/RestaurantController.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/web/controller/RestaurantController.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
+++ src/main/java/com/example/rezevirajmasa/demo/web/controller/RestaurantController.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -0,0 +1,109 @@
+package com.example.rezevirajmasa.demo.web.controller;
+
+import com.example.rezevirajmasa.demo.model.Customer;
+import com.example.rezevirajmasa.demo.model.Restaurant;
+import com.example.rezevirajmasa.demo.model.TableEntity;
+import com.example.rezevirajmasa.demo.service.CustomerService;
+import com.example.rezevirajmasa.demo.service.ReservationService;
+import com.example.rezevirajmasa.demo.service.RestaurantService;
+import com.example.rezevirajmasa.demo.service.TableService;
+import net.sourceforge.htmlunit.xpath.operations.Mod;
+import org.springframework.boot.Banner;
+import org.springframework.security.core.Authentication;
+import org.springframework.ui.Model;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.ui.Model;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+@Controller
+public class RestaurantController {
+    private final RestaurantService restaurantService;
+    private final TableService tableService;
+
+    public RestaurantController(RestaurantService restaurantService, TableService tableService) {
+        this.restaurantService = restaurantService;
+        this.tableService = tableService;
+    }
+
+    @GetMapping("/restaurants")
+    public String showRestaurants(@RequestParam(required = false) String search, Model model) {
+        List<Restaurant> restaurantList;
+        if(search == null) {
+            restaurantList = this.restaurantService.listall();
+        } else {
+            restaurantList = restaurantService.listRestaurantBy(search);
+        }
+
+        for (Restaurant restaurant : restaurantList) {
+            // Initialize a set to store unique capacities for this restaurant
+            Set<Integer> uniqueCapacities = new HashSet<>();
+
+            // Populate uniqueCapacities with unique capacity values for tables in this restaurant
+            for (TableEntity table : restaurant.getTablesList()) {
+                uniqueCapacities.add(table.getCapacity());
+            }
+
+            // Add uniqueCapacities to the model for this restaurant
+            model.addAttribute("uniqueCapacities_" + restaurant.getRestaurantId(), uniqueCapacities);
+        }
+        model.addAttribute("bodyContent", "restaurants");
+        model.addAttribute("restaurants", restaurantList);
+        return "index";
+    }
+
+    @GetMapping("/restaurants/{tableNumber}")
+    public String reserveTable(@PathVariable Long tableNumber, Model model) {
+        TableEntity tableEntity = tableService.findById(tableNumber);
+        Restaurant restaurant = tableEntity.getRestaurant();
+
+        model.addAttribute("table", tableEntity);
+        model.addAttribute("restaurant", restaurant);
+
+        model.addAttribute("bodyContent", "reservationConfirmation.html");
+
+        return "index";
+    }
+
+    @GetMapping("/restaurants/add")
+    public String showAddRestaurantForm(Model model) {
+        model.addAttribute("bodyContent", "restaurantForm");
+        return "index";
+    }
+
+    @PostMapping("/register-restaurant")
+    public String saveRestaurant(@RequestParam String name,
+                                 @RequestParam String cuisineType,
+                                 @RequestParam String address,
+                                 @RequestParam String phone,
+                                 @RequestParam String operatingHours,
+                                 @RequestParam BigDecimal rating,
+                                 @RequestParam int numberOfTables,
+                                 @RequestParam List<Integer> tableCapacities,
+                                 @RequestParam List<String> tableLocations,
+                                 @RequestParam List<String> tableSmokingAreas,
+                                 @RequestParam List<String> tableDescriptions,
+                                 @RequestParam String socialMediaLinks,
+                                 @RequestParam String website,
+                                 Model model) {
+
+        Restaurant restaurant = new Restaurant();
+        restaurant.setName(name);
+        restaurant.setCuisineType(cuisineType);
+        restaurant.setAddress(address);
+        restaurant.setPhone(phone);
+        restaurant.setOperatingHours(operatingHours);
+        restaurant.setRating(rating);
+        restaurant.setSocialMediaLinks(socialMediaLinks);
+        restaurant.setWebsite(website);
+
+        restaurantService.save(restaurant, numberOfTables, tableCapacities, tableLocations, tableSmokingAreas, tableDescriptions);
+        model.addAttribute("bodyContent", "restaurants");
+        return "redirect:/restaurants";
+    }
+
+}
Index: c/main/java/com/example/rezevirajmasa/demo/web/filters/JwtAuthFilter.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/web/filters/JwtAuthFilter.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ 	(revision )
@@ -1,72 +1,0 @@
-package com.example.rezevirajmasa.demo.web.filters;
-
-import com.example.rezevirajmasa.demo.config.UserAuthProvider;
-import io.jsonwebtoken.ExpiredJwtException;
-import jakarta.servlet.FilterChain;
-import jakarta.servlet.ServletException;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpHeaders;
-import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
-import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.web.filter.OncePerRequestFilter;
-
-import java.io.IOException;
-
-@RequiredArgsConstructor
-public class JwtAuthFilter extends OncePerRequestFilter {
-
-    private final UserAuthProvider userAuthProvider;
-
-    @Override
-    protected void doFilterInternal(
-            HttpServletRequest request,
-            HttpServletResponse response,
-            FilterChain filterChain) throws ServletException, IOException {
-        String header = request.getHeader(HttpHeaders.AUTHORIZATION);
-
-        String username = null;
-        String jwt = null;
-
-        if(header != null) {
-            jwt = header.substring(7);
-            String[] elements = header.split(" ");
-
-            if(elements.length == 2 && "Bearer".equals(elements[0])) {
-                try {
-                    username = userAuthProvider.extractUsername(jwt); // logikata vidi ja
-                    SecurityContextHolder.getContext().setAuthentication(
-                            userAuthProvider.validateToken(elements[1])
-                    );
-                    if (username != null) {
-                        System.out.println("Authenticated user: " + username); // Debug log
-                        SecurityContextHolder.getContext().setAuthentication(
-                                userAuthProvider.validateToken(jwt) // Ensure token validation works properly
-                        );
-                    }
-                } catch (ExpiredJwtException e) {
-                    String isRefreshToken = request.getHeader("isRefreshToken");
-                    String requestURL = request.getRequestURL().toString();
-                    if (isRefreshToken != null && isRefreshToken.equals("true") && requestURL.contains("refresh-token")) {
-                        allowForRefreshToken(e, request);
-                    } else
-                        request.setAttribute("exception", e);
-
-                } catch (RuntimeException e) {
-                    SecurityContextHolder.clearContext();
-                    throw e;
-                }
-            }
-        }
-        filterChain.doFilter(request, response);
-    }
-
-    private void allowForRefreshToken(ExpiredJwtException ex, HttpServletRequest request) {
-        UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(
-                null, null, null);
-        SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);
-        request.setAttribute("claims", ex.getClaims());
-    }
-}
Index: src/main/java/com/example/rezevirajmasa/demo/web/rest/AuthController.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/web/rest/AuthController.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/web/rest/AuthController.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,36 +1,9 @@
 package com.example.rezevirajmasa.demo.web.rest;
 
-import com.example.rezevirajmasa.demo.config.UserAuthProvider;
-import com.example.rezevirajmasa.demo.dto.CredentialsDto;
-import com.example.rezevirajmasa.demo.dto.SignUpDto;
-import com.example.rezevirajmasa.demo.dto.UserDto;
-import com.example.rezevirajmasa.demo.service.UserService;
-import lombok.RequiredArgsConstructor;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.authentication.AuthenticationManager;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.net.URI;
-
-@RequiredArgsConstructor
 @RestController
 public class AuthController {
-    private final UserService userService;
-    private final UserAuthProvider userAuthProvider;
-    @PostMapping("/api/login")
-    public ResponseEntity<UserDto> login(@RequestBody CredentialsDto credentialsDto) {
-        UserDto user = userService.login(credentialsDto);
-        String token = userAuthProvider.createToken(user.getEmail());
-        user.setToken(token);
-
-        return ResponseEntity.ok(user);
-    }
-
-    @PostMapping("/api/register")
-    public ResponseEntity<UserDto> register(@RequestBody SignUpDto signUpDto) {
-        UserDto user = userService.register(signUpDto);
-        user.setToken(userAuthProvider.createToken(user.getEmail()));
-        return ResponseEntity.created(URI.create("/users/" + user.getId())).body(user);
-    }
 }
Index: src/main/java/com/example/rezevirajmasa/demo/web/rest/testController.java
===================================================================
--- src/main/java/com/example/rezevirajmasa/demo/web/rest/testController.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/java/com/example/rezevirajmasa/demo/web/rest/testController.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,30 +1,16 @@
 package com.example.rezevirajmasa.demo.web.rest;
 
-import com.example.rezevirajmasa.demo.dto.*;
-import com.example.rezevirajmasa.demo.mappers.UserMapper;
 import com.example.rezevirajmasa.demo.model.*;
-import com.example.rezevirajmasa.demo.model.exceptions.InvalidReservationException;
-import com.example.rezevirajmasa.demo.service.*;
-import com.example.rezevirajmasa.demo.service.impl.TokenService;
-import jakarta.servlet.http.HttpServletRequest;
-import jdk.jfr.consumer.RecordingStream;
+import com.example.rezevirajmasa.demo.service.CustomerService;
+import com.example.rezevirajmasa.demo.service.ReservationService;
+import com.example.rezevirajmasa.demo.service.RestaurantService;
+import com.example.rezevirajmasa.demo.service.TableService;
 import org.apache.coyote.Response;
-import org.apache.http.protocol.HTTP;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.annotation.AuthenticationPrincipal;
-import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.security.core.parameters.P;
-import org.springframework.security.core.userdetails.UserDetails;
 import org.springframework.web.bind.annotation.*;
 
-import java.nio.file.attribute.UserPrincipal;
-import java.security.Principal;
 import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.*;
-import java.util.stream.Collectors;
+import java.util.List;
 
 @CrossOrigin(origins = "http://localhost:3000/")
@@ -32,20 +18,13 @@
 public class testController {
     private final RestaurantService restaurantService;
-    private final UserService userService;
+    private final CustomerService customerService;
     private final ReservationService reservationService;
-    private final ReservationHistoryService reservationHistoryService;
     private final TableService tableService;
-    private final MenuService menuService;
-    private final UserMapper userMapper;
-    private final TokenService tokenService;
-    public testController(RestaurantService restaurantService, UserService userService, ReservationService reservationService, ReservationHistoryService reservationHistoryService, TableService tableService, MenuService menuService, UserMapper userMapper, TokenService tokenService) {
+
+    public testController(RestaurantService restaurantService, CustomerService customerService, ReservationService reservationService, TableService tableService) {
         this.restaurantService = restaurantService;
-        this.userService = userService;
+        this.customerService = customerService;
         this.reservationService = reservationService;
-        this.reservationHistoryService = reservationHistoryService;
         this.tableService = tableService;
-        this.menuService = menuService;
-        this.userMapper = userMapper;
-        this.tokenService = tokenService;
     }
 
@@ -55,97 +34,49 @@
     }
 
-    //restaurants calls
-
-    @GetMapping("/api/restaurants")
-    public ResponseEntity<List<RestaurantDTO>> getAllRestaurants() {
-            return new ResponseEntity<List<RestaurantDTO>>(restaurantService.listall(), HttpStatus.OK);
+    @RequestMapping("/api/restaurants")
+    public ResponseEntity<List<Restaurant>> getAllRestaurants() {
+        return new ResponseEntity<List<Restaurant>>(restaurantService.listall(), HttpStatus.OK);
     }
 
-    @GetMapping("/api/restaurants/{restaurantId}")
-    public ResponseEntity<RestaurantDTO> getRestaurantById(@PathVariable Long restaurantId) {
-        RestaurantDTO restaurantDTO = restaurantService.findById(restaurantId);
-        return new ResponseEntity<>(restaurantDTO, HttpStatus.OK);
+    @RequestMapping("/api/restaurants/{restaurantId}")
+    public ResponseEntity<Restaurant> getRestaurantById(@PathVariable Long restaurantId) {
+        return new ResponseEntity<Restaurant>(restaurantService.findById(restaurantId), HttpStatus.OK);
     }
 
-    @PostMapping("/api/search")
-    public ResponseEntity<List<RestaurantDTO>> searchRestaurants(@RequestBody Map<String, Object> requestData) {
-        Optional<String> dateTimeOptional = Optional.ofNullable((String) requestData.get("dateTime"));
-        int partySize = Integer.parseInt(requestData.get("partySize").toString());
-        Optional<String> searchOptional = Optional.ofNullable((String) requestData.get("search"));
+//    Customer CALLS
 
-        String dateTime = dateTimeOptional.orElse(null);
-        String search = searchOptional.orElse(null);
-
-        LocalDateTime parsedDateTime = null;
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
-        if (dateTime != null) {
-            parsedDateTime = LocalDateTime.parse(dateTime, formatter);
-        }
-
-        List<RestaurantDTO> filteredRestaurants = restaurantService.findRestaurantsBySearchParams(parsedDateTime, partySize, search);
-
-        return new ResponseEntity<>(filteredRestaurants, HttpStatus.OK);
+    @RequestMapping("/api/customers")
+    public ResponseEntity<List<Customer>> getAllCustomers() {
+        return new ResponseEntity<List<Customer>>(customerService.listAll(), HttpStatus.OK);
     }
 
-    @PostMapping("/api/search/shortcut/{param}")
-    public ResponseEntity<List<RestaurantDTO>> searchByCuisineTypeShortcut(@PathVariable String param) {
-        List<RestaurantDTO> filteredRestaurants;
-        if(param != null && !param.isEmpty()) {
-            filteredRestaurants = restaurantService.findRestaurantsByCuisineType(param);
-        } else {
-            filteredRestaurants = restaurantService.listall();
-        }
-        return new ResponseEntity<List<RestaurantDTO>>(filteredRestaurants, HttpStatus.OK);
+    @RequestMapping("/api/customers/{id}")
+    public ResponseEntity<Customer> getCustomerById(@PathVariable Long id) {
+        return new ResponseEntity<Customer>(customerService.findById(id), HttpStatus.OK);
     }
 
-    @GetMapping("/api/cuisineTypes")
-    public ResponseEntity<List<String>> getAllCuisineTypes() {
-        List<String> cuisineTypes = restaurantService.findALlCuisineTypes();
-        return new ResponseEntity<>(cuisineTypes, HttpStatus.OK);
+    @PutMapping("/api/customers/edit/{id}")
+    public ResponseEntity<Customer> editCustomerById(@PathVariable Long id, @RequestBody Customer customer) {
+        return new ResponseEntity<Customer>(
+                customerService.updateCustomer(id, customer.getFirstName(), customer.getLastName(), customer.getEmail(), customer.getPassword(), customer.getPhone(), customer.getAddress(), customer.getMembershipLevel()),
+                HttpStatus.OK
+        );
     }
 
-    // User calls
-
-    @GetMapping("/api/user/{email}")
-    public ResponseEntity<User> getUserByEmail(@PathVariable String email)
-    {
-        User user = userService.findByMail(email);
-        return ResponseEntity.ok(user);
+    @PostMapping("/api/customers")
+    public ResponseEntity<Customer> saveCustomer(@RequestBody Customer customer) {
+        // Ensure that the role is set to ROLE_USER by default
+        customer.setRole(Role.ROLE_USER);
+        return new ResponseEntity<Customer>(
+                customerService.registration(customer),
+                HttpStatus.OK
+        );
     }
 
-//    Reservation Calls
-
-    @GetMapping("/api/reservations/by/{email}")
-    public ResponseEntity<List<ReservationDTO>> getReservations(@PathVariable String email) {
-        if (email == null || email.isEmpty()) {
-            return ResponseEntity.badRequest().build();
-        }
-        User user = userService.findByMail(email);
-        if (user == null) {
-            return ResponseEntity.notFound().build();
-        }
-
-        List<Reservation> reservations = reservationService.findReservationByUser(user);
-        List<ReservationDTO> reservationDTOs = reservations.stream()
-                .map(ReservationDTO::new)
-                .collect(Collectors.toList());
-
-        return ResponseEntity.ok(reservationDTOs);
-    }
-
-    @PostMapping("/api/reservations")
-    public ResponseEntity<?> createReservation(@RequestBody ReservationDTO reservation){
-    User user = userService.findByMail(reservation.getUserEmail());
-    Restaurant restaurant = restaurantService.findByIdRestaurant(reservation.getRestaurantId());
-        Reservation savedReservation = reservationService.makeReservationRest(reservation, user, restaurant);
-
-        return new ResponseEntity<>(savedReservation, HttpStatus.CREATED);
-    }
-
-    @GetMapping("/api/reservations/{reservationId}")
-    public ResponseEntity<ReservationDTO> getReservation(@PathVariable Long reservationId) {
-        Reservation reservation = reservationService.findById(reservationId);
-        if (reservation != null) {
-            return ResponseEntity.ok(new ReservationDTO(reservation));
+    @DeleteMapping("/api/customers/delete/{customerId}")
+    public ResponseEntity<Response> deleteCustomer(@PathVariable Long customerId) {
+        boolean deleted = customerService.deleteById(customerId);
+        if(deleted) {
+            return ResponseEntity.ok().build();
         } else {
             return ResponseEntity.notFound().build();
@@ -153,49 +84,54 @@
     }
 
-//    @GetMapping("/api/reservations/{restaurantId}")
-//    public ResponseEntity<List<Reservation>> getReservationsByRestaurant(@PathVariable Long restaurantId)
-//    {
-//        Restaurant restaurant = restaurantService.findByIdRestaurant(restaurantId);
-//        List<Reservation> reservations = reservationService.findAllByRestaurant(restaurant);
-//        return ResponseEntity.ok(reservations);
-//    }
+//    Reservation Calls
 
-    @GetMapping("/api/table-reservations/{tableId}")
-    public ResponseEntity<List<LocalDateTime>> tableReservations(@PathVariable Long tableId) {
-        TableEntity table = tableService.findByIdTable(tableId);
-        if (table == null) {
+    @GetMapping("/api/reservations")
+    public ResponseEntity<List<Reservation>> getReservations() {
+        return new ResponseEntity<List<Reservation>>(reservationService.listAll(), HttpStatus.OK);
+    }
+
+    @PostMapping("/api/reservations")
+    public ResponseEntity<Reservation> createReservation(@RequestBody Reservation reservation) {
+        reservation.setReservationDateTime(LocalDateTime.now());
+        Reservation savedReservation = reservationService.makeReservationRest(reservation);
+        return new ResponseEntity<>(savedReservation, HttpStatus.CREATED);
+    }
+
+    @GetMapping("/api/reservations/{reservationId}")
+    public ResponseEntity<Reservation> getReservation(@PathVariable Long reservationId) {
+        Reservation reservation = reservationService.findById(reservationId);
+        if (reservation != null) {
+            return ResponseEntity.ok(reservation);
+        } else {
             return ResponseEntity.notFound().build();
         }
-
-        List<Reservation> reservations = reservationService.reservationsForTable(table);
-        List<LocalDateTime> reservedTimes = reservations.stream()
-                .map(Reservation::getReservationDateTime)
-                .collect(Collectors.toList());
-
-        return ResponseEntity.ok(reservedTimes);
     }
 
-
-    @PostMapping("/api/reservations/{reservationId}/{email}")
+    @PostMapping("/api/reservations/{reservationId}")
     public ResponseEntity<Reservation> editReservation(@PathVariable Long reservationId,
-                                                       @RequestBody ReservationDTO reservationDTO,
-                                                       @PathVariable String email) {
-        User user = userService.findByMail(email);
-        Restaurant restaurant = restaurantService.findByIdRestaurant(reservationDTO.getRestaurantId());
-        if (!reservationDTO.getReservationID().equals(reservationId)) {
+                                                       @RequestBody Reservation reservation) {
+        if (!reservation.getReservationID().equals(reservationId)) {
             return ResponseEntity.badRequest().build();
         }
 
-        try {
-            Reservation updatedReservation = reservationService.updateReservation(reservationId, reservationDTO, user);
-            return ResponseEntity.ok(updatedReservation);
-        } catch (InvalidReservationException e) {
-            return ResponseEntity.status(409).body(null);
-        } catch (Exception e) {
-            return ResponseEntity.status(500).build();
+        Reservation savedReservation = reservationService.findById(reservationId);
+        if(!reservation.getCheckInTime().equals(savedReservation.getCheckInTime())) {
+            tableService.canceledTimeSlots(savedReservation.getTable().getId(), savedReservation.getCheckInTime());
         }
+
+        savedReservation.setReservationDateTime(LocalDateTime.now());
+        savedReservation.setCheckInTime(reservation.getCheckInTime());
+        savedReservation.setCheckOutTime(reservation.getCheckInTime().plusHours(2));
+        savedReservation.setPartySize(reservation.getPartySize());
+        savedReservation.setSpecialRequests(reservation.getSpecialRequests());
+        tableService.deleteTimeSlotsForReservation(reservation.getTable().getId(), reservation.getCheckInTime());
+
+        //moze da se vovede sistem za ako od 4ca doagjaat samo 2ca da se najde pomala masa po moznost ako ima u toj moment
+        //listaj samo slotovi za taa masa vo toj moment ili da ima da odbere od novo ama taka bolje nova rezevacij
+
+        Reservation updatedReservation = reservationService.makeReservationRest(savedReservation);
+        System.out.println("Saved reservation time: " + savedReservation.getCheckInTime());
+        return ResponseEntity.ok(updatedReservation);
     }
-
-
 
     @DeleteMapping("/api/reservations/delete/{reservationId}")
@@ -209,29 +145,10 @@
     }
 
-    @GetMapping("/api/reservations/past/{email}")
-    public ResponseEntity<List<Restaurant.ReservationHistory>> pastReservations(@PathVariable String email) {
-        User user = userService.findByMail(email);
-        return null;
+//    TableEntity Calls
+
+    @GetMapping("/api/tables/{tableId}")
+    public ResponseEntity<TableEntity> findTableById(@PathVariable Long tableId) {
+        return new ResponseEntity<TableEntity>(tableService.findById(tableId), HttpStatus.OK);
     }
 
-    // TableEntity Calls
-    @GetMapping("/api/tables/{tableId}")
-    public ResponseEntity<TableDTO> findTableById(@PathVariable Long tableId) {
-        TableDTO tableDTO = tableService.findById(tableId);
-        return new ResponseEntity<>(tableDTO, HttpStatus.OK);
-    }
-
-    // past reservation calls
-    @GetMapping("/api/past-reservations/{email}")
-    public ResponseEntity<List<Restaurant.ReservationHistory>> findPastReservationsByUser(@PathVariable String email) {
-        User user = userService.findByMail(email);
-        List<Restaurant.ReservationHistory> reservations = reservationHistoryService.findByUser(user);
-        return new ResponseEntity<>(reservations, HttpStatus.OK);
-    }
-
-    // menu calls
-    @GetMapping("/api/restaurant-menu/{restaurantId}")
-    public List<Menu> getMenuByRestaurantId(@PathVariable Long restaurantId) {
-        return menuService.getMenuByRestaurantId(restaurantId);
-    }
 }
Index: src/main/resources/application.properties
===================================================================
--- src/main/resources/application.properties	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/main/resources/application.properties	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,18 +1,10 @@
 spring.datasource.driver-class-name=org.postgresql.Driver
-
-#spring.datasource.url=jdbc:postgresql://194.149.135.130:5432/db_202425z_va_prj_rezervirajmasa2024_25
-#spring.datasource.username=t_rezervirajmasa2024_25
-#spring.datasource.password=9fd0b128464b
-
-spring.datasource.url=jdbc:postgresql://localhost:9999/db_202425z_va_prj_rezervirajmasa2024_25
-spring.datasource.username=db_202425z_va_prj_rezervirajmasa2024_25_owner
-spring.datasource.password=9fd0b128464b
-
-spring.jpa.hibernate.ddl-auto=validate
+spring.datasource.url=jdbc:postgresql://localhost:5432/rezervirajMasa
+spring.datasource.username=postgres
+spring.datasource.password=postgres
+spring.jpa.hibernate.ddl-auto=update
 spring.jpa.properties.hibernate.shor_url=true
 
-spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
+spring.jpa.properties..hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
 spring.jpa.show-sql=true
 spring.main.allow-bean-definition-overriding=true
-
-server.port=8081
Index: src/test/java/com/example/rezevirajmasa/demo/CustomerRepositoryTests.java
===================================================================
--- src/test/java/com/example/rezevirajmasa/demo/CustomerRepositoryTests.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/test/java/com/example/rezevirajmasa/demo/CustomerRepositoryTests.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -1,6 +1,8 @@
 package com.example.rezevirajmasa.demo;
 
+import com.example.rezevirajmasa.demo.model.Customer;
 import com.example.rezevirajmasa.demo.model.MembershipLevel;
 import com.example.rezevirajmasa.demo.model.exceptions.InvalidCustomerIdException;
+import com.example.rezevirajmasa.demo.repository.CustomerRepository;
 
 import org.assertj.core.api.Assertions;
Index: src/test/java/com/example/rezevirajmasa/demo/TableRepositoryTests.java
===================================================================
--- src/test/java/com/example/rezevirajmasa/demo/TableRepositoryTests.java	(revision e48199adf103ea72701a91722bdbf8cfb9732731)
+++ src/test/java/com/example/rezevirajmasa/demo/TableRepositoryTests.java	(revision d24f17cb212e43f94a77a44d655ba10b4b8143d2)
@@ -22,5 +22,5 @@
         tableEntity.setDescription("Romantic spot");
         tableEntity.setSmokingArea(true);
-        tableEntity.setTableLocation("Big blue");
+        tableEntity.setLocation("Big blue");
 
         TableEntity savedTable = tableRepository.save(tableEntity);
