Created services and repositories
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export function renderHeader() {
|
||||
function renderHeader() {
|
||||
const headerDiv = document.getElementById("header");
|
||||
|
||||
if (window.location.pathname.endsWith("/")) {
|
||||
@@ -53,26 +53,26 @@ export function renderHeader() {
|
||||
attachHeaderButtonListeners();
|
||||
}
|
||||
|
||||
export function attachHeaderButtonListeners() {
|
||||
const login = document.getElementById(“patientLogin”);
|
||||
function attachHeaderButtonListeners() {
|
||||
const login = document.getElementById("patientLogin");
|
||||
if (login) {
|
||||
login.addEventListener('click', () => { openModal('patientLogin'); });
|
||||
}
|
||||
|
||||
const signup = document.getElementById(“patientSignup”);
|
||||
const signup = document.getElementById("patientSignup");
|
||||
if (signup) {
|
||||
signup.addEventListener('click', () => { openModal('patientSignup'); });
|
||||
}
|
||||
}
|
||||
|
||||
export function logout() {
|
||||
function logout() {
|
||||
localStorage.removeItem("userRole");
|
||||
localStorage.removeItem("TOKEN");
|
||||
window.location.href = "/";
|
||||
}
|
||||
|
||||
export function logoutPatient() {
|
||||
function logoutPatient() {
|
||||
localStorage.removeItem("userRole");
|
||||
selectRole('patient')
|
||||
window.location.href='/pages/loggedPatientDashboard.html
|
||||
selectRole('patient');
|
||||
window.location.href='/pages/loggedPatientDashboard.html';
|
||||
}
|
||||
Reference in New Issue
Block a user