mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Derive unitScales from unitNames
This commit is contained in:
@@ -35,7 +35,4 @@ angular.module("admin.products").factory "VariantUnitManager", ->
|
||||
@unitNames[unitType][scale]
|
||||
|
||||
@unitScales: (unitType) ->
|
||||
unitScales =
|
||||
'weight': [1.0, 1000.0, 1000000.0]
|
||||
'volume': [0.001, 1.0, 1000.0]
|
||||
unitScales[unitType]
|
||||
(parseFloat(scale) for scale in Object.keys(@unitNames[unitType])).sort()
|
||||
|
||||
Reference in New Issue
Block a user