profile update
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ion-card>
|
||||
<ion-card style="margin: 0px; border-color: white;">
|
||||
<!-- <ion-card-header>-->
|
||||
<!-- <ion-card-title>Card Title</ion-card-title>-->
|
||||
<!-- <ion-card-subtitle>Card Subtitle</ion-card-subtitle>-->
|
||||
@@ -45,10 +45,11 @@
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-input type="text" maxlength="25" placeholder="Online Name" [(ngModel)]='online_name' ></ion-input>
|
||||
<ion-input type="text" maxlength="14" placeholder="Online Name" [(ngModel)]='online_name' ></ion-input>
|
||||
</ion-item>
|
||||
<div style="text-align: right;">
|
||||
<ion-button shape="round" (click)="sendUpdateProfile()">Update</ion-button>
|
||||
{{profileMessage}}
|
||||
<ion-button shape="round" size="small" (click)="sendUpdateProfile()">Update</ion-button>
|
||||
</div>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
@@ -78,6 +78,7 @@ export class EditProfilePage implements OnInit {
|
||||
promo: number,
|
||||
};
|
||||
|
||||
profileMessage : string ='';
|
||||
profileResult:any;
|
||||
async sendUpdateProfile(){
|
||||
const loading = await this.loadingCtrl.create({
|
||||
@@ -94,7 +95,7 @@ export class EditProfilePage implements OnInit {
|
||||
email: this.email,
|
||||
state: this.sessionDataProviderService.user_state,
|
||||
city: this.sessionDataProviderService.city,
|
||||
online_name: this.sessionDataProviderService.online_name,
|
||||
online_name: this.online_name,
|
||||
pref_email: this.sessionDataProviderService.pref_email,
|
||||
pref_phone: this.sessionDataProviderService.pref_phone,
|
||||
promo: this.sessionDataProviderService.promo,
|
||||
@@ -103,7 +104,14 @@ export class EditProfilePage implements OnInit {
|
||||
loading.present();
|
||||
this.wrenchService.updateProfile(this.profileData).subscribe(
|
||||
profileResult => {
|
||||
loading.dismiss();
|
||||
this.profileResult = profileResult;
|
||||
if (this.profileResult?.internal_return==0){
|
||||
this.profileMessage="Profile Updated";
|
||||
setTimeout(()=>{
|
||||
this.profileMessage='';
|
||||
}, 3000);
|
||||
}
|
||||
console.log("profileResult RETURN->", this.profileResult);
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user