Skip to content

Commit

Permalink
Merge pull request #533 from rahulramakrishnan3/release-3.0.0
Browse files Browse the repository at this point in the history
bug fix 1558 from frontend
  • Loading branch information
Cafnanc authored Jul 26, 2024
2 parents 3dfc69e + c6289f1 commit da1d037
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/app/pages/edit-profile/edit-profile.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class EditProfilePage implements OnInit, isDeactivatable {
}
}

onSubmit() {
async onSubmit() {
this.form1.onSubmit();
if (this.form1.myForm.valid) {
if (this.profileImageData.image && !this.profileImageData.isUploaded) {
Expand All @@ -151,7 +151,7 @@ export class EditProfilePage implements OnInit, isDeactivatable {
form[entityKey] = control.multiple ? _.map(form[entityKey], 'value') : form[entityKey]
});
this.form1.myForm.markAsPristine();
const updated = this.profileService.profileUpdate(form);
const updated = await this.profileService.profileUpdate(form);
if(updated){ this.router.navigate([`${CommonRoutes.TABS}/${CommonRoutes.HOME}`], { replaceUrl: true })}
}
} else {
Expand Down
12 changes: 8 additions & 4 deletions src/app/pages/session-detail/session-detail.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ export class SessionDetailPage implements OnInit {
sessionManagerText="";
activeUrl:any;
isNotInvited: any;
defaultUiForm = [
{
title: "MEETING_PLATFORM",
key: "meeting_info",
}
];

constructor(private localStorage: LocalStorageService, private router: Router,
private activatedRoute: ActivatedRoute, private sessionService: SessionService,
Expand All @@ -57,6 +63,7 @@ export class SessionDetailPage implements OnInit {
}

async ionViewWillEnter() {
this.detailData.form = JSON.parse(JSON.stringify(this.defaultUiForm));
await this.user.getUserValue();
this.userDetails = await this.localStorage.getLocalData(localKeys.USER_DETAILS);
this.fetchSessionDetails();
Expand All @@ -69,10 +76,7 @@ export class SessionDetailPage implements OnInit {
};
detailData = {
form: [
{
title: "MEETING_PLATFORM",
key: "meeting_info",
},

],
data: {
id:'',
Expand Down
7 changes: 5 additions & 2 deletions src/app/pages/tabs/home/home.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class HomePage implements OnInit {
this.isMentor = this.profileService.isMentor
App.addListener('appStateChange', (state: AppState) => {
this.localStorage.getLocalData(localKeys.USER_DETAILS).then(data => {
if (state.isActive == true && data) {
if (state.isActive == true && data && !data.profile_mandatory_fields.length) {
this.getSessions();
if(this.profileService.isMentor){
this.getCreatedSessionDetails();
Expand Down Expand Up @@ -97,7 +97,10 @@ export class HomePage implements OnInit {
}

async ionViewWillEnter() {
this.getSessions();
this.user = await this.localStorage.getLocalData(localKeys.USER_DETAILS);
if(this.user && !this.user.profile_mandatory_fields.length){
this.getSessions();
}
this.gotToTop();
let isRoleRequested = await this.localStorage.getLocalData(localKeys.IS_ROLE_REQUESTED)
let isBecomeMentorTileClosed =await this.localStorage.getLocalData(localKeys.IS_BECOME_MENTOR_TILE_CLOSED)
Expand Down

0 comments on commit da1d037

Please sign in to comment.