Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sue updates #79

Merged
merged 13 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 9 additions & 54 deletions resources/views/admin-dashboard.blade.php
Original file line number Diff line number Diff line change
@@ -1,71 +1,26 @@
@extends('layouts.app')

@section('content')
<body class="h-screen bg-gray-900">
<body>
Sue-Holding marked this conversation as resolved.
Show resolved Hide resolved
<div class="flex h-full">
<div class="flex h-screen">

<!-- Sidebar -->
<aside class="w-1/4 bg-blue-600 text-white p-6">
<ul class="space-y-4">
<li><a href="#" class="block hover:bg-blue-500 p-2 rounded">Home</a></li>
<li><a href="{{ route('user_settings') }}" class="block hover:bg-blue-500 p-2 rounded">Profile Setting</a></li>
<li><a href="#" class="block hover:bg-blue-500 p-2 rounded">Reviews</a></li>
<li><a href="#" class="block hover:bg-blue-500 p-2 rounded">Films</a></li>
<li><a href="{{ route('admin_settings') }}" class="block hover:bg-blue-500 p-2 rounded">Users</a></li>
</ul>
</aside>
<!-- Sidebar -->
<x-admin-sidebar>
</x-admin-sidebar>


<!-- Main Content Area -->
<main class="flex-1 p-6 flex flex-col items-center w-full">

<!-- H1 Centered at the Top -->
<h2 class="text-2xl font-semibold text-white mb-4 text-center">Welcome, John Doe</h2>

<!-- Pending Reviews Title -->
<h2 class="text-2xl font-semibold text-white mb-4 w-full text-center">Pending Reviews</h2>

<!-- Full-Screen Reviews Table -->
<div class="w-full flex-grow bg-black rounded-lg shadow-lg overflow-hidden">
<table class="w-full border-collapse">
<!-- Table Header -->
<thead>
<tr class="bg-blue-600 text-white text-left">
<th class="p-4">Review</th>
<th class="p-4">Film Name</th>
<th class="p-4">Rating</th>
<th class="p-4">User ID</th>
<th class="p-4 text-center">Actions</th>
</tr>
</thead>
<!-- Table Body -->
<tbody class="text-white">
<tr class="border-b border-gray-700">
<td class="p-4">Amazing movie, loved it!</td>
<td class="p-4">Inception</td>
<td class="p-4">5/5</td>
<td class="p-4">User123</td>
<td class="p-4 flex justify-center space-x-2">
<button class="bg-green-500 text-white px-4 py-2 rounded hover:bg-green-600">Approve</button>
<button class="bg-yellow-500 text-white px-4 py-2 rounded hover:bg-yellow-600">Edit</button>
<button class="bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600">Delete</button>
</td>
</tr>
<tr class="border-b border-gray-700">
<td class="p-4">Best Batman movie!</td>
<td class="p-4">The Dark Knight</td>
<td class="p-4">4.8/5</td>
<td class="p-4">User456</td>
<td class="p-4 flex justify-center space-x-2">
<button class="bg-green-500 text-white px-4 py-2 rounded hover:bg-green-600">Approve</button>
<button class="bg-yellow-500 text-white px-4 py-2 rounded hover:bg-yellow-600">Edit</button>
<button class="bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600">Delete</button>
</td>
</tr>
</tbody>
</table>
</div>
<x-pending-reviews-table>
</x-pending-reiviews-table>

</main>
</div>
</div>
</body>

Expand Down
116 changes: 15 additions & 101 deletions resources/views/admin-settings.blade.php
Original file line number Diff line number Diff line change
@@ -1,113 +1,27 @@
@extends('layouts.app')

@section('content')
<body class="h-screen bg-gray-900">
<body>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion

The body element is already started inside the header, and ends inside the footer tags, that comes with the "layouts.app" Change the body element into a div element

<div class="flex h-full">
<div class="flex h-screen">

<!-- Sidebar -->
<aside class="w-1/4 bg-blue-600 text-white p-6">
<ul class="space-y-4">
<li><a href="#" class="block hover:bg-blue-500 p-2 rounded">Home</a></li>
<li><a href="#" class="block hover:bg-blue-500 p-2 rounded">Profile Settings</a></li>
<li><a href="#" class="block hover:bg-blue-500 p-2 rounded">Reviews</a></li>
<li><a href="#" class="block hover:bg-blue-500 p-2 rounded">Films</a></li>
<li><a href="#" class="block hover:bg-blue-500 p-2 rounded">Users</a></li>
</ul>
</aside>
<!-- Sidebar -->
<x-admin-sidebar>
</x-admin-sidebar>

<!-- Main Content -->
<main class="flex-1 p-6">
<h2 class="text-2xl font-semibold text-white mb-4 text-center">Welcome, John Doe</h2>
<h2 class="text-2xl font-semibold text-white mb-4 text-center">Users List</h2>
<!-- Main Content -->
<main class="flex-1 p-6">
<h2 class="text-2xl font-semibold text-white mb-4 text-center">Welcome, John Doe</h2>
<h2 class="text-2xl font-semibold text-white mb-4 text-center">Users List</h2>

<!-- Search Section -->
<div class="mb-4 text-center">
<form class="flex justify-center gap-4">
<input type="text" placeholder="Search by Name" class="p-3 border rounded w-1/3" id="search" name="search">
<button type="submit" class="bg-blue-600 text-black px-6 py-3 rounded hover:bg-blue-700">
Search
</button>
</form>
</div>

<!-- Users Table -->
<div class="w-full bg-white rounded-lg shadow-lg overflow-hidden mb-6">
<table class="w-full text-left border-collapse">
<thead>
<tr class="bg-blue-600 text-black">
<th class="p-4" style="display: none;">User ID</th>
<th class="p-4">First Name</th>
<th class="p-4">Last Name</th>
<th class="p-4">Role</th>
<th class="p-4 text-center">Actions</th>
</tr>
</thead>
<tbody class="text-gray-700">
<tr class="border-b hover:bg-gray-100">
<td class="p-4" style="display: none;">1</td> <!-- Hidden User ID -->
<td class="p-4">John</td>
<td class="p-4">Doe</td>
<td class="p-4">Admin</td>
<td class="p-4 text-center">
<button class="bg-yellow-500 text-black px-4 py-2 rounded hover:bg-yellow-600">Edit</button>
<button class="bg-red-500 text-black px-4 py-2 rounded hover:bg-red-600">Delete</button>
</td>
</tr>
<tr class="border-b hover:bg-gray-100">
<td class="p-4" style="display: none;">1</td> <!-- Hidden User ID -->
<td class="p-4">Jane</td>
<td class="p-4">Smith</td>
<td class="p-4">User</td>
<td class="p-4 text-center">
<button class="bg-yellow-500 text-black px-4 py-2 rounded hover:bg-yellow-600">Edit</button>
<button class="bg-red-500 text-black px-4 py-2 rounded hover:bg-red-600">Delete</button>
</td>
</tr>
</tbody>
</table>
</div>
<x-search-user-table>
</x-search-user-table>

<!-- Create New User -->
<h2 class="text-2xl font-semibold text-white mb-4 text-center">Create New User</h2>
<x-create-new-user-form>
</x-create-new-user-form>

<div class="p-6 bg-white rounded-lg shadow-lg w-full mx-auto">
<form name="create-new-admin-user" id="create-new-admin-user" method="post" action=""
class="flex w-full gap-6">
@csrf

<!-- First Name -->
<div class="flex-1">
<label class="block text-gray-700 font-semibold mb-2">First Name</label>
<input type="text" placeholder="First Name" id="firstName" name="firstName"
class="p-3 border rounded w-full" required>
</div>

<!-- Last Name -->
<div class="flex-1">
<label class="block text-gray-700 font-semibold mb-2">Last Name</label>
<input type="text" placeholder="Last Name" id="lastName" name="lastName"
class="p-3 border rounded w-full" required>
</div>

<!-- Role Selection -->
<div class="flex-1">
<label class="block text-gray-700 font-semibold mb-2">Role</label>
<select name="role" id="role" class="p-3 border rounded w-full">
<option value="admin">Admin</option>
<option value="user">User</option>
</select>
</div>

<!-- Submit Button -->
<div class="flex-1 flex items-end">
<button type="submit" class="bg-blue-600 text-black px-6 py-3 rounded hover:bg-blue-700 w-full">
Create User
</button>
</div>
</form>
</div>

</main>
</main>
</div>
</div>
</body>
@endsection
13 changes: 13 additions & 0 deletions resources/views/components/admin-sidebar.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Admin's Sidebar sue's-->
<aside class="w-1/4 h-full bg-blue-950 p-6 text-white">
<h1 class="text-2xl font-bold">WATCHLIST</h1>
<ul class="space-y-4">
<li><a href="{{ route('home') }}" class="block hover:bg-blue-500 p-2 rounded">Home</a></li>
<li><a href="{{ route('admin-dashboard') }}" class="block hover:bg-blue-500 p-2 rounded">Admin Page</a></li>
<li><a href="{{ route('user_settings') }}" class="block hover:bg-blue-500 p-2 rounded">Profile Settings</a></li>
<li><a href="{{ route('review') }}" class="block hover:bg-blue-500 p-2 rounded">Reviews</a></li>
<li><a href="#" class="block hover:bg-blue-500 p-2 rounded">Films</a></li>
<li><a href="{{ route('admin_settings') }}" class="block hover:bg-blue-500 p-2 rounded">Users</a></li>

</ul>
</aside>
1 change: 1 addition & 0 deletions resources/views/components/approve-button.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<button class="bg-green-500 text-white px-4 py-2 rounded hover:bg-green-600">Approve</button>
3 changes: 3 additions & 0 deletions resources/views/components/create-button.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<button type="submit" class="bg-blue-600 text-black px-6 py-3 rounded hover:bg-blue-700 w-full">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the spacing regarding this code

Create User
</button>
41 changes: 41 additions & 0 deletions resources/views/components/create-new-user-form.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- Create New User -->
<h2 class="text-2xl font-semibold text-white mb-4 text-center">Create New User</h2>

<div class="p-6 bg-white rounded-lg shadow-lg w-full mx-auto">
<form name="create-new-admin-user" id="create-new-admin-user" method="post" action=""
class="flex w-full gap-6">
@csrf

<!-- First Name -->
<div class="flex-1">
<label class="block text-gray-700 font-semibold mb-2">First Name</label>
<input type="text" placeholder="First Name" id="firstName" name="firstName"
class="p-3 border rounded w-full" required>
</div>

<!-- Last Name -->
<div class="flex-1">
<label class="block text-gray-700 font-semibold mb-2">Last Name</label>
<input type="text" placeholder="Last Name" id="lastName" name="lastName"
class="p-3 border rounded w-full" required>
</div>

<!-- Role Selection -->
<div class="flex-1">
<label class="block text-gray-700 font-semibold mb-2">Role</label>
<select name="role" id="role" class="p-3 border rounded w-full">
<option value="admin">Admin</option>
<option value="user">User</option>
</select>
</div>

<!-- Submit Button -->
<div class="flex-1 flex items-end">
<x-create-button>
</x-create-button>
<!-- <button type="submit" class="bg-blue-600 text-black px-6 py-3 rounded hover:bg-blue-700 w-full">
Create User
</button> -->
</div>
</form>
</div>
1 change: 1 addition & 0 deletions resources/views/components/delete-button.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<button class="bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600">Delete</button>
1 change: 1 addition & 0 deletions resources/views/components/edit-button.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<button class="bg-yellow-500 text-white px-4 py-2 rounded hover:bg-yellow-600">Edit</button>
49 changes: 49 additions & 0 deletions resources/views/components/pending-reviews-table.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!-- Pending Reviews Title -->
<h2 class="text-2xl font-semibold text-white mb-4 w-full text-center">Pending Reviews</h2>

<!-- Full-Screen Reviews Table -->
<div class="w-full flex-grow bg-black rounded-lg shadow-lg overflow-hidden">
<table class="w-full border-collapse">
<!-- Table Header -->
<thead>
<tr class="bg-blue-600 text-white text-left">
<th class="p-4">Review</th>
<th class="p-4">Film Name</th>
<th class="p-4">Rating</th>
<th class="p-4">User ID</th>
<th class="p-4 text-center">Actions</th>
</tr>
</thead>
<!-- Table Body -->
<tbody class="text-white">
<tr class="border-b border-gray-700">
<td class="p-4">Amazing movie, loved it!</td>
<td class="p-4">Inception</td>
<td class="p-4">5/5</td>
<td class="p-4">User123</td>
<td class="p-4 flex justify-center space-x-2">
<x-approve-button>
</x-approve-button>
<x-edit-button>
</x-edit-button>
<x-delete-button>
</x-delete-button>
<!-- <button class="bg-green-500 text-white px-4 py-2 rounded hover:bg-green-600">Approve</button>
<button class="bg-yellow-500 text-white px-4 py-2 rounded hover:bg-yellow-600">Edit</button>
<button class="bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600">Delete</button> -->
</td>
</tr>
<tr class="border-b border-gray-700">
<td class="p-4">Best Batman movie!</td>
<td class="p-4">The Dark Knight</td>
<td class="p-4">4.8/5</td>
<td class="p-4">User456</td>
<td class="p-4 flex justify-center space-x-2">
<button class="bg-green-500 text-white px-4 py-2 rounded hover:bg-green-600">Approve</button>
<button class="bg-yellow-500 text-white px-4 py-2 rounded hover:bg-yellow-600">Edit</button>
<button class="bg-red-500 text-white px-4 py-2 rounded hover:bg-red-600">Delete</button>
</td>
</tr>
</tbody>
</table>
</div>
9 changes: 9 additions & 0 deletions resources/views/components/profile-photo.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="w-1/3 flex flex-col items-center space-y-4">
<img src="https://via.placeholder.com/300"
alt="Profile Picture"
class="rounded-lg shadow-lg w-64 h-64 object-cover">

<button class="bg-blue-500 text-white px-3 py-1 rounded hover:bg-blue-600">
Change Profile Image
</button>
</div>
Loading