Skip to content

Commit 2e4b22e

Browse files
authored
Merge pull request #93 from mansurskTarento/marketplace-provider-ui
Marketplace provider UI
2 parents 355f7bd + e31b4bf commit 2e4b22e

File tree

4 files changed

+35
-15
lines changed

4 files changed

+35
-15
lines changed

project/ws/app/src/lib/routes/home/routes/marketplace-provider/components/content-upload/content-upload.component.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class ContentUploadComponent implements OnInit, OnChanges {
3535
'While uploading the course catalog, ensure to define key properties such as Content Details, Certificate Configuration, and Progress Transform Settings. These are essential for accurate tracking and effective learner engagement. you will have the provision to update the properties later also.',
3636
'Upload the course catalog using a CSV or XLSX file. Once uploaded, the system will indicate whether the courses are live. Non-published courses and published courses will be displayed in separate tabs for better organization. Additionally, you can download detailed logs for reference and troubleshooting.',
3737
],
38-
helpVideoLink: 'url',
38+
helpVideoLink: `/assets/public/content/guide-videos/CIOS_Updated_demo.mp4`,
3939
}
4040

4141
//#region (transformation variables)
@@ -453,7 +453,7 @@ export class ContentUploadComponent implements OnInit, OnChanges {
453453
const successMsg = hasTransformationAlready ? 'Transform Content updated successfully.' : 'Transform Content saved successfully.'
454454
this.showSnackBar(successMsg)
455455
this.sendDetailsUpdateEvent()
456-
}, 1000)
456+
}, 1000)
457457
}
458458
},
459459
error: (error: HttpErrorResponse) => {
@@ -506,16 +506,17 @@ export class ContentUploadComponent implements OnInit, OnChanges {
506506
this.getContentList()
507507
this.getUnPublishedCoursesList()
508508
this.getPublishedCoursesList()
509-
}, 1000)
509+
}, 1000)
510510
}
511511
},
512512
error: (error: HttpErrorResponse) => {
513513
this.executed = false
514514
this.transformationsUpdated = false
515-
let errmsg = _.get(error, 'error.code', 'Some thig went wrong while uploading. Please try again')
516-
if (error && error.error && error.error.includes('unsupported file type')) {
517-
errmsg = 'Uploaded file format is not supported. Please try again with a supported file format.'
518-
}
515+
this.contentFileUploaded = false
516+
const errmsg = _.get(error, 'error.params.errmsg', 'Some thing went wrong while uploading. Please try again')
517+
// if (error && error.error && error.error.includes('unsupported file type')) {
518+
// errmsg = 'Uploaded file format is not supported. Please try again with a supported file format.'
519+
// }
519520
this.dialogRef.close()
520521
this.showSnackBar(errmsg)
521522
},
@@ -568,7 +569,7 @@ export class ContentUploadComponent implements OnInit, OnChanges {
568569
this.showSnackBar(msg)
569570
setTimeout(() => {
570571
this.getUnPublishedCoursesList()
571-
}, 2000)
572+
}, 2000)
572573
}
573574
},
574575
error: (error: HttpErrorResponse) => {

project/ws/app/src/lib/routes/home/routes/marketplace-provider/components/help-center-guide/help-center-guide.component.ts

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
import { Component, Input, OnInit } from '@angular/core'
2+
import { environment } from '../../../../../../../../../../../src/environments/environment'
3+
import * as _ from 'lodash'
4+
import { DemoVideoPopupComponent } from '../../../../components/demo-video-popup/demo-video-popup.component'
5+
import { MatDialog } from '@angular/material/dialog'
26

37
@Component({
48
selector: 'ws-app-help-center-guide',
@@ -12,17 +16,32 @@ export class HelpCenterGuideComponent implements OnInit {
1216
showTopSection = false
1317
playVideo = false
1418

15-
constructor() { }
19+
constructor(
20+
private dialog: MatDialog
21+
) { }
1622

1723
ngOnInit() {
1824
}
1925

20-
openVideoPopup() { }
26+
openVideoPopup() {
27+
const url = `${environment.karmYogiPath}${_.get(this.helpCenterGuide, 'helpVideoLink')}`
28+
this.dialog.open(DemoVideoPopupComponent, {
29+
data: {
30+
videoLink: url,
31+
},
32+
disableClose: true,
33+
width: '50%',
34+
height: '60%',
35+
panelClass: 'overflow-visable',
36+
})
37+
}
2138

2239
callResizeEvent(_event: any) {
23-
setTimeout(() => {
24-
window.dispatchEvent(new Event('resize'))
25-
}, 100)
40+
if (document.querySelector('.flex')) {
41+
setTimeout(() => {
42+
window.dispatchEvent(new Event('resize'))
43+
}, 100)
44+
}
2645
}
2746

2847
}

project/ws/app/src/lib/routes/home/routes/marketplace-provider/components/market-place-dashboard/market-place-dashboard.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class MarketPlaceDashboardComponent implements OnInit {
2222
'Ensure all mandatory fields in the onboarding form regarding the content provider are filled. Once completed, proceed to uploading course catalog for the content provider.',
2323
'Reach out to support team for authenticating the content provider',
2424
],
25-
helpVideoLink: 'url',
25+
helpVideoLink: `/assets/public/content/guide-videos/CIOS_Updated_demo.mp4`,
2626
}
2727

2828
providersList: any = []

project/ws/app/src/lib/routes/home/routes/marketplace-provider/components/provider-details/provider-details.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class ProviderDetailsComponent implements OnInit, OnChanges {
3232
'Ensure all mandatory fields in the onboarding form regarding the content provider are filled. Once completed, proceed to uploading course catalog for the content provider.',
3333
'Partner code is a unique code that helps to differentiate the content provider.',
3434
],
35-
helpVideoLink: 'url',
35+
helpVideoLink: `/assets/public/content/guide-videos/CIOS_Updated_demo.mp4`,
3636
}
3737
providerFormGroup!: FormGroup
3838
providerDetalsBeforUpdate: any

0 commit comments

Comments
 (0)