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
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"@project-sunbird/client-services": "7.0.4",
"@project-sunbird/common-consumption": "7.0.6",
"@project-sunbird/common-consumption": "7.0.7",
"@project-sunbird/common-form-elements": "6.0.0",
"@project-sunbird/content-player": "5.1.0",
"@project-sunbird/discussions-ui": "5.3.0-beta.0",
Expand Down
8 changes: 4 additions & 4 deletions src/app/resources/resources.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
</div>

<div class="sb-card-scroll-container" (scroll)='onScroll($event)'>
<div class="sb-card-container sb-card-recently-container">
<div class="sb-card-container sb-card-recently-container" *ngIf="listofCategory.length">
<div class="recently-viewed-card-size" *ngFor="let content of section.contents">
<sb-library-card
[isOffline]="!content?.isAvailableLocally && !commonUtilService.networkInfo.isNetworkAvailable"
[content]="content" [type]="'mobile_textbook'" [isLoading]="searchApiLoader"
[content]="content" [type]="'mobile_textbook'" [isLoading]="searchApiLoader" [categoryKeys]="listofCategory"
(cardClick)="navigateToDetailPage($event, result?.name);"
[cardImg]="content?.cardImg || content?.appIcon || defaultAppIcon">
</sb-library-card>
Expand All @@ -54,9 +54,9 @@
<div *ngIf="!result?.theme || result?.theme?.orientation === 'vertical'">
<div class="section-header-style" role="heading" aria-level="2" *ngIf="result.data.sections.length">{{result.name}}</div>
<div *ngFor="let section of result.data.sections">
<div class="sb-textbook-container" *ngIf="section?.contents && section?.contents?.length">
<div class="sb-textbook-container" *ngIf="section?.contents && section?.contents?.length && listofCategory.length">
<sb-library-cards-stack [title]="section?.name" [contentList]="section?.contents"
[isOffline]="!commonUtilService.networkInfo.isNetworkAvailable"
[isOffline]="!commonUtilService.networkInfo.isNetworkAvailable" [categoryKeys]="listofCategory"
[viewMoreButtonText]="'VIEW_MORE' | translate" [maxCardCount]="3"
(viewMoreClick)="navigateToTextbookPage(section?.contents, section.name)"
(cardClick)="navigateToDetailPage($event, section.name)">
Expand Down
3 changes: 2 additions & 1 deletion src/app/resources/resources.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,8 @@ export class ResourcesComponent implements OnInit, AfterViewInit, OnDestroy, Fra
await this.router.navigate([RouterLinks.TEXTBOOK_VIEW_MORE], {
state: {
contentList: items,
subjectName: subject
subjectName: subject,
categoryKeys: this.listofCategory
}
});
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/app/textbook-view-more/textbook-view-more.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
</span>
</div>
<!-- Card style -->
<div class="sb-card-container sb-card-textbook-container">
<div class="sb-card-container sb-card-textbook-container" *ngIf="categoryKeys.length">
<div class="mb-1" *ngFor="let content of contentList; let i = index">
<sb-library-card [content]="content" [type]="LibraryCardTypes.MOBILE_TEXTBOOK"
[layoutConfig]="{layout: 'v3'}"
[layoutConfig]="{layout: 'v3'}" [categoryKeys]="categoryKeys"
(click)="navigateToDetailPage(content, i, content.name)"
[cardImg]="commonUtilService.getContentImg(content)">
</sb-library-card>
Expand Down
2 changes: 2 additions & 0 deletions src/app/textbook-view-more/textbook-view-more.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class TextbookViewMorePage {
displaySections?: any[];
totalCount: number;
viewMoreTotalCount: number;
categoryKeys: [];

constructor(
@Inject('PROFILE_SERVICE') private profileService: ProfileService,
Expand All @@ -86,6 +87,7 @@ export class TextbookViewMorePage {
this.supportedFacets = extras.supportedFacets;
this.totalCount = this.contentList.length;
this.viewMoreTotalCount = extras.totalCount;
this.categoryKeys = extras.categoryKeys;
}
if(this.corRelationList) {
this.corRelationList.forEach(list => {
Expand Down