mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
accompanyiing period comment: fix removing of comment
This commit is contained in:
parent
16a0dc4621
commit
ded2ac7d48
@ -29,7 +29,7 @@
|
|||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div> //DOES NOT WORk
|
<div>
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li v-if="pinnedComment !== null">
|
<li v-if="pinnedComment !== null">
|
||||||
<a class="btn btn-delete"
|
<a class="btn btn-delete"
|
||||||
@ -38,7 +38,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div> -->
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -49,6 +49,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import CKEditor from '@ckeditor/ckeditor5-vue';
|
import CKEditor from '@ckeditor/ckeditor5-vue';
|
||||||
import ClassicEditor from "ChillMainAssets/module/ckeditor5";
|
import ClassicEditor from "ChillMainAssets/module/ckeditor5";
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Comment",
|
name: "Comment",
|
||||||
@ -65,15 +66,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
pinnedComment() {
|
...mapState({
|
||||||
return this.$store.state.accompanyingCourse.pinnedComment;
|
pinnedComment: state => state.accompanyingCourse.pinnedComment,
|
||||||
},
|
}),
|
||||||
content: {
|
content: {
|
||||||
set(value) {
|
set(value) {
|
||||||
this.formData.content = value;
|
this.formData.content = value;
|
||||||
},
|
},
|
||||||
get() {
|
get() {
|
||||||
return (this.pinnedComment)? this.pinnedComment.content : {};
|
return this.pinnedComment ? this.pinnedComment.content : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
errors() {
|
errors() {
|
||||||
|
@ -342,8 +342,7 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
|
|||||||
/**
|
/**
|
||||||
* Add/remove pinnedComment
|
* Add/remove pinnedComment
|
||||||
*/
|
*/
|
||||||
removePinnedComment({ commit }, payload) { //DOES NOT WORK
|
removePinnedComment({ commit }, payload) {
|
||||||
|
|
||||||
const body = {type: "accompanying_period_comment", id: payload.id};
|
const body = {type: "accompanying_period_comment", id: payload.id};
|
||||||
const url = `/api/1.0/person/accompanying-course/${id}/comment.json`;
|
const url = `/api/1.0/person/accompanying-course/${id}/comment.json`;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user