Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
253 changes: 253 additions & 0 deletions source/Client/ABS/src/app/components/profile/profile.component.css

Large diffs are not rendered by default.

135 changes: 129 additions & 6 deletions source/Client/ABS/src/app/components/profile/profile.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,130 @@
<div *ngIf="user">
<h2 class="page-header">{{user.name}}</h2>
<ul class="list-group">
<li class="list-group-item">Username : {{user.name}}</li>
<li class="list-group-item">Email : {{user.email}}</li>
</ul>
<!-- Page Container -->
<div class="w3-container w3-content" style="max-width:1400px;margin-top:80px">
<!-- The Grid -->
<div class="w3-row">
<!-- Left Column -->
<div class="w3-col m3">
<!-- Profile -->
<div class="w3-card w3-round w3-white">
<div class="w3-container">
<h4 class="w3-center">Profile</h4>
<p class="w3-center"><img src="assets/images/avatar3.png" class="w3-circle" style="height:106px;width:106px" alt="Avatar"></p>
<hr>
<div *ngIf="user">
<p><i class="fa fa-pencil fa-fw w3-margin-right w3-text-theme"></i> Name : {{user.name}}</p>
<p><i class="fa fa-envelope-square fa-fw w3-margin-right w3-text-theme"></i>{{user.email}}</p>
<p><i class="fa fa-mobile fa-fw w3-margin-right w3-text-theme"></i> {{user.mobile}} </p>
</div>
</div>
</div>
<br>

<!-- Accordion -->
<div class="w3-card w3-round">
<div class="w3-white">
<button (click)="myFunction('Details1')" class="w3-button w3-block w3-theme-l1 w3-left-align"><i class="fa fa-circle-o-notch fa-fw w3-margin-right"></i> My Details</button>
<div id="Details1" class="w3-hide w3-container">
<p>..</p>
</div>
<button (click)="myFunction('Demo2')" class="w3-button w3-block w3-theme-l1 w3-left-align"><i class="fa fa-calendar-check-o fa-fw w3-margin-right"></i> Appointment History</button>
<div id="Demo2" class="w3-hide w3-container">
<p>..</p>
</div>
<button (click)="myFunction('Demo3')" class="w3-button w3-block w3-theme-l1 w3-left-align"><i class="fa fa-users fa-fw w3-margin-right"></i> My Medical Record</button>
<div id="Demo3" class="w3-hide w3-container">
<div class="w3-row-padding">
<br>
<div class="w3-half">
<!-- <img src="assets/images/abc.jpg" style="width:100%" class="w3-margin-bottom"> -->
</div>
</div>
</div>
<button (click)="myFunction('Demo4')" class="w3-button w3-block w3-theme-l1 w3-left-align"><i class="fa fa-calendar-check-o fa-fw w3-margin-right"></i>My Dependants and Carers</button>
<div id="Demo4" class="w3-hide w3-container">
<p>..</p>
</div>
<button (click)="myFunction('Demo5')" class="w3-button w3-block w3-theme-l1 w3-left-align"><i class="fa fa-user-md fa-fw w3-margin-right"></i>My Surgery</button>
<div id="Demo5" class="w3-hide w3-container">
<p>..</p>
</div>

</div>
</div>
<br>



<!-- End Left Column -->
</div>

<!-- Middle Column -->
<div class="w3-col m7">

<div class="w3-row-padding">
<div class="w3-col m12">
<div class="w3-card w3-round w3-white">
<div class="w3-container w3-padding">
<h6 class="w3-opacity">
Detail Profile
</h6>


</div>
</div>
</div>
</div>

<!-- <div class="w3-container w3-card w3-white w3-round w3-margin"><br>

<span class="w3-right w3-opacity"></span>


</div> -->





<!-- End Middle Column -->
</div>

<!-- Right Column -->
<div class="w3-col m2">
<div class="w3-card w3-round w3-white w3-center">
<div class="w3-container">
<p>Upcoming Events:</p>
<img src="assets/images/avatar3.png" alt="Forest" style="width:100%;">
<p><strong></strong></p>
<p></p>
<p><button class="w3-button w3-block w3-theme-l4"></button></p>
</div>
</div>
<br>

<div class="w3-card w3-round w3-white w3-center">
<div class="w3-container">

<div class="w3-row w3-opacity">
<div class="w3-half">
<button class="w3-button w3-block w3-green w3-section" title="Accept"><i class="fa fa-check"></i></button>
</div>
<div class="w3-half">
<button class="w3-button w3-block w3-red w3-section" title="Decline"><i class="fa fa-remove"></i></button>
</div>
</div>
</div>
</div>
<br>




<!-- End Right Column -->
</div>

<!-- End Grid -->
</div>

<!-- End Page Container -->
</div>
<br>
14 changes: 12 additions & 2 deletions source/Client/ABS/src/app/components/profile/profile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@ export class ProfileComponent implements OnInit {
user:Object;

constructor(private authService:AuthService, private router:Router) { }

myFunction(id) {
console.log(id);
const x = document.getElementById(id);
if (x.className.indexOf("w3-show") == -1) {
x.className += " w3-show";
x.previousElementSibling.className += " w3-theme-d1";
} else {
x.className = x.className.replace("w3-show", "");
x.previousElementSibling.className =
x.previousElementSibling.className.replace(" w3-theme-d1", "");
}
}
ngOnInit() {
this.authService.getProfile().subscribe(profile => {
this.user = profile.user;
Expand All @@ -23,5 +34,4 @@ export class ProfileComponent implements OnInit {
return false;
});
}

}
8 changes: 4 additions & 4 deletions source/Client/ABS/src/app/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ export class AuthService {
}

getProfile() {
const headers1 = new Headers();
const headersProfile = new Headers();
this.loadToken();
headers1.append('Authorization', this.authToken);
headers1.append('Content-Type', 'application/json');
return this.http.get('http://localhost:3060/user/profile', {headers: headers1})
headersProfile.append('Authorization', this.authToken);
headersProfile.append('Content-Type', 'application/json');
return this.http.get('http://localhost:3060/user/profile', {headers: headersProfile})
.map(res => res.json());
}

Expand Down
Binary file added source/Client/ABS/src/assets/images/avatar3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions source/Client/ABS/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<title>ABS</title>
<base href="/">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Open+Sans'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
Expand Down
Binary file added source/node/public/dist/assets/images/avatar3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions source/node/public/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<title>ABS</title>
<base href="/">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Open+Sans'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
Expand Down
2 changes: 1 addition & 1 deletion source/node/public/dist/inline.bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 19 additions & 6 deletions source/node/public/dist/main.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion source/node/public/dist/main.bundle.js.map

Large diffs are not rendered by default.

Loading