From f04ceaec9581648fc63606bccb9b574f74091c16 Mon Sep 17 00:00:00 2001 From: scmmishra Date: Wed, 27 Mar 2019 18:14:59 +0530 Subject: [PATCH] chore: removed commented code --- .../lms/components/TopSectionButton.vue | 29 ++----------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/erpnext/public/js/education/lms/components/TopSectionButton.vue b/erpnext/public/js/education/lms/components/TopSectionButton.vue index 45a889fea9..0fa49d4da5 100644 --- a/erpnext/public/js/education/lms/components/TopSectionButton.vue +++ b/erpnext/public/js/education/lms/components/TopSectionButton.vue @@ -16,45 +16,20 @@ export default { } }, 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() }, methods: { computeButtons(){ if(this.isLoggedIn){ - if(lms.store.enrolledPrograms.includes(this.$route.params.program_name)){ - if(this.$route.name == 'home'){ - this.buttonName = 'Explore Courses' - } - // else if(this.$route.name == 'program'){ - // this.buttonName = 'Start Course' - // } - } - else { - this.buttonName = 'Enroll Now' - } + this.buttonName = 'Explore Programs' } else{ this.buttonName = 'Sign Up' } }, - // getContinueData() { - // lms.call({ - // method: "get_continue_data", - // args: { - // program_name: this.$route.params.program_name - // } - // }) - // }, primaryAction() { 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)){ this.$router.push({ name: 'content', params: { program_name: this.$route.params.program_name, course: this.nextCourse, type: this.nextContentType, content: this.nextContent}})