profile update

This commit is contained in:
CHIEFSOFT\ameye
2023-12-12 21:30:25 -05:00
parent b16a0a628f
commit ef3f163cf4
2 changed files with 13 additions and 4 deletions
@@ -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);
}
);