Implement Delete Budget
This commit is contained in:
@ -23,6 +23,14 @@ export default {
|
||||
gotTransactions(e) {
|
||||
this.$data.transactionsFile = e.target.files[0];
|
||||
},
|
||||
deleteBudget() {
|
||||
fetch("/api/v1/budget/" + this.$store.getters.CurrentBudget.ID, {
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + this.$store.state.Session.Token
|
||||
},
|
||||
})
|
||||
},
|
||||
clearBudget() {
|
||||
fetch("/api/v1/budget/" + this.$store.getters.CurrentBudget.ID + "/settings/clear", {
|
||||
method: "POST",
|
||||
@ -65,6 +73,23 @@ export default {
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6" xl="3">
|
||||
<v-card>
|
||||
<v-card-header>
|
||||
<v-card-header-text>
|
||||
<v-card-title>
|
||||
Delete Budget
|
||||
</v-card-title>
|
||||
<v-card-subtitle>
|
||||
This deletes the whole bugdet including all transactions, assignments, accounts and categories. Not undoable!
|
||||
</v-card-subtitle>
|
||||
</v-card-header-text>
|
||||
</v-card-header>
|
||||
<v-card-actions class="justify-center">
|
||||
<v-btn @click="deleteBudget" color="error">Delete budget</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6" xl="3">
|
||||
<v-card>
|
||||
<v-card-header>
|
||||
|
Reference in New Issue
Block a user