Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/app/core/services/util/util.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,21 @@ export class UtilService {
header: texts[msg.header],
message: texts[msg.message],
buttons: [
{
text: texts[msg.submit],
cssClass: 'alert-button-bg-white',
handler: () => {
resolve(true);
}
},
{
text: texts[msg.cancel],
role: 'cancel',
cssClass: 'alert-button-bg-white',
cssClass: 'alert-button-red',
handler: (blah) => {
resolve(false);
}
}, {
text: texts[msg.submit],
cssClass: 'alert-button-red',
handler: () => {
resolve(true);
}
}
},
]
});
await alert.present();
Expand Down
8 changes: 4 additions & 4 deletions src/app/pages/create-session/create-session.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class CreateSessionPage implements OnInit {
if(this.type=='default'){
if (!this.form1?.myForm.pristine || this.profileImageData.haveValidationError) {
let texts: any;
this.translate.get(['SESSION_FORM_UNSAVED_DATA', 'EXIT', 'BACK', 'EXIT_HEADER_LABEL']).subscribe(text => {
this.translate.get(['SESSION_FORM_UNSAVED_DATA', 'EXIT', 'CANCEL', 'EXIT_HEADER_LABEL']).subscribe(text => {
texts = text;
})
const alert = await this.alert.create({
Expand All @@ -123,13 +123,13 @@ export class CreateSessionPage implements OnInit {
buttons: [
{
text: texts['EXIT'],
cssClass: "alert-button",
cssClass: "alert-button-bg-white",
role: 'exit',
handler: () => { }
},
{
text: texts['BACK'],
cssClass: "alert-button-bg-white",
text: texts['CANCEL'],
cssClass: "alert-button-red",
role: 'cancel',
handler: () => { }
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/home-search/home-search.page.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<app-page-header [config]="headerConfig"></app-page-header>
<ion-content class="ion-padding">
<ion-toolbar>
<ion-searchbar class="top-padding" [(ngModel)]="searchText" placeholder="" (ionInput)="checkInput()" debounce="100"></ion-searchbar>
<ion-searchbar class="top-padding" [(ngModel)]="searchText" placeholder="" (keypress)="checkInput($event)" debounce="100"></ion-searchbar>
</ion-toolbar>
<ion-segment (ionChange)="segmentChanged($event)" [value]="type">
<ion-segment-button value="all-sessions">
Expand Down
7 changes: 5 additions & 2 deletions src/app/pages/home-search/home-search.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ export class HomeSearchPage implements OnInit {
this.searching = false;
}

checkInput(){
this.searchText=this.searchText.replace(/^ +/gm, '')
checkInput(event: any){
this.searchText=this.searchText.replace(/^ +/gm, '');
if(event.keyCode == 13){
this.search();
}
}

search(){
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/session-detail/session-detail.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ <h6 class="title-font">{{detailData?.data?.title}}</h6>
<div *ngIf="detailData?.data?.isEnrolled && detailData?.data?.status==='published' && !isEnabled">
<ion-button class="load-more-button" expand="full" (click)="onCancel()">{{"UN_ENROLL" | translate}}</ion-button>
</div>
<div *ngIf="detailData?.data?.isEnrolled && detailData?.data?.status!='completed' && isEnabled">
<ion-button class="load-more-button" expand="full" (click)="onJoin()">{{"JOIN" | translate}}</ion-button>
<div *ngIf="detailData?.data?.isEnrolled && detailData?.data?.status!='completed' && isEnabled" class="join-button">
<ion-button class="load-more-button" expand="full" (click)="onJoin()" [disabled]="platformOff">{{"JOIN" | translate}}</ion-button>
</div>
</ng-template>
</ion-footer>
5 changes: 4 additions & 1 deletion src/app/pages/session-detail/session-detail.page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,7 @@ ion-item {
--padding-end: 0px;
--inner-padding-end: 0px;
--padding-start: 0px;
}
}
.join-button{
background: var(--white);
}
4 changes: 2 additions & 2 deletions src/app/pages/session-detail/session-detail.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ export class SessionDetailPage implements OnInit {
let msg = {
header: 'CANCEL_SESSION',
message: 'CANCEL_CONFIRM_MESSAGE',
cancel: 'CLOSE',
submit: 'CANCEL'
cancel: 'CANCEL',
submit: 'UN_ENROLL'
}
this.utilService.alertPopup(msg).then(async data => {
if (data) {
Expand Down
14 changes: 9 additions & 5 deletions src/app/pages/tabs/profile/profile.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export class ProfilePage implements OnInit {
this.visited=true;
}
this.gotToTop();
this.profileDetailsApi();
}

gotToTop() {
Expand All @@ -89,15 +90,18 @@ export class ProfilePage implements OnInit {


async doRefresh(event){
var result = await this.profileService.getProfileDetailsFromAPI(this.user?.isAMentor,this.user?._id);
if(result){
this.formData.data = result;
this.formData.data.emailId = result.email.address;
}
this.profileDetailsApi();
event.target.complete();
}

feedback() {
this.navCtrl.navigateForward([CommonRoutes.FEEDBACK]);
}
async profileDetailsApi(){
var result = await this.profileService.getProfileDetailsFromAPI(this.user?.isAMentor,this.user?._id);
if(result){
this.formData.data = result;
this.formData.data.emailId = result.email.address;
}
}
}
4 changes: 2 additions & 2 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"SIGN_UP_TO_MENTOR_ED":"Sign up to AP-MentorED",
"ADD":"Add",
"CANCEL": "Cancel",
"CANCEL_SESSION":"Cancel Session",
"CANCEL_SESSION":"Unenroll session",
"OK": "Ok",
"LOG_IN":"Log In",
"SHOW_PASSWORD":"Show password",
Expand Down Expand Up @@ -96,7 +96,7 @@
"NO_DATA_AVAILABLE": "No data available",
"CONFIRM":"Confirm",
"FORM_UNSAVED_DATA":"You have unsaved data, please save your data before closing.",
"SESSION_FORM_UNSAVED_DATA": "Are you sure you want to exit? You will lose all data if you leave this page?",
"SESSION_FORM_UNSAVED_DATA": "Are you sure you want to exit? Your data will not be saved.",
"SAVE":"Save",
"TERMS_OF_USE": "Terms of use",
"SOMETHING_WENT_WRONG":"Something went wrong",
Expand Down