Delete that getScale method which is now useless

since we now rely on the serialized variant_unit_scale
This commit is contained in:
Jean-Baptiste Bellet
2022-03-08 14:58:34 +01:00
parent aa71e12020
commit adcdca812d
2 changed files with 0 additions and 26 deletions

View File

@@ -37,17 +37,6 @@ angular.module("admin.products").factory "VariantUnitManager", (availableUnits)
options.push [[I18n.t('items'), 'items']]
options = [].concat options...
@getScale: (value, unitType) ->
scaledValue = null
validScales = []
unitScales = VariantUnitManager.unitScales(unitType)
validScales.unshift scale for scale in unitScales when value/scale >= 1
if validScales.length > 0
validScales[0]
else
unitScales[0]
@getUnitName: (scale, unitType) ->
if @units[unitType][scale]
@units[unitType][scale]['name']