Skip to content

Commit

Permalink
Merge pull request #538 from rahulramakrishnan3/release-3.1.0
Browse files Browse the repository at this point in the history
Release 3.0.1
  • Loading branch information
Cafnanc authored Aug 6, 2024
2 parents 996ef1d + 216418b commit 9aeb6a9
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/app/core/services/util/util.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import * as Bowser from "bowser"
import { BehaviorSubject, Subject } from 'rxjs';
import * as Papa from 'papaparse';
import { LocalStorageService } from '../localstorage.service';
import { environment } from 'src/environments/environment';

@Injectable({
providedIn: 'root',
Expand All @@ -33,7 +34,7 @@ export class UtilService {
}

getDeepLink(url){
return window['env']['deepLinkUrl']+url;
return environment.deepLinkUrl+url;
}

async shareLink(param:ISocialSharing) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/private/private.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ getUser() {
this.adminAccess = profileDetails.permissions ? this.permissionService.hasAdminAcess(this.actionsArrays,profileDetails?.permissions) : false;
this.user = profileDetails;
if (!environment['isAuthBypassed'] && profileDetails.profile_mandatory_fields && profileDetails.profile_mandatory_fields.length > 0 || !profileDetails.about && !environment['isAuthBypassed']) {
this.router.navigate([`/${CommonRoutes.EDIT_PROFILE}`], { replaceUrl: true });
this.router.navigate([`/${CommonRoutes.EDIT_PROFILE}`], { replaceUrl: true, queryParams: {redirectUrl: '/tabs/home'}});
}
this.isMentor = this.profile.isMentor;
})
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/create-session/create-session.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ export class CreateSessionPage implements OnInit {
this.getImageUploadUrl(this.localImage);
} else {
const form = Object.assign({}, {...this.form1.myForm.getRawValue(), ...this.form1.myForm.value});
form.start_date = form.start_date.unix().toString();
form.end_date = form.end_date.unix().toString();
form.start_date = (Math.floor(form.start_date.unix() / 60) * 60).toString();
form.end_date = (Math.floor(form.end_date.unix() / 60) * 60).toString();
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
form.time_zone = timezone;
_.forEach(this.entityNames, (entityKey) => {
Expand Down
18 changes: 14 additions & 4 deletions src/app/pages/edit-profile/edit-profile.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import { AlertController, Platform } from '@ionic/angular';
import { isDeactivatable } from 'src/app/core/guards/canDeactive/deactive.guard';
import { TranslateService } from '@ngx-translate/core';
import { map } from 'rxjs/operators';
import { Router } from '@angular/router';
import { ActivatedRoute, Router } from '@angular/router';
import { CommonRoutes } from 'src/global.routes';
import { PlatformLocation } from '@angular/common';
import { PlatformLocation, Location } from '@angular/common';

@Component({
selector: 'app-edit-profile',
Expand All @@ -49,6 +49,7 @@ export class EditProfilePage implements OnInit, isDeactivatable {
entityNames: any;
entityList: any;
formData: any;
redirectUrl: any;
constructor(
private form: FormService,
private api: HttpService,
Expand All @@ -62,7 +63,9 @@ export class EditProfilePage implements OnInit, isDeactivatable {
private toast: ToastService,
private utilService: UtilService,
private router: Router,
private platformLocation: PlatformLocation
private platformLocation: PlatformLocation,
private activatedRoute: ActivatedRoute,
private location: Location
) {
}

Expand All @@ -73,6 +76,9 @@ export class EditProfilePage implements OnInit, isDeactivatable {
history.pushState(null, '', location.href)
})
}
this.activatedRoute.queryParams.subscribe(params => {
this.redirectUrl = params.redirectUrl;
});
}
async ngOnInit() {
this.userDetails = await this.localStorage.getLocalData(localKeys.USER_DETAILS);
Expand Down Expand Up @@ -152,7 +158,11 @@ export class EditProfilePage implements OnInit, isDeactivatable {
});
this.form1.myForm.markAsPristine();
const updated = await this.profileService.profileUpdate(form);
if(updated){ this.router.navigate([`${CommonRoutes.TABS}/${CommonRoutes.HOME}`], { replaceUrl: true })}
if(updated && this.redirectUrl){
this.router.navigate([this.redirectUrl], { replaceUrl: true })
}else{
this.location.back()
}
}
} else {
this.toast.showToast('Please fill all the mandatory fields', 'danger');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
[ngClass]="selectedChips.has(chip) ? 'selected-chip' : ''"
>
<ion-icon name="add" *ngIf="!selectedChips.has(chip)"></ion-icon>
<ion-icon name="close-circle" color="white" *ngIf="selectedChips.has(chip)"></ion-icon>
<ion-icon name="close-circle" color="white" *ngIf="selectedChips.has(chip) && !disabled"></ion-icon>
<ion-label class="chip-label">{{ chip.label }}</ion-label>
</ion-chip>
<ion-chip *ngIf="allowCustomEntities" (click)="addNewOption()">
Expand Down
Binary file modified src/assets/default-session-img/session-img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icon/favicon.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: 1 addition & 1 deletion src/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
:root {
--ion-default-font: "NotoSans-Regular";
--ion-font-family: "NotoSans-Regular";
--ion-color-primary: #024BA3;
--ion-color-primary: #832215;
--red: rgb(255, 0, 0);
--white:#fff;
--black:#000;
Expand Down

0 comments on commit 9aeb6a9

Please sign in to comment.