Vue.component('AddressTickets', {
template: `
Tickets
| Kundennummer |
Erstellt am |
Betreff |
Letztes Update |
Aktion |
| {{ ticket.customField7 }} |
{{ formatDate(ticket.createdAt) }} |
{{ ticket.subject }} |
{{ formatDate(ticket.updatedAt) }} |
Anzeigen |
Lieferscheine
| Art der Arbeit |
Lieferadresse |
Erstellt von |
Erstellt am |
Aktion |
| {{ note.note }} |
{{ note.deliveryAddressName }} ({{ note.deliveryAddressEMail }}
)
{{ note.deliveryAddressLine }}
{{ note.deliveryAddressPLZ }}, {{ note.deliveryAddressCity }}
|
{{ note.createdByName }} |
{{ formatUnix(note.create) }} |
Anzeigen |
`,
data() {
return {window: window};
},
computed: {
tickets() {
return (this.window.TT_CONFIG?.TICKETS || []).map(t => ({
id: t.id,
customField7: t.customField7,
createdAt: t.createdAt,
subject: t.subject,
updatedAt: t.updatedAt,
activitiesHref: t._links?.activities?.href
}));
},
shippingNotes() {
return [...(this.window.TT_CONFIG?.SHIPPING_NOTES || [])].sort((a, b) => a.create - b.create);
}
},
methods: {
formatDate(d) {
return this.window.moment(d).format('DD.MM.YYYY HH:mm');
},
formatUnix(ts) {
return this.window.moment.unix(ts).format('DD.MM.YYYY HH:mm');
},
getTicketUrl(t) {
return `https://project.xinon.at${t.activitiesHref.replace('api/v3', 'projects/storungen-and-support').replace('activities', 'activity')}`;
},
getShippingNoteUrl(n) {
return `${this.window.TT_CONFIG.BASE_PATH}/WarehouseShippingNote/createPDF?id=${n.id}`;
}
}
});