From 69448e29a85cad3a94b3be3ad33efbc52764528f Mon Sep 17 00:00:00 2001
From: ivar <i@oiee.no>
Date: Mon, 9 Mar 2026 23:05:38 +0100
Subject: Add wip cli

---
 app/src/routes/+page.svelte | 35 ++++++++++++++++++++++++-----------
 1 file changed, 24 insertions(+), 11 deletions(-)

(limited to 'app/src/routes/+page.svelte')

diff --git a/app/src/routes/+page.svelte b/app/src/routes/+page.svelte
index b12c471..693a430 100644
--- a/app/src/routes/+page.svelte
+++ b/app/src/routes/+page.svelte
@@ -1,6 +1,10 @@
 <script lang="ts">
     import Button from "$lib/ui/button.svelte";
-    import { clear_auth_session, init_auth_session, do_import } from "./methods.remote";
+    import {
+        clear_auth_session,
+        init_auth_session,
+        do_import,
+    } from "./methods.remote";
     import type { PageProps } from "./$types";
     import type { ImportForm } from "$lib/shared";
 
@@ -33,7 +37,8 @@
 
     function onMappingChanged(sb1Id: string, actualId: string) {
         let mappings = form.mappings;
-        if (mappings.find((c) => c.sb1Id === sb1Id)) mappings = mappings.filter((c) => c.sb1Id !== sb1Id);
+        if (mappings.find((c) => c.sb1Id === sb1Id))
+            mappings = mappings.filter((c) => c.sb1Id !== sb1Id);
         mappings.push({ sb1Id, actualId });
         form.mappings = mappings;
     }
@@ -44,12 +49,6 @@
         <form onsubmit={run}>
             <h3>Importer</h3>
             <fieldset>
-                <h4>Budsjett</h4>
-                {#each data.actual.budgets as budget}
-                    {@const id = `budget-${budget.id}`}
-                    <input name="budget" {id} value={budget.id} type="radio" bind:group={form.budgetId} />
-                    <label for={id}>{budget.name}({budget.id})</label><br />
-                {/each}
                 <h4>Kontoer</h4>
                 {#each data.sb1.accounts as account}
                     {@const actualId = `mapping-${account.key}-actual`}
@@ -57,7 +56,15 @@
                         <code>{account.name}</code>
                         <span>&#8594;</span>
                         <label for={actualId}>Actual</label>
-                        <select name={actualId} id={actualId} onchange={(e) => onMappingChanged(account.key, e.currentTarget.value)}>
+                        <select
+                            name={actualId}
+                            id={actualId}
+                            onchange={(e) =>
+                                onMappingChanged(
+                                    account.key,
+                                    e.currentTarget.value,
+                                )}
+                        >
                             <option value="-" selected>-</option>
                             {#each data.actual.accounts as actual}
                                 <option value={actual.id}>
@@ -68,7 +75,11 @@
                     </div>
                 {/each}
                 <h4>Ellers</h4>
-                <input type="checkbox" id="dry" bind:checked={form.dryRun} /><label for="dry">Tørrkjøring</label><br /><br />
+                <input
+                    type="checkbox"
+                    id="dry"
+                    bind:checked={form.dryRun}
+                /><label for="dry">Tørrkjøring</label><br /><br />
                 <input type="submit" />
             </fieldset>
         </form>
@@ -76,6 +87,8 @@
         <Button onclick={logout} loading={navigating}>Logg ut</Button>
         <div></div>
     {:else}
-        <Button onclick={authorize} loading={navigating}>Autentisér hos Sparebanken 1</Button>
+        <Button onclick={authorize} loading={navigating}
+            >Autentisér hos Sparebanken 1</Button
+        >
     {/if}
 </main>
-- 
cgit v1.3

