|
|
@ -14,7 +14,9 @@ const TimeTrack = { |
|
|
|
archive: [], |
|
|
|
archive: [], |
|
|
|
selectedTicket: null, |
|
|
|
selectedTicket: null, |
|
|
|
searchQuery: '', |
|
|
|
searchQuery: '', |
|
|
|
portal: '' |
|
|
|
portal: '', |
|
|
|
|
|
|
|
portals: null, |
|
|
|
|
|
|
|
importStringForPortals: '' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
@ -58,10 +60,14 @@ const TimeTrack = { |
|
|
|
|
|
|
|
|
|
|
|
let storedPortal = localStorage.getItem('portal'); |
|
|
|
let storedPortal = localStorage.getItem('portal'); |
|
|
|
this.portal = storedPortal == null ? '' : storedPortal; |
|
|
|
this.portal = storedPortal == null ? '' : storedPortal; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let storedPortals = JSON.parse(localStorage.getItem('portals')); |
|
|
|
|
|
|
|
this.portals = storedPortals == null ? null : storedPortals; |
|
|
|
}, |
|
|
|
}, |
|
|
|
updateStorage() { |
|
|
|
updateStorage() { |
|
|
|
localStorage.setItem('tickets', JSON.stringify(this.tickets)); |
|
|
|
localStorage.setItem('tickets', JSON.stringify(this.tickets)); |
|
|
|
localStorage.setItem('archive', JSON.stringify(this.archive)); |
|
|
|
localStorage.setItem('archive', JSON.stringify(this.archive)); |
|
|
|
|
|
|
|
localStorage.setItem('portals', JSON.stringify(this.portals)); |
|
|
|
localStorage.setItem('ticketSystemUrl', this.ticketSystemUrl); |
|
|
|
localStorage.setItem('ticketSystemUrl', this.ticketSystemUrl); |
|
|
|
localStorage.setItem('showPT', this.showPT); |
|
|
|
localStorage.setItem('showPT', this.showPT); |
|
|
|
localStorage.setItem('theme', this.theme); |
|
|
|
localStorage.setItem('theme', this.theme); |
|
|
@ -326,6 +332,21 @@ const TimeTrack = { |
|
|
|
}); |
|
|
|
}); |
|
|
|
vue.updateStorage(); |
|
|
|
vue.updateStorage(); |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
importPortalsJson() { |
|
|
|
|
|
|
|
let vue = this; |
|
|
|
|
|
|
|
if (this.importStringForPortals !== '') { |
|
|
|
|
|
|
|
this.portals = JSON.parse(this.importStringForPortals); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.importStringForPortals = ''; |
|
|
|
|
|
|
|
console.log(vue.portals.length); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iziToast.show({ |
|
|
|
|
|
|
|
message: 'Portalnamen importiert', |
|
|
|
|
|
|
|
color: 'green' |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.updateStorage(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|