|
|
@ -168,6 +168,7 @@ const TimeTrack = { |
|
|
|
this.updateStorage(); |
|
|
|
this.updateStorage(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
startTimeBox(ticket, minutes) { |
|
|
|
startTimeBox(ticket, minutes) { |
|
|
|
|
|
|
|
Notification.requestPermission(); |
|
|
|
this.startTracking(ticket, false, minutes); |
|
|
|
this.startTracking(ticket, false, minutes); |
|
|
|
}, |
|
|
|
}, |
|
|
|
startTracking(ticket, individual = false, timeBoxMinutes = null) { |
|
|
|
startTracking(ticket, individual = false, timeBoxMinutes = null) { |
|
|
@ -327,16 +328,19 @@ const TimeTrack = { |
|
|
|
return number.indexOf('#') >= 0; |
|
|
|
return number.indexOf('#') >= 0; |
|
|
|
}, |
|
|
|
}, |
|
|
|
deleteTicket(index, archive = false) { |
|
|
|
deleteTicket(index, archive = false) { |
|
|
|
|
|
|
|
let message = ''; |
|
|
|
if (archive) { |
|
|
|
if (archive) { |
|
|
|
let name = this.archive[index].number; |
|
|
|
let name = this.archive[index].number; |
|
|
|
|
|
|
|
message = 'Ticket "' + name + '" wurde gelöscht'; |
|
|
|
this.archive.splice(index, 1); |
|
|
|
this.archive.splice(index, 1); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
let name = this.tickets[index].number; |
|
|
|
let name = this.tickets[index].number; |
|
|
|
|
|
|
|
message = 'Ticket "' + name + '" wurde gelöscht'; |
|
|
|
this.tickets.splice(index, 1); |
|
|
|
this.tickets.splice(index, 1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
iziToast.show({ |
|
|
|
iziToast.show({ |
|
|
|
message: 'Ticket "' + name + '" wurde gelöscht', |
|
|
|
message: message, |
|
|
|
color: 'blue' |
|
|
|
color: 'blue' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -574,6 +578,7 @@ const TimeTrack = { |
|
|
|
this.tickets.forEach((ticket) => { |
|
|
|
this.tickets.forEach((ticket) => { |
|
|
|
if (ticket.isTimeBox && vue.timeBoxTimeLeft(ticket) <= 0) { |
|
|
|
if (ticket.isTimeBox && vue.timeBoxTimeLeft(ticket) <= 0) { |
|
|
|
vue.stopTracking(ticket); |
|
|
|
vue.stopTracking(ticket); |
|
|
|
|
|
|
|
alert('Zeit für "'+ticket.number+'" ist abgelaufen!'); |
|
|
|
if (Notification.permission) { |
|
|
|
if (Notification.permission) { |
|
|
|
new Notification('Timebox zu Ende', { |
|
|
|
new Notification('Timebox zu Ende', { |
|
|
|
body: 'Zeit für "'+ticket.number+'" ist abgelaufen!', |
|
|
|
body: 'Zeit für "'+ticket.number+'" ist abgelaufen!', |
|
|
|