chore: removed commented code

This commit is contained in:
scmmishra 2019-03-27 18:14:59 +05:30
parent 5b57d977d8
commit f04ceaec95

View File

@ -16,45 +16,20 @@ export default {
} }
}, },
mounted() { mounted() {
// if(this.isLoggedIn && this.$route.name == 'program'){
// this.getContinueData().then( data => {
// this.nextContent = data.content,
// this.nextContentType = data.content_type,
// this.nextCourse = data.course
// })
// }
this.computeButtons() this.computeButtons()
}, },
methods: { methods: {
computeButtons(){ computeButtons(){
if(this.isLoggedIn){ if(this.isLoggedIn){
if(lms.store.enrolledPrograms.includes(this.$route.params.program_name)){ this.buttonName = 'Explore Programs'
if(this.$route.name == 'home'){
this.buttonName = 'Explore Courses'
}
// else if(this.$route.name == 'program'){
// this.buttonName = 'Start Course'
// }
}
else {
this.buttonName = 'Enroll Now'
}
} }
else{ else{
this.buttonName = 'Sign Up' this.buttonName = 'Sign Up'
} }
}, },
// getContinueData() {
// lms.call({
// method: "get_continue_data",
// args: {
// program_name: this.$route.params.program_name
// }
// })
// },
primaryAction() { primaryAction() {
if(this.$route.name == 'home'){ if(this.$route.name == 'home'){
return this.$router.push('List/Program');
} }
else if(this.$route.name == 'program' && lms.store.enrolledPrograms.includes(this.$route.params.program_name)){ else if(this.$route.name == 'program' && lms.store.enrolledPrograms.includes(this.$route.params.program_name)){
this.$router.push({ name: 'content', params: { program_name: this.$route.params.program_name, course: this.nextCourse, type: this.nextContentType, content: this.nextContent}}) this.$router.push({ name: 'content', params: { program_name: this.$route.params.program_name, course: this.nextCourse, type: this.nextContentType, content: this.nextContent}})