Skip to content

Commit

Permalink
feat: add course version
Browse files Browse the repository at this point in the history
  • Loading branch information
marianzburlea committed Sep 22, 2019
1 parent 9fbc0e9 commit 37f2676
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/component/course/course.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ const Course = ({ courseId }) => {
courseDocument.set({ published: !course.published }, { merge: true });
};

if (course && course.courseLevel) {
if (course) {
courseSchema.filedList.courseLevel.getOptionLabel = option => <div style={{ color: 'black' }}>{option.label}</div>
courseSchema.filedList.version.getOptionLabel = option => <div style={{ color: 'black' }}>{option.label}</div>
}
if (courseSchema.filedList.courseAuthorCustom) {
courseSchema.filedList.courseAuthorCustom.getOptionLabel = option => <div style={{ color: 'black' }}><Avatar user={option.user} /></div>
Expand Down
21 changes: 21 additions & 0 deletions src/component/course/course.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,27 @@ export default {
visible: true,
value: ''
},
version: {
type: 'select',
placeholder: 'Select version',
label: 'When was it recorded?',
defaultValue: {
label: '1',
value: 1
},
options: [{
label: '1',
value: 1
},
{
label: '2',
value: 2
},
],
edit: true,
visible: true,
value: ''
},
courseAuthorCustom: {
type: 'select',
placeholder: 'Select Author',
Expand Down

0 comments on commit 37f2676

Please sign in to comment.