Format document

This commit is contained in:
Jan Bader 2022-01-31 19:58:06 +00:00
parent 34b9c14419
commit 9c0126b14c

View File

@ -17,7 +17,7 @@ export default {
this.$store.commit(TITLE, "Settings") this.$store.commit(TITLE, "Settings")
}, },
methods: { methods: {
gotAssignments(e){ gotAssignments(e) {
this.$data.assignmentsFile = e.target.files[0]; this.$data.assignmentsFile = e.target.files[0];
}, },
gotTransactions(e) { gotTransactions(e) {
@ -25,7 +25,7 @@ export default {
}, },
deleteBudget() { deleteBudget() {
fetch("/api/v1/budget/" + this.$store.getters.CurrentBudget.ID, { fetch("/api/v1/budget/" + this.$store.getters.CurrentBudget.ID, {
method: "DELETE", method: "DELETE",
headers: { headers: {
'Authorization': 'Bearer ' + this.$store.state.Session.Token 'Authorization': 'Bearer ' + this.$store.state.Session.Token
}, },
@ -35,7 +35,7 @@ export default {
}, },
clearBudget() { clearBudget() {
fetch("/api/v1/budget/" + this.$store.getters.CurrentBudget.ID + "/settings/clear", { fetch("/api/v1/budget/" + this.$store.getters.CurrentBudget.ID + "/settings/clear", {
method: "POST", method: "POST",
headers: { headers: {
'Authorization': 'Bearer ' + this.$store.state.Session.Token 'Authorization': 'Bearer ' + this.$store.state.Session.Token
}, },
@ -56,86 +56,75 @@ export default {
<template> <template>
<v-container> <v-container>
<h1>Danger Zone</h1> <h1>Danger Zone</h1>
<v-row> <v-row>
<v-col cols="12" md="6" xl="3"> <v-col cols="12" md="6" xl="3">
<v-card> <v-card>
<v-card-header> <v-card-header>
<v-card-header-text> <v-card-header-text>
<v-card-title> <v-card-title>Clear Budget</v-card-title>
Clear Budget <v-card-subtitle>This removes transactions and assignments to start from scratch. Accounts and categories are kept. Not undoable!</v-card-subtitle>
</v-card-title> </v-card-header-text>
<v-card-subtitle> </v-card-header>
This removes transactions and assignments to start from scratch. Accounts and categories are kept. Not undoable! <v-card-actions class="justify-center">
</v-card-subtitle> <v-btn @click="clearBudget" color="error">Clear budget</v-btn>
</v-card-header-text> </v-card-actions>
</v-card-header> </v-card>
<v-card-actions class="justify-center"> </v-col>
<v-btn @click="clearBudget" color="error">Clear budget</v-btn> <v-col cols="12" md="6" xl="3">
</v-card-actions> <v-card>
</v-card> <v-card-header>
</v-col> <v-card-header-text>
<v-col cols="12" md="6" xl="3"> <v-card-title>Delete Budget</v-card-title>
<v-card> <v-card-subtitle>This deletes the whole bugdet including all transactions, assignments, accounts and categories. Not undoable!</v-card-subtitle>
<v-card-header> </v-card-header-text>
<v-card-header-text> </v-card-header>
<v-card-title> <v-card-actions class="justify-center">
Delete Budget <v-btn @click="deleteBudget" color="error">Delete budget</v-btn>
</v-card-title> </v-card-actions>
<v-card-subtitle> </v-card>
This deletes the whole bugdet including all transactions, assignments, accounts and categories. Not undoable! </v-col>
</v-card-subtitle> <v-col cols="12" md="6" xl="3">
</v-card-header-text> <v-card>
</v-card-header> <v-card-header>
<v-card-actions class="justify-center"> <v-card-header-text>
<v-btn @click="deleteBudget" color="error">Delete budget</v-btn> <v-card-title>Fix all historic negative category-balances</v-card-title>
</v-card-actions> <v-card-subtitle>This restores YNABs functionality, that would substract any overspent categories' balances from next months inflows.</v-card-subtitle>
</v-card> </v-card-header-text>
</v-col> </v-card-header>
<v-col cols="12" md="6" xl="3"> <v-card-actions class="justify-center">
<v-card> <v-btn @click="cleanNegative" color="primary">Fix negative</v-btn>
<v-card-header> </v-card-actions>
<v-card-header-text> </v-card>
<v-card-title> </v-col>
Fix all historic negative category-balances <v-col cols="12" xl="6">
</v-card-title> <v-card>
<v-card-subtitle> <v-card-header>
This restores YNABs functionality, that would substract any overspent categories' balances from next months inflows. <v-card-header-text>
</v-card-subtitle> <v-card-title>Import YNAB Budget</v-card-title>
</v-card-header-text> </v-card-header-text>
</v-card-header> </v-card-header>
<v-card-actions class="justify-center">
<v-btn @click="cleanNegative" color="primary">Fix negative</v-btn>
</v-card-actions>
</v-card>
</v-col>
<v-col cols="12" xl="6">
<v-card>
<v-card-header>
<v-card-header-text>
<v-card-title>
Import YNAB Budget
</v-card-title>
</v-card-header-text>
</v-card-header>
<label for="transactions_file"> <label for="transactions_file">
Transaktionen: Transaktionen:
<input type="file" @change="gotTransactions" accept="text/*" /> <input type="file" @change="gotTransactions" accept="text/*" />
</label> </label>
<br /> <br />
<label for="assignments_file"> <label for="assignments_file">
Budget: Budget:
<input type="file" @change="gotAssignments" accept="text/*" /> <input type="file" @change="gotAssignments" accept="text/*" />
</label> </label>
<v-card-actions class="justify-center"> <v-card-actions class="justify-center">
<v-btn :disabled="filesIncomplete" @click="ynabImport" color="primary">Importieren</v-btn> <v-btn
</v-card-actions> :disabled="filesIncomplete"
</v-card> @click="ynabImport"
</v-col> color="primary"
</v-row> >Importieren</v-btn>
<v-card> </v-card-actions>
</v-card> </v-card>
</v-container> </v-col>
</v-row>
<v-card></v-card>
</v-container>
</template> </template>