Skip to content

Commit

Permalink
Merge pull request #331 from sunbird-cb/dev-portal
Browse files Browse the repository at this point in the history
Dev portal player: routing Fix
  • Loading branch information
aAmitSengar authored Mar 24, 2022
2 parents 5376196 + ba57227 commit 5608fed
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,9 @@ export class ContentStripMultipleComponent extends WidgetBaseComponent
// continue learing strip
if (content && content.length) {
contentNew = content.filter((c: any) => {
if (c.completionPercentage && c.completionPercentage > 0) {
// if (c.completionPercentage && c.completionPercentage > 0) {
return c
}
// }
})
}
this.processStrip(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
viewerRouteGenerator,
WidgetContentService,
} from '@sunbird-cb/collection'
import { TFetchStatus, UtilityService, ConfigurationsService } from '@sunbird-cb/utils'
import { TFetchStatus, UtilityService, ConfigurationsService, LoggerService } from '@sunbird-cb/utils'
import { AccessControlService } from '@ws/author'
import { Subscription } from 'rxjs'
import { NsAnalytics } from '../../models/app-toc-analytics.model'
Expand Down Expand Up @@ -88,6 +88,7 @@ export class AppTocBannerComponent implements OnInit, OnChanges, OnDestroy {
public configSvc: ConfigurationsService,
private tagSvc: TitleTagService,
private actionSVC: ActionService,
private logger: LoggerService,
) {

}
Expand Down Expand Up @@ -211,6 +212,9 @@ export class AppTocBannerComponent implements OnInit, OnChanges, OnDestroy {
}
if (this.resumeData && this.content) {
const resumeDataV2 = this.getResumeDataFromList()
if (!resumeDataV2.mimeType) {
resumeDataV2.mimeType = this.getMimeType(this.content, resumeDataV2.identifier)
}
this.resumeDataLink = viewerRouteGenerator(
resumeDataV2.identifier,
resumeDataV2.mimeType,
Expand Down Expand Up @@ -261,6 +265,26 @@ export class AppTocBannerComponent implements OnInit, OnChanges, OnDestroy {
}
})
}
getMimeType(content: NsContent.IContent, identifier: string): NsContent.EMimeTypes {
if (content.identifier === identifier) {
return content.mimeType
} else if (content.children.length === 0) {
if (content.children[0].identifier === identifier) {
return content.mimeType
} else {
// big blunder in data
this.logger.log(content.identifier, 'Wrong mimetypes for resume')
return content.mimeType
}
} else {
for (let i = 0; i < content.children.length; i++) {
if (content.children[i].identifier === identifier) {
return this.getMimeType(content.children[i], identifier)
}
}
}
return content.mimeType
}

private getBatchId(): string {
let batchId = ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<span class="mat-subheading-2">{{'Insights'}}</span>
</mat-card-title>
<mat-card-content class="flex flex-1 flex-column">
<ng-container *ngFor="let _result of [1,2,3,4]">
<ng-container *ngFor="let _result of [1,2]">
<ng-container *ngIf="_result">
<ng-container *ngIf="_result % 2 == 1" [ngTemplateOutlet]="testdetail" [ngTemplateOutletContext]="{
icon: 'done',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,19 @@
.box-c {
min-width: 428px;
max-width: 428.66px;
min-height: 235px;
// min-height: 235px;
height: fit-content;
margin: $size-xs;
box-shadow: none !important;
}
.foldtl {
position: relative;
-webkit-box-shadow: 5px 5px 5px rgba(0,0,0,0.8);
-moz-box-shadow: 5px 5px 5px rgba(0,0,0,0.8);
box-shadow: 5px 5px 5px rgba(0,0,0,0.8);
}
.foldl:before {
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.8);
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.8);
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.8);
}

.foldl:before {
content: "";
position: absolute;
top: 0%;
Expand All @@ -105,7 +106,7 @@
height: 0px;
border-bottom: 70px solid #eee;
border-left: 70px solid #272822; /*Set to background color, not transparent!*/
-webkit-box-shadow: 7px 7px 7px rgba(0,0,0,0.3);
-moz-box-shadow: 7px 7px 7px rgba(0,0,0,0.3);
box-shadow: 7px 7px 7px rgba(0,0,0,0.3);
}
-webkit-box-shadow: 7px 7px 7px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 7px 7px 7px rgba(0, 0, 0, 0.3);
box-shadow: 7px 7px 7px rgba(0, 0, 0, 0.3);
}

0 comments on commit 5608fed

Please sign in to comment.