Moved to new united api
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<script>
|
||||
import { EditSymbol } from '$lib/editSymbol.svelte';
|
||||
import { settingsSymbol } from '$lib/settingsSymbol.svelte';
|
||||
import { invalidate, invalidateAll } from '$app/navigation';
|
||||
let { data } = $props();
|
||||
let trans = $derived(data.transactions);
|
||||
let budgets = $derived(data.budgets);
|
||||
@ -10,6 +11,7 @@
|
||||
let account = $derived(data.account);
|
||||
let hide = $derived(account?.hide || false);
|
||||
let inTotal = $derived(account?.in_total || false);
|
||||
let expanded = $state([]);
|
||||
|
||||
function editNotes(transaction) {
|
||||
my_modal_3.showModal();
|
||||
@ -61,7 +63,9 @@
|
||||
</div>
|
||||
<div class="w-64 grow">{account?.balance}</div>
|
||||
<div class="w-14 flex-none text-right">
|
||||
<button class="btn btn-square btn-ghost">{@render settingsSymbol()} </button>
|
||||
<button class="btn btn-square btn-ghost" onclick={() => settings_modal.showModal()}
|
||||
>{@render settingsSymbol()}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -160,8 +164,8 @@
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
onclick={() => {
|
||||
if (budget_id) {
|
||||
fetch(`/api/budget/${budget_id}/transaction`, {
|
||||
if (currentTransaction.budget_id) {
|
||||
fetch(`/api/budget/${currentTransaction.budget_id}/transaction`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
||||
Reference in New Issue
Block a user