From 15f8116430ee7c7e082567f648a67ae3d52de3b8 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Wed, 1 Apr 2026 23:26:04 +0200 Subject: [PATCH] working on entry form Signed-off-by: Stephan Richter --- frontend/src/App.svelte | 2 + frontend/src/Components/Autocomplete.svelte | 4 +- .../src/routes/accounting/add_entry.svelte | 99 +++++++++++++++++++ frontend/src/routes/accounting/index.svelte | 17 +++- frontend/src/routes/accounting/new.svelte | 5 + 5 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 frontend/src/routes/accounting/add_entry.svelte create mode 100644 frontend/src/routes/accounting/new.svelte diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 69ac224e..443b88da 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -26,6 +26,7 @@ import Messages from "./routes/message/Messages.svelte"; import MsgSettings from "./routes/message/Settings.svelte"; import Menu from "./Components/Menu.svelte"; + import NewAccount from "./routes/accounting/new.svelte"; import NewPage from "./routes/wiki/AddPage.svelte"; import Notes from "./routes/notes/Index.svelte"; import PollList from "./routes/poll/Index.svelte"; @@ -90,6 +91,7 @@ {/if} + diff --git a/frontend/src/Components/Autocomplete.svelte b/frontend/src/Components/Autocomplete.svelte index 35a02c88..76bd89ca 100644 --- a/frontend/src/Components/Autocomplete.svelte +++ b/frontend/src/Components/Autocomplete.svelte @@ -52,7 +52,6 @@ candidate = candidates[idx]; candidates = []; selected = []; - console.log(candidate); onSelect(candidate); } @@ -93,6 +92,7 @@ return false; } + candidate = { display : candidate.display }; candidates = await getCandidates(candidate.display); if (selected>candidates.length) selected = candidates.length; return false; @@ -103,7 +103,7 @@ span { position : relative } select { position : absolute; top: 30px; left: 3px; } - select { background: black; color: orange; border: 1px solid orange; border-radius: 5px; } + select { background: black; color: orange; border: 1px solid orange; border-radius: 5px; z-index: 50; } option:checked { background: orange; color: black; } diff --git a/frontend/src/routes/accounting/add_entry.svelte b/frontend/src/routes/accounting/add_entry.svelte new file mode 100644 index 00000000..d468ea40 --- /dev/null +++ b/frontend/src/routes/accounting/add_entry.svelte @@ -0,0 +1,99 @@ + + + + +
+ {#if new_account} + {t('create_new_object',{object:t('account')})} + {t('account name')} + + + {t('currency')} + +
+ {:else} + {t('add_object',{object:t('entry')})} + {/if} + + {t('date')} + + + {t('source')} + + + {t('destination')} + + + {t('amount')} + +  {entry.account.currency} + + + {t('purpose')} + + + + + + +
+
+
+{JSON.stringify(entry,null,2)}
+
+
+ +
+
+{JSON.stringify(user,null,2)}
+
+
diff --git a/frontend/src/routes/accounting/index.svelte b/frontend/src/routes/accounting/index.svelte index 4b993eec..517d60bd 100644 --- a/frontend/src/routes/accounting/index.svelte +++ b/frontend/src/routes/accounting/index.svelte @@ -1 +1,16 @@ -

Accounts

\ No newline at end of file + + +
+ {t('accounts')} + + +
\ No newline at end of file diff --git a/frontend/src/routes/accounting/new.svelte b/frontend/src/routes/accounting/new.svelte new file mode 100644 index 00000000..5f4df92f --- /dev/null +++ b/frontend/src/routes/accounting/new.svelte @@ -0,0 +1,5 @@ + + +