49 lines
1.2 KiB
Vue
Raw Normal View History

2018-11-09 11:47:09 +05:30
<template>
<div>
2019-04-08 19:56:21 +05:30
<breadcrumb></breadcrumb>
2018-11-13 17:24:07 +05:30
<TopSection v-bind:title="program.program_name" v-bind:description="program.description">
</TopSection>
2019-03-31 19:46:39 +05:30
<CardList :title="'Courses'" :description="''" :sectionType="'section-padding'">
2018-11-22 15:33:30 +05:30
<CourseCard slot="card-list-slot" v-for="course in courseData" :course="course" :program_name="program_name" :key="course.name"/>
2018-11-13 17:24:07 +05:30
</CardList>
2018-11-09 11:47:09 +05:30
</div>
</template>
<script>
2018-11-13 17:24:07 +05:30
import TopSection from "../components/TopSection.vue"
import CardList from "../components/CardList.vue"
import CourseCard from "../components/CourseCard.vue"
2019-04-08 19:56:21 +05:30
import Breadcrumb from "../components/Breadcrumb.vue"
2018-11-09 11:47:09 +05:30
export default {
props: ['program_name'],
2018-11-13 17:03:18 +05:30
name: "ProgramPage",
2018-11-09 11:47:09 +05:30
components: {
2018-11-13 17:24:07 +05:30
TopSection,
CardList,
2019-04-08 19:56:21 +05:30
CourseCard,
Breadcrumb
2018-11-09 11:47:09 +05:30
},
data() {
return {
program: {},
2018-11-22 15:33:30 +05:30
courseData: [],
2018-11-09 11:47:09 +05:30
}
},
mounted() {
this.getProgramDetails().then(data => this.program = data);
2018-11-22 15:33:30 +05:30
this.getCourses().then(data => this.courseData = data);
2018-11-09 11:47:09 +05:30
},
methods: {
getProgramDetails() {
2018-11-13 16:47:46 +05:30
return lms.call('get_program_details', {
2018-11-09 11:47:09 +05:30
program_name: this.program_name
});
},
getCourses() {
2018-11-13 16:47:46 +05:30
return lms.call('get_courses', {
2018-11-09 11:47:09 +05:30
program_name: this.program_name
})
}
}
};
</script>