diff --git a/main.js b/main.js
index 6a8dc9361e..326e3b7640 100644
--- a/main.js
+++ b/main.js
@@ -53,6 +53,11 @@ var formRequestArray = [{
'type': 'user',
'subType': 'manageduser',
'action': 'create'
+ },
+ {
+ 'type': 'group',
+ 'subType': 'activities',
+ 'action': 'list'
}
];
diff --git a/package.json b/package.json
index d168e84765..9e035abd7b 100644
--- a/package.json
+++ b/package.json
@@ -48,7 +48,7 @@
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"@project-sunbird/client-services": "^3.1.3",
- "@project-sunbird/common-consumption": "^3.0.26",
+ "@project-sunbird/common-consumption": "^3.1.0",
"@project-sunbird/content-player": "3.1.0",
"@project-sunbird/sunbird-sdk": "~3.1.3",
"code-push": "^3.0.1",
@@ -97,7 +97,7 @@
"ionic4-rating": "^1.0.9",
"rxjs": "^6.5.3",
"sb-cordova-plugin-customtabs": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-customtabs.git",
- "sb-cordova-plugin-db": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-db.git",
+ "sb-cordova-plugin-db": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-db.git#release-3.1.0",
"sb-cordova-plugin-sync": "git+https://github.com/swayangjit/sb-cordova-plugin-sync.git",
"sb-cordova-plugin-utility": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-utility.git#release-3.0.0",
"tslib": "^1.10.0",
diff --git a/src/app/components/profile-avatar/profile-avatar.component.ts b/src/app/components/profile-avatar/profile-avatar.component.ts
index d71df5bbf2..62e0465bf8 100644
--- a/src/app/components/profile-avatar/profile-avatar.component.ts
+++ b/src/app/components/profile-avatar/profile-avatar.component.ts
@@ -1,26 +1,28 @@
import { Component, Input, OnInit, OnChanges } from '@angular/core';
-import GraphemeSplitter from 'grapheme-splitter';
+import { CommonUtilService } from '@app/services';
@Component({
selector: 'app-profile-avatar',
templateUrl: './profile-avatar.component.html',
styleUrls: ['./profile-avatar.component.scss'],
})
-export class ProfileAvatarComponent implements OnInit , OnChanges {
+export class ProfileAvatarComponent implements OnInit, OnChanges {
@Input() username: string;
@Input() isStateUser: boolean;
bgColor: string;
color: string;
initial: string;
- // GraphemeSplitter = require('grapheme-splitter');
- constructor() { }
+
+ constructor(
+ private commonUtilService: CommonUtilService,
+ ) { }
+
ngOnInit() {
this.extractInitial();
}
/**
* It will detect the changes of username and call the extractInitial() method
- * @param changes
*/
ngOnChanges(changes: any) {
this.username = changes.username.currentValue;
@@ -58,12 +60,10 @@ export class ProfileAvatarComponent implements OnInit , OnChanges {
}
/**
- * It will extract the first character of the user name and return with different BG color
- */
+ * It will extract the first character of the user name and return with different BG color
+ */
extractInitial() {
- const splitter = new GraphemeSplitter();
- const split: string[] = splitter.splitGraphemes(this.username.trim());
- this.initial = split[0];
+ this.initial = this.commonUtilService.extractInitial(this.username);
if (this.initial) {
this.getBgColor(this.username);
}
diff --git a/src/app/my-groups/activity-details/activity-details.page.html b/src/app/my-groups/activity-details/activity-details.page.html
index 7b11fbeeaf..20c8d25f84 100644
--- a/src/app/my-groups/activity-details/activity-details.page.html
+++ b/src/app/my-groups/activity-details/activity-details.page.html
@@ -3,18 +3,19 @@
-
+
-
+
+ [identifier]="member.identifier" [indexOfMember]="i"
+ [initial]="commonUtilService.extractInitial(member.title)" [title]="member.title" [isAdmin]="member.isAdmin">
-
+
\ No newline at end of file
diff --git a/src/app/my-groups/activity-details/activity-details.page.ts b/src/app/my-groups/activity-details/activity-details.page.ts
index 28747e95af..ba2b70ec2c 100644
--- a/src/app/my-groups/activity-details/activity-details.page.ts
+++ b/src/app/my-groups/activity-details/activity-details.page.ts
@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
+import { CommonUtilService } from '@app/services';
@Component({
selector: 'app-activity-details',
@@ -7,9 +8,13 @@ import { Router } from '@angular/router';
styleUrls: ['./activity-details.page.scss'],
})
export class ActivityDetailsPage implements OnInit {
+
+ timeStamp = '';
memberList: any;
+
constructor(
- private router: Router
+ private router: Router,
+ private commonUtilService: CommonUtilService,
) {
const extras = this.router.getCurrentNavigation().extras.state;
this.memberList = extras.memberList;
@@ -19,4 +24,8 @@ export class ActivityDetailsPage implements OnInit {
ngOnInit() {
}
+ onSearch(text) {
+ console.log('onsearch', text);
+ }
+
}
diff --git a/src/app/my-groups/group-details/group-details.page.html b/src/app/my-groups/group-details/group-details.page.html
index ceec0055d8..ad59730dd7 100644
--- a/src/app/my-groups/group-details/group-details.page.html
+++ b/src/app/my-groups/group-details/group-details.page.html
@@ -34,9 +34,10 @@
{{'ADD_MEMBER' | translate}}
-
-
-
+
diff --git a/src/app/my-groups/group-details/group-details.page.ts b/src/app/my-groups/group-details/group-details.page.ts
index 88a2eb65da..d95ce80509 100644
--- a/src/app/my-groups/group-details/group-details.page.ts
+++ b/src/app/my-groups/group-details/group-details.page.ts
@@ -179,7 +179,7 @@ export class GroupDetailsPage {
}
}
- async activityMenuClick() {
+ async activityMenuClick(event) {
// this.telemetryGeneratorService.generateInteractTelemetry(
// InteractType.TOUCH,
// InteractSubtype.SORT_OPTION_CLICKED,
@@ -405,7 +405,7 @@ export class GroupDetailsPage {
return split[0];
}
- navigateToActivityDetails() {
+ navigateToActivityDetails(event) {
const navigationExtras: NavigationExtras = {
state: {
groupId: this.groupId,
diff --git a/src/app/my-groups/my-groups.page.html b/src/app/my-groups/my-groups.page.html
index 240440da81..da405c7e1f 100644
--- a/src/app/my-groups/my-groups.page.html
+++ b/src/app/my-groups/my-groups.page.html
@@ -4,8 +4,8 @@
{{'MY_GROUPS' | translate}}
-
-
+
+

@@ -33,9 +33,10 @@
-
+
-
+
\ No newline at end of file
diff --git a/src/services/common-util.service.ts b/src/services/common-util.service.ts
index 761187f812..eed982aa8a 100644
--- a/src/services/common-util.service.ts
+++ b/src/services/common-util.service.ts
@@ -25,6 +25,7 @@ import { SbPopoverComponent } from '@app/app/components/popups';
import { AndroidPermissionsStatus } from './android-permissions/android-permission';
import { Router } from '@angular/router';
import { AndroidPermissionsService } from './android-permissions/android-permissions.service';
+import GraphemeSplitter from 'grapheme-splitter';
declare const FCMPlugin;
export interface NetworkInfo {
@@ -186,7 +187,7 @@ export class CommonUtilService {
* Show popup with Try Again and Skip button.
* @param source Page from alert got called
*/
- async showContentComingSoonAlert(source, dialCode?) {
+ async showContentComingSoonAlert(source, dialCode?) {
this.telemetryGeneratorService.generateInteractTelemetry(
InteractType.OTHER,
InteractSubtype.QR_CODE_COMINGSOON,
@@ -245,10 +246,10 @@ export class CommonUtilService {
await qrAlert.present();
const corRelationList: CorrelationData[] = [{
id: this.translateMessage(heading) === this.translateMessage('INVALID_QR') ?
- InteractSubtype.QR_CODE_INVALID : InteractSubtype.QR_NOT_LINKED,
+ InteractSubtype.QR_CODE_INVALID : InteractSubtype.QR_NOT_LINKED,
type: CorReleationDataType.CHILD_UI
}];
- corRelationList.push({id: dialCode, type: ObjectType.QR});
+ corRelationList.push({ id: dialCode, type: ObjectType.QR });
// generate impression telemetry
this.telemetryGeneratorService.generateImpressionTelemetry(
InteractType.POPUP_LOADED, '',
@@ -263,15 +264,15 @@ export class CommonUtilService {
const { data } = await qrAlert.onDidDismiss();
// generate interact telemetry for close popup
this.telemetryGeneratorService.generateInteractTelemetry(
- InteractType.SELECT_CLOSE,
- data ? (data.isLeftButtonClicked ? InteractSubtype.CTA : InteractSubtype.CLOSE_ICON) : InteractSubtype.OUTSIDE,
- source === PageId.ONBOARDING_PROFILE_PREFERENCES ? Environment.ONBOARDING : Environment.HOME,
- source === PageId.ONBOARDING_PROFILE_PREFERENCES ? PageId.SCAN_OR_MANUAL : PageId.HOME,
- undefined,
- undefined,
- undefined,
- corRelationList
- );
+ InteractType.SELECT_CLOSE,
+ data ? (data.isLeftButtonClicked ? InteractSubtype.CTA : InteractSubtype.CLOSE_ICON) : InteractSubtype.OUTSIDE,
+ source === PageId.ONBOARDING_PROFILE_PREFERENCES ? Environment.ONBOARDING : Environment.HOME,
+ source === PageId.ONBOARDING_PROFILE_PREFERENCES ? PageId.SCAN_OR_MANUAL : PageId.HOME,
+ undefined,
+ undefined,
+ undefined,
+ corRelationList
+ );
}
/**
@@ -576,16 +577,26 @@ export class CommonUtilService {
async presentToastForOffline(msg: string) {
this.toast = await this.toastController.create({
- duration: 3000,
- message: this.translateMessage(msg),
- showCloseButton: true,
- position: 'top',
- closeButtonText: 'X',
- cssClass: ['toastHeader', 'offline']
+ duration: 3000,
+ message: this.translateMessage(msg),
+ showCloseButton: true,
+ position: 'top',
+ closeButtonText: 'X',
+ cssClass: ['toastHeader', 'offline']
});
await this.toast.present();
this.toast.onDidDismiss(() => {
- this.toast = undefined;
+ this.toast = undefined;
});
- }
+ }
+
+ extractInitial(name) {
+ let initial = '';
+ if (name) {
+ const splitter = new GraphemeSplitter();
+ const split: string[] = splitter.splitGraphemes(name.trim());
+ initial = split[0];
+ }
+ return initial;
+ }
}