diff --git a/static/app.js b/static/app.js index 0256eee..d387745 100644 --- a/static/app.js +++ b/static/app.js @@ -96,6 +96,23 @@ return Number(whole) * 100000000 + Number(fraction); } + /* The stored type names and what the owner sees, docs/spec.md section 7.3. */ + var TYPE_LABELS = { + trade: "Handel", + income: "Inntekt", + spend: "Forbruk", + loss: "Tap", + transfer_out: "Overføring ut", + transfer_in: "Overføring inn", + gift_received: "Gåve (motteke)", + gift_given: "Gåve (gjeven)", + admin_cost: "Forvaltningskostnad" + }; + + function typeLabel(type) { + return TYPE_LABELS[type] || String(type || ""); + } + function api(method, path, body) { var options = { method: method,