Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 23fb6cf

Browse files
author
Casper Bottelet
committed
move comment component to own folder
1 parent c11c095 commit 23fb6cf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ticket-conductor-frontend/src/components/ticket/createComment.vue renamed to ticket-conductor-frontend/src/components/comment/createComment.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<script>
1717
import axios from 'axios'
1818
import config from '../../../config/config.js'
19+
import auth from '../../auth/index.js'
1920
2021
export default {
2122
data () {
@@ -25,17 +26,16 @@ export default {
2526
},
2627
methods: {
2728
newComment() {
28-
var comment = this.elConsumer
29-
axios.post(config.api_url + '/ticket/' + this.$route.params.id + 'create-comment',
29+
var comment = this.comment
30+
axios.post(config.api_url + '/ticket/' + this.$route.params.id + '/create-comment',
3031
{
31-
title: comment,
32+
text: comment,
3233
},
3334
{
3435
headers: auth.getAuthHeader()
3536
})
3637
.then(function (response) {
3738
self.comment = null
38-
self.$parent.getTickets() //A vuejs 1 (I think)hack to call the getTicket method, on parent component to instantly refresh the table
3939
self.$store.commit('setFlashMessage', {
4040
text: "Comment was added",
4141
type: "success",

ticket-conductor-frontend/src/components/ticket/showTicket.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import config from '../../../config/config.js'
2727
import auth from '../../auth/index.js'
2828
import ticketSidebar from './ticketSidebar.vue'
29-
import createComment from './createComment.vue'
29+
import createComment from '../comment/createComment.vue'
3030
3131
export default {
3232
data () {

0 commit comments

Comments
 (0)