Run prettier
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
2022-03-15 12:49:53 +00:00
parent d8d713f841
commit 61a534610f
42 changed files with 1485 additions and 1187 deletions

View File

@ -72,53 +72,82 @@ function ynabExport() {
saveAs(blob, timeStamp + " " + CurrentBudgetName.value + " - Transactions.tsv");
})
}
</script>
<template>
<div>
<h1>Danger Zone</h1>
<div class="grid md:grid-cols-2 gap-6">
<Card class="flex-col p-3">
<h2 class="text-lg font-bold">Clear Budget</h2>
<p>This removes transactions and assignments to start from scratch. Accounts and categories are kept. Not undoable!</p>
<div>
<h1>Danger Zone</h1>
<div class="grid md:grid-cols-2 gap-6">
<Card class="flex-col p-3">
<h2 class="text-lg font-bold">Clear Budget</h2>
<p>
This removes transactions and assignments to start from
scratch. Accounts and categories are kept. Not undoable!
</p>
<Button class="bg-red-500 py-2" @click="clearBudget">Clear budget</Button>
</Card>
<Card class="flex-col p-3">
<h2 class="text-lg font-bold">Delete Budget</h2>
<p>This deletes the whole bugdet including all transactions, assignments, accounts and categories. Not undoable!</p>
<Button class="bg-red-500 py-2" @click="deleteBudget">Delete budget</button>
</Card>
<Card class="flex-col p-3">
<h2 class="text-lg font-bold">Fix all historic negative category-balances</h2>
<p>This restores YNABs functionality, that would substract any overspent categories' balances from next months inflows.</p>
<Button class="bg-orange-500 py-2" @click="cleanNegative">Fix negative</button>
</Card>
<Card class="flex-col p-3">
<h2 class="text-lg font-bold">Import YNAB Budget</h2>
<div>
<label for="transactions_file">
Transaktionen:
<input type="file" @change="gotTransactions" accept="text/*" />
</label>
<br />
<label for="assignments_file">
Budget:
<input type="file" @change="gotAssignments" accept="text/*" />
</label>
</div>
<Button class="bg-red-500 py-2" @click="clearBudget"
>Clear budget</Button
>
</Card>
<Card class="flex-col p-3">
<h2 class="text-lg font-bold">Delete Budget</h2>
<p>
This deletes the whole bugdet including all transactions,
assignments, accounts and categories. Not undoable!
</p>
<Button class="bg-red-500 py-2" @click="deleteBudget"
>Delete budget</Button
>
</Card>
<Card class="flex-col p-3">
<h2 class="text-lg font-bold">
Fix all historic negative category-balances
</h2>
<p>
This restores YNABs functionality, that would substract any
overspent categories' balances from next months inflows.
</p>
<Button class="bg-orange-500 py-2" @click="cleanNegative"
>Fix negative</Button
>
</Card>
<Card class="flex-col p-3">
<h2 class="text-lg font-bold">Import YNAB Budget</h2>
<Button class="bg-blue-500 py-2" :disabled="filesIncomplete" @click="ynabImport">Importieren</Button>
</Card>
<Card class="flex-col p-3">
<h2 class="text-lg font-bold">Export as YNAB TSV</h2>
<div>
<label for="transactions_file">
Transaktionen:
<input
type="file"
@change="gotTransactions"
accept="text/*" />
</label>
<br />
<label for="assignments_file">
Budget:
<input
type="file"
@change="gotAssignments"
accept="text/*" />
</label>
</div>
<div class="flex flex-row">
<Button class="bg-blue-500 py-2" @click="ynabExport">Export</Button>
</div>
</Card>
</div>
</div>
</template>
<Button
class="bg-blue-500 py-2"
:disabled="filesIncomplete"
@click="ynabImport"
>Importieren</Button
>
</Card>
<Card class="flex-col p-3">
<h2 class="text-lg font-bold">Export as YNAB TSV</h2>
<div class="flex flex-row">
<Button class="bg-blue-500 py-2" @click="ynabExport"
>Export</Button
>
</div>
</Card>
</div>
</div>
</template>