Skip to content

Commit

Permalink
Merge pull request #3543 from Ajoymaity/release-7.0.0
Browse files Browse the repository at this point in the history
Issue #ED-3456 fix: Fixed QR code and telemetry issue
  • Loading branch information
swayangjit authored Feb 13, 2024
2 parents 75eb088 + 45db6ca commit 81f3066
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/app/profile/guest-edit/guest-edit.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class GuestEditPage implements OnInit, OnDestroy {
});

this.previousProfileType = this.profile.profileType;
this.profileForTelemetry = Object.assign({}, this.profile);
this.profileForTelemetry = Object.assign({}, JSON.parse(this.profile.categories));
this.defaultFrameworkID = this.profile.syllabus[0]

}
Expand Down Expand Up @@ -407,7 +407,13 @@ export class GuestEditPage implements OnInit, OnDestroy {
async onCategoryChanged(category, event, index) {
let currentValue = Array.isArray(event) ? event : [event];
if (currentValue.length) {
this.generateInteractTelemetry(Array.isArray(event) ? event : [event], category.code)
const oldAttribute: any = {};
const newAttribute: any = {};
oldAttribute[category.code] = this.profileForTelemetry[category.identifier] ? this.profileForTelemetry[category.identifier] : '';
newAttribute[category.code] = event ? event : '';
if (!isEqual(oldAttribute, newAttribute)) {
this.appGlobalService.generateAttributeChangeTelemetry(oldAttribute, newAttribute, PageId.GUEST_PROFILE);
}
if (index !== this.categories.length - 1) {
if (index === 0) {
event = Array.isArray(event) ? event[0] : event;
Expand Down
9 changes: 7 additions & 2 deletions src/app/search/search.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1948,10 +1948,15 @@ export class SearchPage implements OnInit, AfterViewInit, OnDestroy, OnTabViewWi
if (e.index === 1) {
req[e.identifier] = [content.framework];
} else {
let terms = this.categories.find(ele => e.code === ele.code).terms;
let code = content[e.code] || content[e.alterNativeCode]
let category = this.categories.find(ele => e.code === ele.code);
let terms = category ? category.terms : undefined
if (terms) {
let code = content[e.code] || content[e.alterNativeCode];
code = Array.isArray(code) ? code[0] : code;
req[e.identifier] = [terms.find((ter) => ter.name === code || ter.identifier === code).code];
} else {
req[e.identifier] = content[e.code] || content[e.alterNativeCode];
}
}
});
resolve(req);
Expand Down

0 comments on commit 81f3066

Please sign in to comment.