|
|
|
@ -211,6 +211,7 @@ const TimeTrack = {
@@ -211,6 +211,7 @@ const TimeTrack = {
|
|
|
|
|
}, |
|
|
|
|
stopTracking(ticket) { |
|
|
|
|
// console.log(ticket);
|
|
|
|
|
let component = this; |
|
|
|
|
ticket.trackingStopped = moment(); |
|
|
|
|
ticket.tracking = false; |
|
|
|
|
|
|
|
|
@ -233,6 +234,27 @@ const TimeTrack = {
@@ -233,6 +234,27 @@ const TimeTrack = {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (this.ticketSystemUrl && this.isTicketNumber(ticket.number)) { |
|
|
|
|
iziToast.show({ |
|
|
|
|
message: 'Buchung gespeichert', |
|
|
|
|
color: 'blue', |
|
|
|
|
buttons: [ |
|
|
|
|
['<button>' + |
|
|
|
|
'<a href="' + component.ticketSystemUrl + ticket.number.replace('#', '').trim()+'/time_entries/new?time_entry[hours]='+Math.round(minutesSpent)/60+'">' + |
|
|
|
|
'<img src="'+component.ticketSystemIcon+'" class="ticket-icon"/>' + |
|
|
|
|
'</a>' + |
|
|
|
|
'</button>', function (instance, toast) { |
|
|
|
|
instance.hide({ |
|
|
|
|
transitionOut: 'fadeOutUp', |
|
|
|
|
onClosing: function(instance, toast, closedBy){ |
|
|
|
|
component.restoreTrashed(); |
|
|
|
|
} |
|
|
|
|
}, toast, 'buttonName'); |
|
|
|
|
}, true] |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ticket.history.pushToBeginning(historyEntry); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -792,6 +814,21 @@ const TimeTrack = {
@@ -792,6 +814,21 @@ const TimeTrack = {
|
|
|
|
|
fun: this.fun, |
|
|
|
|
theme: this.theme |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
ticketSystemIcon() { |
|
|
|
|
if (this.ticketSystemUrl) { |
|
|
|
|
if (this.ticketSystemUrl.find('redmine')) { |
|
|
|
|
return 'assets/img/redmine.png'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (this.ticketSystemUrl.find('jira')) { |
|
|
|
|
return 'assets/img/jira.png'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (this.ticketSystemUrl.find('gitlab')) { |
|
|
|
|
return 'assets/img/gitlab.png'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|