Browse Source

Update Profile API connection parmeter changes

master
kj1352 5 years ago
parent
commit
d2515fcdc4
2 changed files with 5 additions and 7 deletions
  1. +2
    -2
      src/app/profile/profile.page.html
  2. +3
    -5
      src/app/profile/profile.page.ts

+ 2
- 2
src/app/profile/profile.page.html View File

@@ -6,8 +6,8 @@
</figure>
<div class="content">
<h5>
<span *ngIf="!showEdit"> {{ userInfo.name }} </span>
<input *ngIf="showEdit" type="text" [(ngModel)]="userInfo.name">
<span> {{ userInfo.name }} </span>
<!-- <input *ngIf="showEdit" type="text" [(ngModel)]="userInfo.name"> -->

<button *ngIf="!showEdit" (click)="showEdit = true"> Edit </button>
<button *ngIf="showEdit" (click)="showEdit = false; updateUserInfo();"> Save </button>


+ 3
- 5
src/app/profile/profile.page.ts View File

@@ -25,14 +25,12 @@ export class ProfilePage implements OnInit {
this.userInfo = JSON.parse(localStorage.userInfo)['User Info'];
}
updateUserInfo() {
updateUserInfo() {
let tempUserInfo = {
id: this.userInfo.id,
name: this.userInfo.name,
user_id: this.userInfo.id,
username: this.userInfo.username,
user_mobile: this.userInfo.mobile,
email: this.userInfo.email,
mobile: this.userInfo.mobile,
address: []
}
this.authService.updateUser(tempUserInfo).then((data) => {


Loading…
Cancel
Save