Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
[#164904821 Chore] link all pages
Browse files Browse the repository at this point in the history
  • Loading branch information
timi-codes committed Mar 26, 2019
1 parent d15786c commit 40e7fdf
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
2 changes: 1 addition & 1 deletion UI/cashier/customer.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="current-user web-user">
<img class="avatar" src="../img/emeka [email protected]" />
<h4>Tejumola Peter</h4>
<span>(admin)</span>
<span>(cashier)</span>
<img class="arrow-down" src="../img/arrow-drop-down.svg" />
</div>
</div>
Expand Down
Empty file removed UI/header.html
Empty file.
10 changes: 5 additions & 5 deletions UI/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@ <h4>Internet support</h4>
<img src="./img/banka-blue-logo.svg" />

<div class="ct-select-group ct-js-select-group">
<select class="ct-select ct-js-select">
<option>CUSTOMER</option>
<option>STAFF</option>
<option>ADMIN</option>
<select class="ct-select ct-js-select" id="user-role">
<option value="customer">CUSTOMER</option>
<option value="staff">STAFF</option>
<option value="admin">ADMIN</option>
</select>
</div>
<input type="text" id="email" name="email" placeholder="Email Address">
<input type="password" id="password" name="password" placeholder="Password">

<button class="signup">Login</button>
<button class="signup" id="user-login-btn">Login</button>

<p class="account"><a id="signup-button">Forgot password?</a></p>
</div>
Expand Down
21 changes: 21 additions & 0 deletions UI/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,24 @@ loginModal.onclick = function(e) {
loginModal.style.display = "none";
body.classList.remove("stop-scrolling");
};

var userLogin = document.getElementById("user-login-btn");
var userRole = document.getElementById("user-role");
var role = "customer";
userRole.onchange = function() {
role = document.getElementById("user-role").value;
};

userLogin.onclick = function(e) {
gotoNextPage();
};

function gotoNextPage() {
if (role == "customer") {
window.location.href = "./customer/dashboard.html";
} else if (role == "staff") {
window.location.href = "./cashier/dashboard.html";
} else if (role == "admin") {
window.location.href = "./admin/dashboard.html";
}
}

0 comments on commit 40e7fdf

Please sign in to comment.