Added ListPage and other UI improvements
This commit is contained in:
51
erpnext/public/js/education/lms/pages/ListPage.vue
Normal file
51
erpnext/public/js/education/lms/pages/ListPage.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
<TopSection :title="portal.title" :description="portal.description">
|
||||
<AButton :type="'primary'" :size="'lg'" :route="{ name: 'signup'}">Sign Up</AButton>
|
||||
</TopSection>
|
||||
<CardList :title="'All Programs'" :description="''">
|
||||
<ProgramCard slot="card-list-slot" v-for="item in masterData" :key="item.program.name" :program="item.program" :enrolled="item.is_enrolled"/>
|
||||
</CardList>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ProgramCard from '../components/ProgramCard.vue';
|
||||
import CourseCard from "../components/CourseCard.vue"
|
||||
import Button from '../components/Button.vue';
|
||||
import TopSection from "../components/TopSection.vue"
|
||||
import CardList from "../components/CardList.vue"
|
||||
|
||||
|
||||
export default {
|
||||
props: ['master'],
|
||||
name: "ListPage",
|
||||
components: {
|
||||
AButton: Button,
|
||||
CourseCard,
|
||||
ProgramCard,
|
||||
CardList,
|
||||
TopSection
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
portal: {},
|
||||
masterData: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getPortalDetails().then(data => this.portal = data);
|
||||
this.getMaster().then(data => this.masterData = data);
|
||||
},
|
||||
methods: {
|
||||
// updateEnrolledPrograms(){
|
||||
// return lms.call("get_program_enrollments")
|
||||
// },
|
||||
getPortalDetails() {
|
||||
return lms.call("get_portal_details")
|
||||
},
|
||||
getMaster() {
|
||||
return lms.call("get_all_programs")
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user