Skip to content
Snippets Groups Projects
Commit a1dbd35d authored by Aldrich Valentino Halim's avatar Aldrich Valentino Halim
Browse files

preferred location hidden if user is not a driver

parent c17cd63a
1 merge request!42Projekers - 13515051 - Girvandi Ilyas
...@@ -42,6 +42,11 @@ function getUserProfile(){ ...@@ -42,6 +42,11 @@ function getUserProfile(){
singleList.innerHTML = loc; singleList.innerHTML = loc;
listOfLocation.appendChild(singleList); listOfLocation.appendChild(singleList);
} }
//display preferred location if driver
if(isDriver == 0){
document.getElementById('preferred-location').style.display = 'none';
document.getElementById('user-location').style.display = 'none';
}
} }
}; };
xmlhttp.open('GET', '../controller/profile.php?id=' + id, true); xmlhttp.open('GET', '../controller/profile.php?id=' + id, true);
......
...@@ -62,10 +62,10 @@ ...@@ -62,10 +62,10 @@
<img src="../img/mail.png" /><div id="email"></div><br /> <img src="../img/mail.png" /><div id="email"></div><br />
<img src="../img/phone.png" /><div id="phone"></div><br /> <img src="../img/phone.png" /><div id="phone"></div><br />
</div> </div>
<div class="sub-header"> <div class="sub-header" id="preferred-location">
<div class="sub-header-heading"><h1>PREFERRED LOCATION</h1></div> <div class="sub-header-heading"><h1>PREFERRED LOCATION</h1></div>
<div class="edit-icon"> <div class="edit-icon">
<a href="../view/edit-prefered-locations.html"><img src="../img/pencil.png" /></a> <a href="../view/edit-prefered-locations.php"><img src="../img/pencil.png" /></a>
</div> </div>
</div> </div>
<div class="user-location"><ul id="user-location"></ul></div> <div class="user-location"><ul id="user-location"></ul></div>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment