brotherton-erpnext/erpnext/public/js/education/lms/pages/ProfilePage.vue

45 lines
1.3 KiB
Vue
Raw Normal View History

2018-11-26 11:23:51 +00:00
<template>
<div>
2018-11-26 13:46:54 +00:00
<ProfileInfo :enrolledPrograms="enrolledPrograms"></ProfileInfo>
2018-11-30 07:16:53 +00:00
<CardList :title="'Your Progress'" :description="''" :sectionType="'section-padding section-bg'">
2018-11-26 11:23:51 +00:00
<ProgressCard slot="card-list-slot" v-for="program in enrolledPrograms" :program="program" :key="program"/>
</CardList>
2018-11-30 07:16:53 +00:00
<CardList :title="'Quiz Attempts'" :description="''" :sectionType="'section-padding section'">
2018-12-09 14:27:12 +00:00
<ScoreCard slot="card-list-slot" v-for="program in enrolledPrograms" :program="program" :key="program"/>
2018-11-30 07:16:53 +00:00
</CardList>
2018-11-26 11:23:51 +00:00
</div>
</template>
<script>
import Button from '../components/Button.vue';
import TopSection from "../components/TopSection.vue"
import CardList from "../components/CardList.vue"
import ProgressCard from "../components/ProgressCard.vue"
2018-11-26 13:46:54 +00:00
import ProfileInfo from "../components/ProfileInfo.vue"
2018-11-30 07:16:53 +00:00
import ScoreCard from "../components/ScoreCard.vue"
2018-11-26 11:23:51 +00:00
export default {
name: "ProfilePage",
components: {
AButton: Button,
TopSection,
CardList,
2018-11-26 13:46:54 +00:00
ProfileInfo,
2018-11-30 07:16:53 +00:00
ProgressCard,
ScoreCard
2018-11-26 11:23:51 +00:00
},
data() {
return {
enrolledPrograms: {},
}
},
mounted() {
this.getEnrolledPrograms().then(data => this.enrolledPrograms = data);
},
methods: {
getEnrolledPrograms() {
return lms.call("get_program_enrollments")
}
}
};
2018-11-26 13:46:54 +00:00
</script>