Skip to content

Commit

Permalink
Merge pull request #93 from mansurskTarento/marketplace-provider-ui
Browse files Browse the repository at this point in the history
Marketplace provider UI
  • Loading branch information
sureshece16 authored Nov 21, 2024
2 parents 355f7bd + e31b4bf commit 2e4b22e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class ContentUploadComponent implements OnInit, OnChanges {
'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.',
'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.',
],
helpVideoLink: 'url',
helpVideoLink: `/assets/public/content/guide-videos/CIOS_Updated_demo.mp4`,
}

//#region (transformation variables)
Expand Down Expand Up @@ -453,7 +453,7 @@ export class ContentUploadComponent implements OnInit, OnChanges {
const successMsg = hasTransformationAlready ? 'Transform Content updated successfully.' : 'Transform Content saved successfully.'
this.showSnackBar(successMsg)
this.sendDetailsUpdateEvent()
}, 1000)
}, 1000)
}
},
error: (error: HttpErrorResponse) => {
Expand Down Expand Up @@ -506,16 +506,17 @@ export class ContentUploadComponent implements OnInit, OnChanges {
this.getContentList()
this.getUnPublishedCoursesList()
this.getPublishedCoursesList()
}, 1000)
}, 1000)
}
},
error: (error: HttpErrorResponse) => {
this.executed = false
this.transformationsUpdated = false
let errmsg = _.get(error, 'error.code', 'Some thig went wrong while uploading. Please try again')
if (error && error.error && error.error.includes('unsupported file type')) {
errmsg = 'Uploaded file format is not supported. Please try again with a supported file format.'
}
this.contentFileUploaded = false
const errmsg = _.get(error, 'error.params.errmsg', 'Some thing went wrong while uploading. Please try again')
// if (error && error.error && error.error.includes('unsupported file type')) {
// errmsg = 'Uploaded file format is not supported. Please try again with a supported file format.'
// }
this.dialogRef.close()
this.showSnackBar(errmsg)
},
Expand Down Expand Up @@ -568,7 +569,7 @@ export class ContentUploadComponent implements OnInit, OnChanges {
this.showSnackBar(msg)
setTimeout(() => {
this.getUnPublishedCoursesList()
}, 2000)
}, 2000)
}
},
error: (error: HttpErrorResponse) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { Component, Input, OnInit } from '@angular/core'
import { environment } from '../../../../../../../../../../../src/environments/environment'
import * as _ from 'lodash'
import { DemoVideoPopupComponent } from '../../../../components/demo-video-popup/demo-video-popup.component'
import { MatDialog } from '@angular/material/dialog'

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

constructor() { }
constructor(
private dialog: MatDialog
) { }

ngOnInit() {
}

openVideoPopup() { }
openVideoPopup() {
const url = `${environment.karmYogiPath}${_.get(this.helpCenterGuide, 'helpVideoLink')}`
this.dialog.open(DemoVideoPopupComponent, {
data: {
videoLink: url,
},
disableClose: true,
width: '50%',
height: '60%',
panelClass: 'overflow-visable',
})
}

callResizeEvent(_event: any) {
setTimeout(() => {
window.dispatchEvent(new Event('resize'))
}, 100)
if (document.querySelector('.flex')) {
setTimeout(() => {
window.dispatchEvent(new Event('resize'))
}, 100)
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class MarketPlaceDashboardComponent implements OnInit {
'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.',
'Reach out to support team for authenticating the content provider',
],
helpVideoLink: 'url',
helpVideoLink: `/assets/public/content/guide-videos/CIOS_Updated_demo.mp4`,
}

providersList: any = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class ProviderDetailsComponent implements OnInit, OnChanges {
'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.',
'Partner code is a unique code that helps to differentiate the content provider.',
],
helpVideoLink: 'url',
helpVideoLink: `/assets/public/content/guide-videos/CIOS_Updated_demo.mp4`,
}
providerFormGroup!: FormGroup
providerDetalsBeforUpdate: any
Expand Down

0 comments on commit 2e4b22e

Please sign in to comment.