brotherton-erpnext/erpnext/public/js/education/web-academy.js

27 lines
856 B
JavaScript
Raw Normal View History

2018-10-30 12:55:49 +00:00
import Vue from 'vue/dist/vue.js';
import VueRouter from 'vue-router/dist/vue-router.js'
import AcademyRoot from "./web-academy/AcademyRoot.vue";
import AcademyHome from "./web-academy/pages/AcademyHome.vue";
import AcademyProgramPage from "./web-academy/pages/AcademyProgramPage.vue";
import AcademyCoursePage from "./web-academy/pages/AcademyCoursePage.vue";
Vue.use(VueRouter)
const routes = [
2018-11-01 11:47:30 +00:00
{name: 'home', path: '', component: AcademyHome},
{name: 'program', path: '/Program/:code', component: AcademyProgramPage, props: true},
{name: 'content', path: '/Program/:code/:course/:type/:content', component: AcademyCoursePage, props: true},
2018-10-30 12:55:49 +00:00
];
const router = new VueRouter({
routes: routes,
});
frappe.ready(() => {
2018-11-01 11:47:30 +00:00
window.v = new Vue({
2018-10-30 12:55:49 +00:00
el: "#web-academy",
router: router,
template: "<academy-root/>",
components: { AcademyRoot }
});
})