-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from wanderlust-group-project-1/nirmal
feat:admin pages
- Loading branch information
Showing
12 changed files
with
559 additions
and
10 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
# Setup | ||
|
||
Rename `example.env` to `.env` | ||
|
||
Rename `database/example.env` to `database/.env` | ||
|
||
|
||
|
4 changes: 2 additions & 2 deletions
4
app/controllers/Admin/Home.php → app/controllers/Admin/Dashboard.php
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
class RentalServices { | ||
use Controller; | ||
|
||
public function index(string $a = '', string $b = '', string $c = ''):void { | ||
$this->view('admin/rentalServices'); | ||
} | ||
|
||
public function item(string $a = '', string $b = '', string $c = ''):void { | ||
$this->view('admin/item'); | ||
}} | ||
|
||
|
||
?> |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
require_once('../app/views/admin/layout/header.php'); | ||
require_once('../app/views/admin/layout/sidebar.php'); | ||
|
||
?> | ||
|
||
|
||
<?php | ||
require_once('../app/views/admin/layout/footer.php'); | ||
|
||
|
||
?> |
Empty file.
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,108 @@ | ||
<?php | ||
require_once('../app/views/admin/layout/header.php'); | ||
require_once('../app/views/admin/layout/sidebar.php'); | ||
|
||
?> | ||
|
||
<div class="table-container"> | ||
<table class="data-table"> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Email</th> | ||
<th>Status</th> | ||
<th>Action</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>John Doe</td> | ||
<td>john@example.com</td> | ||
<td><span class="status accepted">Accepted</span></td> | ||
<td><button class="view-button">View</button></td> | ||
</tr> | ||
<tr> | ||
<td>Jane Smith</td> | ||
<td>jane@example.com</td> | ||
<td><span class="status not-accepted">Not Accepted</span></td> | ||
<td><button class="view-button">View</button></td> | ||
</tr> | ||
<tr> | ||
<td>Bob Johnson</td> | ||
<td>bob@example.com</td> | ||
<td><span class="status waiting">Waiting</span></td> | ||
<td><button class="view-button">View</button></td> | ||
</tr> | ||
<!-- Add more rows as needed --> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<!-- Modal --> | ||
<div class="rental-services-modal" id="rental-services-modal"> | ||
<div class="modal-content"> | ||
<span class="close">×</span> | ||
<div class="profile-info"> | ||
<img src="<?php echo ROOT_DIR?>/assets/images/dp.jpg" alt="Profile Image" class="profile-image"> | ||
<h2 id="profile-name">Sandali </h2> | ||
<p id="profile-email">sandali@gmail.com</p> | ||
<p id="profile-address">Maharagama</p> | ||
<p id="profile-status" class="accepted">Accepted</p> | ||
<div class="profile-links"> | ||
<a href="#" id="link-1">Link 1</a> | ||
<a href="#" id="link-2">Link 2</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
<script> | ||
|
||
// Get the modal | ||
var modal = document.getElementById("rental-services-modal"); | ||
|
||
// Get the <span> element that closes the modal | ||
var span = document.getElementsByClassName("close")[0]; | ||
|
||
// Get all view buttons | ||
var viewButtons = document.querySelectorAll('.view-button'); | ||
|
||
// Function to handle modal display | ||
function openModal(content) { | ||
// document.getElementById("modal-content").innerHTML = content; | ||
modal.style.display = "block"; | ||
} | ||
|
||
// Add click event listener to view buttons | ||
viewButtons.forEach(function(button) { | ||
button.addEventListener('click', function() { | ||
|
||
var name = this.parentElement.parentElement.querySelector('td:first-child').textContent; | ||
var email = this.parentElement.parentElement.querySelector('td:nth-child(2)').textContent; | ||
openModal("Name: " + name + "<br>Email: " + email); | ||
}); | ||
}); | ||
|
||
// Close the modal when the close button is clicked | ||
span.onclick = function() { | ||
modal.style.display = "none"; | ||
} | ||
|
||
// Close the modal if the user clicks outside of it | ||
window.onclick = function(event) { | ||
if (event.target == modal) { | ||
modal.style.display = "none"; | ||
} | ||
} | ||
|
||
</script> | ||
|
||
|
||
|
||
|
||
<?php | ||
require_once('../app/views/admin/layout/footer.php'); | ||
|
||
|
||
?> |
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<nav class="sidebar sidebar-offcanvas" id="sidebar"> | ||
<ul class="nav"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="index.html"> | ||
<i class="ti-shield menu-icon"></i> | ||
<span class="menu-title">Dashboard</span> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" data-bs-toggle="collapse" href="rentalServices" aria-expanded="false" aria-controls="ui-basic"> | ||
<i class="ti-palette menu-icon"></i> | ||
<span class="menu-title">Rental Services</span> | ||
<i class="menu-arrow"></i> | ||
</a> | ||
<div class="collapse" id="ui-basic"> | ||
<ul class="nav flex-column sub-menu"> | ||
<li class="nav-item"> <a class="nav-link" href="pages/ui-features/buttons.html">Buttons</a></li> | ||
<li class="nav-item"> <a class="nav-link" href="pages/ui-features/typography.html">Typography</a></li> | ||
</ul> | ||
</div> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="rentalServices/1/Items"> | ||
<i class="ti-layout-list-post menu-icon"></i> | ||
<span class="menu-title">Items</span> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="pages/charts/chartjs.html"> | ||
<i class="ti-pie-chart menu-icon"></i> | ||
<span class="menu-title">Charts</span> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="pages/tables/basic-table.html"> | ||
<i class="ti-view-list-alt menu-icon"></i> | ||
<span class="menu-title">Tables</span> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="pages/icons/themify.html"> | ||
<i class="ti-star menu-icon"></i> | ||
<span class="menu-title">Icons</span> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" data-bs-toggle="collapse" href="#auth" aria-expanded="false" aria-controls="auth"> | ||
<i class="ti-user menu-icon"></i> | ||
<span class="menu-title">User Pages</span> | ||
<i class="menu-arrow"></i> | ||
</a> | ||
<div class="collapse" id="auth"> | ||
<ul class="nav flex-column sub-menu"> | ||
<li class="nav-item"> <a class="nav-link" href="pages/samples/login.html"> Login </a></li> | ||
<li class="nav-item"> <a class="nav-link" href="pages/samples/login-2.html"> Login 2 </a></li> | ||
<li class="nav-item"> <a class="nav-link" href="pages/samples/register.html"> Register </a></li> | ||
<li class="nav-item"> <a class="nav-link" href="pages/samples/register-2.html"> Register 2 </a></li> | ||
<li class="nav-item"> <a class="nav-link" href="pages/samples/lock-screen.html"> Lockscreen </a></li> | ||
</ul> | ||
</div> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="documentation/documentation.html"> | ||
<i class="ti-write menu-icon"></i> | ||
<span class="menu-title">Documentation</span> | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> |
Oops, something went wrong.