diff --git a/internal/handlers/events.go b/internal/handlers/events.go index da24c4e..0533b6e 100644 --- a/internal/handlers/events.go +++ b/internal/handlers/events.go @@ -249,9 +249,17 @@ func (h *EventHandler) ViewEventExpenses(w http.ResponseWriter, r *http.Request) return } + totalClaim := 0.0 + for _, exp := range expenses { + if exp.ConvertedAmount > 0 { + totalClaim += exp.ConvertedAmount + } + } + data := map[string]interface{}{ - "Event": event, - "Expenses": expenses, + "Event": event, + "Expenses": expenses, + "TotalClaim": totalClaim, } w.Header().Set("Content-Type", "text/html; charset=utf-8") diff --git a/static/css/style.css b/static/css/style.css index 3711e7a..a1e8af6 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1,47 +1,47 @@ /* ========================================================================== - ExpenseFlow — PWA Expense Tracker Stylesheet - Mobile-first responsive | Plain CSS | System-ui font + ReceiptNext — PWA Expense Tracker Stylesheet + "The Terminal Mint" dark palette | Mobile-first responsive ========================================================================== */ /* -------------------------------------------------------------------------- 0. CSS Custom Properties (Design Tokens) -------------------------------------------------------------------------- */ :root { - /* Colors */ + /* Colors — "The Terminal Mint" Dark Palette */ --color-primary: #10b981; - --color-primary-hover: #059669; - --color-primary-light: #d1fae5; + --color-primary-hover: #34d399; + --color-primary-light: #064e3b; --color-primary-dark: #047857; - --color-secondary: #1e293b; - --color-secondary-hover: #334155; + --color-secondary: #334155; + --color-secondary-hover: #475569; - --color-bg: #f8fafc; - --color-card: #ffffff; - --color-text: #0f172a; - --color-text-muted: #64748b; - --color-text-light: #94a3b8; + --color-bg: #0f172a; + --color-card: #1e293b; + --color-text: #f8fafc; + --color-text-muted: #94a3b8; + --color-text-light: #64748b; - --color-border: #e2e8f0; + --color-border: #334155; --color-border-focus: #10b981; --color-danger: #ef4444; - --color-danger-hover: #dc2626; - --color-danger-light: #fef2f2; + --color-danger-hover: #f87171; + --color-danger-light: #450a0a; --color-success: #10b981; --color-warning: #f59e0b; - --color-open-bg: #d1fae5; - --color-open-text: #065f46; - --color-closed-bg: #f1f5f9; - --color-closed-text: #475569; + --color-open-bg: #064e3b; + --color-open-text: #6ee7b7; + --color-closed-bg: #334155; + --color-closed-text: #cbd5e1; - /* Shadows */ - --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05); - --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04); - --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04); - --shadow-xl: 0 10px 25px rgba(0, 0, 0, 0.08); + /* Shadows — more pronounced on dark bg */ + --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2); + --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2); + --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2); + --shadow-xl: 0 10px 25px rgba(0, 0, 0, 0.4); /* Border radius */ --radius-sm: 6px; diff --git a/static/favicon.svg b/static/favicon.svg new file mode 100644 index 0000000..4938093 --- /dev/null +++ b/static/favicon.svg @@ -0,0 +1,4 @@ + + + Rx + diff --git a/static/manifest.json b/static/manifest.json index cf44f0a..d672d4d 100644 --- a/static/manifest.json +++ b/static/manifest.json @@ -1,10 +1,10 @@ { - "name": "ExpenseFlow", - "short_name": "ExpenseFlow", + "name": "ReceiptNext", + "short_name": "ReceiptNext", "start_url": "/", "display": "standalone", "theme_color": "#10b981", - "background_color": "#ffffff", + "background_color": "#0f172a", "icons": [ { "src": "/static/icons/icon-192.png", diff --git a/static/sw.js b/static/sw.js index ba29c28..14c075b 100644 --- a/static/sw.js +++ b/static/sw.js @@ -1,16 +1,17 @@ /* ============================================================ - * ExpenseFlow — Service Worker + * ReceiptNext — Service Worker * Version: 1.0.0 - * Cache name: expenseflow-v1 + * Cache name: receiptnext-v1 * Strategy: Cache-first for shell assets, network-only for API * ============================================================ */ -const CACHE_NAME = 'expenseflow-v1'; +const CACHE_NAME = 'receiptnext-v1'; // Shell assets to pre-cache on install const SHELL_ASSETS = [ '/', '/static/css/style.css', + '/static/favicon.svg', 'https://unpkg.com/htmx.org@1.9.10' ]; @@ -194,7 +195,7 @@ self.addEventListener('fetch', event => { // Return a minimal offline fallback for navigations if (request.mode === 'navigate') { return new Response( - 'Offline — ExpenseFlow

You\'re offline

ExpenseFlow needs an internet connection to load. Please check your connection and try again.

', + 'Offline — ReceiptNext

You\'re offline

ReceiptNext needs an internet connection to load. Please check your connection and try again.

', { status: 503, statusText: 'Service Unavailable', diff --git a/templates/dashboard.html b/templates/dashboard.html index 2eca3f7..f126ec9 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -4,7 +4,9 @@ - Dashboard - ExpenseFlow + ReceiptNext + + @@ -12,81 +14,56 @@
-

ExpenseFlow

- Logout +

ReceiptNext

My Events

-
-
- - diff --git a/templates/event_expenses.html b/templates/event_expenses.html index e2bfdb4..8227e5b 100644 --- a/templates/event_expenses.html +++ b/templates/event_expenses.html @@ -4,7 +4,9 @@ - {{.Event.Name}} - ExpenseFlow + {{.Event.Name}} - ReceiptNext + + @@ -13,22 +15,56 @@
- ← Back - -

{{.Event.Name}}

- {{.Event.Status}} + hx-get="/dashboard" hx-target="body" hx-push-url="true">← Events +

{{.Event.Name}}

- -
-
- - diff --git a/templates/index.html b/templates/index.html index 1e36cef..873060a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -6,7 +6,9 @@ - ExpenseFlow + ReceiptNext + + @@ -16,12 +18,8 @@