-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into api-connections
- Loading branch information
Showing
51 changed files
with
1,904 additions
and
163 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,67 @@ | ||
import logo from './logo.svg'; | ||
import './App.css'; | ||
import React, { useState } from 'react'; | ||
import { BrowserRouter as Router, Route, Routes, Navigate } from 'react-router-dom'; | ||
import Header from './components/Header'; | ||
import Sidebar from './components/Sidebar'; | ||
import Login from './pages/Login'; | ||
import Movies from './pages/Movie'; | ||
import MovieUpdate from './pages/MovieUpdate'; | ||
import AddShowtime from './pages/AddShowtime'; | ||
import UpdateShowtime from './pages/UpdateShowtime'; | ||
import DeleteMovieForm from './pages/DeleteMovie'; | ||
import DeleteShowtime from './pages/DeleteShowtime'; | ||
import AddBooking from './pages/AddBooking'; | ||
import UpdateBooking from './pages/UpdateBooking'; | ||
import DeleteBooking from './pages/DeleteBooking'; | ||
import Chat from './pages/Chat'; | ||
import MovieGrid from './pages/AllMovies'; | ||
import ShowtimeGrid from './pages/AllShowtimes'; | ||
import BookingGrid from './pages/AllBookings'; | ||
import RegisterPage from './pages/Signup'; | ||
|
||
const App = () => { | ||
const [isLoggedIn, setIsLoggedIn] = useState(false); | ||
|
||
const handleLogin = () => { | ||
setIsLoggedIn(true); | ||
}; | ||
|
||
function App() { | ||
return ( | ||
<div className="App"> | ||
<header className="App-header"> | ||
<img src={logo} className="App-logo" alt="logo" /> | ||
<p> | ||
Cine Magic Admin Panel | ||
</p> | ||
<a | ||
className="App-link" | ||
href="https://reactjs.org" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Learn React | ||
</a> | ||
</header> | ||
</div> | ||
<Router> | ||
{isLoggedIn ? ( | ||
<div className="app-container"> | ||
<Header /> | ||
<div style={{ display: 'flex', height: 'calc(100vh - [header-height])' }}> | ||
<Sidebar /> | ||
<div style={{ flex: 1, padding: '20px' }}> | ||
<Routes> | ||
<Route path="/movies-view" element={<MovieGrid />} /> | ||
<Route path="/movies" element={<Movies />} /> | ||
<Route path="/UpdateMovie" element={<MovieUpdate />} /> | ||
<Route path="/DeleteMovie" element={<DeleteMovieForm />} /> | ||
<Route path="/add-showtime" element={<AddShowtime />} /> | ||
<Route path="/update-showtime" element={<UpdateShowtime />} /> | ||
<Route path="/delete-showtime" element={<DeleteShowtime />} /> | ||
<Route path="/add-booking" element={<AddBooking />} /> | ||
<Route path="/update-booking" element={<UpdateBooking />} /> | ||
<Route path="/delete-booking" element={<DeleteBooking />} /> | ||
<Route path="/chat" element={<Chat />} /> | ||
<Route path="/showtime-view" element={<ShowtimeGrid />} /> | ||
<Route path="/Booking-view" element={<BookingGrid />} /> | ||
<Route path="/register-page" element={<RegisterPage />} /> | ||
<Route path="/" element={<Navigate replace to="/movies-view" />} /> | ||
</Routes> | ||
</div> | ||
</div> | ||
</div> | ||
) : ( | ||
<Routes> | ||
<Route path="/login" element={<Login onLogin={handleLogin} />} /> | ||
<Route path="/register-page" element={<RegisterPage />} /> | ||
<Route path="*" element={<Navigate replace to="/login" />} /> | ||
</Routes> | ||
)} | ||
</Router> | ||
); | ||
} | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Header.js | ||
import React from 'react'; | ||
|
||
const Header = () => { | ||
return ( | ||
<div style={{ | ||
backgroundColor: 'black', | ||
color: 'white', | ||
height: '65px', | ||
display: 'flex', | ||
alignItems: 'center', | ||
paddingLeft: '20px' | ||
}}> | ||
CINEMAGIC | ||
</div> | ||
); | ||
}; | ||
|
||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Sidebar.js | ||
import React from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
import '../css/Sidebar.css'; // Import the CSS file | ||
|
||
const Sidebar = () => { | ||
// Navigation items | ||
const navigation = [ | ||
{ title: 'Movies', link: '/movies-view' }, | ||
{ title: 'Add Movie', link: '/movies' }, | ||
{ title: 'Update Movie', link: '/UpdateMovie' }, | ||
{ title: 'Delete Movie', link: '/DeleteMovie' }, | ||
{ emptytitle: '', link: '' }, | ||
{ title: 'Showtimes', link: '/showtime-view' }, | ||
{ title: 'Add Showtime', link: '/add-showtime' }, | ||
{ title: 'Update Showtime', link: '/update-showtime' }, | ||
{ title: 'Delete Showtime', link: '/delete-showtime' }, | ||
{ emptytitle: '', link: '' }, | ||
{ title: 'Bookings', link: '/Booking-view' }, | ||
{ title: 'Add Booking', link: '/add-booking' }, | ||
{ title: 'Update Booking', link: '/update-booking' }, | ||
{ title: 'Delete Booking', link: '/delete-booking' }, | ||
{ emptytitle: '', link: '' }, | ||
{ title: 'Chat', link: '/chat' }, | ||
|
||
|
||
// Add more navigation items here | ||
]; | ||
|
||
return ( | ||
<div className="sidebar"> | ||
{navigation.map((item, index) => ( | ||
<Link to={item.link} key={index} className="sidebar-item"> | ||
{item.title} | ||
</Link> | ||
|
||
))} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Sidebar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* AddBooking.css */ | ||
.add-booking-container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100%; | ||
padding: 20px; | ||
|
||
/* Dark background */ | ||
} | ||
|
||
.add-booking-form { | ||
max-width: 500px; | ||
margin: auto; | ||
padding: 30px 50px; | ||
background-color: #444; | ||
/* Slightly lighter background for the form */ | ||
|
||
border-radius: 5px; | ||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); | ||
color: #fff; | ||
font-family: 'Roboto', sans-serif; | ||
} | ||
|
||
.add-booking-form h2 { | ||
text-align: center; | ||
color: #ffd700; | ||
/* Theme color for headings */ | ||
} | ||
|
||
.add-booking-form input, | ||
.add-booking-form button { | ||
width: 100%; | ||
padding: 10px; | ||
margin-bottom: 15px; | ||
border-radius: 3px; | ||
border: none; | ||
background-color: #fff; | ||
/* White input background for contrast */ | ||
color: #333; | ||
/* Dark text for readability */ | ||
} | ||
|
||
.add-booking-form button { | ||
background-color: #ffd700; | ||
/* Theme color for button */ | ||
color: #333; | ||
cursor: pointer; | ||
font-weight: bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
.add-showtime-container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100%; | ||
/* background-color: #333; */ | ||
/* Dark background */ | ||
} | ||
|
||
.add-showtime-form { | ||
|
||
max-width: 500px; | ||
margin: auto; | ||
background-color: #444; | ||
/* Slightly lighter background for the form */ | ||
padding: 20px 50px; | ||
border-radius: 5px; | ||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); | ||
color: #fff; | ||
font-family: 'Roboto', sans-serif; | ||
} | ||
|
||
.add-showtime-form h2 { | ||
text-align: center; | ||
color: #ffd700; | ||
/* Theme color for headings */ | ||
} | ||
|
||
.add-showtime-form input, | ||
.add-showtime-form button { | ||
width: 100%; | ||
padding: 10px; | ||
margin-bottom: 15px; | ||
border-radius: 3px; | ||
border: none; | ||
background-color: #fff; | ||
/* White input background for contrast */ | ||
color: #333; | ||
/* Dark text for readability */ | ||
} | ||
|
||
.add-showtime-form button { | ||
background-color: #ffd700; | ||
/* Theme color for button */ | ||
color: #333; | ||
cursor: pointer; | ||
font-weight: bold; | ||
} |
Empty file.
Oops, something went wrong.