diff --git a/src/routes/transfer/+page.svelte b/src/routes/transfer/+page.svelte
index dcce588..e12c258 100644
--- a/src/routes/transfer/+page.svelte
+++ b/src/routes/transfer/+page.svelte
@@ -29,6 +29,7 @@
cards = await result.json();
}
}
+
async function fetchCategories() {
const result = await fetch("/api/transfer/all");
if (!result.ok) {
@@ -104,6 +105,15 @@
return card ? card.name : "Unknown";
}
+ function handleValueInput(
+ event: Event & { currentTarget: EventTarget & HTMLInputElement },
+ ): void {
+ const target = event.target as HTMLInputElement;
+ const rawValue = target.value.replace(/[^0-9]/g, "");
+ currentTransfer.value = parseInt(rawValue || "0");
+ target.value = (currentTransfer.value / 100).toFixed(2);
+ }
+
const constructedTime = $derived(`${mutateDate}T${selectedTime}Z`);
const currentTransfer = $derived(editingTransfer ?? newTransfer);
$inspect(currentTransfer);
@@ -154,7 +164,7 @@
Value: