From 667c2dc1149c1fe7da42e9b53198498cb3565a78 Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Mon, 8 May 2023 12:41:59 +0530 Subject: [PATCH 01/36] Platform UI --- src/app/core/constants/formConstant.ts | 7 ++++ .../create-session/create-session.page.html | 37 +++++++++++++++---- .../create-session/create-session.page.scss | 10 +++++ .../create-session/create-session.page.ts | 27 +++++++++++++- .../session-detail/session-detail.page.ts | 8 +++- .../dynamic-form/dynamic-form.component.ts | 4 ++ .../meeting-platform.component.html | 23 ++++++++++++ .../meeting-platform.component.scss | 23 ++++++++++++ .../meeting-platform.component.spec.ts | 24 ++++++++++++ .../meeting-platform.component.ts | 27 ++++++++++++++ .../session-card/session-card.component.html | 37 ++++++++++++++++++- .../session-card/session-card.component.ts | 14 ++++++- src/app/shared/shared.module.ts | 7 +++- src/assets/i18n/en.json | 6 ++- src/global.scss | 15 ++++++++ 15 files changed, 253 insertions(+), 16 deletions(-) create mode 100644 src/app/shared/components/meeting-platform/meeting-platform.component.html create mode 100644 src/app/shared/components/meeting-platform/meeting-platform.component.scss create mode 100644 src/app/shared/components/meeting-platform/meeting-platform.component.spec.ts create mode 100644 src/app/shared/components/meeting-platform/meeting-platform.component.ts diff --git a/src/app/core/constants/formConstant.ts b/src/app/core/constants/formConstant.ts index b28c8ae0..356fd3f7 100644 --- a/src/app/core/constants/formConstant.ts +++ b/src/app/core/constants/formConstant.ts @@ -33,4 +33,11 @@ export const HELP_VIDEOS: IFORM = { "subType": "videos", "action": "videoFields", "templateName":"defaultTemplate", +} + +export const PLATFORMS: IFORM = { + type: "platform", + subType: "platformForm", + action: "platformFields", + templateName: "defaultTemplate", } \ No newline at end of file diff --git a/src/app/pages/create-session/create-session.page.html b/src/app/pages/create-session/create-session.page.html index 2d9d072a..3c71b799 100644 --- a/src/app/pages/create-session/create-session.page.html +++ b/src/app/pages/create-session/create-session.page.html @@ -1,15 +1,36 @@ - - - -
- +
+ + + {{'CREATE_SESSION' | translate}} + + + {{"MEETING_LINK" | translate}} + + +
+ + + +
+ +
+
+
+ + +
- +
+
-
- {{'PUBLISH' | translate}} +
+ {{'PUBLISH' | translate}} +
+
+ {{'SUBMIT' | translate}} + {{'SEE_IT_LATER' | translate}}
\ No newline at end of file diff --git a/src/app/pages/create-session/create-session.page.scss b/src/app/pages/create-session/create-session.page.scss index e69de29b..e4b36c7b 100644 --- a/src/app/pages/create-session/create-session.page.scss +++ b/src/app/pages/create-session/create-session.page.scss @@ -0,0 +1,10 @@ +.segment{ + display: flex; + justify-content: space-evenly; +} +.height{ + height: 100%; +} +ion-label{ + text-transform: none; +} \ No newline at end of file diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index 6f032330..777da4e1 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -1,5 +1,5 @@ import { HttpClient } from '@angular/common/http'; -import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core'; +import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { AttachmentService, LoaderService, ToastService } from 'src/app/core/services'; import { HttpService } from 'src/app/core/services/http/http.service'; @@ -16,7 +16,7 @@ import { File } from "@ionic-native/file/ngx"; import { urlConstants } from 'src/app/core/constants/urlConstants'; import * as moment from 'moment'; import { TranslateService } from '@ngx-translate/core'; -import { CREATE_SESSION_FORM } from 'src/app/core/constants/formConstant'; +import { CREATE_SESSION_FORM, PLATFORMS } from 'src/app/core/constants/formConstant'; import { FormService } from 'src/app/core/services/form/form.service'; @Component({ @@ -41,9 +41,26 @@ export class CreateSessionPage implements OnInit { profileImageData: any = { type: 'session' } + platformConfig: any = [ + { + name: "Create session", + icon: "pencil-sharp", + form: { + controls : [] + } + }, + { + name: "Meeting platform", + icon: "add-circle-outline", + form: { + controls: [] + } + } + ] public formData: JsonFormData; showForm: boolean = false; isSubmited: boolean; + type: any = "default"; constructor( private http: HttpClient, private sessionService: SessionService, @@ -199,4 +216,10 @@ export class CreateSessionPage implements OnInit { this.form1.myForm.markAsDirty(); this.profileImageData.isUploaded = true; } + segmentChanged(event){ + this.type = event.target.value; + } + isValid(event){ + this.isSubmited = event; + } } diff --git a/src/app/pages/session-detail/session-detail.page.ts b/src/app/pages/session-detail/session-detail.page.ts index d4863fd5..6e8f7e06 100644 --- a/src/app/pages/session-detail/session-detail.page.ts +++ b/src/app/pages/session-detail/session-detail.page.ts @@ -41,6 +41,10 @@ export class SessionDetailPage implements OnInit { }; detailData = { form: [ + { + title: "MEETING_PLATFORM", + key: "meetingInfo", + }, { title: 'RECOMMENDED_FOR', key: 'recommendedFor', @@ -103,7 +107,8 @@ export class SessionDetailPage implements OnInit { status:null, isEnrolled:null, title:"", - startDate:"" + startDate:"", + meetingInfo:"" }, }; @@ -116,6 +121,7 @@ export class SessionDetailPage implements OnInit { this.isEnabled = ((response.startDate-currentTimeInSeconds)<600 || response.status=='live')?true:false; this.detailData.data = Object.assign({}, response); this.detailData.data.startDate = readableStartDate; + this.detailData.data.meetingInfo = response.meetingInfo.platform; this.startDate = (response.startDate>0)?moment.unix(response.startDate).toLocaleString():this.startDate; this.endDate = (response.endDate>0)?moment.unix(response.endDate).toLocaleString():this.endDate; } diff --git a/src/app/shared/components/dynamic-form/dynamic-form.component.ts b/src/app/shared/components/dynamic-form/dynamic-form.component.ts index 21df7373..6e9b60a1 100644 --- a/src/app/shared/components/dynamic-form/dynamic-form.component.ts +++ b/src/app/shared/components/dynamic-form/dynamic-form.component.ts @@ -4,8 +4,10 @@ import { Input, OnChanges, OnInit, + Output, SimpleChanges, ViewChild, + EventEmitter } from '@angular/core'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; import { IonDatetime } from '@ionic/angular'; @@ -66,6 +68,7 @@ export class DynamicFormComponent implements OnInit { dependedChildDate=""; dependedParent: any; dependedParentDate: any; + @Output() formValid = new EventEmitter() constructor(private fb: FormBuilder, private toast: ToastService, private changeDetRef: ChangeDetectorRef) {} ngOnInit() { @@ -133,6 +136,7 @@ export class DynamicFormComponent implements OnInit { ) ); } + this.formValid.emit(this.myForm.valid) } compareWith(a, b) { a = _.flatten([a]); diff --git a/src/app/shared/components/meeting-platform/meeting-platform.component.html b/src/app/shared/components/meeting-platform/meeting-platform.component.html new file mode 100644 index 00000000..7bfee48d --- /dev/null +++ b/src/app/shared/components/meeting-platform/meeting-platform.component.html @@ -0,0 +1,23 @@ + + + {{"SELECT_MEETING_PLATFORM" | translate}} + + + + + + + + {{option.name}} + + + + + {{selectedHint}} + + +
+ +
+
+
diff --git a/src/app/shared/components/meeting-platform/meeting-platform.component.scss b/src/app/shared/components/meeting-platform/meeting-platform.component.scss new file mode 100644 index 00000000..42ab0f17 --- /dev/null +++ b/src/app/shared/components/meeting-platform/meeting-platform.component.scss @@ -0,0 +1,23 @@ +.inner-button{ + width: 30%; + --border-width: 30%; + --border-radius: 8px !important; +} +.card-title{ + font-weight: 800; +} +.select{ + width: 100%; +} +.button-class{ + justify-content: space-evenly; +} +.hint-icon{ + font-size: 12px; + margin: 0%; +} +.hint-label{ + font-size: 12px; + padding-left: 5px; + margin: 0%; +} \ No newline at end of file diff --git a/src/app/shared/components/meeting-platform/meeting-platform.component.spec.ts b/src/app/shared/components/meeting-platform/meeting-platform.component.spec.ts new file mode 100644 index 00000000..40aa7ec4 --- /dev/null +++ b/src/app/shared/components/meeting-platform/meeting-platform.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { MeetingPlatformComponent } from './meeting-platform.component'; + +describe('MeetingPlatformComponent', () => { + let component: MeetingPlatformComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ MeetingPlatformComponent ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(MeetingPlatformComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/shared/components/meeting-platform/meeting-platform.component.ts b/src/app/shared/components/meeting-platform/meeting-platform.component.ts new file mode 100644 index 00000000..e4851cc1 --- /dev/null +++ b/src/app/shared/components/meeting-platform/meeting-platform.component.ts @@ -0,0 +1,27 @@ +import { Component, Input, OnInit, ViewChild } from '@angular/core'; +import { DynamicFormComponent, JsonFormData } from '../dynamic-form/dynamic-form.component'; +import { FormService } from 'src/app/core/services/form/form.service'; +import { PLATFORMS } from 'src/app/core/constants/formConstant'; +import * as _ from 'lodash'; +@Component({ + selector: 'app-meeting-platform', + templateUrl: './meeting-platform.component.html', + styleUrls: ['./meeting-platform.component.scss'], +}) +export class MeetingPlatformComponent implements OnInit { + @ViewChild('form1') form1: DynamicFormComponent; + @Input() config: any; + meetingPlatforms: any; + selectedLink: any = "Big blue button (Default)"; + selectedHint: any = "Big Blue Button is the default meeting platform."; + + constructor(private form: FormService,) { } + async ngOnInit() { + const result = await this.form.getForm(PLATFORMS); + this.meetingPlatforms = _.get(result, 'result.data.fields.forms'); + } + clickOptions(options:any){ + this.selectedHint = options; + console.log(this.selectedHint) + } +} diff --git a/src/app/shared/components/session-card/session-card.component.html b/src/app/shared/components/session-card/session-card.component.html index ee5e9f84..2044d810 100644 --- a/src/app/shared/components/session-card/session-card.component.html +++ b/src/app/shared/components/session-card/session-card.component.html @@ -29,7 +29,42 @@
{{data?.name || data?.title}}
{{"COMPLETED_ON"|translate}} {{endDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{endDate|date:'shortTime'}} - {{buttonConfig?.label | translate}} + {{buttonConfig?.label | translate}} + + +
+
{{data?.name || data?.title}}
+ + + + + + {{"STARTS_ON"|translate}} {{startDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{startDate|date:'shortTime'}} + {{"STARTED_ON"|translate}} {{startDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{startDate|date:'shortTime'}} + {{"COMPLETED_ON"|translate}} {{endDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{endDate|date:'shortTime'}} + + + + + + + +

{{"MEETING_PLATFORM" | translate}} : {{meetingPlatform.platform}}

+
+
+
+ + + + Close + + + Join + + + +
+
diff --git a/src/app/shared/components/session-card/session-card.component.ts b/src/app/shared/components/session-card/session-card.component.ts index 8cdeecf5..84aafa8e 100644 --- a/src/app/shared/components/session-card/session-card.component.ts +++ b/src/app/shared/components/session-card/session-card.component.ts @@ -1,10 +1,11 @@ -import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core'; +import { Component, Input, OnInit, Output, EventEmitter, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import * as moment from 'moment'; import { localKeys } from 'src/app/core/constants/localStorage.keys'; import { LocalStorageService, ToastService } from 'src/app/core/services'; import { SessionService } from 'src/app/core/services/session/session.service'; import { CommonRoutes } from 'src/global.routes'; +import { IonModal, ModalController } from '@ionic/angular'; @Component({ selector: 'app-session-card', @@ -14,11 +15,14 @@ import { CommonRoutes } from 'src/global.routes'; export class SessionCardComponent implements OnInit { @Input() data: any; @Output() onClickEvent = new EventEmitter(); + @ViewChild(IonModal) modal: IonModal; startDate: string; isCreator: boolean; buttonConfig; userData: any; endDate: string; + isModalOpen = false; + meetingPlatform: any; constructor(private router: Router, private sessionService: SessionService, private toast: ToastService, private localStorage: LocalStorageService) { } @@ -27,6 +31,7 @@ export class SessionCardComponent implements OnInit { this.setButtonConfig(this.isCreator); this.startDate = (this.data.startDate>0)?moment.unix(this.data.startDate).toLocaleString():this.startDate; this.endDate = (this.data.endDate>0)?moment.unix(this.data.endDate).toLocaleString():this.endDate; + this.meetingPlatform = (this.data.meetingInfo); } setButtonConfig(isCreator: boolean) { @@ -59,4 +64,11 @@ export class SessionCardComponent implements OnInit { } this.userData.about?this.onClickEvent.emit(value):this.router.navigate([`/${CommonRoutes.EDIT_PROFILE}`]); } + setOpen(isOpen: boolean) { + // (this.buttonConfig?.type!='enrollAction') ? this.isModalOpen = isOpen : null + this.isModalOpen = isOpen + } + close(){ + this.modal.dismiss(null, 'cancel'); + } } diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 0f362fc8..337847ce 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -24,6 +24,7 @@ import { import { SafeHtmlPipe } from './safe-html.pipe'; import { MentorCardComponent } from './components/mentor-card/mentor-card.component'; import { NumberOnlyDirective } from './directive/onlyNumbers'; +import { MeetingPlatformComponent } from './components/meeting-platform/meeting-platform.component'; @NgModule({ declarations: [ @@ -45,7 +46,8 @@ import { NumberOnlyDirective } from './directive/onlyNumbers'; PersonaSelectionCardComponent, GenericProfileHeaderComponent, MentorCardComponent, - NumberOnlyDirective + NumberOnlyDirective, + MeetingPlatformComponent ], imports: [ CommonModule, @@ -72,7 +74,8 @@ import { NumberOnlyDirective } from './directive/onlyNumbers'; SafeHtmlPipe, PersonaSelectionCardComponent, GenericProfileHeaderComponent, - MentorCardComponent + MentorCardComponent, + MeetingPlatformComponent ], }) export class SharedModule {} diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 7c063f95..33bcefe4 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -168,5 +168,9 @@ "CATEGORIES": "Categories", "MEDIUM": "Medium", "DON'T_DELETE": "Don't delete", - "YES_DELETE": "Yes delete" + "YES_DELETE": "Yes delete", + "SEE_IT_LATER": "See it later", + "SELECT_MEETING_PLATFORM": "Add meeting link", + "MEETING_PLATFORM": "Meeting platform", + "MEETING_LINK": "Meeting link" } diff --git a/src/global.scss b/src/global.scss index 93cbbf8c..088fdd26 100644 --- a/src/global.scss +++ b/src/global.scss @@ -270,4 +270,19 @@ ion-accordion-group{ color: grey; } } +} + +////////////// + + +ion-modal#example-modal { + --width: fit-content; + --min-width: 300px; + --height: fit-content; + --border-radius: 6px; + --box-shadow: 0 28px 48px rgba(0, 0, 0, 0.4); +} + +ion-modal#example-modal .wrapper { + margin-bottom: 10px; } \ No newline at end of file From 1a0fe1eb70127d1678ab64dc046bd58759cb2068 Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Wed, 10 May 2023 21:04:36 +0530 Subject: [PATCH 02/36] create session BBB --- .../create-session/create-session.page.html | 37 ++++-- .../create-session/create-session.page.scss | 18 +++ .../create-session/create-session.page.ts | 111 +++++++++++++----- .../session-card/session-card.component.html | 4 +- src/assets/i18n/en.json | 5 +- 5 files changed, 134 insertions(+), 41 deletions(-) diff --git a/src/app/pages/create-session/create-session.page.html b/src/app/pages/create-session/create-session.page.html index 3c71b799..20632f76 100644 --- a/src/app/pages/create-session/create-session.page.html +++ b/src/app/pages/create-session/create-session.page.html @@ -2,7 +2,7 @@
- {{'CREATE_SESSION' | translate}} + {{ firstStepperTitle | translate}} {{"MEETING_LINK" | translate}} @@ -18,19 +18,38 @@ - + + + + {{"SELECT_MEETING_PLATFORM" | translate}} + + + + + + {{ option.name }} + + + + + {{selectedHint}} + + +
+ +
+
+
-
-
+
+
{{'PUBLISH' | translate}}
-
- {{'SUBMIT' | translate}} - {{'SEE_IT_LATER' | translate}} +
+ {{'SUBMIT' | translate}} + {{'SET_IT_LATER' | translate}}
\ No newline at end of file diff --git a/src/app/pages/create-session/create-session.page.scss b/src/app/pages/create-session/create-session.page.scss index e4b36c7b..6163098c 100644 --- a/src/app/pages/create-session/create-session.page.scss +++ b/src/app/pages/create-session/create-session.page.scss @@ -7,4 +7,22 @@ } ion-label{ text-transform: none; +} +.card-title{ + font-weight: 800; +} +.select{ + width: 100%; +} +.hint-icon{ + font-size: 12px; + margin: 0%; +} +.hint-label{ + font-size: 12px; + padding-left: 5px; + margin: 0%; +} +.btns{ + width: 100%; } \ No newline at end of file diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index 4d884af9..c2bcef4c 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -28,6 +28,7 @@ export class CreateSessionPage implements OnInit { lastUploadedImage: boolean; private win: any = window; @ViewChild('form1') form1: DynamicFormComponent; + @ViewChild('platformForm') platformForm: DynamicFormComponent; id: any = null; localImage; path; @@ -62,6 +63,11 @@ export class CreateSessionPage implements OnInit { showForm: boolean = false; isSubmited: boolean; type: any = "default"; + selectedLink: any; + selectedHint: any; + meetingPlatforms:any ; + firstStepperTitle: string; + constructor( private http: HttpClient, private sessionService: SessionService, @@ -85,8 +91,10 @@ export class CreateSessionPage implements OnInit { }); } async ngOnInit() { + this.firstStepperTitle = (this.id) ? "EDIT_SESSION":"CREATE_NEW_SESSION"; const result = await this.form.getForm(CREATE_SESSION_FORM); this.formData = _.get(result, 'result.data.fields'); + this.getPlatformFormDetails(); if (this.id) { let response = await this.sessionService.getSessionDetailsAPI(this.id); this.profileImageData.image = response.image; @@ -100,39 +108,51 @@ export class CreateSessionPage implements OnInit { this.isSubmited = false; //to be removed this.profileImageData.isUploaded = true; this.changeDetRef.detectChanges(); + if(this.id){ + this.type = 'segment'; + } + } + + async getPlatformFormDetails() { + let form = await this.form.getForm(PLATFORMS) + this.meetingPlatforms = form.result.data.fields.forms; + this.selectedLink = this.meetingPlatforms[0].name; + this.selectedHint = this.meetingPlatforms[0].hint; } async canPageLeave() { - if (!this.form1.myForm.pristine || this.profileImageData.haveValidationError) { - let texts: any; - this.translate.get(['SESSION_FORM_UNSAVED_DATA', 'EXIT', 'BACK']).subscribe(text => { - texts = text; - }) - const alert = await this.alert.create({ - message: texts['SESSION_FORM_UNSAVED_DATA'], - buttons: [ - { - text: texts['EXIT'], - cssClass: "alert-button", - handler: () => { } - }, - { - text: texts['BACK'], - cssClass: "alert-button", - role: 'cancel', - handler: () => { } - } - ] - }); - await alert.present(); - let data = await alert.onDidDismiss(); - if (data.role == 'cancel') { - return false; + if(this.type=='default'){ + if (!this.form1?.myForm.pristine || this.profileImageData.haveValidationError) { + let texts: any; + this.translate.get(['SESSION_FORM_UNSAVED_DATA', 'EXIT', 'BACK']).subscribe(text => { + texts = text; + }) + const alert = await this.alert.create({ + message: texts['SESSION_FORM_UNSAVED_DATA'], + buttons: [ + { + text: texts['EXIT'], + cssClass: "alert-button", + handler: () => { } + }, + { + text: texts['BACK'], + cssClass: "alert-button", + role: 'cancel', + handler: () => { } + } + ] + }); + await alert.present(); + let data = await alert.onDidDismiss(); + if (data.role == 'cancel') { + return false; + } else { + return true; + } } else { return true; } - } else { - return true; } return true } @@ -155,7 +175,8 @@ export class CreateSessionPage implements OnInit { this.form1.myForm.markAsPristine(); let result = await this.sessionService.createSession(form, this.id); if (result) { - this.id ? this.location.back() : this.router.navigate([`${CommonRoutes.SESSIONS_DETAILS}/`+result._id],{replaceUrl:true}) + this.type = 'segment'; + // this.id ? this.location.back() : this.router.navigate([`${CommonRoutes.SESSIONS_DETAILS}/`+result._id],{replaceUrl:true}) } else { this.profileImageData.image = this.lastUploadedImage; this.profileImageData.isUploaded = false; @@ -194,6 +215,16 @@ export class CreateSessionPage implements OnInit { } preFillData(existingData) { + for(let j=0;j link?.name == 'link') + if(existingData.meetingInfo.link){ + obj.value = existingData?.meetingInfo?.link + } + } + } + for (let i = 0; i < this.formData.controls.length; i++) { this.formData.controls[i].value = existingData[this.formData.controls[i].name]; @@ -225,4 +256,28 @@ export class CreateSessionPage implements OnInit { isValid(event){ this.isSubmited = event; } + clickOptions(event:any){ + this.selectedHint = event.detail.value.hint; + } + setItLater(){ + this.id ? this.router.navigate([`/${"session-detail"}/${this.id}`], {replaceUrl: true}): this.location.back(); + + } + onSubmitLink(){ + if (this.platformForm.myForm.valid){ + let meetingInfo = { + 'meetingInfo':{ + 'platform': this.selectedLink, + 'link': this.platformForm.myForm.value?.link, + "meta": { + "password": this.platformForm.myForm.value?.password, + "meetingId":this.platformForm.myForm.value?.meetingId + } + + }} + this.sessionService.createSession(meetingInfo,this.id).then(()=>{ + this.router.navigate([`/${"session-detail"}/${this.id}`]) + }) + } + } } diff --git a/src/app/shared/components/session-card/session-card.component.html b/src/app/shared/components/session-card/session-card.component.html index 2044d810..1c0029af 100644 --- a/src/app/shared/components/session-card/session-card.component.html +++ b/src/app/shared/components/session-card/session-card.component.html @@ -29,7 +29,7 @@
{{data?.name || data?.title}}
{{"COMPLETED_ON"|translate}} {{endDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{endDate|date:'shortTime'}} - {{buttonConfig?.label | translate}} + {{buttonConfig?.label | translate}}
@@ -59,7 +59,7 @@
{{data?.name || data?.title}}
Close - Join + Join diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 33bcefe4..dc966983 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -169,8 +169,9 @@ "MEDIUM": "Medium", "DON'T_DELETE": "Don't delete", "YES_DELETE": "Yes delete", - "SEE_IT_LATER": "See it later", + "SET_IT_LATER": "Set it later", "SELECT_MEETING_PLATFORM": "Add meeting link", "MEETING_PLATFORM": "Meeting platform", - "MEETING_LINK": "Meeting link" + "MEETING_LINK": "Meeting link", + "EDIT_SESSION": "Edit session" } From d9e08a6a6fa45698b2993fb74d6fcfe30a1afe04 Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Fri, 12 May 2023 00:25:14 +0530 Subject: [PATCH 03/36] Platform UI --- .../core/services/session/session.service.ts | 15 ++++-- .../create-session/create-session.page.html | 8 ++-- .../create-session/create-session.page.ts | 24 +++++++--- src/app/pages/home-search/home-search.page.ts | 2 +- .../mentor-details/mentor-details.page.ts | 2 +- .../session-detail/session-detail.page.ts | 4 +- src/app/pages/sessions/sessions.ts | 2 +- src/app/pages/tabs/home/home.page.ts | 2 +- .../join-dialog-box.component.html | 46 +++++++++++++++++++ .../join-dialog-box.component.scss | 6 +++ .../join-dialog-box.component.spec.ts | 24 ++++++++++ .../join-dialog-box.component.ts | 39 ++++++++++++++++ .../session-card/session-card.component.html | 37 +-------------- .../session-card/session-card.component.ts | 9 +--- src/app/shared/shared.module.ts | 7 ++- src/assets/i18n/en.json | 3 +- src/global.scss | 4 +- 17 files changed, 166 insertions(+), 68 deletions(-) create mode 100644 src/app/shared/components/join-dialog-box/join-dialog-box.component.html create mode 100644 src/app/shared/components/join-dialog-box/join-dialog-box.component.scss create mode 100644 src/app/shared/components/join-dialog-box/join-dialog-box.component.spec.ts create mode 100644 src/app/shared/components/join-dialog-box/join-dialog-box.component.ts diff --git a/src/app/core/services/session/session.service.ts b/src/app/core/services/session/session.service.ts index d6678c37..3caba642 100644 --- a/src/app/core/services/session/session.service.ts +++ b/src/app/core/services/session/session.service.ts @@ -4,13 +4,15 @@ import { urlConstants } from '../../constants/urlConstants'; import * as _ from 'lodash-es'; import { InAppBrowser } from '@awesome-cordova-plugins/in-app-browser/ngx'; import { Router } from '@angular/router'; +import { JoinDialogBoxComponent } from 'src/app/shared/components/join-dialog-box/join-dialog-box.component'; +import { ModalController } from '@ionic/angular'; @Injectable({ providedIn: 'root' }) export class SessionService { - constructor(private loaderService: LoaderService, private httpService: HttpService, private toast: ToastService, private inAppBrowser: InAppBrowser, private router: Router) { } + constructor(private loaderService: LoaderService, private httpService: HttpService, private toast: ToastService, private inAppBrowser: InAppBrowser, private router: Router, private modalCtrl: ModalController) { } async createSession(formData, id?: string) { @@ -151,7 +153,8 @@ async getSessionsList(obj) { } } - async joinSession(id) { + async joinSession(sessionData) { + let id = sessionData.sessionId?sessionData.sessionId: sessionData._id; await this.loaderService.startLoader(); const config = { url: urlConstants.API_URLS.JOIN_SESSION + id, @@ -161,7 +164,13 @@ async getSessionsList(obj) { let data = await this.httpService.get(config); this.loaderService.stopLoader(); if (data.responseCode == "OK") { - this.openBrowser(data.result.link); + // this.openBrowser(data.result.link); + let modal = await this.modalCtrl.create({ + component: JoinDialogBoxComponent, + componentProps: { data: data.result, sessionData : sessionData}, + cssClass: 'example-modal' + }); + modal.present() } } catch (error) { diff --git a/src/app/pages/create-session/create-session.page.html b/src/app/pages/create-session/create-session.page.html index 20632f76..ab253dff 100644 --- a/src/app/pages/create-session/create-session.page.html +++ b/src/app/pages/create-session/create-session.page.html @@ -25,7 +25,7 @@ - + {{ option.name }} @@ -46,10 +46,10 @@
- {{'PUBLISH' | translate}} + {{'PUBLISH_AND_ADD_LINK' | translate}}
- {{'SUBMIT' | translate}} - {{'SET_IT_LATER' | translate}} + {{'SUBMIT' | translate}} + {{'SET_IT_LATER' | translate}}
\ No newline at end of file diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index c2bcef4c..b75df556 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -67,6 +67,7 @@ export class CreateSessionPage implements OnInit { selectedHint: any; meetingPlatforms:any ; firstStepperTitle: string; + sessionDetails: any; constructor( private http: HttpClient, @@ -97,6 +98,7 @@ export class CreateSessionPage implements OnInit { this.getPlatformFormDetails(); if (this.id) { let response = await this.sessionService.getSessionDetailsAPI(this.id); + this.sessionDetails= response; this.profileImageData.image = response.image; this.profileImageData.isUploaded = true; response.startDate = moment.unix(response.startDate).format("YYYY-MM-DDTHH:mm"); @@ -109,14 +111,14 @@ export class CreateSessionPage implements OnInit { this.profileImageData.isUploaded = true; this.changeDetRef.detectChanges(); if(this.id){ - this.type = 'segment'; + this.type = 'default'; } } async getPlatformFormDetails() { let form = await this.form.getForm(PLATFORMS) this.meetingPlatforms = form.result.data.fields.forms; - this.selectedLink = this.meetingPlatforms[0].name; + this.selectedLink = this.meetingPlatforms[0]; this.selectedHint = this.meetingPlatforms[0].hint; } @@ -174,9 +176,12 @@ export class CreateSessionPage implements OnInit { form.timeZone = timezone; this.form1.myForm.markAsPristine(); let result = await this.sessionService.createSession(form, this.id); - if (result) { - this.type = 'segment'; - // this.id ? this.location.back() : this.router.navigate([`${CommonRoutes.SESSIONS_DETAILS}/`+result._id],{replaceUrl:true}) + this.type = 'segment'; + if (result._id) { + this.id = result._id; + result.startDate = moment.unix(result.startDate).format("YYYY-MM-DDTHH:mm"); + result.endDate = moment.unix(result.endDate).format("YYYY-MM-DDTHH:mm"); + this.preFillData(result); } else { this.profileImageData.image = this.lastUploadedImage; this.profileImageData.isUploaded = false; @@ -217,7 +222,8 @@ export class CreateSessionPage implements OnInit { preFillData(existingData) { for(let j=0;j link?.name == 'link') if(existingData.meetingInfo.link){ obj.value = existingData?.meetingInfo?.link @@ -267,7 +273,7 @@ export class CreateSessionPage implements OnInit { if (this.platformForm.myForm.valid){ let meetingInfo = { 'meetingInfo':{ - 'platform': this.selectedLink, + 'platform': this.selectedLink.name, 'link': this.platformForm.myForm.value?.link, "meta": { "password": this.platformForm.myForm.value?.password, @@ -280,4 +286,8 @@ export class CreateSessionPage implements OnInit { }) } } + compareWithFn(o1, o2) { + return o1 === o2; + }; + } diff --git a/src/app/pages/home-search/home-search.page.ts b/src/app/pages/home-search/home-search.page.ts index c217c56a..48a66d22 100644 --- a/src/app/pages/home-search/home-search.page.ts +++ b/src/app/pages/home-search/home-search.page.ts @@ -86,7 +86,7 @@ export class HomeSearchPage implements OnInit { break; case 'joinAction': - (event.data.sessionId)?await this.sessionService.joinSession(event.data.sessionId):await this.sessionService.joinSession(event.data._id); + (event.data.sessionId)?await this.sessionService.joinSession(event.data):await this.sessionService.joinSession(event.data); this.search(); break; diff --git a/src/app/pages/mentor-details/mentor-details.page.ts b/src/app/pages/mentor-details/mentor-details.page.ts index cde5de66..efc022b9 100644 --- a/src/app/pages/mentor-details/mentor-details.page.ts +++ b/src/app/pages/mentor-details/mentor-details.page.ts @@ -112,7 +112,7 @@ export class MentorDetailsPage implements OnInit { break; case 'joinAction': - await this.sessionService.joinSession(event.data._id); + await this.sessionService.joinSession(event.data); this.upcomingSessions = await this.sessionService.getUpcomingSessions(this.mentorId); break; diff --git a/src/app/pages/session-detail/session-detail.page.ts b/src/app/pages/session-detail/session-detail.page.ts index 70e38b6f..0c951f37 100644 --- a/src/app/pages/session-detail/session-detail.page.ts +++ b/src/app/pages/session-detail/session-detail.page.ts @@ -20,6 +20,7 @@ export class SessionDetailPage implements OnInit { isEnabled: boolean; startDate: any; endDate: any; + sessionDatas: any; constructor(private localStorage: LocalStorageService, private router: Router, private activatedRoute: ActivatedRoute, private sessionService: SessionService, @@ -114,6 +115,7 @@ export class SessionDetailPage implements OnInit { async fetchSessionDetails() { var response = await this.sessionService.getSessionDetailsAPI(this.id); + this.sessionDatas = response; if (response) { this.setPageHeader(response); let readableStartDate = moment.unix(response.startDate).toLocaleString(); @@ -198,7 +200,7 @@ export class SessionDetailPage implements OnInit { } async onJoin() { - await this.sessionService.joinSession(this.id); + await this.sessionService.joinSession(this.sessionDatas); } async onEnroll() { diff --git a/src/app/pages/sessions/sessions.ts b/src/app/pages/sessions/sessions.ts index 8b6238ed..fa67fb10 100644 --- a/src/app/pages/sessions/sessions.ts +++ b/src/app/pages/sessions/sessions.ts @@ -94,6 +94,6 @@ export class SessionsPage implements OnInit { } async onJoin(event){ - await this.sessionService.joinSession(event.data.sessionId); + await this.sessionService.joinSession(event.data); } } \ No newline at end of file diff --git a/src/app/pages/tabs/home/home.page.ts b/src/app/pages/tabs/home/home.page.ts index 82050909..3fd3ecc6 100644 --- a/src/app/pages/tabs/home/home.page.ts +++ b/src/app/pages/tabs/home/home.page.ts @@ -78,7 +78,7 @@ export class HomePage implements OnInit { break; case 'joinAction': - (event.data.sessionId)?await this.sessionService.joinSession(event.data.sessionId):await this.sessionService.joinSession(event.data._id); + (event.data.sessionId)?await this.sessionService.joinSession(event.data):await this.sessionService.joinSession(event.data); this.getSessions(); break; diff --git a/src/app/shared/components/join-dialog-box/join-dialog-box.component.html b/src/app/shared/components/join-dialog-box/join-dialog-box.component.html new file mode 100644 index 00000000..061690df --- /dev/null +++ b/src/app/shared/components/join-dialog-box/join-dialog-box.component.html @@ -0,0 +1,46 @@ +
+
+
+ {{ sessionData?.name || sessionData?.title }} +
+ + + + + + {{ "STARTS_ON" | translate + }} {{ startDate | date : "dd/MM/yyyy" }} + {{ "AT" | translate }} {{ startDate | date : "shortTime" }} + {{ "STARTED_ON" | translate }} + {{ startDate | date : "dd/MM/yyyy" }} + {{ "AT" | translate }} {{ startDate | date : "shortTime" }} + {{ "COMPLETED_ON" | + translate }} {{ endDate | date : "dd/MM/yyyy" }} + {{ "AT" | translate }} {{ endDate | date : "shortTime" }} + + + + + + + +

+ {{ "MEETING_PLATFORM" | translate }} : + {{ meetingPlatform.platform }} +

+
+
+
+ + + + {{ "CLOSE" | translate + }} + + + {{ "JOIN" | + translate }} + + + +
\ No newline at end of file diff --git a/src/app/shared/components/join-dialog-box/join-dialog-box.component.scss b/src/app/shared/components/join-dialog-box/join-dialog-box.component.scss new file mode 100644 index 00000000..31d0f45f --- /dev/null +++ b/src/app/shared/components/join-dialog-box/join-dialog-box.component.scss @@ -0,0 +1,6 @@ +.join-header{ + text-align: center; +} +.join-platform{ + font-size: 12px; +} \ No newline at end of file diff --git a/src/app/shared/components/join-dialog-box/join-dialog-box.component.spec.ts b/src/app/shared/components/join-dialog-box/join-dialog-box.component.spec.ts new file mode 100644 index 00000000..7d3f7f20 --- /dev/null +++ b/src/app/shared/components/join-dialog-box/join-dialog-box.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { JoinDialogBoxComponent } from './join-dialog-box.component'; + +describe('JoinDialogBoxComponent', () => { + let component: JoinDialogBoxComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ JoinDialogBoxComponent ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(JoinDialogBoxComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts b/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts new file mode 100644 index 00000000..666c8063 --- /dev/null +++ b/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts @@ -0,0 +1,39 @@ +import { Component, OnInit } from '@angular/core'; +import { ModalController } from '@ionic/angular'; +import * as moment from 'moment'; +import { InAppBrowser } from '@awesome-cordova-plugins/in-app-browser/ngx'; + +@Component({ + selector: 'app-join-dialog-box', + templateUrl: './join-dialog-box.component.html', + styleUrls: ['./join-dialog-box.component.scss'], +}) +export class JoinDialogBoxComponent implements OnInit { + data; + sessionData; + startDate: any; + endDate: any; + meetingPlatform: any; + + constructor(private modalCtrl: ModalController, private inAppBrowser: InAppBrowser) { } + + ngOnInit() { + this.startDate = (this.sessionData.startDate>0)?moment.unix(this.sessionData.startDate).toLocaleString():this.startDate; + this.endDate = (this.sessionData.endDate>0)?moment.unix(this.sessionData.endDate).toLocaleString():this.endDate; + this.meetingPlatform = (this.sessionData.meetingInfo); + } + openBrowser(link) { + let browser = this.inAppBrowser.create(link, `_system`); + browser.on('exit').subscribe(() => { + }, err => { + console.error(err); + }); + } + + cancel(){ + return this.modalCtrl.dismiss(null, 'cancel'); + } + onButtonClick(){ + this.openBrowser(this.data.link); + } +} diff --git a/src/app/shared/components/session-card/session-card.component.html b/src/app/shared/components/session-card/session-card.component.html index 1c0029af..f46b3952 100644 --- a/src/app/shared/components/session-card/session-card.component.html +++ b/src/app/shared/components/session-card/session-card.component.html @@ -29,42 +29,7 @@
{{data?.name || data?.title}}
{{"COMPLETED_ON"|translate}} {{endDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{endDate|date:'shortTime'}} - {{buttonConfig?.label | translate}} - - -
-
{{data?.name || data?.title}}
- - - - - - {{"STARTS_ON"|translate}} {{startDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{startDate|date:'shortTime'}} - {{"STARTED_ON"|translate}} {{startDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{startDate|date:'shortTime'}} - {{"COMPLETED_ON"|translate}} {{endDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{endDate|date:'shortTime'}} - - - - - - - -

{{"MEETING_PLATFORM" | translate}} : {{meetingPlatform.platform}}

-
-
-
- - - - Close - - - Join - - - -
-
+ {{buttonConfig?.label | translate}}
diff --git a/src/app/shared/components/session-card/session-card.component.ts b/src/app/shared/components/session-card/session-card.component.ts index 9cc1fbe9..280b3211 100644 --- a/src/app/shared/components/session-card/session-card.component.ts +++ b/src/app/shared/components/session-card/session-card.component.ts @@ -5,7 +5,7 @@ import { localKeys } from 'src/app/core/constants/localStorage.keys'; import { LocalStorageService, ToastService } from 'src/app/core/services'; import { SessionService } from 'src/app/core/services/session/session.service'; import { CommonRoutes } from 'src/global.routes'; -import { IonModal, ModalController } from '@ionic/angular'; +import { IonModal } from '@ionic/angular'; @Component({ selector: 'app-session-card', @@ -65,11 +65,4 @@ export class SessionCardComponent implements OnInit { } this.userData.about?this.onClickEvent.emit(value):this.router.navigate([`/${CommonRoutes.EDIT_PROFILE}`]); } - setOpen(isOpen: boolean) { - // (this.buttonConfig?.type!='enrollAction') ? this.isModalOpen = isOpen : null - this.isModalOpen = isOpen - } - close(){ - this.modal.dismiss(null, 'cancel'); - } } diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 337847ce..16952d7e 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -25,6 +25,7 @@ import { SafeHtmlPipe } from './safe-html.pipe'; import { MentorCardComponent } from './components/mentor-card/mentor-card.component'; import { NumberOnlyDirective } from './directive/onlyNumbers'; import { MeetingPlatformComponent } from './components/meeting-platform/meeting-platform.component'; +import { JoinDialogBoxComponent } from './components/join-dialog-box/join-dialog-box.component'; @NgModule({ declarations: [ @@ -47,7 +48,8 @@ import { MeetingPlatformComponent } from './components/meeting-platform/meeting- GenericProfileHeaderComponent, MentorCardComponent, NumberOnlyDirective, - MeetingPlatformComponent + MeetingPlatformComponent, + JoinDialogBoxComponent ], imports: [ CommonModule, @@ -75,7 +77,8 @@ import { MeetingPlatformComponent } from './components/meeting-platform/meeting- PersonaSelectionCardComponent, GenericProfileHeaderComponent, MentorCardComponent, - MeetingPlatformComponent + MeetingPlatformComponent, + JoinDialogBoxComponent ], }) export class SharedModule {} diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index dc966983..fdb7f732 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -173,5 +173,6 @@ "SELECT_MEETING_PLATFORM": "Add meeting link", "MEETING_PLATFORM": "Meeting platform", "MEETING_LINK": "Meeting link", - "EDIT_SESSION": "Edit session" + "EDIT_SESSION": "Edit session", + "PUBLISH_AND_ADD_LINK": "Publish and Add link" } diff --git a/src/global.scss b/src/global.scss index 088fdd26..bab22be1 100644 --- a/src/global.scss +++ b/src/global.scss @@ -275,7 +275,7 @@ ion-accordion-group{ ////////////// -ion-modal#example-modal { +.example-modal { --width: fit-content; --min-width: 300px; --height: fit-content; @@ -283,6 +283,6 @@ ion-modal#example-modal { --box-shadow: 0 28px 48px rgba(0, 0, 0, 0.4); } -ion-modal#example-modal .wrapper { +.example-modal .wrapper { margin-bottom: 10px; } \ No newline at end of file From 1081880dfca5694aaef1beb6b4a26a82ecebf53f Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Fri, 12 May 2023 10:40:05 +0530 Subject: [PATCH 04/36] button config for see it later --- src/app/pages/create-session/create-session.page.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index b75df556..da4d3b96 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -176,6 +176,7 @@ export class CreateSessionPage implements OnInit { form.timeZone = timezone; this.form1.myForm.markAsPristine(); let result = await this.sessionService.createSession(form, this.id); + this.sessionDetails = result; this.type = 'segment'; if (result._id) { this.id = result._id; From 4f442cc9cfafc96e03b88242c04a0b00122500a5 Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Fri, 12 May 2023 17:33:04 +0530 Subject: [PATCH 05/36] join dialog zoom id added --- .../create-session/create-session.page.ts | 6 +++- .../join-dialog-box.component.html | 29 +++++++++++++++++++ .../join-dialog-box.component.ts | 11 ++++++- src/assets/i18n/en.json | 6 ++-- 4 files changed, 48 insertions(+), 4 deletions(-) diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index da4d3b96..7c2169d7 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -226,8 +226,12 @@ export class CreateSessionPage implements OnInit { this.selectedLink = this?.meetingPlatforms[j]; this.selectedHint = this.meetingPlatforms[j].hint; let obj = this?.meetingPlatforms[j]?.form?.controls.find( (link:any) => link?.name == 'link') + let meetingId = this?.meetingPlatforms[j]?.form?.controls.find( (meetingId:any) => meetingId?.name == 'meetingId') + let password = this?.meetingPlatforms[j]?.form?.controls.find( (password:any) => password?.name == 'password') if(existingData.meetingInfo.link){ obj.value = existingData?.meetingInfo?.link + meetingId.value = existingData?.meetingInfo?.meta?.meetingId + password.value = existingData?.meetingInfo?.meta?.password } } } @@ -283,7 +287,7 @@ export class CreateSessionPage implements OnInit { }} this.sessionService.createSession(meetingInfo,this.id).then(()=>{ - this.router.navigate([`/${"session-detail"}/${this.id}`]) + this.router.navigate([`/${"session-detail"}/${this.id}`],{replaceUrl: true}) }) } } diff --git a/src/app/shared/components/join-dialog-box/join-dialog-box.component.html b/src/app/shared/components/join-dialog-box/join-dialog-box.component.html index 061690df..85ecc3ab 100644 --- a/src/app/shared/components/join-dialog-box/join-dialog-box.component.html +++ b/src/app/shared/components/join-dialog-box/join-dialog-box.component.html @@ -30,6 +30,35 @@

+ + + + + +

+ {{'PASSWORD' | translate}}: + {{ data?.meta?.password }} +

+
+ + + + +
+ + + + + +

+ {{'MEETING_ID' | translate}}: + {{ data?.meta?.meetingId }} +

+
+ + + +
diff --git a/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts b/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts index 666c8063..96081770 100644 --- a/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts +++ b/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { ModalController } from '@ionic/angular'; import * as moment from 'moment'; import { InAppBrowser } from '@awesome-cordova-plugins/in-app-browser/ngx'; +import { ToastService } from 'src/app/core/services'; @Component({ selector: 'app-join-dialog-box', @@ -15,7 +16,7 @@ export class JoinDialogBoxComponent implements OnInit { endDate: any; meetingPlatform: any; - constructor(private modalCtrl: ModalController, private inAppBrowser: InAppBrowser) { } + constructor(private modalCtrl: ModalController, private inAppBrowser: InAppBrowser, private toast: ToastService) { } ngOnInit() { this.startDate = (this.sessionData.startDate>0)?moment.unix(this.sessionData.startDate).toLocaleString():this.startDate; @@ -36,4 +37,12 @@ export class JoinDialogBoxComponent implements OnInit { onButtonClick(){ this.openBrowser(this.data.link); } + copyToClipBoard(copyData:any) { + console.log('copyclipboard',copyData) + navigator.clipboard.writeText(copyData).then(() => { + this.toast.showToast('Copied successfully.', "success") + },() => { + console.error('Failed to copy'); + }); + } } diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index fdb7f732..cad4d441 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -100,7 +100,7 @@ "SAVE":"Save", "TERMS_OF_USE": "Terms of use", "SOMETHING_WENT_WRONG":"Something went wrong", - "CREATE_NEW_SESSION": "Create new Session", + "CREATE_NEW_SESSION": "Create a new Session", "DELETE": "Delete", "START_SESSIONS": "Start session", "START": "Start", @@ -174,5 +174,7 @@ "MEETING_PLATFORM": "Meeting platform", "MEETING_LINK": "Meeting link", "EDIT_SESSION": "Edit session", - "PUBLISH_AND_ADD_LINK": "Publish and Add link" + "PUBLISH_AND_ADD_LINK": "Publish and Add link", + "MEETING_ID": "Meeting id", + "PASSWORD": "Password" } From bb0ee086fd6345b31934c99936c7f6dd1e48127a Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Mon, 15 May 2023 19:46:17 +0530 Subject: [PATCH 06/36] copy to clipboard --- android/app/capacitor.build.gradle | 1 + android/app/src/main/assets/capacitor.plugins.json | 4 ++++ android/capacitor.settings.gradle | 3 +++ ios/App/Podfile | 1 + package.json | 1 + src/app/pages/create-session/create-session.page.ts | 6 +++--- .../join-dialog-box/join-dialog-box.component.html | 5 ++--- .../join-dialog-box/join-dialog-box.component.ts | 13 ++++++------- 8 files changed, 21 insertions(+), 13 deletions(-) diff --git a/android/app/capacitor.build.gradle b/android/app/capacitor.build.gradle index d224f1d8..6fbed166 100644 --- a/android/app/capacitor.build.gradle +++ b/android/app/capacitor.build.gradle @@ -11,6 +11,7 @@ apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" dependencies { implementation project(':capacitor-app') implementation project(':capacitor-browser') + implementation project(':capacitor-clipboard') implementation project(':capacitor-filesystem') implementation project(':capacitor-haptics') implementation project(':capacitor-keyboard') diff --git a/android/app/src/main/assets/capacitor.plugins.json b/android/app/src/main/assets/capacitor.plugins.json index 582b2afb..e305a1ed 100644 --- a/android/app/src/main/assets/capacitor.plugins.json +++ b/android/app/src/main/assets/capacitor.plugins.json @@ -7,6 +7,10 @@ "pkg": "@capacitor/browser", "classpath": "com.capacitorjs.plugins.browser.BrowserPlugin" }, + { + "pkg": "@capacitor/clipboard", + "classpath": "com.capacitorjs.plugins.clipboard.ClipboardPlugin" + }, { "pkg": "@capacitor/filesystem", "classpath": "com.capacitorjs.plugins.filesystem.FilesystemPlugin" diff --git a/android/capacitor.settings.gradle b/android/capacitor.settings.gradle index 014c5a5b..f97b5ba5 100644 --- a/android/capacitor.settings.gradle +++ b/android/capacitor.settings.gradle @@ -8,6 +8,9 @@ project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/ include ':capacitor-browser' project(':capacitor-browser').projectDir = new File('../node_modules/@capacitor/browser/android') +include ':capacitor-clipboard' +project(':capacitor-clipboard').projectDir = new File('../node_modules/@capacitor/clipboard/android') + include ':capacitor-filesystem' project(':capacitor-filesystem').projectDir = new File('../node_modules/@capacitor/filesystem/android') diff --git a/ios/App/Podfile b/ios/App/Podfile index 2270d97c..db0743cb 100644 --- a/ios/App/Podfile +++ b/ios/App/Podfile @@ -11,6 +11,7 @@ def capacitor_pods pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app' pod 'CapacitorBrowser', :path => '../../node_modules/@capacitor/browser' + pod 'CapacitorClipboard', :path => '../../node_modules/@capacitor/clipboard' pod 'CapacitorFilesystem', :path => '../../node_modules/@capacitor/filesystem' pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics' pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard' diff --git a/package.json b/package.json index 87092308..cced72cc 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "@capacitor/app": "1.1.1", "@capacitor/browser": "^1.0.7", "@capacitor/cli": "^3.5.1", + "@capacitor/clipboard": "^5.0.2", "@capacitor/core": "^3.5.1", "@capacitor/filesystem": "^1.1.0", "@capacitor/haptics": "1.1.4", diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index 7c2169d7..9374d974 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -229,9 +229,9 @@ export class CreateSessionPage implements OnInit { let meetingId = this?.meetingPlatforms[j]?.form?.controls.find( (meetingId:any) => meetingId?.name == 'meetingId') let password = this?.meetingPlatforms[j]?.form?.controls.find( (password:any) => password?.name == 'password') if(existingData.meetingInfo.link){ - obj.value = existingData?.meetingInfo?.link - meetingId.value = existingData?.meetingInfo?.meta?.meetingId - password.value = existingData?.meetingInfo?.meta?.password + obj.value = existingData?.meetingInfo?.link; + meetingId.value = existingData?.meetingInfo?.meta?.meetingId; + password.value = existingData?.meetingInfo?.meta?.password; } } } diff --git a/src/app/shared/components/join-dialog-box/join-dialog-box.component.html b/src/app/shared/components/join-dialog-box/join-dialog-box.component.html index 85ecc3ab..a7f7928b 100644 --- a/src/app/shared/components/join-dialog-box/join-dialog-box.component.html +++ b/src/app/shared/components/join-dialog-box/join-dialog-box.component.html @@ -41,8 +41,7 @@

- - + @@ -56,7 +55,7 @@

- +
diff --git a/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts b/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts index 96081770..f6011922 100644 --- a/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts +++ b/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts @@ -3,6 +3,7 @@ import { ModalController } from '@ionic/angular'; import * as moment from 'moment'; import { InAppBrowser } from '@awesome-cordova-plugins/in-app-browser/ngx'; import { ToastService } from 'src/app/core/services'; +import { Clipboard } from '@capacitor/clipboard'; @Component({ selector: 'app-join-dialog-box', @@ -37,12 +38,10 @@ export class JoinDialogBoxComponent implements OnInit { onButtonClick(){ this.openBrowser(this.data.link); } - copyToClipBoard(copyData:any) { - console.log('copyclipboard',copyData) - navigator.clipboard.writeText(copyData).then(() => { - this.toast.showToast('Copied successfully.', "success") - },() => { - console.error('Failed to copy'); + + copyToClipBoard = async (copyData: any) => { + await Clipboard.write({ + string: copyData }); - } + }; } From b335df7aa0be2a3d47721b625ddcf53ee6b7f060 Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Mon, 15 May 2023 22:22:45 +0530 Subject: [PATCH 07/36] copy toast message --- package.json | 2 +- .../components/join-dialog-box/join-dialog-box.component.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index cced72cc..adb3c598 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "@capacitor/app": "1.1.1", "@capacitor/browser": "^1.0.7", "@capacitor/cli": "^3.5.1", - "@capacitor/clipboard": "^5.0.2", + "@capacitor/clipboard": "^1.0.8", "@capacitor/core": "^3.5.1", "@capacitor/filesystem": "^1.1.0", "@capacitor/haptics": "1.1.4", diff --git a/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts b/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts index f6011922..a2a11893 100644 --- a/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts +++ b/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts @@ -42,6 +42,8 @@ export class JoinDialogBoxComponent implements OnInit { copyToClipBoard = async (copyData: any) => { await Clipboard.write({ string: copyData + }).then(()=>{ + this.toast.showToast('Copied successfully',"success"); }); }; } From 832da1e2b8614aa80dfeb4e4dd84748d35d17223 Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Thu, 18 May 2023 09:54:38 +0530 Subject: [PATCH 08/36] meeting-platform component deleted --- .../meeting-platform.component.html | 23 ---------------- .../meeting-platform.component.scss | 23 ---------------- .../meeting-platform.component.spec.ts | 24 ----------------- .../meeting-platform.component.ts | 27 ------------------- src/app/shared/shared.module.ts | 3 --- 5 files changed, 100 deletions(-) delete mode 100644 src/app/shared/components/meeting-platform/meeting-platform.component.html delete mode 100644 src/app/shared/components/meeting-platform/meeting-platform.component.scss delete mode 100644 src/app/shared/components/meeting-platform/meeting-platform.component.spec.ts delete mode 100644 src/app/shared/components/meeting-platform/meeting-platform.component.ts diff --git a/src/app/shared/components/meeting-platform/meeting-platform.component.html b/src/app/shared/components/meeting-platform/meeting-platform.component.html deleted file mode 100644 index 7bfee48d..00000000 --- a/src/app/shared/components/meeting-platform/meeting-platform.component.html +++ /dev/null @@ -1,23 +0,0 @@ - - - {{"SELECT_MEETING_PLATFORM" | translate}} - - - - - - - - {{option.name}} - - - - - {{selectedHint}} - - -
- -
-
-
diff --git a/src/app/shared/components/meeting-platform/meeting-platform.component.scss b/src/app/shared/components/meeting-platform/meeting-platform.component.scss deleted file mode 100644 index 42ab0f17..00000000 --- a/src/app/shared/components/meeting-platform/meeting-platform.component.scss +++ /dev/null @@ -1,23 +0,0 @@ -.inner-button{ - width: 30%; - --border-width: 30%; - --border-radius: 8px !important; -} -.card-title{ - font-weight: 800; -} -.select{ - width: 100%; -} -.button-class{ - justify-content: space-evenly; -} -.hint-icon{ - font-size: 12px; - margin: 0%; -} -.hint-label{ - font-size: 12px; - padding-left: 5px; - margin: 0%; -} \ No newline at end of file diff --git a/src/app/shared/components/meeting-platform/meeting-platform.component.spec.ts b/src/app/shared/components/meeting-platform/meeting-platform.component.spec.ts deleted file mode 100644 index 40aa7ec4..00000000 --- a/src/app/shared/components/meeting-platform/meeting-platform.component.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { MeetingPlatformComponent } from './meeting-platform.component'; - -describe('MeetingPlatformComponent', () => { - let component: MeetingPlatformComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ MeetingPlatformComponent ], - imports: [IonicModule.forRoot()] - }).compileComponents(); - - fixture = TestBed.createComponent(MeetingPlatformComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/shared/components/meeting-platform/meeting-platform.component.ts b/src/app/shared/components/meeting-platform/meeting-platform.component.ts deleted file mode 100644 index e4851cc1..00000000 --- a/src/app/shared/components/meeting-platform/meeting-platform.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Component, Input, OnInit, ViewChild } from '@angular/core'; -import { DynamicFormComponent, JsonFormData } from '../dynamic-form/dynamic-form.component'; -import { FormService } from 'src/app/core/services/form/form.service'; -import { PLATFORMS } from 'src/app/core/constants/formConstant'; -import * as _ from 'lodash'; -@Component({ - selector: 'app-meeting-platform', - templateUrl: './meeting-platform.component.html', - styleUrls: ['./meeting-platform.component.scss'], -}) -export class MeetingPlatformComponent implements OnInit { - @ViewChild('form1') form1: DynamicFormComponent; - @Input() config: any; - meetingPlatforms: any; - selectedLink: any = "Big blue button (Default)"; - selectedHint: any = "Big Blue Button is the default meeting platform."; - - constructor(private form: FormService,) { } - async ngOnInit() { - const result = await this.form.getForm(PLATFORMS); - this.meetingPlatforms = _.get(result, 'result.data.fields.forms'); - } - clickOptions(options:any){ - this.selectedHint = options; - console.log(this.selectedHint) - } -} diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 16952d7e..aed650e6 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -24,7 +24,6 @@ import { import { SafeHtmlPipe } from './safe-html.pipe'; import { MentorCardComponent } from './components/mentor-card/mentor-card.component'; import { NumberOnlyDirective } from './directive/onlyNumbers'; -import { MeetingPlatformComponent } from './components/meeting-platform/meeting-platform.component'; import { JoinDialogBoxComponent } from './components/join-dialog-box/join-dialog-box.component'; @NgModule({ @@ -48,7 +47,6 @@ import { JoinDialogBoxComponent } from './components/join-dialog-box/join-dialog GenericProfileHeaderComponent, MentorCardComponent, NumberOnlyDirective, - MeetingPlatformComponent, JoinDialogBoxComponent ], imports: [ @@ -77,7 +75,6 @@ import { JoinDialogBoxComponent } from './components/join-dialog-box/join-dialog PersonaSelectionCardComponent, GenericProfileHeaderComponent, MentorCardComponent, - MeetingPlatformComponent, JoinDialogBoxComponent ], }) From 757d9916a620f91f2aad539c890ed20fe0be2aac Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Thu, 18 May 2023 17:23:14 +0530 Subject: [PATCH 09/36] session card platform --- .../session-card/session-card.component.html | 33 ++++++++++++------- .../session-card/session-card.component.scss | 6 ++-- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/app/shared/components/session-card/session-card.component.html b/src/app/shared/components/session-card/session-card.component.html index f46b3952..903fcdc0 100644 --- a/src/app/shared/components/session-card/session-card.component.html +++ b/src/app/shared/components/session-card/session-card.component.html @@ -19,18 +19,27 @@
{{data?.name || data?.title}}
- - + + - - - {{"STARTS_ON"|translate}} {{startDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{startDate|date:'shortTime'}} - {{"STARTED_ON"|translate}} {{startDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{startDate|date:'shortTime'}} - {{"COMPLETED_ON"|translate}} {{endDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{endDate|date:'shortTime'}} - - - {{buttonConfig?.label | translate}} - - +
+ {{"STARTS_ON"|translate}} {{startDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{startDate|date:'shortTime'}} + {{"STARTED_ON"|translate}} {{startDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{startDate|date:'shortTime'}} + {{"COMPLETED_ON"|translate}} {{endDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{endDate|date:'shortTime'}} +
+ + + + + {{buttonConfig?.label | translate}} + \ No newline at end of file diff --git a/src/app/shared/components/session-card/session-card.component.scss b/src/app/shared/components/session-card/session-card.component.scss index b31a9abd..a93565b4 100644 --- a/src/app/shared/components/session-card/session-card.component.scss +++ b/src/app/shared/components/session-card/session-card.component.scss @@ -23,9 +23,6 @@ margin-top: 0px; font-size: 16px; } - p { - margin: 6px 0px 0px 0px; - } } .text-align { overflow: hidden; @@ -52,4 +49,7 @@ ion-icon{ } .header{ margin-top: 10px; +} +.join-platform{ + padding-left: 8px; } \ No newline at end of file From cafc51ff5f2f3c890601b628bdc99be412f052af Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Thu, 18 May 2023 18:38:35 +0530 Subject: [PATCH 10/36] add link toast --- src/app/core/services/toast.service.ts | 6 ++-- .../session-detail/session-detail.page.ts | 35 ++++++++++++++++++- src/global.scss | 9 +++++ 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/src/app/core/services/toast.service.ts b/src/app/core/services/toast.service.ts index 53d33885..cd5743e1 100644 --- a/src/app/core/services/toast.service.ts +++ b/src/app/core/services/toast.service.ts @@ -11,7 +11,7 @@ export class ToastService { private translate : TranslateService ) { } - async showToast(msg, color) { + async showToast(msg, color , duration= 5000,toastButton = []) { let texts; this.translate.get([msg]).subscribe(resp =>{ texts = resp; @@ -19,8 +19,10 @@ export class ToastService { let toast = await this.toastCtrl.create({ message: texts[msg], color:color, - duration: 5000, + duration: duration, position: 'top', + buttons: toastButton, + cssClass: 'custom-toast' }); toast.present(); } diff --git a/src/app/pages/session-detail/session-detail.page.ts b/src/app/pages/session-detail/session-detail.page.ts index 0c951f37..45b453cc 100644 --- a/src/app/pages/session-detail/session-detail.page.ts +++ b/src/app/pages/session-detail/session-detail.page.ts @@ -6,6 +6,8 @@ import { CommonRoutes } from 'src/global.routes'; import * as moment from 'moment'; import { localKeys } from 'src/app/core/constants/localStorage.keys'; import { Location } from '@angular/common'; +import { ToastController } from '@ionic/angular'; +import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'app-session-detail', @@ -21,10 +23,11 @@ export class SessionDetailPage implements OnInit { startDate: any; endDate: any; sessionDatas: any; + snackbarRef: any; constructor(private localStorage: LocalStorageService, private router: Router, private activatedRoute: ActivatedRoute, private sessionService: SessionService, - private utilService: UtilService, private toast: ToastService, private _location: Location, private user: UserService) { + private utilService: UtilService, private toast: ToastService, private _location: Location, private user: UserService ,private toaster: ToastController,private translate : TranslateService) { this.id = this.activatedRoute.snapshot.paramMap.get('id') } ngOnInit() {} @@ -130,8 +133,23 @@ export class SessionDetailPage implements OnInit { this.detailData.data.meetingInfo = response.meetingInfo.platform; this.startDate = (response.startDate>0)?moment.unix(response.startDate).toLocaleString():this.startDate; this.endDate = (response.endDate>0)?moment.unix(response.endDate).toLocaleString():this.endDate; + console.log("response :", response) + } + if((response.meetingInfo.platform == 'OFF') && this.isCreator && response.status=='published'){ + this.showToasts('Meeting platform is not added, please add platform', 0 , [ + { + text: 'Add meeting link', + role: 'cancel', + handler: () => { + this.router.navigate([CommonRoutes.CREATE_SESSION], { queryParams: { id: this.id , type: 'segment'} }); + } + } + ]) } } + ionViewWillLeave(){ + this.snackbarRef = this.toaster.dismiss(); + } setPageHeader(response) { let currentTimeInSeconds=Math.floor(Date.now()/1000); @@ -243,4 +261,19 @@ export class SessionDetailPage implements OnInit { } }).catch(error => { }) } + showToasts(message: any,duration : any, toastButton : any){ + let texts; + this.translate.get([message]).subscribe(resp =>{ + texts = resp; + }); + this.snackbarRef = this.toaster.create({ + message: texts[message], + // color: "danger", + buttons: toastButton, + cssClass: 'custom-toast' + }).then((toastData) => { + + toastData.present(); + }); + } } diff --git a/src/global.scss b/src/global.scss index bab22be1..c25a794c 100644 --- a/src/global.scss +++ b/src/global.scss @@ -285,4 +285,13 @@ ion-accordion-group{ .example-modal .wrapper { margin-bottom: 10px; +} +ion-toast.custom-toast::part(button) { + border-radius: 5px; + background-color: #39a464; + font-size: 15px; + text-transform: none; +} +ion-toast.custom-toast{ + --background: var(--ion-color-primary); } \ No newline at end of file From 5cff8018b4fbb6af10bea85a91babedb36cbeb37 Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Thu, 18 May 2023 18:39:09 +0530 Subject: [PATCH 11/36] toast padding --- src/app/pages/session-detail/session-detail.page.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/pages/session-detail/session-detail.page.scss b/src/app/pages/session-detail/session-detail.page.scss index 0ff4786f..eb36b376 100644 --- a/src/app/pages/session-detail/session-detail.page.scss +++ b/src/app/pages/session-detail/session-detail.page.scss @@ -1,5 +1,6 @@ .main-wrapper{ - margin : 10px 15px 0px 15px + margin : 10px 15px 0px 15px; + padding-bottom: 40px; } .load-more-button{ height: 50px; From b291eb9744b310bb17e182c8bffb2eb1c8b321af Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Thu, 18 May 2023 18:41:07 +0530 Subject: [PATCH 12/36] prefill data and platform OFF --- .../create-session/create-session.page.html | 3 +- .../create-session/create-session.page.ts | 31 +++++-------------- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/src/app/pages/create-session/create-session.page.html b/src/app/pages/create-session/create-session.page.html index ab253dff..a0dd6501 100644 --- a/src/app/pages/create-session/create-session.page.html +++ b/src/app/pages/create-session/create-session.page.html @@ -18,7 +18,6 @@ - {{"SELECT_MEETING_PLATFORM" | translate}} @@ -49,7 +48,7 @@ {{'PUBLISH_AND_ADD_LINK' | translate}}
+ {{'SET_IT_LATER' | translate}} {{'SUBMIT' | translate}} - {{'SET_IT_LATER' | translate}}
\ No newline at end of file diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index 9374d974..2d31a6da 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -35,7 +35,7 @@ export class CreateSessionPage implements OnInit { public headerConfig: any = { // menu: true, backButton: { - label: 'CREATE_SESSION', + label: '', }, notification: false, }; @@ -43,26 +43,11 @@ export class CreateSessionPage implements OnInit { type: 'session', haveValidationError: false } - platformConfig: any = [ - { - name: "Create session", - icon: "pencil-sharp", - form: { - controls : [] - } - }, - { - name: "Meeting platform", - icon: "add-circle-outline", - form: { - controls: [] - } - } - ] + public formData: JsonFormData; showForm: boolean = false; isSubmited: boolean; - type: any = "default"; + type: any ; selectedLink: any; selectedHint: any; meetingPlatforms:any ; @@ -88,6 +73,9 @@ export class CreateSessionPage implements OnInit { ) { this.activatedRoute.queryParamMap.subscribe(params => { this.id = params?.get('id'); + this.headerConfig.label = this.id ? "EDIT_SESSION":"CREATE_NEW_SESSION"; + this.type = params?.get('type'); + this.type ? this.type = 'segment': this.type = 'default'; this.path = this.platform.is("ios") ? this.file.documentsDirectory : this.file.externalDataDirectory; }); } @@ -110,9 +98,6 @@ export class CreateSessionPage implements OnInit { this.isSubmited = false; //to be removed this.profileImageData.isUploaded = true; this.changeDetRef.detectChanges(); - if(this.id){ - this.type = 'default'; - } } async getPlatformFormDetails() { @@ -230,8 +215,8 @@ export class CreateSessionPage implements OnInit { let password = this?.meetingPlatforms[j]?.form?.controls.find( (password:any) => password?.name == 'password') if(existingData.meetingInfo.link){ obj.value = existingData?.meetingInfo?.link; - meetingId.value = existingData?.meetingInfo?.meta?.meetingId; - password.value = existingData?.meetingInfo?.meta?.password; + meetingId = existingData?.meetingInfo?.meta?.meetingId; + password = existingData?.meetingInfo?.meta?.password; } } } From cac95c554f5e12dc3dc6fb8ce60898df51d8ae9c Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Fri, 19 May 2023 13:50:06 +0530 Subject: [PATCH 13/36] add meetingLink on sessionCard --- .../pages/session-detail/session-detail.page.ts | 1 - .../session-card/session-card.component.html | 17 +++++++++++++---- .../session-card/session-card.component.scss | 11 +++++++++++ .../session-card/session-card.component.ts | 4 ++++ 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/app/pages/session-detail/session-detail.page.ts b/src/app/pages/session-detail/session-detail.page.ts index 45b453cc..6fc3f28c 100644 --- a/src/app/pages/session-detail/session-detail.page.ts +++ b/src/app/pages/session-detail/session-detail.page.ts @@ -133,7 +133,6 @@ export class SessionDetailPage implements OnInit { this.detailData.data.meetingInfo = response.meetingInfo.platform; this.startDate = (response.startDate>0)?moment.unix(response.startDate).toLocaleString():this.startDate; this.endDate = (response.endDate>0)?moment.unix(response.endDate).toLocaleString():this.endDate; - console.log("response :", response) } if((response.meetingInfo.platform == 'OFF') && this.isCreator && response.status=='published'){ this.showToasts('Meeting platform is not added, please add platform', 0 , [ diff --git a/src/app/shared/components/session-card/session-card.component.html b/src/app/shared/components/session-card/session-card.component.html index 903fcdc0..accea4e9 100644 --- a/src/app/shared/components/session-card/session-card.component.html +++ b/src/app/shared/components/session-card/session-card.component.html @@ -28,15 +28,24 @@
{{data?.name || data?.title}}
{{"COMPLETED_ON"|translate}} {{endDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{endDate|date:'shortTime'}} - + + + +
+

+ {{ "MEETING_PLATFORM" | translate }} : + Add meeting link +

+
+
{{buttonConfig?.label | translate}} diff --git a/src/app/shared/components/session-card/session-card.component.scss b/src/app/shared/components/session-card/session-card.component.scss index a93565b4..05950e61 100644 --- a/src/app/shared/components/session-card/session-card.component.scss +++ b/src/app/shared/components/session-card/session-card.component.scss @@ -52,4 +52,15 @@ ion-icon{ } .join-platform{ padding-left: 8px; +} +.add-meeting-link{ + width: 75%; + text-decoration: underline; + font-weight: 600; + color: var(--ion-color-primary); + z-index: 1000; + +} +.meetingPlatform{ + padding-left: 10px; } \ No newline at end of file diff --git a/src/app/shared/components/session-card/session-card.component.ts b/src/app/shared/components/session-card/session-card.component.ts index 280b3211..79a9fbd6 100644 --- a/src/app/shared/components/session-card/session-card.component.ts +++ b/src/app/shared/components/session-card/session-card.component.ts @@ -65,4 +65,8 @@ export class SessionCardComponent implements OnInit { } this.userData.about?this.onClickEvent.emit(value):this.router.navigate([`/${CommonRoutes.EDIT_PROFILE}`]); } + clickOnAddMeetingLink(cardData:any){ + let id = cardData._id; + this.router.navigate([CommonRoutes.CREATE_SESSION], { queryParams: { id: id , type: 'segment'} }); + } } From 5e0a6bae33c283d0c5c4d7181911f98762260103 Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Mon, 22 May 2023 12:07:23 +0530 Subject: [PATCH 14/36] value key added --- src/app/pages/create-session/create-session.page.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index 2d31a6da..e108e269 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -265,6 +265,7 @@ export class CreateSessionPage implements OnInit { 'meetingInfo':{ 'platform': this.selectedLink.name, 'link': this.platformForm.myForm.value?.link, + 'value': this.selectedLink.value, "meta": { "password": this.platformForm.myForm.value?.password, "meetingId":this.platformForm.myForm.value?.meetingId From fad9e7b801e436d3c8c16106243ff0ba8124eaf8 Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Mon, 22 May 2023 13:33:34 +0530 Subject: [PATCH 15/36] platform console error. --- .../components/session-card/session-card.component.html | 6 +++--- .../components/session-card/session-card.component.scss | 2 +- .../components/session-card/session-card.component.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/shared/components/session-card/session-card.component.html b/src/app/shared/components/session-card/session-card.component.html index accea4e9..4c036458 100644 --- a/src/app/shared/components/session-card/session-card.component.html +++ b/src/app/shared/components/session-card/session-card.component.html @@ -28,16 +28,16 @@
{{data?.name || data?.title}}
{{"COMPLETED_ON"|translate}} {{endDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{endDate|date:'shortTime'}} - +

{{ "MEETING_PLATFORM" | translate }} : - {{ meetingPlatform.platform }} + {{ meetingPlatform?.platform }}

- +

diff --git a/src/app/shared/components/session-card/session-card.component.scss b/src/app/shared/components/session-card/session-card.component.scss index 05950e61..68debb08 100644 --- a/src/app/shared/components/session-card/session-card.component.scss +++ b/src/app/shared/components/session-card/session-card.component.scss @@ -61,6 +61,6 @@ ion-icon{ z-index: 1000; } -.meetingPlatform{ +.meeting-platform{ padding-left: 10px; } \ No newline at end of file diff --git a/src/app/shared/components/session-card/session-card.component.ts b/src/app/shared/components/session-card/session-card.component.ts index 79a9fbd6..b5e4be6d 100644 --- a/src/app/shared/components/session-card/session-card.component.ts +++ b/src/app/shared/components/session-card/session-card.component.ts @@ -27,11 +27,11 @@ export class SessionCardComponent implements OnInit { constructor(private router: Router, private sessionService: SessionService, private toast: ToastService, private localStorage: LocalStorageService) { } async ngOnInit() { + this.meetingPlatform = (this.data?.meetingInfo); this.isCreator = await this.checkIfCreator(); this.setButtonConfig(this.isCreator); this.startDate = (this.data.startDate>0)?moment.unix(this.data.startDate).toLocaleString():this.startDate; this.endDate = (this.data.endDate>0)?moment.unix(this.data.endDate).toLocaleString():this.endDate; - this.meetingPlatform = (this.data.meetingInfo); } setButtonConfig(isCreator: boolean) { From b5294d1d85f424608ea17a2b962e2e677e59c72c Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Mon, 22 May 2023 15:27:42 +0530 Subject: [PATCH 16/36] create session prefillData --- src/app/pages/create-session/create-session.page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index e108e269..234e72dd 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -162,8 +162,8 @@ export class CreateSessionPage implements OnInit { this.form1.myForm.markAsPristine(); let result = await this.sessionService.createSession(form, this.id); this.sessionDetails = result; - this.type = 'segment'; if (result._id) { + this.type = 'segment'; this.id = result._id; result.startDate = moment.unix(result.startDate).format("YYYY-MM-DDTHH:mm"); result.endDate = moment.unix(result.endDate).format("YYYY-MM-DDTHH:mm"); From f8bd750f26f3cafe8edbd25e23941a17bfe2955b Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Tue, 23 May 2023 15:45:20 +0530 Subject: [PATCH 17/36] BUG: 733 is done & session-card breaking issue. --- .../components/session-card/session-card.component.html | 2 +- .../components/session-card/session-card.component.scss | 4 ++++ src/assets/i18n/en.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/shared/components/session-card/session-card.component.html b/src/app/shared/components/session-card/session-card.component.html index 4c036458..622e9581 100644 --- a/src/app/shared/components/session-card/session-card.component.html +++ b/src/app/shared/components/session-card/session-card.component.html @@ -30,7 +30,7 @@

{{data?.name || data?.title}}
-
+

{{ "MEETING_PLATFORM" | translate }} : {{ meetingPlatform?.platform }} diff --git a/src/app/shared/components/session-card/session-card.component.scss b/src/app/shared/components/session-card/session-card.component.scss index 68debb08..0ed680a2 100644 --- a/src/app/shared/components/session-card/session-card.component.scss +++ b/src/app/shared/components/session-card/session-card.component.scss @@ -61,6 +61,10 @@ ion-icon{ z-index: 1000; } +.join-platform-container{ + width: 350px; +} .meeting-platform{ padding-left: 10px; + width: max-content; } \ No newline at end of file diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index cad4d441..b20c482d 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -100,7 +100,7 @@ "SAVE":"Save", "TERMS_OF_USE": "Terms of use", "SOMETHING_WENT_WRONG":"Something went wrong", - "CREATE_NEW_SESSION": "Create a new Session", + "CREATE_NEW_SESSION": "Create a new session", "DELETE": "Delete", "START_SESSIONS": "Start session", "START": "Start", From b8d97bbb026e3ec844845284cec0f3a4786ae9b2 Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Tue, 23 May 2023 16:36:59 +0530 Subject: [PATCH 18/36] BUG: 734,735 is fixed --- src/app/pages/create-session/create-session.page.ts | 2 ++ src/assets/i18n/en.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index 234e72dd..74986d37 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -165,6 +165,8 @@ export class CreateSessionPage implements OnInit { if (result._id) { this.type = 'segment'; this.id = result._id; + this.firstStepperTitle = (this.id) ? "EDIT_SESSION":"CREATE_NEW_SESSION"; + this.headerConfig.label = this.id ? "EDIT_SESSION":"CREATE_NEW_SESSION"; result.startDate = moment.unix(result.startDate).format("YYYY-MM-DDTHH:mm"); result.endDate = moment.unix(result.endDate).format("YYYY-MM-DDTHH:mm"); this.preFillData(result); diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index b20c482d..1d1fbdc8 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -173,7 +173,7 @@ "SELECT_MEETING_PLATFORM": "Add meeting link", "MEETING_PLATFORM": "Meeting platform", "MEETING_LINK": "Meeting link", - "EDIT_SESSION": "Edit session", + "EDIT_SESSION": "Edit session details", "PUBLISH_AND_ADD_LINK": "Publish and Add link", "MEETING_ID": "Meeting id", "PASSWORD": "Password" From 6fe6eb997df59bf039ad6fea326f3bad9155e1f1 Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Tue, 23 May 2023 20:09:18 +0530 Subject: [PATCH 19/36] PR comments resolved. --- src/app/core/services/session/session.service.ts | 1 - src/app/pages/create-session/create-session.page.ts | 4 ++-- src/app/pages/home-search/home-search.page.ts | 2 +- src/app/pages/tabs/home/home.page.ts | 2 +- src/assets/i18n/en.json | 3 ++- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/core/services/session/session.service.ts b/src/app/core/services/session/session.service.ts index 3caba642..8e87908a 100644 --- a/src/app/core/services/session/session.service.ts +++ b/src/app/core/services/session/session.service.ts @@ -164,7 +164,6 @@ async getSessionsList(obj) { let data = await this.httpService.get(config); this.loaderService.stopLoader(); if (data.responseCode == "OK") { - // this.openBrowser(data.result.link); let modal = await this.modalCtrl.create({ component: JoinDialogBoxComponent, componentProps: { data: data.result, sessionData : sessionData}, diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index 74986d37..a9b85257 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -75,12 +75,12 @@ export class CreateSessionPage implements OnInit { this.id = params?.get('id'); this.headerConfig.label = this.id ? "EDIT_SESSION":"CREATE_NEW_SESSION"; this.type = params?.get('type'); - this.type ? this.type = 'segment': this.type = 'default'; + this.type = this.type ? 'segment' : 'default'; this.path = this.platform.is("ios") ? this.file.documentsDirectory : this.file.externalDataDirectory; }); } async ngOnInit() { - this.firstStepperTitle = (this.id) ? "EDIT_SESSION":"CREATE_NEW_SESSION"; + this.firstStepperTitle = (this.id) ? "EDIT_SESSION_LABEL":"CREATE_NEW_SESSION"; const result = await this.form.getForm(CREATE_SESSION_FORM); this.formData = _.get(result, 'result.data.fields'); this.getPlatformFormDetails(); diff --git a/src/app/pages/home-search/home-search.page.ts b/src/app/pages/home-search/home-search.page.ts index 48a66d22..f33b4bf0 100644 --- a/src/app/pages/home-search/home-search.page.ts +++ b/src/app/pages/home-search/home-search.page.ts @@ -86,7 +86,7 @@ export class HomeSearchPage implements OnInit { break; case 'joinAction': - (event.data.sessionId)?await this.sessionService.joinSession(event.data):await this.sessionService.joinSession(event.data); + this.sessionService.joinSession(event.data) this.search(); break; diff --git a/src/app/pages/tabs/home/home.page.ts b/src/app/pages/tabs/home/home.page.ts index 3fd3ecc6..9265ee34 100644 --- a/src/app/pages/tabs/home/home.page.ts +++ b/src/app/pages/tabs/home/home.page.ts @@ -78,7 +78,7 @@ export class HomePage implements OnInit { break; case 'joinAction': - (event.data.sessionId)?await this.sessionService.joinSession(event.data):await this.sessionService.joinSession(event.data); + this.sessionService.joinSession(event.data) this.getSessions(); break; diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 1d1fbdc8..3c5123ae 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -176,5 +176,6 @@ "EDIT_SESSION": "Edit session details", "PUBLISH_AND_ADD_LINK": "Publish and Add link", "MEETING_ID": "Meeting id", - "PASSWORD": "Password" + "PASSWORD": "Password", + "EDIT_SESSION_LABEL": "Edit session" } From 3a9ef0d6cf811081c531bdfda418ad441367c5a0 Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Mon, 29 May 2023 00:07:22 +0530 Subject: [PATCH 20/36] BUG fixes. --- .../pages/create-session/create-session.page.html | 8 +++++--- .../pages/create-session/create-session.page.scss | 10 ++++++++++ .../pages/create-session/create-session.page.ts | 1 + .../pages/session-detail/session-detail.page.ts | 4 ++-- .../dynamic-form/dynamic-form.component.html | 1 + .../dynamic-form/dynamic-form.component.ts | 1 + .../join-dialog-box/join-dialog-box.component.html | 4 ---- .../join-dialog-box/join-dialog-box.component.ts | 1 + .../session-card/session-card.component.html | 13 ++++++------- .../session-card/session-card.component.scss | 14 ++++++++------ 10 files changed, 35 insertions(+), 22 deletions(-) diff --git a/src/app/pages/create-session/create-session.page.html b/src/app/pages/create-session/create-session.page.html index a0dd6501..4d15fd99 100644 --- a/src/app/pages/create-session/create-session.page.html +++ b/src/app/pages/create-session/create-session.page.html @@ -1,10 +1,12 @@

- + +
1
{{ firstStepperTitle | translate}}
- + +
2
{{"MEETING_LINK" | translate}}
@@ -48,7 +50,7 @@ {{'PUBLISH_AND_ADD_LINK' | translate}}
- {{'SET_IT_LATER' | translate}} + {{'SET_IT_LATER' | translate}} {{'SUBMIT' | translate}}
\ No newline at end of file diff --git a/src/app/pages/create-session/create-session.page.scss b/src/app/pages/create-session/create-session.page.scss index 6163098c..8eed97ed 100644 --- a/src/app/pages/create-session/create-session.page.scss +++ b/src/app/pages/create-session/create-session.page.scss @@ -25,4 +25,14 @@ ion-label{ } .btns{ width: 100%; +} +.icon-2{ + background: var(--ion-color-primary); + height: 25px; + width: 25px; + border-radius: 50px; + color: var(--white); + display: flex; + align-items: center; + justify-content: center; } \ No newline at end of file diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index a9b85257..ac322934 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -162,6 +162,7 @@ export class CreateSessionPage implements OnInit { this.form1.myForm.markAsPristine(); let result = await this.sessionService.createSession(form, this.id); this.sessionDetails = result; + this.type = 'segment'; if (result._id) { this.type = 'segment'; this.id = result._id; diff --git a/src/app/pages/session-detail/session-detail.page.ts b/src/app/pages/session-detail/session-detail.page.ts index 6fc3f28c..14013de8 100644 --- a/src/app/pages/session-detail/session-detail.page.ts +++ b/src/app/pages/session-detail/session-detail.page.ts @@ -135,7 +135,7 @@ export class SessionDetailPage implements OnInit { this.endDate = (response.endDate>0)?moment.unix(response.endDate).toLocaleString():this.endDate; } if((response.meetingInfo.platform == 'OFF') && this.isCreator && response.status=='published'){ - this.showToasts('Meeting platform is not added, please add platform', 0 , [ + this.showToasts('Meeting link is not added, please add a link.', 0 , [ { text: 'Add meeting link', role: 'cancel', @@ -158,7 +158,7 @@ export class SessionDetailPage implements OnInit { if(this.userDetails){ this.isCreator = this.userDetails._id == response.userId ? true : false; } - this.headerConfig.edit = (this.isCreator && response.status=="published")?true:null; + this.headerConfig.edit = (this.isCreator && response.status=="published"&& !this.isEnabled)?true:null; this.headerConfig.delete = (this.isCreator && response.status=="published" && !this.isEnabled)?true:null; } diff --git a/src/app/shared/components/dynamic-form/dynamic-form.component.html b/src/app/shared/components/dynamic-form/dynamic-form.component.html index 48baa4e3..d88123d1 100644 --- a/src/app/shared/components/dynamic-form/dynamic-form.component.html +++ b/src/app/shared/components/dynamic-form/dynamic-form.component.html @@ -42,6 +42,7 @@ [value]="control.value" [maxlength]="control?.validators?.maxLength" (ionChange)="removeSpace($event)" + [placeholder]="control.placeHolder" >
- - {{ "CLOSE" | translate - }} - {{ "JOIN" | translate }} diff --git a/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts b/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts index a2a11893..3b16848f 100644 --- a/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts +++ b/src/app/shared/components/join-dialog-box/join-dialog-box.component.ts @@ -36,6 +36,7 @@ export class JoinDialogBoxComponent implements OnInit { return this.modalCtrl.dismiss(null, 'cancel'); } onButtonClick(){ + this.modalCtrl.dismiss(); this.openBrowser(this.data.link); } diff --git a/src/app/shared/components/session-card/session-card.component.html b/src/app/shared/components/session-card/session-card.component.html index 622e9581..1260bee6 100644 --- a/src/app/shared/components/session-card/session-card.component.html +++ b/src/app/shared/components/session-card/session-card.component.html @@ -23,15 +23,15 @@
{{data?.name || data?.title}}
- {{"STARTS_ON"|translate}} {{startDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{startDate|date:'shortTime'}} - {{"STARTED_ON"|translate}} {{startDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{startDate|date:'shortTime'}} - {{"COMPLETED_ON"|translate}} {{endDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{endDate|date:'shortTime'}} + {{"STARTS_ON"|translate}} {{startDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{startDate|date:'shortTime'}} + {{"STARTED_ON"|translate}} {{startDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{startDate|date:'shortTime'}} + {{"COMPLETED_ON"|translate}} {{endDate|date:'dd/MM/yyyy'}} {{"AT"|translate}} {{endDate|date:'shortTime'}}
- +
-

+

{{ "MEETING_PLATFORM" | translate }} : {{ meetingPlatform?.platform }}

@@ -40,8 +40,7 @@
{{data?.name || data?.title}}
-

- {{ "MEETING_PLATFORM" | translate }} : +

Add meeting link

diff --git a/src/app/shared/components/session-card/session-card.component.scss b/src/app/shared/components/session-card/session-card.component.scss index 0ed680a2..21408a68 100644 --- a/src/app/shared/components/session-card/session-card.component.scss +++ b/src/app/shared/components/session-card/session-card.component.scss @@ -42,16 +42,18 @@ ion-icon{ font-size: 20px; color: black; } -.date-label{ - margin-left: 8px; - font-size: 12px; - color: rgb(41, 41, 41); -} +// .date-label{ +// margin-left: 8px; +// font-size: 12px; +// color: rgb(41, 41, 41); +// } .header{ margin-top: 10px; } -.join-platform{ +.platform-date-label{ padding-left: 8px; + font-size: 12px; + color: rgb(41, 41, 41); } .add-meeting-link{ width: 75%; From cb8e207f7b5ccae139994998e1dd58ea9dc99bee Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Mon, 29 May 2023 10:01:57 +0530 Subject: [PATCH 21/36] BUG: fixes commented lines --- .../components/session-card/session-card.component.scss | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/app/shared/components/session-card/session-card.component.scss b/src/app/shared/components/session-card/session-card.component.scss index 21408a68..1df22329 100644 --- a/src/app/shared/components/session-card/session-card.component.scss +++ b/src/app/shared/components/session-card/session-card.component.scss @@ -42,11 +42,6 @@ ion-icon{ font-size: 20px; color: black; } -// .date-label{ -// margin-left: 8px; -// font-size: 12px; -// color: rgb(41, 41, 41); -// } .header{ margin-top: 10px; } From 0d027c5a1a2132305ba7a5782494519efe5457e5 Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Mon, 29 May 2023 13:41:48 +0530 Subject: [PATCH 22/36] placeHolder for platform --- src/app/core/constants/formConstant.ts | 8 ++++---- .../components/dynamic-form/dynamic-form.component.html | 2 +- .../components/dynamic-form/dynamic-form.component.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/core/constants/formConstant.ts b/src/app/core/constants/formConstant.ts index 356fd3f7..45434b69 100644 --- a/src/app/core/constants/formConstant.ts +++ b/src/app/core/constants/formConstant.ts @@ -36,8 +36,8 @@ export const HELP_VIDEOS: IFORM = { } export const PLATFORMS: IFORM = { - type: "platform", - subType: "platformForm", - action: "platformFields", - templateName: "defaultTemplate", + "type": "platformApp", + "subType": "platformAppForm", + "action": "platformAppFields", + "templateName": "defaultTemplate" } \ No newline at end of file diff --git a/src/app/shared/components/dynamic-form/dynamic-form.component.html b/src/app/shared/components/dynamic-form/dynamic-form.component.html index d88123d1..31b8f11a 100644 --- a/src/app/shared/components/dynamic-form/dynamic-form.component.html +++ b/src/app/shared/components/dynamic-form/dynamic-form.component.html @@ -42,7 +42,7 @@ [value]="control.value" [maxlength]="control?.validators?.maxLength" (ionChange)="removeSpace($event)" - [placeholder]="control.placeHolder" + [placeholder]="control.platformPlaceHolder" > Date: Tue, 30 May 2023 23:48:01 +0530 Subject: [PATCH 23/36] story 922 done --- src/app/core/constants/urlConstants.ts | 1 + src/app/core/services/auth/auth.service.ts | 9 +++++++++ src/app/pages/auth/login/login.page.html | 8 ++++++++ src/app/pages/auth/login/login.page.ts | 8 +++++++- src/assets/i18n/en.json | 3 ++- 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/app/core/constants/urlConstants.ts b/src/app/core/constants/urlConstants.ts index 54f803d9..85320b7b 100644 --- a/src/app/core/constants/urlConstants.ts +++ b/src/app/core/constants/urlConstants.ts @@ -19,6 +19,7 @@ export const urlConstants = { UPCOMING_SESSIONS:"/mentoring/v1/mentors/upcomingSessions/", SHARE_MENTOR_PROFILE:"/mentoring/v1/mentors/share/", REPORT_ISSUE:"/mentoring/v1/issues/create", + GET_MAIL_INFO:"/mentoring/v1/platform/config", // FORMS FORM_READ:'/mentoring/v1/form/read', diff --git a/src/app/core/services/auth/auth.service.ts b/src/app/core/services/auth/auth.service.ts index f9cf6a48..d64e7e4e 100644 --- a/src/app/core/services/auth/auth.service.ts +++ b/src/app/core/services/auth/auth.service.ts @@ -119,4 +119,13 @@ export class AuthService { } } + async getMailInfo(){ + const config = { + url: urlConstants.API_URLS.GET_MAIL_INFO + }; + let data: any = await this.httpService.post(config); + let result = _.get(data, 'result'); + return result; + } + } \ No newline at end of file diff --git a/src/app/pages/auth/login/login.page.html b/src/app/pages/auth/login/login.page.html index 731d37eb..90d0f515 100644 --- a/src/app/pages/auth/login/login.page.html +++ b/src/app/pages/auth/login/login.page.html @@ -24,6 +24,14 @@
+
+ +

{{"TERMS_AND_CONDITION"|translate}} {{"PRIVACY_POLICY"|translate}} & {{"TERMS_OF_SERVICE"|translate}}

diff --git a/src/app/pages/auth/login/login.page.ts b/src/app/pages/auth/login/login.page.ts index 4a1581ca..61a0c36d 100644 --- a/src/app/pages/auth/login/login.page.ts +++ b/src/app/pages/auth/login/login.page.ts @@ -55,6 +55,7 @@ export class LoginPage implements OnInit { }; labels = ["LOGIN_TO_MENTOR_ED"]; mentorId: any; + supportInfo: any; constructor(private authService: AuthService, private router: Router, private menuCtrl: MenuController, private activatedRoute: ActivatedRoute, private translateService: TranslateService, private localStorage: LocalStorageService) { @@ -63,6 +64,7 @@ export class LoginPage implements OnInit { ngOnInit() { this.translateText(); + this.getMailInfo(); } async translateText() { @@ -116,5 +118,9 @@ export class LoginPage implements OnInit { goToSignup() { this.router.navigate([`/${CommonRoutes.AUTH}/${CommonRoutes.PERSONA_SELECTION}`]); } - + getMailInfo(){ + this.authService.getMailInfo().then((result:any) =>{ + this.supportInfo = result + }) +} } diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 3c5123ae..2e5ec061 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -177,5 +177,6 @@ "PUBLISH_AND_ADD_LINK": "Publish and Add link", "MEETING_ID": "Meeting id", "PASSWORD": "Password", - "EDIT_SESSION_LABEL": "Edit session" + "EDIT_SESSION_LABEL": "Edit session", + "HAVING_TROUBLE_LOGIN": "Having trouble in logging in? Write to us." } From cdbb9c0b568914236dc35895910b57e1efbdc42f Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Wed, 31 May 2023 13:03:18 +0530 Subject: [PATCH 24/36] bug fixes --- src/app/pages/create-session/create-session.page.html | 2 +- src/app/pages/create-session/create-session.page.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/pages/create-session/create-session.page.html b/src/app/pages/create-session/create-session.page.html index 4d15fd99..bc826595 100644 --- a/src/app/pages/create-session/create-session.page.html +++ b/src/app/pages/create-session/create-session.page.html @@ -50,7 +50,7 @@ {{'PUBLISH_AND_ADD_LINK' | translate}}
- {{'SET_IT_LATER' | translate}} + {{'SET_IT_LATER' | translate}} {{'SUBMIT' | translate}}
\ No newline at end of file diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index ac322934..c04179d8 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -148,7 +148,6 @@ export class CreateSessionPage implements OnInit { async onSubmit() { if(!this.isSubmited){ this.form1.onSubmit(); - this.isSubmited = true; } if (this.form1.myForm.valid) { if (this.profileImageData.image && !this.profileImageData.isUploaded) { @@ -162,8 +161,8 @@ export class CreateSessionPage implements OnInit { this.form1.myForm.markAsPristine(); let result = await this.sessionService.createSession(form, this.id); this.sessionDetails = result; - this.type = 'segment'; if (result._id) { + this.isSubmited = true; this.type = 'segment'; this.id = result._id; this.firstStepperTitle = (this.id) ? "EDIT_SESSION":"CREATE_NEW_SESSION"; @@ -172,6 +171,8 @@ export class CreateSessionPage implements OnInit { result.endDate = moment.unix(result.endDate).format("YYYY-MM-DDTHH:mm"); this.preFillData(result); } else { + this.isSubmited = true; + this.type = 'segment'; this.profileImageData.image = this.lastUploadedImage; this.profileImageData.isUploaded = false; } From 146e01a062218950d9301d966efff9b3f9f3c77c Mon Sep 17 00:00:00 2001 From: Ashwini Kumar Date: Thu, 1 Jun 2023 14:30:27 +0530 Subject: [PATCH 25/36] Help form and button validation. --- src/app/core/constants/formConstant.ts | 7 +++++++ src/app/pages/help/help.page.html | 4 ++-- src/app/pages/help/help.page.ts | 25 +++++++++++-------------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/app/core/constants/formConstant.ts b/src/app/core/constants/formConstant.ts index 45434b69..efef3e6e 100644 --- a/src/app/core/constants/formConstant.ts +++ b/src/app/core/constants/formConstant.ts @@ -40,4 +40,11 @@ export const PLATFORMS: IFORM = { "subType": "platformAppForm", "action": "platformAppFields", "templateName": "defaultTemplate" +} + +export const HELP: IFORM = { + "type": "help", + "subType": "helpForm", + "action": "helpFields", + "templateName":"defaultTemplate" } \ No newline at end of file diff --git a/src/app/pages/help/help.page.html b/src/app/pages/help/help.page.html index 9de44a95..037c2d16 100644 --- a/src/app/pages/help/help.page.html +++ b/src/app/pages/help/help.page.html @@ -3,9 +3,9 @@ {{"REPORT_AN_ISSUE" | translate}}
{{"TELL_US_THE_PROBLEM" | translate}} - +
- {{"SUBMIT" | translate}} + {{"SUBMIT" | translate}} \ No newline at end of file diff --git a/src/app/pages/help/help.page.ts b/src/app/pages/help/help.page.ts index e2bebd54..ad7cd853 100644 --- a/src/app/pages/help/help.page.ts +++ b/src/app/pages/help/help.page.ts @@ -5,6 +5,9 @@ import { HttpService, LoaderService, ToastService } from 'src/app/core/services' import { DynamicFormComponent, JsonFormData } from 'src/app/shared/components/dynamic-form/dynamic-form.component'; import { CommonRoutes } from 'src/global.routes'; import { Device } from '@awesome-cordova-plugins/device/ngx'; +import { FormService } from 'src/app/core/services/form/form.service'; +import { HELP } from 'src/app/core/constants/formConstant'; +import * as _ from 'lodash'; @Component({ selector: 'app-help', @@ -17,28 +20,18 @@ export class HelpPage implements OnInit { backButton: true, label: "HELP" }; - formData: JsonFormData = { - controls: [ - { - "name": "description", - "label": "Tell us here", - "value": "", - "class": "ion-margin", - "type": "text", - "position": "floating", - "validators": {} - }, - ] - }; + public formData: JsonFormData; metaData: { deviceName: string; androidVersion: string; }; - constructor(private router: Router, private loaderService: LoaderService, private toast: ToastService, private httpService: HttpService, private device: Device) { } + constructor(private router: Router, private loaderService: LoaderService, private toast: ToastService, private httpService: HttpService, private device: Device, + private form: FormService,) { } ngOnInit() { this.metaData = { deviceName: this.device.model, androidVersion: this.device.version } + this.helpForm(); } onSubmit() { @@ -61,4 +54,8 @@ export class HelpPage implements OnInit { this.loaderService.stopLoader(); } } + async helpForm(){ + const result = await this.form.getForm(HELP); + this.formData = _.get(result, 'result.data.fields'); + } } \ No newline at end of file From 82081c8c5f7cac321e85d9d32e46b946147db22b Mon Sep 17 00:00:00 2001 From: Rahul K R Date: Tue, 6 Jun 2023 14:15:37 +0530 Subject: [PATCH 26/36] session creation page bug fixed --- .../core/services/session/session.service.ts | 1 + .../create-session/create-session.page.html | 2 +- .../create-session/create-session.page.ts | 53 +++++++++---------- 3 files changed, 27 insertions(+), 29 deletions(-) diff --git a/src/app/core/services/session/session.service.ts b/src/app/core/services/session/session.service.ts index 8e87908a..e0478355 100644 --- a/src/app/core/services/session/session.service.ts +++ b/src/app/core/services/session/session.service.ts @@ -31,6 +31,7 @@ export class SessionService { } catch (error) { this.loaderService.stopLoader(); + return false } } diff --git a/src/app/pages/create-session/create-session.page.html b/src/app/pages/create-session/create-session.page.html index bc826595..5e1096a9 100644 --- a/src/app/pages/create-session/create-session.page.html +++ b/src/app/pages/create-session/create-session.page.html @@ -49,7 +49,7 @@
{{'PUBLISH_AND_ADD_LINK' | translate}}
-
+
{{'SET_IT_LATER' | translate}} {{'SUBMIT' | translate}}
diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index c04179d8..5a7dedc4 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -71,37 +71,37 @@ export class CreateSessionPage implements OnInit { private changeDetRef: ChangeDetectorRef, private router: Router ) { - this.activatedRoute.queryParamMap.subscribe(params => { - this.id = params?.get('id'); - this.headerConfig.label = this.id ? "EDIT_SESSION":"CREATE_NEW_SESSION"; - this.type = params?.get('type'); - this.type = this.type ? 'segment' : 'default'; - this.path = this.platform.is("ios") ? this.file.documentsDirectory : this.file.externalDataDirectory; - }); + this.path = this.platform.is("ios") ? this.file.documentsDirectory : this.file.externalDataDirectory; } async ngOnInit() { - this.firstStepperTitle = (this.id) ? "EDIT_SESSION_LABEL":"CREATE_NEW_SESSION"; const result = await this.form.getForm(CREATE_SESSION_FORM); this.formData = _.get(result, 'result.data.fields'); + this.changeDetRef.detectChanges(); + this.activatedRoute.queryParamMap.subscribe(async (params) => { + this.id = params?.get('id'); + this.headerConfig.label = this.id ? "EDIT_SESSION":"CREATE_NEW_SESSION"; + this.type = params?.get('type')? params?.get('type'): 'default'; + this.firstStepperTitle = (this.id) ? "EDIT_SESSION_LABEL":"CREATE_NEW_SESSION"; + if (this.id) { + let response = await this.sessionService.getSessionDetailsAPI(this.id); + this.sessionDetails= response; + this.profileImageData.image = response.image; + this.profileImageData.isUploaded = true; + response.startDate = moment.unix(response.startDate).format("YYYY-MM-DDTHH:mm"); + response.endDate = moment.unix(response.endDate).format("YYYY-MM-DDTHH:mm"); + this.preFillData(response); + } else { + this.showForm = true; + } + }); this.getPlatformFormDetails(); - if (this.id) { - let response = await this.sessionService.getSessionDetailsAPI(this.id); - this.sessionDetails= response; - this.profileImageData.image = response.image; - this.profileImageData.isUploaded = true; - response.startDate = moment.unix(response.startDate).format("YYYY-MM-DDTHH:mm"); - response.endDate = moment.unix(response.endDate).format("YYYY-MM-DDTHH:mm"); - this.preFillData(response); - } else { - this.showForm = true; - } this.isSubmited = false; //to be removed this.profileImageData.isUploaded = true; this.changeDetRef.detectChanges(); } async getPlatformFormDetails() { - let form = await this.form.getForm(PLATFORMS) + let form = await this.form.getForm(PLATFORMS); this.meetingPlatforms = form.result.data.fields.forms; this.selectedLink = this.meetingPlatforms[0]; this.selectedHint = this.meetingPlatforms[0].hint; @@ -160,19 +160,16 @@ export class CreateSessionPage implements OnInit { form.timeZone = timezone; this.form1.myForm.markAsPristine(); let result = await this.sessionService.createSession(form, this.id); - this.sessionDetails = result; - if (result._id) { + this.id = this.id ? this.id : result._id; + if (result) { + this.sessionDetails = _.isEmpty(result) ? this.sessionDetails : result; this.isSubmited = true; - this.type = 'segment'; - this.id = result._id; - this.firstStepperTitle = (this.id) ? "EDIT_SESSION":"CREATE_NEW_SESSION"; + this.firstStepperTitle = (this.id) ? "EDIT_SESSION_LABEL":"CREATE_NEW_SESSION"; this.headerConfig.label = this.id ? "EDIT_SESSION":"CREATE_NEW_SESSION"; result.startDate = moment.unix(result.startDate).format("YYYY-MM-DDTHH:mm"); result.endDate = moment.unix(result.endDate).format("YYYY-MM-DDTHH:mm"); - this.preFillData(result); + this.router.navigate([CommonRoutes.CREATE_SESSION], { queryParams: { id: this.id , type: 'segment'} }); } else { - this.isSubmited = true; - this.type = 'segment'; this.profileImageData.image = this.lastUploadedImage; this.profileImageData.isUploaded = false; } From 2f0df437cf6289095a328e6eefeba8a8e7c8586b Mon Sep 17 00:00:00 2001 From: Rahul K R Date: Tue, 6 Jun 2023 16:09:56 +0530 Subject: [PATCH 27/36] BUG: 750 fixed. --- src/assets/i18n/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 2e5ec061..c824d2b1 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -178,5 +178,5 @@ "MEETING_ID": "Meeting id", "PASSWORD": "Password", "EDIT_SESSION_LABEL": "Edit session", - "HAVING_TROUBLE_LOGIN": "Having trouble in logging in? Write to us." + "HAVING_TROUBLE_LOGIN": "Having trouble in logging in/signing up? Write to us." } From 436227ba4df6dd8063f929751eacf813577e2414 Mon Sep 17 00:00:00 2001 From: Rahul K R Date: Tue, 6 Jun 2023 18:13:30 +0530 Subject: [PATCH 28/36] bbb date in dialog box bug 751 --- .../join-dialog-box.component.html | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/app/shared/components/join-dialog-box/join-dialog-box.component.html b/src/app/shared/components/join-dialog-box/join-dialog-box.component.html index 54875d35..c0d8d9d3 100644 --- a/src/app/shared/components/join-dialog-box/join-dialog-box.component.html +++ b/src/app/shared/components/join-dialog-box/join-dialog-box.component.html @@ -8,15 +8,7 @@
- {{ "STARTS_ON" | translate - }} {{ startDate | date : "dd/MM/yyyy" }} - {{ "AT" | translate }} {{ startDate | date : "shortTime" }} - {{ "STARTED_ON" | translate }} - {{ startDate | date : "dd/MM/yyyy" }} - {{ "AT" | translate }} {{ startDate | date : "shortTime" }} - {{ "COMPLETED_ON" | - translate }} {{ endDate | date : "dd/MM/yyyy" }} - {{ "AT" | translate }} {{ endDate | date : "shortTime" }} + {{startDate | date: 'EEEE, MMMM d'}} . {{startDate | date:'hh:mm'}} - {{startDate | date:'shortTime'}} @@ -30,7 +22,7 @@

- + @@ -44,7 +36,7 @@
- + @@ -62,8 +54,7 @@
- {{ "JOIN" | - translate }} + {{'JOIN' | translate}} From 75cf7272b29794b0318559ce3cf7ef106b701d5f Mon Sep 17 00:00:00 2001 From: Rahul K R Date: Tue, 6 Jun 2023 23:44:35 +0530 Subject: [PATCH 29/36] PR comments meeting link --- src/app/pages/session-detail/session-detail.page.ts | 2 +- src/assets/i18n/en.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/pages/session-detail/session-detail.page.ts b/src/app/pages/session-detail/session-detail.page.ts index 14013de8..890bb245 100644 --- a/src/app/pages/session-detail/session-detail.page.ts +++ b/src/app/pages/session-detail/session-detail.page.ts @@ -135,7 +135,7 @@ export class SessionDetailPage implements OnInit { this.endDate = (response.endDate>0)?moment.unix(response.endDate).toLocaleString():this.endDate; } if((response.meetingInfo.platform == 'OFF') && this.isCreator && response.status=='published'){ - this.showToasts('Meeting link is not added, please add a link.', 0 , [ + this.showToasts('ADD_MEETING_LINK', 0 , [ { text: 'Add meeting link', role: 'cancel', diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index c824d2b1..edd13499 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -178,5 +178,6 @@ "MEETING_ID": "Meeting id", "PASSWORD": "Password", "EDIT_SESSION_LABEL": "Edit session", - "HAVING_TROUBLE_LOGIN": "Having trouble in logging in/signing up? Write to us." + "HAVING_TROUBLE_LOGIN": "Having trouble in logging in/signing up? Write to us.", + "ADD_MEETING_LINK": "Meeting link is not added, please add a link." } From 848ee1dd7c30350b7bf6616ab154bcfba96939df Mon Sep 17 00:00:00 2001 From: Rahul K R Date: Wed, 7 Jun 2023 11:30:05 +0530 Subject: [PATCH 30/36] versiob bug, session back button --- .../pages/create-session/create-session.page.ts | 2 +- src/app/pages/help/help.page.ts | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/app/pages/create-session/create-session.page.ts b/src/app/pages/create-session/create-session.page.ts index 5a7dedc4..3b208b71 100644 --- a/src/app/pages/create-session/create-session.page.ts +++ b/src/app/pages/create-session/create-session.page.ts @@ -168,7 +168,7 @@ export class CreateSessionPage implements OnInit { this.headerConfig.label = this.id ? "EDIT_SESSION":"CREATE_NEW_SESSION"; result.startDate = moment.unix(result.startDate).format("YYYY-MM-DDTHH:mm"); result.endDate = moment.unix(result.endDate).format("YYYY-MM-DDTHH:mm"); - this.router.navigate([CommonRoutes.CREATE_SESSION], { queryParams: { id: this.id , type: 'segment'} }); + this.router.navigate([CommonRoutes.CREATE_SESSION], { queryParams: { id: this.id , type: 'segment'}, replaceUrl: true }); } else { this.profileImageData.image = this.lastUploadedImage; this.profileImageData.isUploaded = false; diff --git a/src/app/pages/help/help.page.ts b/src/app/pages/help/help.page.ts index ad7cd853..df59e157 100644 --- a/src/app/pages/help/help.page.ts +++ b/src/app/pages/help/help.page.ts @@ -8,6 +8,7 @@ import { Device } from '@awesome-cordova-plugins/device/ngx'; import { FormService } from 'src/app/core/services/form/form.service'; import { HELP } from 'src/app/core/constants/formConstant'; import * as _ from 'lodash'; +import { App } from '@capacitor/app'; @Component({ selector: 'app-help', @@ -21,17 +22,21 @@ export class HelpPage implements OnInit { label: "HELP" }; public formData: JsonFormData; - metaData: { deviceName: string; androidVersion: string; }; + metaData: { deviceName: string; androidVersion: string; version: string}; constructor(private router: Router, private loaderService: LoaderService, private toast: ToastService, private httpService: HttpService, private device: Device, private form: FormService,) { } ngOnInit() { - this.metaData = { - deviceName: this.device.model, - androidVersion: this.device.version - } - this.helpForm(); + App.getInfo().then((data)=>{ + this.metaData = { + deviceName: this.device.model, + androidVersion: this.device.version, + version: data.version + } + this.helpForm(); + }) + } onSubmit() { From 7154220e865814746995986b90a06ccb262eb3ca Mon Sep 17 00:00:00 2001 From: Rahul K R Date: Wed, 7 Jun 2023 14:16:42 +0530 Subject: [PATCH 31/36] vertionName added --- android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index ed789500..72ad69b1 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -20,7 +20,7 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode code - versionName "2.1.0" + versionName "2.4.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. From 216ec0738d064e2751bec7456100106f2132a75d Mon Sep 17 00:00:00 2001 From: Rahul K R Date: Wed, 7 Jun 2023 15:46:34 +0530 Subject: [PATCH 32/36] BUG:754 fix --- src/app/pages/tabs/home/home.page.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/pages/tabs/home/home.page.ts b/src/app/pages/tabs/home/home.page.ts index 9265ee34..72a72d1f 100644 --- a/src/app/pages/tabs/home/home.page.ts +++ b/src/app/pages/tabs/home/home.page.ts @@ -12,6 +12,8 @@ import { urlConstants } from 'src/app/core/constants/urlConstants'; import { SessionService } from 'src/app/core/services/session/session.service'; import { Location } from '@angular/common'; import { TermsAndConditionsPage } from '../../terms-and-conditions/terms-and-conditions.page'; +import { App, AppState } from '@capacitor/app'; + @Component({ selector: 'app-home', @@ -54,6 +56,11 @@ export class HomePage implements OnInit { private toast:ToastService) { } ngOnInit() { + App.addListener('appStateChange', (state: AppState) => { + if (state.isActive == true) { + this.getSessions(); + } + }); this.getUser(); this.userService.userEventEmitted$.subscribe(data => { if (data) { From e7cdb082fe87128b9c1db2f627b16a73b23eeaf5 Mon Sep 17 00:00:00 2001 From: Rahul K R Date: Mon, 12 Jun 2023 11:22:08 +0530 Subject: [PATCH 33/36] BUG:752 and deeplink fixes --- .../pages/session-detail/session-detail.page.html | 7 ++++--- .../pages/session-detail/session-detail.page.scss | 9 ++++++++- .../pages/session-detail/session-detail.page.ts | 9 ++++++++- src/app/pages/tabs/home/home.page.ts | 6 +++++- .../join-dialog-box/join-dialog-box.component.html | 14 ++++++++------ .../join-dialog-box/join-dialog-box.component.scss | 9 +++++++++ .../session-card/session-card.component.html | 2 +- .../session-card/session-card.component.ts | 9 +++++++-- src/global.scss | 2 +- 9 files changed, 51 insertions(+), 16 deletions(-) diff --git a/src/app/pages/session-detail/session-detail.page.html b/src/app/pages/session-detail/session-detail.page.html index f764ffc8..fdceb881 100644 --- a/src/app/pages/session-detail/session-detail.page.html +++ b/src/app/pages/session-detail/session-detail.page.html @@ -21,10 +21,11 @@
{{detailData?.data?.title}}
-
- + {{"START_SESSIONS" | translate}} -
+ +
{{"ENROLL" | translate}} diff --git a/src/app/pages/session-detail/session-detail.page.scss b/src/app/pages/session-detail/session-detail.page.scss index eb36b376..26f542ba 100644 --- a/src/app/pages/session-detail/session-detail.page.scss +++ b/src/app/pages/session-detail/session-detail.page.scss @@ -4,6 +4,8 @@ } .load-more-button{ height: 50px; + width: 100%; + font-size: 15px !important; } .session-btn{ margin: 10px,; @@ -41,4 +43,9 @@ img{ width: 93%; border-radius: 10px; height: 220px; -} \ No newline at end of file +} +ion-item { + --padding-end: 0px; + --inner-padding-end: 0px; + --padding-start: 0px; + } \ No newline at end of file diff --git a/src/app/pages/session-detail/session-detail.page.ts b/src/app/pages/session-detail/session-detail.page.ts index 890bb245..d0800fef 100644 --- a/src/app/pages/session-detail/session-detail.page.ts +++ b/src/app/pages/session-detail/session-detail.page.ts @@ -8,6 +8,7 @@ import { localKeys } from 'src/app/core/constants/localStorage.keys'; import { Location } from '@angular/common'; import { ToastController } from '@ionic/angular'; import { TranslateService } from '@ngx-translate/core'; +import { App, AppState } from '@capacitor/app'; @Component({ selector: 'app-session-detail', @@ -30,7 +31,13 @@ export class SessionDetailPage implements OnInit { private utilService: UtilService, private toast: ToastService, private _location: Location, private user: UserService ,private toaster: ToastController,private translate : TranslateService) { this.id = this.activatedRoute.snapshot.paramMap.get('id') } - ngOnInit() {} + ngOnInit() { + App.addListener('appStateChange', (state: AppState) => { + if (state.isActive == true) { + this.fetchSessionDetails(); + } + }); + } async ionViewWillEnter() { await this.user.getUserValue(); diff --git a/src/app/pages/tabs/home/home.page.ts b/src/app/pages/tabs/home/home.page.ts index 72a72d1f..b5109968 100644 --- a/src/app/pages/tabs/home/home.page.ts +++ b/src/app/pages/tabs/home/home.page.ts @@ -59,6 +59,10 @@ export class HomePage implements OnInit { App.addListener('appStateChange', (state: AppState) => { if (state.isActive == true) { this.getSessions(); + var obj = { page: this.page, limit: this.limit, searchText: "" }; + this.sessionService.getAllSessionsAPI(obj).then((data)=>{ + this.createdSessions = data; + }) } }); this.getUser(); @@ -85,7 +89,7 @@ export class HomePage implements OnInit { break; case 'joinAction': - this.sessionService.joinSession(event.data) + await this.sessionService.joinSession(event.data) this.getSessions(); break; diff --git a/src/app/shared/components/join-dialog-box/join-dialog-box.component.html b/src/app/shared/components/join-dialog-box/join-dialog-box.component.html index c0d8d9d3..b191b4d5 100644 --- a/src/app/shared/components/join-dialog-box/join-dialog-box.component.html +++ b/src/app/shared/components/join-dialog-box/join-dialog-box.component.html @@ -1,13 +1,15 @@
-
- {{ sessionData?.name || sessionData?.title }} -
+
+
+ {{ sessionData?.name || sessionData?.title }} +
+
- + {{startDate | date: 'EEEE, MMMM d'}} . {{startDate | date:'hh:mm'}} - {{startDate | date:'shortTime'}} @@ -15,8 +17,8 @@
- -

+ +

{{ "MEETING_PLATFORM" | translate }} : {{ meetingPlatform.platform }}

diff --git a/src/app/shared/components/join-dialog-box/join-dialog-box.component.scss b/src/app/shared/components/join-dialog-box/join-dialog-box.component.scss index 31d0f45f..aa7823ed 100644 --- a/src/app/shared/components/join-dialog-box/join-dialog-box.component.scss +++ b/src/app/shared/components/join-dialog-box/join-dialog-box.component.scss @@ -1,6 +1,15 @@ .join-header{ text-align: center; + max-width: 300px; + padding-left: 11%; } .join-platform{ font-size: 12px; + overflow: hidden; + text-overflow: ellipsis; +} +.platform-ellipsis{ + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; } \ No newline at end of file diff --git a/src/app/shared/components/session-card/session-card.component.html b/src/app/shared/components/session-card/session-card.component.html index 1260bee6..0019fa7d 100644 --- a/src/app/shared/components/session-card/session-card.component.html +++ b/src/app/shared/components/session-card/session-card.component.html @@ -47,7 +47,7 @@
{{data?.name || data?.title}}
- {{buttonConfig?.label | translate}} + {{buttonConfig?.label | translate}} \ No newline at end of file diff --git a/src/app/shared/components/session-card/session-card.component.ts b/src/app/shared/components/session-card/session-card.component.ts index b5e4be6d..83f87eea 100644 --- a/src/app/shared/components/session-card/session-card.component.ts +++ b/src/app/shared/components/session-card/session-card.component.ts @@ -6,6 +6,7 @@ import { LocalStorageService, ToastService } from 'src/app/core/services'; import { SessionService } from 'src/app/core/services/session/session.service'; import { CommonRoutes } from 'src/global.routes'; import { IonModal } from '@ionic/angular'; +import { App, AppState } from '@capacitor/app'; @Component({ selector: 'app-session-card', @@ -27,6 +28,11 @@ export class SessionCardComponent implements OnInit { constructor(private router: Router, private sessionService: SessionService, private toast: ToastService, private localStorage: LocalStorageService) { } async ngOnInit() { + App.addListener('appStateChange', (state: AppState) => { + if (state.isActive == true) { + this.setButtonConfig(this.isCreator); + } + }); this.meetingPlatform = (this.data?.meetingInfo); this.isCreator = await this.checkIfCreator(); this.setButtonConfig(this.isCreator); @@ -38,11 +44,10 @@ export class SessionCardComponent implements OnInit { let currentTimeInSeconds=Math.floor(Date.now()/1000); if(isCreator){ this.buttonConfig={label:"START",type:"startAction"}; - this.buttonConfig.isEnabled = ((this.data.startDate-currentTimeInSeconds)<600 || this.data.status=='live')?true:false; } else { this.buttonConfig=(!isCreator&&this.data.isEnrolled || !isCreator&&this.data.sessionId)?{label:"JOIN",type:"joinAction"}:{label:"ENROLL",type:"enrollAction"}; - this.buttonConfig.isEnabled = ((this.data.startDate-currentTimeInSeconds)<300 || this.data.status=='live')?true:false; } + this.buttonConfig.isEnabled = ((this.data.startDate - currentTimeInSeconds) < 600 && !(this.data?.meetingInfo?.platform == 'OFF')) ? true : false } async checkIfCreator() { diff --git a/src/global.scss b/src/global.scss index c25a794c..c09d1727 100644 --- a/src/global.scss +++ b/src/global.scss @@ -277,7 +277,7 @@ ion-accordion-group{ .example-modal { --width: fit-content; - --min-width: 300px; + --min-width: 95%; --height: fit-content; --border-radius: 6px; --box-shadow: 0 28px 48px rgba(0, 0, 0, 0.4); From 97a66f71ac3157e5b1ab71ded3b1097fba0c6015 Mon Sep 17 00:00:00 2001 From: Rahul K R Date: Fri, 16 Jun 2023 11:18:58 +0530 Subject: [PATCH 34/36] prod bug fix --- src/app/core/services/http/http.service.ts | 8 ++++++-- src/app/pages/auth/register/register.page.html | 4 ++-- src/app/pages/feedback/feedback.page.ts | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/app/core/services/http/http.service.ts b/src/app/core/services/http/http.service.ts index 80ad378c..b59ff810 100644 --- a/src/app/core/services/http/http.service.ts +++ b/src/app/core/services/http/http.service.ts @@ -20,6 +20,7 @@ import { FeedbackPage } from 'src/app/pages/feedback/feedback.page'; }) export class HttpService { baseUrl; + isFeedbackTriggered = false; constructor( private http: HTTP, private userService: UserService, @@ -75,7 +76,8 @@ export class HttpService { return this.http.get(this.baseUrl + requestParam.url, '', headers) .then((data: any) => { let result: any = JSON.parse(data.data); - if(result?.meta?.data?.length){ + if(result?.meta?.data?.length && !this.isFeedbackTriggered){ + this.isFeedbackTriggered = true; this.openModal(result?.meta?.data[0]); } if (result.responseCode === "OK") { @@ -179,6 +181,8 @@ export class HttpService { data: sessionData, } }); - return await modal.present(); + await modal.present(); + const isModelClosed = await modal.onWillDismiss(); + this.isFeedbackTriggered = isModelClosed.data; } } diff --git a/src/app/pages/auth/register/register.page.html b/src/app/pages/auth/register/register.page.html index ea9f9a58..2ac8cd4a 100644 --- a/src/app/pages/auth/register/register.page.html +++ b/src/app/pages/auth/register/register.page.html @@ -4,7 +4,6 @@
-
@@ -20,4 +19,5 @@

{{"LOGIN"|translate}}

-
\ No newline at end of file +
+ \ No newline at end of file diff --git a/src/app/pages/feedback/feedback.page.ts b/src/app/pages/feedback/feedback.page.ts index 35fe398d..914aaf59 100644 --- a/src/app/pages/feedback/feedback.page.ts +++ b/src/app/pages/feedback/feedback.page.ts @@ -64,11 +64,11 @@ export class FeedbackPage implements OnInit { if (result) { this.toast.showToast(result?.message, "success"); } - await this.modalController.dismiss(); + await this.modalController.dismiss(false); } async closeModal() { await this.sessionService.submitFeedback({ skippedFeedback: true, feedbackAs: this.feedbackData.feedbackAs }, this.sessionData._id); - await this.modalController.dismiss(); + await this.modalController.dismiss(false); } } From b79b780bd1e7d92660501e73f9b7dcfe83e1a0cf Mon Sep 17 00:00:00 2001 From: Rahul K R Date: Tue, 20 Jun 2023 12:36:09 +0530 Subject: [PATCH 35/36] delete flow --- src/app/pages/help/help.page.html | 22 +++++++-- src/app/pages/help/help.page.ts | 76 +++++++++++++++++++++++++++---- src/assets/i18n/en.json | 6 ++- src/global.scss | 4 ++ 4 files changed, 94 insertions(+), 14 deletions(-) diff --git a/src/app/pages/help/help.page.html b/src/app/pages/help/help.page.html index 037c2d16..a1773a3c 100644 --- a/src/app/pages/help/help.page.html +++ b/src/app/pages/help/help.page.html @@ -1,11 +1,23 @@ - {{"REPORT_AN_ISSUE" | translate}}
- {{"TELL_US_THE_PROBLEM" | translate}} - + + + + + + {{ option?.name }} + + + +
+
+ +
+
+
- - {{"SUBMIT" | translate}} + + {{option?.buttonText | translate}} \ No newline at end of file diff --git a/src/app/pages/help/help.page.ts b/src/app/pages/help/help.page.ts index df59e157..e9f0121b 100644 --- a/src/app/pages/help/help.page.ts +++ b/src/app/pages/help/help.page.ts @@ -9,6 +9,9 @@ import { FormService } from 'src/app/core/services/form/form.service'; import { HELP } from 'src/app/core/constants/formConstant'; import * as _ from 'lodash'; import { App } from '@capacitor/app'; +import { TranslateService } from '@ngx-translate/core'; +import { AlertController } from '@ionic/angular'; +import { ProfileService } from 'src/app/core/services/profile/profile.service'; @Component({ selector: 'app-help', @@ -22,27 +25,36 @@ export class HelpPage implements OnInit { label: "HELP" }; public formData: JsonFormData; - metaData: { deviceName: string; androidVersion: string; version: string}; + metaData: { deviceName: string; androidVersion: string; version: string; type: string}; + selectedOption: any; + helpForms: any; + userDetails: any; + message: any; constructor(private router: Router, private loaderService: LoaderService, private toast: ToastService, private httpService: HttpService, private device: Device, - private form: FormService,) { } + private form: FormService, private translate: TranslateService,private alert: AlertController,private profileService: ProfileService,) { } - ngOnInit() { + async ngOnInit() { + this.helpForm(); + await this.profileService.profileDetails().then((userDetails) => { + this.userDetails = userDetails; + }); App.getInfo().then((data)=>{ this.metaData = { deviceName: this.device.model, androidVersion: this.device.version, - version: data.version + version: data.version, + type: '' } - this.helpForm(); }) } - onSubmit() { + onSubmit(option: any) { + this.metaData.type = option.value; this.form1.myForm.value.metaData = this.metaData; - this.submitHelpReport() - this.router.navigate([`/${CommonRoutes.TABS}/${CommonRoutes.HOME}`]) + this.form1.myForm.value.description = this.form1.myForm.value.description ? this.form1.myForm.value.description: option.value; + (option.buttonText == "DELETE_ACCOUNT") ? this.deteteAccount(): this.submitHelpReport(); } async submitHelpReport() { await this.loaderService.startLoader(); @@ -58,9 +70,57 @@ export class HelpPage implements OnInit { catch (error) { this.loaderService.stopLoader(); } + this.router.navigate([`/${CommonRoutes.TABS}/${CommonRoutes.HOME}`]) + } + async deteteAccount(){ + let texts: any; + this.translate.get(['DELETE_ALERT_MSG', 'YES', 'NO']).subscribe(text => { + texts = text; + }) + const alert = await this.alert.create({ + message: texts['DELETE_ALERT_MSG'], + buttons: [ + { + text: texts['YES'], + cssClass: "alert-button", + handler: () => { } + }, + { + text: texts['NO'], + cssClass: "alert-button-no", + role: 'no', + handler: () => { } + } + ] + }); + await alert.present(); + let data = await alert.onDidDismiss(); + if(data.role == 'no'){ + await this.loaderService.startLoader(); + const config = { + url: urlConstants.API_URLS.REPORT_ISSUE, + payload: this.form1.myForm.value + }; + try { + let result = await this.httpService.post(config); + result?this.toast.showToast(result.message, "success"):this.toast.showToast(result.message, "danger"); + this.loaderService.stopLoader(); + } + catch (error) { + this.loaderService.stopLoader(); + } + this.router.navigate([`/${CommonRoutes.TABS}/${CommonRoutes.HOME}`]) + } } async helpForm(){ const result = await this.form.getForm(HELP); this.formData = _.get(result, 'result.data.fields'); + this.helpForms = _.get(result, 'result.data.fields.forms'); + this.selectedOption = this.helpForms[0]; + this.message = (this.userDetails?.isAMentor) ? this.selectedOption?.menterMessage : this.selectedOption?.menteeMessage; + } + clickOptions(event:any){ + this.selectedOption = event.detail.value; + this.message = (this.userDetails.isAMentor) ? this.selectedOption?.menterMessage : this.selectedOption?.menteeMessage; } } \ No newline at end of file diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index edd13499..a976bd0d 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -179,5 +179,9 @@ "PASSWORD": "Password", "EDIT_SESSION_LABEL": "Edit session", "HAVING_TROUBLE_LOGIN": "Having trouble in logging in/signing up? Write to us.", - "ADD_MEETING_LINK": "Meeting link is not added, please add a link." + "ADD_MEETING_LINK": "Meeting link is not added, please add a link.", + "DELETE_ACCOUNT": "Delete account", + "DELETE_ALERT_MSG": "Deleting your account will remove all your data from the app forever. You will have to create a new account if you decide to come back. Do you want to continue?", + "YES": "Yes", + "NO": "No" } diff --git a/src/global.scss b/src/global.scss index c09d1727..82a608e0 100644 --- a/src/global.scss +++ b/src/global.scss @@ -294,4 +294,8 @@ ion-toast.custom-toast::part(button) { } ion-toast.custom-toast{ --background: var(--ion-color-primary); +} +.alert-button-no { + background: var(--white) !important; + color: var(--ion-color-primary) !important; } \ No newline at end of file From 8ee4719109d4a5f1e8ec5e1cabe0b2f5bb690620 Mon Sep 17 00:00:00 2001 From: Rahul K R Date: Thu, 22 Jun 2023 11:47:02 +0530 Subject: [PATCH 36/36] comments resolved --- src/app/pages/help/help.page.html | 6 +++--- src/app/pages/help/help.page.ts | 15 +-------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/app/pages/help/help.page.html b/src/app/pages/help/help.page.html index a1773a3c..c5f28637 100644 --- a/src/app/pages/help/help.page.html +++ b/src/app/pages/help/help.page.html @@ -10,9 +10,9 @@ -
-
- +
+
+
diff --git a/src/app/pages/help/help.page.ts b/src/app/pages/help/help.page.ts index e9f0121b..47948f8a 100644 --- a/src/app/pages/help/help.page.ts +++ b/src/app/pages/help/help.page.ts @@ -96,20 +96,7 @@ export class HelpPage implements OnInit { await alert.present(); let data = await alert.onDidDismiss(); if(data.role == 'no'){ - await this.loaderService.startLoader(); - const config = { - url: urlConstants.API_URLS.REPORT_ISSUE, - payload: this.form1.myForm.value - }; - try { - let result = await this.httpService.post(config); - result?this.toast.showToast(result.message, "success"):this.toast.showToast(result.message, "danger"); - this.loaderService.stopLoader(); - } - catch (error) { - this.loaderService.stopLoader(); - } - this.router.navigate([`/${CommonRoutes.TABS}/${CommonRoutes.HOME}`]) + this.submitHelpReport(); } } async helpForm(){