diff --git a/static/components/customer-orders/customer-orders.html b/static/components/customer-orders/customer-orders.html index c65f62e..8f870ee 100644 --- a/static/components/customer-orders/customer-orders.html +++ b/static/components/customer-orders/customer-orders.html @@ -29,97 +29,114 @@ - - - -
- - -
-
-
- + + + + + Products + + + + + + + + + + + + + {{ product.orderedQuantity}} x {{ product.name}} + +
+

{{ product.description }}

+
+
+
+
+ +
+ + + + Shipping Zone: + + + + + Invoice: + + + + + + +
+ + + + Messages: + + + + +
    +
  • + +
  • +
+ +
+
+
+ + + + + + + diff --git a/static/components/customer-orders/customer-orders.js b/static/components/customer-orders/customer-orders.js index 9668c21..4364792 100644 --- a/static/components/customer-orders/customer-orders.js +++ b/static/components/customer-orders/customer-orders.js @@ -25,15 +25,15 @@ async function customerOrders(path) { const stall = this.stallForOrder(order) return { ...order, - stallName: stall.name, - shippingZone: stall.shipping.find(s => s.id === order.shipping_id), + stallName: stall?.name || 'Stall', + shippingZone: stall?.shipping?.find(s => s.id === order.shipping_id), invoice: this.invoiceForOrder(order), products: this.getProductsForOrder(order) } }, stallForOrder: function (order) { try { - const productId = order.items[0]?.product_id + const productId = order.items && order.items[0]?.product_id if (!productId) return const product = this.products.find(p => p.id === productId) if (!product) return