|
@@ -12,7 +12,7 @@
|
|
|
width="100px" />
|
|
width="100px" />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
- {{ packageTitle }}
|
|
|
|
|
|
|
+ ({{ ticketTitle }})
|
|
|
</template>
|
|
</template>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="back-action">
|
|
<div class="back-action">
|
|
@@ -50,9 +50,10 @@
|
|
|
<div style="width: 100%;">
|
|
<div style="width: 100%;">
|
|
|
<q-chat-message v-for="message in repliesInfo"
|
|
<q-chat-message v-for="message in repliesInfo"
|
|
|
:key="message.id"
|
|
:key="message.id"
|
|
|
- :avatar="message.creator_info.picture ? message.creator_info.picture : 'assets/images/web/sample-avatar.svg'"
|
|
|
|
|
|
|
+ :avatar="message.creator_info.picture ? message.creator_info.picture : '/assets/images/web/default-avatar.png'"
|
|
|
:name="message.creator_info.firstname + ' ' + message.creator_info.lastname"
|
|
:name="message.creator_info.firstname + ' ' + message.creator_info.lastname"
|
|
|
:text="[message.body]"
|
|
:text="[message.body]"
|
|
|
|
|
+ text-html
|
|
|
:sent="authenticatedUser.id !== message.creator_info.id" />
|
|
:sent="authenticatedUser.id !== message.creator_info.id" />
|
|
|
<!-- <div>-->
|
|
<!-- <div>-->
|
|
|
<!-- <q-input v-model="replyBody"-->
|
|
<!-- <q-input v-model="replyBody"-->
|
|
@@ -115,7 +116,7 @@ export default {
|
|
|
replyText: null,
|
|
replyText: null,
|
|
|
mounted: false,
|
|
mounted: false,
|
|
|
entityLoading: true,
|
|
entityLoading: true,
|
|
|
- packageTitle: '',
|
|
|
|
|
|
|
+ ticketTitle: '',
|
|
|
authenticatedUser: new User(),
|
|
authenticatedUser: new User(),
|
|
|
api: APIGateway.ticket.APIAdresses.base,
|
|
api: APIGateway.ticket.APIAdresses.base,
|
|
|
ticketCategoryList: new TicketCategoryList(),
|
|
ticketCategoryList: new TicketCategoryList(),
|
|
@@ -195,18 +196,21 @@ export default {
|
|
|
loadAuthData () {
|
|
loadAuthData () {
|
|
|
this.authenticatedUser = this.$store.getters['Auth/user']
|
|
this.authenticatedUser = this.$store.getters['Auth/user']
|
|
|
},
|
|
},
|
|
|
- afterLoadInputData () {
|
|
|
|
|
|
|
+ afterLoadInputData (response) {
|
|
|
|
|
+ this.ticketTitle = response.title
|
|
|
this.entityLoading = false
|
|
this.entityLoading = false
|
|
|
},
|
|
},
|
|
|
sendReply() {
|
|
sendReply() {
|
|
|
this.entityLoading = true
|
|
this.entityLoading = true
|
|
|
|
|
+ const body = this.replyText.replace(/\n/g, '<br>\n')
|
|
|
APIGateway.ticket.reply({
|
|
APIGateway.ticket.reply({
|
|
|
id: this.$route.params.id,
|
|
id: this.$route.params.id,
|
|
|
- body: this.replyText
|
|
|
|
|
|
|
+ body
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
this.$refs.entityShow.editEntity()
|
|
this.$refs.entityShow.editEntity()
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
|
|
+ this.replyText = null
|
|
|
this.$refs.entityShow.getData()
|
|
this.$refs.entityShow.getData()
|
|
|
this.entityLoading = false
|
|
this.entityLoading = false
|
|
|
})
|
|
})
|