diff --git a/app.py b/app.py index afa7183..54a692f 100644 --- a/app.py +++ b/app.py @@ -138,7 +138,10 @@ def index(): @app.route("/checkout") @login_required def checkout(): - return render_template("checkout.html", user=current_user) + with sqlite3.connect(DB_FILE) as conn: + # Fetching the same columns the scanner expects + products = conn.execute('SELECT barcode, name, price, image_url, stock, unit_type FROM products').fetchall() + return render_template("checkout.html", user=current_user, products=products) @app.route("/upsert", methods=["POST"]) diff --git a/templates/checkout.html b/templates/checkout.html index 01e83ec..e21b1d2 100644 --- a/templates/checkout.html +++ b/templates/checkout.html @@ -106,17 +106,22 @@ color: #fff; } - .form-control { - background: var(--input-bg); - color: var(--text-main); - border: none; + .form-control, + .form-control:focus { + background-color: var(--input-bg) !important; + color: var(--text-main) !important; + border: 1px solid var(--border) !important; + box-shadow: none !important; } .form-control:focus { - background: var(--input-bg); - color: var(--text-main); - outline: 2px solid var(--accent); - box-shadow: none; + border-color: var(--accent) !important; + outline: none !important; + } + + .form-control::placeholder { + color: var(--text-muted) !important; + opacity: 1; /* Forces Firefox to respect the color */ } #grand-total { @@ -278,6 +283,18 @@