brotherton-erpnext/erpnext/public/js/education/lms/pages/ProgramPage.vue
Shivam Mishra 8a976ba8ab
feat: LMS is now compatible with Frappe Theme (#17600)
* style: UI fixes for frappe_theme compatibility

* chore: minor ui fixes
2019-05-16 16:38:13 +05:30

49 lines
1.1 KiB
Vue

<template>
<div>
<breadcrumb></breadcrumb>
<TopSection v-bind:title="program.program_name" v-bind:description="program.description">
</TopSection>
<CardList :title="'Courses'" :description="''">
<CourseCard slot="card-list-slot" v-for="course in courseData" :course="course" :program_name="program_name" :key="course.name"/>
</CardList>
</div>
</template>
<script>
import TopSection from "../components/TopSection.vue"
import CardList from "../components/CardList.vue"
import CourseCard from "../components/CourseCard.vue"
import Breadcrumb from "../components/Breadcrumb.vue"
export default {
props: ['program_name'],
name: "ProgramPage",
components: {
TopSection,
CardList,
CourseCard,
Breadcrumb
},
data() {
return {
program: {},
courseData: [],
}
},
mounted() {
this.getProgramDetails().then(data => this.program = data);
this.getCourses().then(data => this.courseData = data);
},
methods: {
getProgramDetails() {
return lms.call('get_program', {
program_name: this.program_name
});
},
getCourses() {
return lms.call('get_courses', {
program_name: this.program_name
})
}
}
};
</script>