2018-10-30 12:55:49 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2018-11-01 11:47:30 +00:00
|
|
|
<AcademyTopSection :title="title" :description="description"/>
|
|
|
|
<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-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-01 11:47:30 +00:00
|
|
|
AcademyTopSection, AcademyList, AcademyProgramCard
|
|
|
|
},
|
|
|
|
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>
|