Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform UI #169

Open
wants to merge 37 commits into
base: release-2.3.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
667c2dc
Platform UI
May 8, 2023
4fbc1c7
Merge remote-tracking branch 'upstream/release-2.3.0' into release-2.3.0
May 8, 2023
1a0fe1e
create session BBB
May 10, 2023
d9e08a6
Platform UI
May 11, 2023
1081880
button config for see it later
May 12, 2023
4f442cc
join dialog zoom id added
May 12, 2023
bb0ee08
copy to clipboard
May 15, 2023
b335df7
copy toast message
May 15, 2023
832da1e
meeting-platform component deleted
May 18, 2023
757d991
session card platform
May 18, 2023
cafc51f
add link toast
May 18, 2023
5cff801
toast padding
May 18, 2023
b291eb9
prefill data and platform OFF
May 18, 2023
cac95c5
add meetingLink on sessionCard
May 19, 2023
5e0a6ba
value key added
May 22, 2023
fad9e7b
platform console error.
May 22, 2023
b5294d1
create session prefillData
May 22, 2023
f8bd750
BUG: 733 is done & session-card breaking issue.
May 23, 2023
b8d97bb
BUG: 734,735 is fixed
May 23, 2023
6fe6eb9
PR comments resolved.
May 23, 2023
3a9ef0d
BUG fixes.
May 28, 2023
cb8e207
BUG: fixes commented lines
May 29, 2023
0d027c5
placeHolder for platform
May 29, 2023
76f168d
story 922 done
May 30, 2023
cdbb9c0
bug fixes
May 31, 2023
146e01a
Help form and button validation.
Jun 1, 2023
82081c8
session creation page bug fixed
Jun 6, 2023
2f0df43
BUG: 750 fixed.
Jun 6, 2023
436227b
bbb date in dialog box bug 751
Jun 6, 2023
75cf727
PR comments meeting link
Jun 6, 2023
848ee1d
versiob bug, session back button
Jun 7, 2023
7154220
vertionName added
Jun 7, 2023
216ec07
BUG:754 fix
Jun 7, 2023
e7cdb08
BUG:752 and deeplink fixes
Jun 12, 2023
97a66f7
prod bug fix
Jun 16, 2023
b79b780
delete flow
Jun 20, 2023
8ee4719
comments resolved
Jun 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 4 additions & 0 deletions android/app/src/main/assets/capacitor.plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
1 change: 1 addition & 0 deletions ios/App/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@capacitor/app": "1.1.1",
"@capacitor/browser": "^1.0.7",
"@capacitor/cli": "^3.5.1",
"@capacitor/clipboard": "^1.0.8",
"@capacitor/core": "^3.5.1",
"@capacitor/filesystem": "^1.1.0",
"@capacitor/haptics": "1.1.4",
Expand Down
14 changes: 14 additions & 0 deletions src/app/core/constants/formConstant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,18 @@ export const HELP_VIDEOS: IFORM = {
"subType": "videos",
"action": "videoFields",
"templateName":"defaultTemplate",
}

export const PLATFORMS: IFORM = {
"type": "platformApp",
"subType": "platformAppForm",
"action": "platformAppFields",
"templateName": "defaultTemplate"
}

export const HELP: IFORM = {
"type": "help",
"subType": "helpForm",
"action": "helpFields",
"templateName":"defaultTemplate"
}
1 change: 1 addition & 0 deletions src/app/core/constants/urlConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
9 changes: 9 additions & 0 deletions src/app/core/services/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

}
8 changes: 6 additions & 2 deletions src/app/core/services/http/http.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -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;
}
}
15 changes: 12 additions & 3 deletions src/app/core/services/session/session.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -29,6 +31,7 @@ export class SessionService {
}
catch (error) {
this.loaderService.stopLoader();
return false
}
}

Expand Down Expand Up @@ -151,7 +154,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,
Expand All @@ -161,7 +165,12 @@ 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},
cssClass: 'example-modal'
});
modal.present()
}
}
catch (error) {
Expand Down
6 changes: 4 additions & 2 deletions src/app/core/services/toast.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ 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;
})
let toast = await this.toastCtrl.create({
message: texts[msg],
color:color,
duration: 5000,
duration: duration,
position: 'top',
buttons: toastButton,
cssClass: 'custom-toast'
});
toast.present();
}
Expand Down
8 changes: 8 additions & 0 deletions src/app/pages/auth/login/login.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
<ion-ripple-effect></ion-ripple-effect>
</div>
</section>
<section class="ion-text-center">
<div class="my-30" color="primary">
<a href="mailto:{{supportInfo?.reportIssue?.to}}?subject={{supportInfo?.reportIssue?.subject}}">
<ion-text>{{"HAVING_TROUBLE_LOGIN"|translate}}</ion-text>
</a>
<ion-ripple-effect></ion-ripple-effect>
</div>
</section>
<div class="t-and-c">
<p>{{"TERMS_AND_CONDITION"|translate}}
<a class='links' href='https://shikshalokam.org/mentoring/privacy-policy'>{{"PRIVACY_POLICY"|translate}}</a> & <a class='links' href='https://shikshalokam.org/mentoring/term-of-use'>{{"TERMS_OF_SERVICE"|translate}}</a></p>
Expand Down
8 changes: 7 additions & 1 deletion src/app/pages/auth/login/login.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -63,6 +64,7 @@ export class LoginPage implements OnInit {

ngOnInit() {
this.translateText();
this.getMailInfo();
}

async translateText() {
Expand Down Expand Up @@ -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
})
}
}
4 changes: 2 additions & 2 deletions src/app/pages/auth/register/register.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<section>
<app-dynamic-form [jsonFormData]="formData" #form1></app-dynamic-form>
</section>
</ion-content>
<div class="mx-10">
<section submitButton [ngClass]="{'btn-disabled': form1.myForm.invalid , 'btn-valid':form1.myForm.valid}">
<div class="d-flex flex-justify-center">
Expand All @@ -20,4 +19,5 @@
<p class="underline" (click)="onLogin()">{{"LOGIN"|translate}}</p>
</div>
</section>
</div>
</div>
</ion-content>
61 changes: 51 additions & 10 deletions src/app/pages/create-session/create-session.page.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,56 @@
<app-page-header [config]="headerConfig"></app-page-header>

<ion-content class="ion-padding">
<app-profile-image *ngIf="showForm" [profileImageData]='profileImageData' [uploadImage]="true" (imageUploadEvent)="imageUploadEvent($event)" (imageRemoveEvent)="imageRemoveEvent($event)"></app-profile-image>
<div *ngIf="formData && showForm">
<app-dynamic-form [jsonFormData]="formData" #form1> </app-dynamic-form>
<div class="height">
<ion-segment (ionChange)="segmentChanged($event)" [value]="type">
<ion-segment-button value="default" layout="icon-start">
<div class="icon-2">1</div>
<ion-label>{{ firstStepperTitle | translate}}</ion-label>
</ion-segment-button>
<ion-segment-button value="segment" [disabled]="!isSubmited" layout="icon-start">
<div class="icon-2">2</div>
<ion-label>{{"MEETING_LINK" | translate}}</ion-label>
</ion-segment-button>
</ion-segment>
<div class="height" [ngSwitch]="type">
<ion-list class="height" *ngSwitchCase="'default'">
<ion-content class="ion-padding">
<app-profile-image *ngIf="showForm" [profileImageData]='profileImageData' [uploadImage]="true" (imageUploadEvent)="imageUploadEvent($event)" (imageRemoveEvent)="imageRemoveEvent($event)"></app-profile-image>
<div *ngIf="formData && showForm">
<app-dynamic-form [jsonFormData]="formData" #form1 (formValid)="isValid($event)"> </app-dynamic-form>
</div>
</ion-content>
</ion-list>
<ion-list class="height" *ngSwitchCase="'segment'">
<ion-card>
<ion-card-header>
<ion-card-title class="ion-text-center card-title">{{"SELECT_MEETING_PLATFORM" | translate}}</ion-card-title>
</ion-card-header>
<ion-card-content>
<ion-list>
<ion-select #link class="select" [(ngModel)]="selectedLink" interface="popover" (ionChange)="clickOptions($event)" [compareWith]="compareWithFn" [value]="selectedLink">
<ion-select-option [value]="option" *ngFor="let option of meetingPlatforms">
{{ option.name }}
</ion-select-option>
</ion-select>
<ion-item lines="none">
<ion-icon class="hint-icon" name="alert-circle"></ion-icon>
<ion-label class="hint-label">{{selectedHint}}</ion-label>
</ion-item>
</ion-list>
<div *ngFor="let option of meetingPlatforms">
<app-dynamic-form *ngIf="selectedLink==option" [jsonFormData]=option.form #platformForm></app-dynamic-form>
</div>
</ion-card-content>
</ion-card>
</ion-list>
</div>
</ion-content>
<section
[ngClass]="{'btn-disabled': form1?.myForm.invalid , 'btn-valid':form1?.myForm.valid}"
>
</div>

<section [ngClass]="{'btn-disabled': form1?.myForm.invalid , 'btn-valid':form1?.myForm.valid}">
<div class="ion-no-border" submitButton>
<ion-button expand="full" (click)="onSubmit()">{{'PUBLISH' | translate}}</ion-button>
<ion-button *ngIf="type == 'default'" expand="full" (click)="onSubmit()">{{'PUBLISH_AND_ADD_LINK' | translate}}</ion-button>
</div>
<div class="ion-no-border segment" submitButton *ngIf="type == 'segment'">
<ion-button *ngIf="sessionDetails?.meetingInfo?.platform === 'OFF'" class="btns" size="default" fill="solid" (click)="setItLater()">{{'SET_IT_LATER' | translate}}</ion-button>
<ion-button [disabled]="platformForm && !platformForm.myForm.valid" class="btns" size="default" (click)="onSubmitLink()">{{'SUBMIT' | translate}}</ion-button>
</div>
</section>
38 changes: 38 additions & 0 deletions src/app/pages/create-session/create-session.page.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.segment{
display: flex;
justify-content: space-evenly;
}
.height{
height: 100%;
}
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%;
}
.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;
}
Loading