-- orders/view.wo — the confirmation page and the orders table. -- Raw text literals for the bodies; see product_list/view.wo for the -- convention. use html pub class OrderOk { name: Text qty: Int total: Float fn render() -> Text { return `

Order placed

${self.qty} × {{ self.name }} — total € ${self.total}

See all orders · Keep shopping

`; } } pub class OrderRow { name: Text qty: Int total: Float status: Text fn render() -> Text { return ` {{ self.name }} ${self.qty} € ${self.total} {{ self.status }} `; } } pub class OrdersPage { rows: multi Component fn render() -> Text { if len(self.rows) == 0 { return `

Orders

No orders yet — go buy something.

`; } return `

Orders

${render_all(self.rows)}
ProductQtyTotalStatus
`; } }