Browse Source

Move method;

feature/tasks
stingl 4 years ago
parent
commit
fbb1fecd04
  1. 14
      js/app.js

14
js/app.js

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