|
|
|
@ -358,7 +358,12 @@ const TimeTrack = {
@@ -358,7 +358,12 @@ const TimeTrack = {
|
|
|
|
|
color: 'blue', |
|
|
|
|
buttons: [ |
|
|
|
|
['<button><i class="fas fa-undo"></i></button>', function (instance, toast) { |
|
|
|
|
component.restoreTrashed(); |
|
|
|
|
let restoredTracker = null; |
|
|
|
|
Object.assign(restoredTracker, component.trashed); |
|
|
|
|
component.trashed = {}; |
|
|
|
|
|
|
|
|
|
component.tickets.push(restoredTracker); |
|
|
|
|
component.updateStorage(); |
|
|
|
|
}, true] |
|
|
|
|
], |
|
|
|
|
timeout: 12000 |
|
|
|
@ -366,13 +371,6 @@ const TimeTrack = {
@@ -366,13 +371,6 @@ const TimeTrack = {
|
|
|
|
|
|
|
|
|
|
this.updateStorage(); |
|
|
|
|
}, |
|
|
|
|
restoreTrashed() { |
|
|
|
|
let restoredTracker = null; |
|
|
|
|
Object.assign(restoredTracker, this.trashed); |
|
|
|
|
this.trashed = {}; |
|
|
|
|
|
|
|
|
|
this.tickets.push(restoredTracker); |
|
|
|
|
}, |
|
|
|
|
archiveTracker(index) { |
|
|
|
|
if (this.tickets[index].tracking) { |
|
|
|
|
this.stopActiveTracker(); |
|
|
|
|