change ticket reply box to textarea

This commit is contained in:
j3d1 2024-01-02 14:35:37 +01:00
parent 7b77c183fb
commit 6dad675d1e

View file

@ -8,8 +8,8 @@
<span class="timeline-item-icon faded-icon" v-else-if="item.type === 'comment'"> <span class="timeline-item-icon faded-icon" v-else-if="item.type === 'comment'">
<font-awesome-icon icon="comment"/> <font-awesome-icon icon="comment"/>
</span> </span>
<span class="timeline-item-icon faded-icon" v-else-if="item.type === 'state'" :class="'bg-' + colorLookup(item.state)"> <span class="timeline-item-icon faded-icon" v-else-if="item.type === 'state'" :class="'bg-' + stateInfo(item.state).color">
<font-awesome-icon :icon="iconLookup(item.state)"/> <font-awesome-icon :icon="stateInfo(item.state).icon"/>
</span> </span>
<span class="timeline-item-icon faded-icon" v-else> <span class="timeline-item-icon faded-icon" v-else>
<font-awesome-icon icon="pen"/> <font-awesome-icon icon="pen"/>
@ -25,8 +25,9 @@
</span> </span>
<div class="new-comment"> <div class="new-comment">
<div class="input-group"> <div class="input-group">
<input type="text" placeholder="reply mail..." v-model="newMail"> <textarea placeholder="reply mail..." v-model="newMail">
<button class="btn btn-primary" @click="sendMail"> </textarea>
<button class="btn btn-primary" @click="sendMailandClear">
Send Send
</button> </button>
</div> </div>
@ -40,6 +41,7 @@
import TimelineMail from "@/components/TimelineMail.vue"; import TimelineMail from "@/components/TimelineMail.vue";
import TimelineComment from "@/components/TimelineComment.vue"; import TimelineComment from "@/components/TimelineComment.vue";
import TimelineStateChange from "@/components/TimelineStateChange.vue"; import TimelineStateChange from "@/components/TimelineStateChange.vue";
import {mapGetters} from "vuex";
export default { export default {
name: 'Timeline', name: 'Timeline',
@ -54,33 +56,14 @@ export default {
data: () => ({ data: () => ({
newMail: "" newMail: ""
}), }),
computed: {
...mapGetters(['stateInfo']),
},
methods: { methods: {
sendMail() { sendMailandClear: function () {
this.$emit('sendMail', this.newMail); this.$emit('sendMail', this.newMail);
this.newMail = ""; this.newMail = "";
}, },
iconLookup: function (state) {
if (state.startsWith('closed_')) {
return 'check';
} else if (state.startsWith('pending_')) {
return 'exclamation';
} else if (state.startsWith('waiting_')) {
return 'hourglass';
} else {
return 'exclamation';
}
},
colorLookup: function (state) {
if (state.startsWith('closed_')) {
return 'secondary';
} else if (state.startsWith('pending_')) {
return 'warning';
} else if (state.startsWith('waiting_')) {
return 'primary';
} else {
return 'danger';
}
},
}, },
}; };
</script> </script>