brotherton-erpnext/erpnext/public/js/education/web-academy/pages/AcademyHome.vue

42 lines
1.2 KiB
Vue
Raw Normal View History

2018-10-30 12:55:49 +00:00
<template>
<div>
2018-11-03 12:33:01 +00:00
<AcademyTopSection :title="title" :description="description">
<AcademyTopSectionButton/>
</AcademyTopSection>
2018-11-01 11:47:30 +00:00
<AcademyList :title="'Featured Programs'" :description="'Master ERPNext'">
<AcademyProgramCard v-for="program in featured_programs" :key="program.name" :program_code="program"/>
</AcademyList>
2018-10-30 12:55:49 +00:00
</div>
</template>
<script>
import AcademyTopSection from "../components/AcademyTopSection.vue"
2018-11-01 11:47:30 +00:00
import AcademyList from "../components/AcademyList.vue"
import AcademyProgramCard from "../components/AcademyProgramCard.vue"
2018-11-03 12:33:01 +00:00
import AcademyTopSectionButton from "../components/AcademyTopSectionButton.vue"
2018-10-30 12:55:49 +00:00
export default {
name: "AcademyHome",
2018-11-01 11:47:30 +00:00
data() {
return{
title: '',
description: '',
featured_programs: []
}
},
2018-10-30 12:55:49 +00:00
components: {
2018-11-03 12:33:01 +00:00
AcademyTopSection,
AcademyList,
AcademyProgramCard,
AcademyTopSectionButton
2018-11-01 11:47:30 +00:00
},
mounted() {
frappe.call("erpnext.www.academy.get_portal_details").then(r => {
this.title = r.message.title,
this.description = r.message.description
});
frappe.call("erpnext.www.academy.get_featured_programs").then(r => {
this.featured_programs = r.message
});
},
2018-10-30 12:55:49 +00:00
};
</script>