accompanyiing period comment: fix removing of comment

This commit is contained in:
nobohan
2022-03-10 17:01:52 +01:00
parent 16a0dc4621
commit ded2ac7d48
2 changed files with 8 additions and 8 deletions

View File

@@ -29,7 +29,7 @@
}}
</div>
<!-- <div> //DOES NOT WORk
<div>
<ul class="record_actions">
<li v-if="pinnedComment !== null">
<a class="btn btn-delete"
@@ -38,7 +38,7 @@
</a>
</li>
</ul>
</div> -->
</div>
</form>
</div>
@@ -49,6 +49,7 @@
<script>
import CKEditor from '@ckeditor/ckeditor5-vue';
import ClassicEditor from "ChillMainAssets/module/ckeditor5";
import { mapState } from "vuex";
export default {
name: "Comment",
@@ -65,15 +66,15 @@ export default {
}
},
computed: {
pinnedComment() {
return this.$store.state.accompanyingCourse.pinnedComment;
},
...mapState({
pinnedComment: state => state.accompanyingCourse.pinnedComment,
}),
content: {
set(value) {
this.formData.content = value;
},
get() {
return (this.pinnedComment)? this.pinnedComment.content : {};
return this.pinnedComment ? this.pinnedComment.content : '';
}
},
errors() {