Index: frontend/src/Components/Hooks/Business/useCreateBusiness.js
===================================================================
--- frontend/src/Components/Hooks/Business/useCreateBusiness.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Business/useCreateBusiness.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,35 @@
+import React from "react";
+
+import axios from "../../../axios.js";
+import { useNavigate } from "react-router-dom";
+
+const useCreateBusiness = () => {
+
+    //const history = useNavigate();
+    const createBusiness = async (business) => {
+		console.log({business})
+		console.log(business)
+        await axios
+	            .post(`/business/add`, business, {
+					params: {
+						userId: localStorage.getItem("userId")
+					}
+				}) 
+	            .then((res) => {
+					//window.location.reload()
+	                //history.push('/hotel');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    }
+
+	return {
+		createBusiness
+	};
+
+}
+
+export default useCreateBusiness;
Index: frontend/src/Components/Hooks/FilesUpload/useFileChange.js
===================================================================
--- frontend/src/Components/Hooks/FilesUpload/useFileChange.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/FilesUpload/useFileChange.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,43 @@
+import axios from "../../../axios";
+import { useState } from "react";
+
+const useFileChange = () => {
+    const [selectedFiles, setSelectedFiles] = useState([]);
+
+    const onFileChangeHandler = (files, type, id, refresh) => {
+        setSelectedFiles(files);
+
+        const formData = new FormData();
+
+        files.forEach((x) => formData.append('files', x))
+        //
+        // for (let i = 0; i < files.length; i++) {
+        //
+        // }
+
+
+        axios.post(`/upload/${type}/${id}`, formData, {
+            headers: {
+                'Content-Type': 'multipart/form-data'
+            }
+        })
+            .then(res => {
+                if (res.status === 200) {
+                    console.log(res.data);
+                    refresh((prev) => ++prev)
+                    alert("File(s) uploaded successfully.");
+                } else {
+                    console.error("File upload failed:", res.data);
+                    alert("File upload failed.");
+                }
+            })
+            .catch(error => {
+                console.error("Error uploading file(s):", error);
+                alert("An error occurred while uploading files.");
+            });
+    };
+
+    return { onFileChangeHandler, selectedFiles };
+};
+
+export default useFileChange;
Index: frontend/src/Components/Hooks/Hotel/useCreateHotel.js
===================================================================
--- frontend/src/Components/Hooks/Hotel/useCreateHotel.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Hotel/useCreateHotel.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,51 @@
+import React from "react";
+
+import axios from "../../../axios.js";
+import { useNavigate } from "react-router-dom";
+
+const useCreateHotel = () => {
+
+    const createHotel = async (hotel, edit) => {
+		console.log({hotel})
+		console.log(hotel)
+		console.log("vo createhotel")
+
+		if(!edit)
+		{
+			await axios
+			.post(`/hotel/add`, hotel, {
+				params: {
+					userId: JSON.parse(localStorage.getItem("user")).userId
+				}
+			}) 
+			.then((res) => {
+				//history.push('/hotel');
+			})
+			.catch((err) => {
+				console.log(err);
+			})
+			.finally(() => {
+			});
+		}
+		else
+		{
+			await axios
+			.post(`/hotel/edit`, hotel) 
+			.then((res) => {
+			})
+			.catch((err) => {
+				console.log(err);
+			})
+			.finally(() => {
+			});
+		}
+
+    }
+
+	return {
+		createHotel
+	};
+
+}
+
+export default useCreateHotel;
Index: frontend/src/Components/Hooks/Hotel/useCreateHotelRoom.js
===================================================================
--- frontend/src/Components/Hooks/Hotel/useCreateHotelRoom.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Hotel/useCreateHotelRoom.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,34 @@
+import React from "react";
+
+import axios from "../../../axios.js";
+import { useNavigate } from "react-router-dom";
+
+const useCreateHotelRoom = (hotelId) => {
+
+    const createHotelRoom = async (hotelRoom) => {
+		console.log({hotelRoom})
+		console.log(hotelRoom)
+        await axios
+	            .post(`/hotel/rooms/add`, hotelRoom, {
+					params: {
+                        userId: localStorage.getItem("userId"),
+                        hotelId: hotelId
+					}
+				}) 
+	            .then((res) => {
+	                //history.push('/hotel');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    }
+
+	return {
+		createHotelRoom
+	};
+
+}
+
+export default useCreateHotelRoom;
Index: frontend/src/Components/Hooks/Hotel/useCreateRoomAvailability.js
===================================================================
--- frontend/src/Components/Hooks/Hotel/useCreateRoomAvailability.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Hotel/useCreateRoomAvailability.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,33 @@
+import React from "react";
+
+import axios from "../../../axios.js";
+import { useNavigate } from "react-router-dom";
+
+const useCreateRoomAvailiability = (hotelRoomId) => {
+
+    const createRoomAvailability = async (hotelRoomAvailable, id) => {
+		console.log({hotelRoomAvailable})
+		console.log(hotelRoomAvailable)
+        await axios
+	            .post(`/hotel/rooms/available/${id}/add`, hotelRoomAvailable, {
+					params: {
+                        hotelId: hotelRoomId
+					}
+				}) 
+	            .then((res) => {
+	                //history.push('/hotel');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    }
+
+	return {
+		createRoomAvailability
+	};
+
+}
+
+export default useCreateRoomAvailiability;
Index: frontend/src/Components/Hooks/Hotel/useEditHotel.js
===================================================================
--- frontend/src/Components/Hooks/Hotel/useEditHotel.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Hotel/useEditHotel.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,26 @@
+import React from "react";
+import axios from "axios";
+import { useHistory } from 'react-router-dom';
+
+const useEditHotel = () => {
+
+    const history = useHistory();
+    const editHotel = async ({hotel}) => {
+        await axios
+	            .post(`/hotel/edit`, hotel) 
+	            .then((res) => {
+	                history.push('/hotel');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    } 
+    return (
+        editHotel
+    )
+
+}
+
+export default useEditHotel;
Index: frontend/src/Components/Hooks/Hotel/useRemoveHotel.js
===================================================================
--- frontend/src/Components/Hooks/Hotel/useRemoveHotel.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Hotel/useRemoveHotel.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,26 @@
+import React from "react";
+import axios from "axios";
+import { useHistory } from 'react-router-dom';
+
+const useRemoveHotel = () => {
+
+    const history = useHistory();
+    const removeHotel = async ({id}) => {
+        await axios
+	            .get(`/hotel/delete?userId=` + id) 
+	            .then((res) => {
+	                history.push('/hotel');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    } 
+    return (
+        removeHotel
+    )
+
+}
+
+export default useRemoveHotel;
Index: frontend/src/Components/Hooks/Restaurant/useCreateMenu.js
===================================================================
--- frontend/src/Components/Hooks/Restaurant/useCreateMenu.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Restaurant/useCreateMenu.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,34 @@
+import React from "react";
+import axios from "../../../axios";
+import { useNavigate } from 'react-router-dom';
+
+const useCreateMenu = () => {
+
+	const navigator = useNavigate();
+
+    const createMenu = async (id, menu) => {
+		console.log(menu)
+        console.log(id)
+        await axios
+	            .post(`/restaurant/` + id + "/menu/add", menu) 
+	            .then((res) => {
+					console.log("NOVO MENI");
+					console.log(res)
+					//window.location.reload()
+					//navigator("/resources/restaurant/" + id)
+	                //history.push('/restaurant');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+	}
+	
+
+    return {
+        createMenu
+	}
+}
+
+export default useCreateMenu;
Index: frontend/src/Components/Hooks/Restaurant/useCreateRestaurant.js
===================================================================
--- frontend/src/Components/Hooks/Restaurant/useCreateRestaurant.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Restaurant/useCreateRestaurant.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,54 @@
+import React from "react";
+import axios from "../../../axios";
+import { useNavigate } from 'react-router-dom';
+
+const useCreateRestaurant = () => {
+
+	const navigator = useNavigate();
+
+    const createRestaurant = async (restaurant, edit) => {
+		console.log(restaurant)
+		if(!edit)
+		{
+			console.log(restaurant)
+			await axios
+			.post(`/restaurant/add`, restaurant, {
+				params: {
+					userId: JSON.parse(localStorage.getItem('user')).userId,
+				}
+			}) 
+			.then((res) => {
+				// console.log(res)
+				// window.location.reload()
+			})
+			.catch((err) => {
+				console.log(err);
+			})
+			.finally(() => {
+			});
+		}
+		else
+		{
+			await axios
+			.post(`/restaurant/edit`, restaurant) 
+			.then((res) => {
+				console.log(res)
+				//window.location.reload()
+				//navigator("/resources/restaurant")
+				//history.push('/restaurant');
+			})
+			.catch((err) => {
+				console.log(err);
+			})
+			.finally(() => {
+			});
+		}
+
+    }
+
+    return {
+        createRestaurant
+	}
+}
+
+export default useCreateRestaurant;
Index: frontend/src/Components/Hooks/Restaurant/useCreateTable.js
===================================================================
--- frontend/src/Components/Hooks/Restaurant/useCreateTable.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Restaurant/useCreateTable.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,30 @@
+import React from "react";
+import axios from "../../../axios";
+import { useNavigate } from 'react-router-dom';
+
+const useCreateTable = () => {
+
+    const createTable = async (id, table, refresh) => {
+		console.log(table)
+        await axios
+	            .post(`/restaurant/table/${id}/add`, null, {
+					params: table
+				})
+	            .then((res) => {
+					console.log(res)
+					refresh(prev => ++prev)
+	                //history.push('/restaurant');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    }
+
+    return {
+        createTable
+	}
+}
+
+export default useCreateTable;
Index: frontend/src/Components/Hooks/Restaurant/useCreateTableAvailability.js
===================================================================
--- frontend/src/Components/Hooks/Restaurant/useCreateTableAvailability.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Restaurant/useCreateTableAvailability.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,30 @@
+import React from "react";
+
+import axios from "../../../axios.js";
+import { useNavigate } from "react-router-dom";
+
+const useCreateTableAvailability = () => {
+
+    const createTableAvailability = async (restaurantTableAvailible, id) => {
+		console.log({restaurantTableAvailible})
+		console.log(restaurantTableAvailible)
+        await axios
+	            .post(`/restaurant/table/${id}/available/add`, restaurantTableAvailible, {
+				}) 
+	            .then((res) => {
+	                //history.push('/hotel');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    }
+
+	return {
+		createTableAvailability
+	};
+
+}
+
+export default useCreateTableAvailability;
Index: frontend/src/Components/Hooks/Restaurant/useEditRestaurant.js
===================================================================
--- frontend/src/Components/Hooks/Restaurant/useEditRestaurant.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Restaurant/useEditRestaurant.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,26 @@
+import React from "react";
+import axios from "axios";
+import { useHistory } from 'react-router-dom';
+
+const useEditRestaurant = () => {
+
+    const history = useHistory();
+    const editRestaurant = async ({restaurnat}) => {
+        await axios
+	            .post(`/restaurant/edit`,user) 
+	            .then((res) => {
+	                history.push('/restaurant');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    } 
+    return (
+        editRestaurant
+    )
+
+}
+
+export default useEditRestaurant;
Index: frontend/src/Components/Hooks/Restaurant/useRemoveRestaruant.js
===================================================================
--- frontend/src/Components/Hooks/Restaurant/useRemoveRestaruant.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Restaurant/useRemoveRestaruant.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,26 @@
+import React from "react";
+import axios from "axios";
+import { useHistory } from 'react-router-dom';
+
+const useRemoveRestaurant = () => {
+
+    const history = useHistory();
+    const removeRestaurant = async ({id}) => {
+        await axios
+	            .get(`/restaurant/delete?restaurantId=` + id) 
+	            .then((res) => {
+	                history.push('/restaurant');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    } 
+    return (
+        removeRestaurant
+    )
+
+}
+
+export default useRemoveRestaurant;
Index: frontend/src/Components/Hooks/Review/useCreateReview.js
===================================================================
--- frontend/src/Components/Hooks/Review/useCreateReview.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Review/useCreateReview.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,26 @@
+import React from "react";
+import axios from "axios";
+import { useHistory } from 'react-router-dom';
+
+const useCreateReview = () => {
+
+    const history = useHistory();
+    const createReview = async ({review}) => {
+        await axios
+	            .post(`/review/add`, user) 
+	            .then((res) => {
+	                history.push('/review');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    } 
+    return (
+            createReview
+    )
+
+}
+
+export default useCreateReview;
Index: frontend/src/Components/Hooks/Review/useDeleteReview.js
===================================================================
--- frontend/src/Components/Hooks/Review/useDeleteReview.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Review/useDeleteReview.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,26 @@
+import React from "react";
+import axios from "axios";
+import { useHistory } from 'react-router-dom';
+
+const useRemoveReview = () => {
+
+    const history = useHistory();
+    const removeReview = async ({id}) => {
+        await axios
+	            .get(`/review/delete?userId=` + id) 
+	            .then((res) => {
+	                history.push('/review');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    } 
+    return (
+        removeReview
+    )
+
+}
+
+export default useRemoveReview;
Index: frontend/src/Components/Hooks/Review/useEditReview.js
===================================================================
--- frontend/src/Components/Hooks/Review/useEditReview.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Review/useEditReview.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,26 @@
+import React from "react";
+import axios from "axios";
+import { useHistory } from 'react-router-dom';
+
+const useEditReview = () => {
+
+    const history = useHistory();
+    const editReview = async ({review}) => {
+        await axios
+	            .post(`/review/edit`, review) 
+	            .then((res) => {
+	                history.push('/review');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    } 
+    return (
+        editReview
+    )
+
+}
+
+export default useEditReview;
Index: frontend/src/Components/Hooks/Transport/useCreateTransport.js
===================================================================
--- frontend/src/Components/Hooks/Transport/useCreateTransport.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Transport/useCreateTransport.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,44 @@
+import React from "react";
+import axios from "../../../axios";
+import { useHistory } from 'react-router-dom';
+
+const useCreateTransport = () => {
+	const userId = JSON.parse(localStorage.getItem('user')).userId
+    const createTransport = async (transport, edit) => {
+			if(!edit)
+			{
+				await axios
+	            .post(`/transport/add/` + userId, transport)
+	            .then((res) => {
+	                //history.push('/transport');
+					console.log(res)
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+			}
+			else
+			{
+				await axios
+	            .post(`/transport/edit`, transport) 
+	            .then((res) => {
+	                //history.push('/transport');
+					console.log(res)
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+			}
+    }
+
+    return {
+        createTransport
+	}
+
+}
+
+export default useCreateTransport;
Index: frontend/src/Components/Hooks/Transport/useCreateTrip.js
===================================================================
--- frontend/src/Components/Hooks/Transport/useCreateTrip.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Transport/useCreateTrip.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,34 @@
+import React from "react";
+
+import axios from "../../../axios.js";
+import { useNavigate } from "react-router-dom";
+
+const useCreateTrip = (transportId) => {
+
+    const createTrip = async (trip) => {
+		console.log({trip})
+		console.log(trip)
+        await axios
+	            .post(`/transport/available/add`, trip, {
+					params: {
+                        userId: localStorage.getItem("userId"),
+                        transportId: transportId
+					}
+				}) 
+	            .then((res) => {
+	                //history.push('/hotel');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    }
+
+	return {
+		createTrip
+	};
+
+}
+
+export default useCreateTrip;
Index: frontend/src/Components/Hooks/Transport/useEditTransport.js
===================================================================
--- frontend/src/Components/Hooks/Transport/useEditTransport.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Transport/useEditTransport.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,26 @@
+import React from "react";
+import axios from "axios";
+import { useHistory } from 'react-router-dom';
+
+const useEditTransport = () => {
+
+    const history = useHistory();
+    const editTransport = async ({transport}) => {
+        await axios
+	            .post(`/transport/edit`, transport) 
+	            .then((res) => {
+	                history.push('/transport');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    } 
+    return (
+        editTransport
+    )
+
+}
+
+export default useEditTransport;
Index: frontend/src/Components/Hooks/Transport/useRemoveTransport.js
===================================================================
--- frontend/src/Components/Hooks/Transport/useRemoveTransport.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/Transport/useRemoveTransport.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,26 @@
+import React from "react";
+import axios from "axios";
+import { useHistory } from 'react-router-dom';
+
+const useRemoveTransport = () => {
+
+    const history = useHistory();
+    const removeTransort = async ({id}) => {
+        await axios
+	            .get(`/transport/delete?transportId=` + id) 
+	            .then((res) => {
+	                history.push('/transport');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    } 
+    return (
+        removeTransport
+    )
+
+}
+
+export default useRemoveTransport;
Index: frontend/src/Components/Hooks/User/useCreateUser.js
===================================================================
--- frontend/src/Components/Hooks/User/useCreateUser.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/User/useCreateUser.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,26 @@
+import React from "react";
+import axios from "../../../axios.js";
+import { useHistory, useNavigate } from 'react-router-dom';
+
+const useCreateUser = () => {
+
+    const navigator = useNavigate()
+    const createUser = async (user) => {
+        await axios
+	            .post(`/register`, user) 
+	            .then((res) => {
+	                navigator("/login")
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    } 
+    return {
+            createUser
+	}
+
+}
+
+export default useCreateUser;
Index: frontend/src/Components/Hooks/User/useEditUser.js
===================================================================
--- frontend/src/Components/Hooks/User/useEditUser.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/User/useEditUser.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,26 @@
+import React from "react";
+import axios from "axios";
+import { useHistory } from 'react-router-dom';
+
+const useEditUser = () => {
+
+    const history = useHistory();
+    const editUser = async ({user}) => {
+        await axios
+	            .post(`/user/edit`, user) 
+	            .then((res) => {
+	                history.push('/user');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    } 
+    return (
+        editUser
+    )
+
+}
+
+export default useEditUser;
Index: frontend/src/Components/Hooks/User/useLogin.js
===================================================================
--- frontend/src/Components/Hooks/User/useLogin.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/User/useLogin.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,64 @@
+import React from "react";
+
+import axios from "../../../axios.js";
+import { Navigate, useAsyncValue, useNavigate } from "react-router-dom";
+import LoginForm from "../../Login/LoginForm.js";
+import {useAuth} from "../../Context/AuthContext";
+
+const useLogin = () => {
+
+    const navigator = useNavigate()
+	const Auth = useAuth();
+    //const history = useNavigate();
+    const login = async (loginData) => {
+		console.log({loginData})
+		console.log(loginData)
+        await axios
+	            .post(`/api/login`, {
+                    username: loginData.email,
+                    password: loginData.password
+                }, {
+                    headers: { 
+                        "Content-Type": "application/x-www-form-urlencoded"
+                    }
+                }) 
+	            .then((res) => {
+					console.log("RES LOGIN")
+					console.log(res)
+					if(res.status === 200)
+					{
+						const user = {
+							sessionId: res.data.auth.details.sessionId,
+							userId: res.data.auth.principal.userID,
+							username: res.data.auth.principal.username,
+							role: res.data.auth.principal.role,
+							name: res.data.auth.principal.name,
+							surname: res.data.auth.principal.surname,
+						}
+						Auth.userLogin(user);
+						console.log(user)
+					}
+					const sessionId = res.data.auth.details.sessionId;
+					const userId = res.data.auth.principal.userID;
+
+					localStorage.setItem("sessionId", sessionId);
+					localStorage.setItem("userId", userId);
+					if(sessionId === null)
+					{
+					}
+                    navigator("/home")
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    }
+
+	return {
+		login
+	};
+
+}
+
+export default useLogin;
Index: frontend/src/Components/Hooks/User/useRemoveUser.js
===================================================================
--- frontend/src/Components/Hooks/User/useRemoveUser.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/User/useRemoveUser.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,26 @@
+import React from "react";
+import axios from "axios";
+import { useHistory } from 'react-router-dom';
+
+const useRemoveUser = () => {
+
+    const history = useHistory();
+    const removeUser = async ({id}) => {
+        await axios
+	            .get(`/user/delete?userId=` + id) 
+	            .then((res) => {
+	                history.push('/user');
+	            })
+	            .catch((err) => {
+	                console.log(err);
+	            })
+	            .finally(() => {
+	            });
+    } 
+    return (
+        removeUser
+    )
+
+}
+
+export default useRemoveUser;
Index: frontend/src/Components/Hooks/useApprove.js
===================================================================
--- frontend/src/Components/Hooks/useApprove.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/useApprove.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,31 @@
+import axios from "../../axios";
+import { useState, useEffect, useContext } from 'react';
+
+const useApprove = (url, dep) => {
+
+    const [data, setData] = useState(null);
+    const [isLoading, setIsLoading] = useState(true);
+    const [changed, setChanged] = useState(0)
+    const getData = async (uurl) => {
+        await axios.
+        get(uurl).then((res) => {
+            setData(res.data);
+        }).catch((error) => {
+            console.log(error)
+        })
+            .finally(() => {
+                setIsLoading(false);
+            });
+    };
+
+    return {
+        data,
+        setData,
+        isLoading,
+        getData,
+        setChanged
+    };
+};
+
+
+export default useApprove;
Index: frontend/src/Components/Hooks/useCreate.js
===================================================================
--- frontend/src/Components/Hooks/useCreate.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/useCreate.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,34 @@
+import axios from "../../axios";
+
+const useCreate = () => {
+
+    //const history = useNavigate();
+    const createEntity = async (url, entity, getData, getData2) => {
+        console.log(entity)
+        await axios
+            .post(url, null, {
+                params: entity,
+                // headers: {
+                //     'Content-Type': 'multipart/form-data'
+                // }
+            })
+            .then((res) => {
+                //history.push('/hotel');
+                console.log(res)
+                getData(prev => ++prev)
+                getData2(prev => ++prev)
+            })
+            .catch((err) => {
+                console.log(err);
+            })
+            .finally(() => {
+            });
+    }
+
+    return {
+        createEntity
+    };
+
+}
+
+export default useCreate;
Index: frontend/src/Components/Hooks/useFormData.js
===================================================================
--- frontend/src/Components/Hooks/useFormData.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/useFormData.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,31 @@
+import { useState } from 'react';
+
+const useFormData = (editData) => {
+  const [formData, setData] = useState({ ...editData });
+
+  const onFormChange = (e) => {
+    setData({
+      ...formData,
+      [e.target.name]: e.target.value,
+    });
+  };
+
+  const onCheckBoxChange = (e) => {
+    setData((prevData) => ({
+        ...prevData,
+        [e.target.name]: !prevData[e.target.name],
+    }));
+  }
+
+  const setFormData = (newData) => {
+    setData({...newData});
+  }
+  return {
+    formData,
+    onFormChange,
+    onCheckBoxChange,
+    setFormData
+  };
+};
+
+export default useFormData;
Index: frontend/src/Components/Hooks/useGet.js
===================================================================
--- frontend/src/Components/Hooks/useGet.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
+++ frontend/src/Components/Hooks/useGet.js	(revision e6c2521bc7455763be50cf2e37427887b6efb4b9)
@@ -0,0 +1,44 @@
+import axios from "../../axios";
+import {useState, useEffect, useContext} from 'react';
+
+const useGet = (url, dep) => {
+
+    console.log(url)
+    const [data, setData] = useState(null);
+    const [isLoading, setIsLoading] = useState(true);
+    const [changed, setChanged] = useState(0)
+    const getData = async (uurl) => {
+        console.log(localStorage.getItem("sessionId"))
+        console.log("url od get " + uurl)
+        await axios.get(uurl, {maxRedirects: 0}).then((res) => {
+            console.log(res);
+            // if(res.request.responseURL.includes('8080'))
+            // {
+            //     window.location.href = "/login"
+            // }
+            setData(res.data);
+        }).catch((error) => {
+            console.log(error)
+            // window.location.href = '/error'
+        })
+            .finally(() => {
+                setIsLoading(false);
+            });
+    };
+
+    useEffect(() => {
+        setIsLoading(true);
+        getData(url);
+    }, [dep, url, changed]);
+
+    return {
+        data,
+        setData,
+        isLoading,
+        getData,
+        setChanged
+    };
+};
+
+
+export default useGet;
