Version 1 of 1 · · Current version

features
shop-catalog, shop-suppliers

Shop: the catalog

Categories nest, products know their margin and whether they're running low, and each comes from a supplier.

$val coffee = dom.find (cls = "Category", key = "coffee")
$expect coffee.parent is "drinks"
$val earl = dom.find (cls = "Product", key = "tea-earl")
$expect earl.low
$expect earl.margin == 5.7
$val beans = dom.find (cls = "Product", key = "coffee-beans")
$expect not beans.low
$val sup = dom.find (cls = "Supplier", key = beans.supplier)
$expect sup.name is "Roastworks Co."