Import data.

This commit is contained in:
HenriT
2021-02-16 18:34:04 +02:00
parent 6cadfed54c
commit 26ccd9365e
7 changed files with 167 additions and 30 deletions

View File

@ -9,7 +9,7 @@
<i class="material-icons">more_vert</i>
</template>
<b-dropdown-item @click="exportJson">Export</b-dropdown-item>
<b-dropdown-item @click="importJson">Import</b-dropdown-item>
<b-dropdown-item @click="openImportModal">Import</b-dropdown-item>
</b-dropdown>
<button class="btn btn-sm btn-outline-dark" @click="createNewInvoice">New invoice</button>
</div>
@ -46,10 +46,10 @@ export default {
.then(id => this.$router.push({ name: 'invoice', params: { id } }));
},
exportJson() {
this.$store.dispatch('exportJson');
this.$store.dispatch('data/exportJson');
},
importJson() {
this.$store.dispatch('importJson');
openImportModal() {
this.$store.commit('data/isImportModalOpen', true);
},
},
};