Commit Graph

6 Commits

Author SHA1 Message Date
abe11853f6 refactor: add helper functions for subtotal, cart empty, and cart item count 2026-04-24 10:29:15 +02:00
639b75578e theme system 2026-04-09 17:39:59 +02:00
93b257a612 fix: store coffee prices as int cents to prevent rounding errors
prices stored as float64 could lead to rounding errors when converting to cents for stripe (19.99 * 100 = 1998.99... truncating to 1998). canged Coffee.Price to int, storing cents directly. Updated the seed data, fallback products, API handlers, and all TUI display code to be in sync with this change.
2026-03-26 09:09:20 +01:00
1a49360191 feat: throw out the boolean navigation with page routing
replaced ViewingCart/ViewingAccount booleans and CheckoutStep int with a
single 'page' type and a SwitchPage() method, this is just almost
copying the reference implementation (terminalDotShop)'s routing
pattern. Adds inCartFlow(), chechoutStep(), and buildPageContent()
helpers to clean up those huge if/else chains in views, footer, header,
and breadcrumds. code is looking a lot better now!
2026-03-25 15:11:33 +01:00
7ebc5b24de updating the ui fr 2026-02-26 10:16:57 +01:00
f62b28d29b first commit after chaning git structure on pc 2026-02-16 11:42:43 +01:00