Skip to content

Commit

Permalink
fixed link issue for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
nati-m-afw committed Mar 17, 2021
1 parent 7fe3f28 commit e6fb975
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h3 class="heading">AAIT Clearance System</h3>
</div>

<a href="./dash.html"><button class="active"><i class="fas fa-tachometer-slowest"></i>Dashboard</button></a>
<a href="./loan.html"><button><i class="fas fa-books"></i>Students</button></a>
<a href="./requests.html"><button><i class="fas fa-books"></i>Requests</button></a>
<a href=""><button><i class="fas fa-info-circle"></i>How To Use</button></a>
<a href="./index.html"><button><i class="fas fa-sign-out-alt"></i>Log out</button></a>
</div>
Expand All @@ -54,7 +54,7 @@ <h3 class="heading my-5">AAIT Clearance System</h3>

<a href="./dash.html"><button class="side-button active"><i
class="fas fa-tachometer-slowest fa-2x"></i>Dashboard</button></a>
<a href="./loan.html"><button class="side-button"><i class="fas fa-books fa-2x"></i>Students</button></a>
<a href="./requests.html"><button class="side-button"><i class="fas fa-books fa-2x"></i>Requests</button></a>
<a href=""><button class="side-button"><i class="fas fa-info-circle fa-2x"></i>How To Use</button></a>
<a href="./index.html"><button class="side-button"><i class="fas fa-sign-out-alt fa-2x"></i>Log out</button></a>

Expand Down
8 changes: 7 additions & 1 deletion assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ if(currentDept == 'adm'){
function displayClearanceStatusForAdmin(){
const navSmall = document.querySelector('.sidebar-small')
const navB = document.querySelector('.sidebar')

// disable loan link for sidebar and sidebar small
navSmall.children[2].style.display = 'none'
navB.children[2].style.display = 'none'

// change dash to admin.html
navSmall.children[1].href = './admin.html?dp=adm'
navB.children[1].href = './admin.html?dp=adm'


while (tableBodyA.firstChild){
tableBodyA.removeChild(tableBodyA.firstChild);
Expand Down Expand Up @@ -51,7 +58,6 @@ if(currentDept == 'adm'){

collection.forEach((item) =>{
if(item.children[0].textContent.includes(searchItem.toUpperCase())){
console.log(item);
item.hidden = false
}
else{
Expand Down
3 changes: 3 additions & 0 deletions loan.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ <h5 class="modal-title" id="exampleModalLabel">Record a Loan</h5>

<!-- Admin Check clearance -->
<script src="./assets/js/admin.js"></script>



</body>

</html>
1 change: 1 addition & 0 deletions students.html
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ <h3 class="heading my-5">AAIT Clearance System</h3>
<script src="./assets/js/apexscript.js"></script>



</body>

</html>

0 comments on commit e6fb975

Please sign in to comment.