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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/app/collection-detail-etb/collection-detail-etb.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ export class CollectionDetailEtbPage implements OnInit {
this.headerService.updatePageConfig(this.headerConfig);
this.hiddenGroups.clear();
this.shownGroups = undefined;
await this.getFrameworkCategory()
await this.getFrameworkCategory();
await this.assignCardData();
this.resetVariables();
await this.setContentDetails(this.identifier, true);
Expand Down Expand Up @@ -1579,10 +1579,13 @@ export class CollectionDetailEtbPage implements OnInit {
}

async getFrameworkCategory() {
await this.formAndFrameworkUtilService.invokedGetFrameworkCategoryList(this.profile.syllabus[0]).then((categories) => {
if (categories) {
this.categories = categories.sort((a, b) => b.index - a.index)
}
});
this.categories = this.appGlobalService.getCachedFrameworkCategory().value;
if (!this.categories && this.commonUtilService.networkInfo.isNetworkAvailable) {
await this.formAndFrameworkUtilService.invokedGetFrameworkCategoryList(this.profile.syllabus[0]).then((categories) => {
if (categories) {
this.categories = categories.sort((a, b) => b.index - a.index)
}
});
}
}
}
9 changes: 6 additions & 3 deletions src/app/content-details/content-details.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1759,8 +1759,11 @@ export class ContentDetailsPage implements OnInit, OnDestroy {


async getContentCategories(frameworkId) {
await this.formFrameworkUtilService.invokedGetFrameworkCategoryList(frameworkId).then((data) => {
this.contentCategories = data;
});
this.contentCategories = this.appGlobalService.getCachedFrameworkCategory().value;
if(!this.contentCategories && this.commonUtilService.networkInfo.isNetworkAvailable) {
await this.formFrameworkUtilService.invokedGetFrameworkCategoryList(frameworkId).then((data) => {
this.contentCategories = data;
});
}
}
}