fix for the cart checkout
Some checks are pending
CI / Check Style (push) Waiting to run
CI / Run Clippy (push) Waiting to run
CI / Run Tests (push) Waiting to run

This commit is contained in:
Priec
2026-06-20 13:29:18 +02:00
parent 3da840c0c9
commit e138fb6579
2 changed files with 6 additions and 0 deletions

View File

@@ -132,6 +132,10 @@ async fn checkout_page(
"packeta_api_key": settings::get(&ctx, "packeta_api_key").unwrap_or(""),
"logged_in_admin": is_admin,
"logged_in_customer": is_customer,
// Required by the navbar profile menu (base.html includes it whenever
// logged_in_customer is true); None for admins/guests.
"customer_name": user.as_ref().filter(|_| is_customer).map(|u| u.name.clone()),
"customer_account_type": user.as_ref().filter(|_| is_customer).map(|u| u.account_type.clone()),
"profile_filled": profile_filled,
// A logged-in customer's account type is fixed; only guests pick it
// and may opt to create an account from the order.

View File

@@ -6,6 +6,7 @@
api_key: lo-95ec80d7-cb60-4b70-9b4b-9ef74cb88758
name: user1
theme: light
account_type: personal
created_at: "2023-11-12T12:34:56.789Z"
updated_at: "2023-11-12T12:34:56.789Z"
- id: 3
@@ -15,5 +16,6 @@
api_key: lo-153561ca-fa84-4e1b-813a-c62526d0a77e
name: user2
theme: light
account_type: personal
created_at: "2023-11-12T12:34:56.789Z"
updated_at: "2023-11-12T12:34:56.789Z"