← All changes
|
assets/src/apps/js/admin/editor/getters/course-section.js
+31
-31
4.3.8
→
4.4.9
View file →
| @@ -1,31 +1,31 @@ | ||
| 1 | -const CourseCurriculum = { | |
| 2 | - sections: function( state ) { | |
| 3 | - return state.sections || []; | |
| 4 | - }, | |
| 5 | - urlEdit: function( state ) { | |
| 6 | - return state.urlEdit; | |
| 7 | - }, | |
| 8 | - hiddenSections: function( state ) { | |
| 9 | - return state.sections | |
| 10 | - .filter( function( section ) { | |
| 11 | - return ! section.open; | |
| 12 | - } ) | |
| 13 | - .map( function( section ) { | |
| 14 | - return parseInt( section.id ); | |
| 15 | - } ); | |
| 16 | - }, | |
| 17 | - isHiddenAllSections: function( state, getters ) { | |
| 18 | - var sections = getters.sections; | |
| 19 | - var hiddenSections = getters.hiddenSections; | |
| 20 | - | |
| 21 | - return hiddenSections.length === sections.length; | |
| 22 | - }, | |
| 23 | - statusUpdateSection: function( state ) { | |
| 24 | - return state.statusUpdateSection; | |
| 25 | - }, | |
| 26 | - statusUpdateSectionItem: function( state ) { | |
| 27 | - return state.statusUpdateSectionItem; | |
| 28 | - }, | |
| 29 | -}; | |
| 30 | - | |
| 31 | -export default CourseCurriculum; | |
| 1 | +const CourseCurriculum = { | |
| 2 | + sections: function( state ) { | |
| 3 | + return state.sections || []; | |
| 4 | + }, | |
| 5 | + urlEdit: function( state ) { | |
| 6 | + return state.urlEdit; | |
| 7 | + }, | |
| 8 | + hiddenSections: function( state ) { | |
| 9 | + return state.sections | |
| 10 | + .filter( function( section ) { | |
| 11 | + return ! section.open; | |
| 12 | + } ) | |
| 13 | + .map( function( section ) { | |
| 14 | + return parseInt( section.id ); | |
| 15 | + } ); | |
| 16 | + }, | |
| 17 | + isHiddenAllSections: function( state, getters ) { | |
| 18 | + var sections = getters.sections; | |
| 19 | + var hiddenSections = getters.hiddenSections; | |
| 20 | + | |
| 21 | + return hiddenSections.length === sections.length; | |
| 22 | + }, | |
| 23 | + statusUpdateSection: function( state ) { | |
| 24 | + return state.statusUpdateSection; | |
| 25 | + }, | |
| 26 | + statusUpdateSectionItem: function( state ) { | |
| 27 | + return state.statusUpdateSectionItem; | |
| 28 | + }, | |
| 29 | +}; | |
| 30 | + | |
| 31 | +export default CourseCurriculum; | |