| 1 |
import ModalCourseItems from '../store/modal-course-items'; |
| 2 |
import CourseSection from '../store/course-section'; |
| 3 |
import i18n from '../store/i18n'; |
| 4 |
import getters from '../getters/course'; |
| 5 |
import mutations from '../mutations/course'; |
| 6 |
import actions from '../actions/course'; |
| 7 |
|
| 8 |
const $ = window.jQuery; |
| 9 |
|
| 10 |
const Course = function Course( data ) { |
| 11 |
var state = $.extend( {}, data.root ); |
| 12 |
|
| 13 |
state.status = 'success'; |
| 14 |
state.heartbeat = true; |
| 15 |
state.countCurrentRequest = 0; |
| 16 |
|
| 17 |
return { |
| 18 |
state: state, |
| 19 |
getters: getters, |
| 20 |
mutations: mutations, |
| 21 |
actions: actions, |
| 22 |
modules: { |
| 23 |
ci: ModalCourseItems( data ), |
| 24 |
i18n: i18n( data.i18n ), |
| 25 |
ss: CourseSection( data ), |
| 26 |
}, |
| 27 |
}; |
| 28 |
}; |
| 29 |
|
| 30 |
export default Course; |
| 31 |
|