Ticket "ding"
-
+
@@ -27,13 +27,27 @@ import KeyValueTable from './components/KeyValueTable'
export default {
name: 'Ticket',
components: { KeyValueTable },
+ props: {
+ ticket: {
+ type: Object,
+ default() {
+ return {}
+ },
+ },
+ },
data() {
return {
- description: '',
+ description: this.ticket.description,
}
},
methods: {
- save() {},
+ save() {
+ this.$emit('save-ticket', this.ticket.id, {}) // TODO: give it only the changed data
+ },
+
+ back() {
+ this.$emit('show-ticket-list')
+ },
},
}
diff --git a/src/components/TicketList.vue b/src/components/TicketList.vue
index 3318c7d..7e31260 100644
--- a/src/components/TicketList.vue
+++ b/src/components/TicketList.vue
@@ -29,7 +29,7 @@
-
+
{{ item.title }}
(#{{ item.id }})
@@ -65,6 +65,11 @@ export default {
},
},
},
+ methods: {
+ openTicket(ticketId) {
+ this.$emit('open-ticket', ticketId)
+ },
+ },
}
|