Skip to content

Commit

Permalink
Merge branch 'dev' into api-connections
Browse files Browse the repository at this point in the history
  • Loading branch information
VidwaDeSeram authored Jan 4, 2024
2 parents 4226c34 + 6bbd697 commit e3903e1
Show file tree
Hide file tree
Showing 51 changed files with 1,904 additions and 163 deletions.
218 changes: 127 additions & 91 deletions admin/package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion admin/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "cine-magic-admin",
"name": "admin-panel",
"version": "0.1.0",
"private": true,
"dependencies": {
Expand All @@ -8,6 +8,7 @@
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.21.1",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
Expand Down
Binary file added admin/public/Images/admin-img.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/public/Images/aquaman-cover-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/public/Images/client-img.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/public/Images/marvels1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/public/Images/migration.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/public/Images/wonka.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 23 additions & 21 deletions admin/public/index.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--

<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">

<meta name="description" content="Web site created using create-react-app" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Expand All @@ -24,12 +24,13 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
<title>Cinemagic Admin</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand All @@ -39,5 +40,6 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
</body>

</html>
6 changes: 5 additions & 1 deletion admin/src/App.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.App {
text-align: center;

}



.App-logo {
height: 40vmin;
pointer-events: none;
Expand Down Expand Up @@ -32,7 +35,8 @@
from {
transform: rotate(0deg);
}

to {
transform: rotate(360deg);
}
}
}
82 changes: 62 additions & 20 deletions admin/src/App.js
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;
19 changes: 19 additions & 0 deletions admin/src/components/Header.js
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;
42 changes: 42 additions & 0 deletions admin/src/components/Sidebar.js
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;
50 changes: 50 additions & 0 deletions admin/src/css/AddBooking.css
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;
}
49 changes: 49 additions & 0 deletions admin/src/css/AddShowtime.css
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 added admin/src/css/AllBookings.css
Empty file.
Loading

0 comments on commit e3903e1

Please sign in to comment.