hftlclub / node-iltis

Node.js backend for ILTIS
MIT License
1 stars 0 forks source link

SizeType should reference unit #39

Closed fmalcher closed 6 years ago

fmalcher commented 6 years ago

At the moment, a size type is completely independent from a unit. It basically contains this information:

Here, one elementary information is missing: the size type. When talking about a bottle filled with 0,5 litres we always say "bottle 0,5 litres" not just "bottle 0,5". Furthermore, "can 0,5 litres" is quite different from "can 0,5 kg" – it's two completely different concepts (imagine a beer can and a peanut can).

A product always has exactly one unit assigned, like "litre" for drinks and "kilogram" for food. When assigning a size type to a product we must only select those size types with the same unit. Otherwise it's possible to create combinations like "bottle 0,5 piece" or "piece 1 litre" which don't make sense.

Thus, a size type should always reference a unit. When assigning a size type to a product, we must only see those with the same unit.

Possible TODOs for the backend


Those are some current screens which lack the unit information or display senseless combinations (which is not cool).

bildschirmfoto 2017-11-19 um 23 16 57 bildschirmfoto 2017-11-19 um 23 16 26 bildschirmfoto 2017-11-19 um 23 16 46