diff --git a/index.html b/index.html
index 979e07c..484c9ee 100644
--- a/index.html
+++ b/index.html
@@ -11,7 +11,7 @@
-
+
Zurücksetzen & Löschen
@@ -389,7 +395,10 @@
diff --git a/js/app.js b/js/app.js
index 3dd7181..f57682e 100644
--- a/js/app.js
+++ b/js/app.js
@@ -14,7 +14,9 @@ const TimeTrack = {
archive: [],
selectedTicket: null,
searchQuery: '',
- portal: ''
+ portal: '',
+ portals: null,
+ importStringForPortals: ''
}
},
mounted() {
@@ -58,10 +60,14 @@ const TimeTrack = {
let storedPortal = localStorage.getItem('portal');
this.portal = storedPortal == null ? '' : storedPortal;
+
+ let storedPortals = JSON.parse(localStorage.getItem('portals'));
+ this.portals = storedPortals == null ? null : storedPortals;
},
updateStorage() {
localStorage.setItem('tickets', JSON.stringify(this.tickets));
localStorage.setItem('archive', JSON.stringify(this.archive));
+ localStorage.setItem('portals', JSON.stringify(this.portals));
localStorage.setItem('ticketSystemUrl', this.ticketSystemUrl);
localStorage.setItem('showPT', this.showPT);
localStorage.setItem('theme', this.theme);
@@ -326,6 +332,21 @@ const TimeTrack = {
});
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: {