|
@@ -6,12 +6,14 @@
|
|
<div class="card-content card-section">
|
|
<div class="card-content card-section">
|
|
<form>
|
|
<form>
|
|
<multi-line-text-input
|
|
<multi-line-text-input
|
|
|
|
+ @valueUpdated="updateLine($event, 'wsl')"
|
|
@addClicked="addLine('wsl')"
|
|
@addClicked="addLine('wsl')"
|
|
@removeClicked="removeLine($event, 'wsl')"
|
|
@removeClicked="removeLine($event, 'wsl')"
|
|
:lines="course.wsl"
|
|
:lines="course.wsl"
|
|
label="What will students learn"
|
|
label="What will students learn"
|
|
/>
|
|
/>
|
|
<multi-line-text-input
|
|
<multi-line-text-input
|
|
|
|
+ @valueUpdated="updateLine($event, 'requirements')"
|
|
@addClicked="addLine('requirements')"
|
|
@addClicked="addLine('requirements')"
|
|
@removeClicked="removeLine($event, 'requirements')"
|
|
@removeClicked="removeLine($event, 'requirements')"
|
|
:lines="course.requirements"
|
|
:lines="course.requirements"
|
|
@@ -45,6 +47,9 @@ export default {
|
|
console.log('Removing line of index:', index)
|
|
console.log('Removing line of index:', index)
|
|
console.log('Removing line for:', field)
|
|
console.log('Removing line for:', field)
|
|
this.$store.commit('instructor/course/removeLine', {field, index})
|
|
this.$store.commit('instructor/course/removeLine', {field, index})
|
|
|
|
+ },
|
|
|
|
+ updateLine({value, index}, field) {
|
|
|
|
+ this.$store.dispatch('instructor/course/updateLine', {field, value, index})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|