Files
openfoodnetwork/app/views
Jean-Baptiste Bellet fa4974ddb2 React to form changes, compute unit price and display accurate values.
- Add method `processUnitPrice` which is responsible for computing the right unit price, that depends on `price`, `variant_unit_scale`, `variant_unit`, `unit_value` and `variant_unit_name`
 - Watch the needed model to compute the unit price: `product.price` and  `product.variant_unit_name`
 - Add dependencies : UnitPrices and localizeCurrencyFilter
 - Add currencyconfig to spec, as it's needed by localizeCurrencyFilter
 - Put `'ng-controller' => 'unitsCtrl'` to the relevant node.
 - Add new ng-model, as it's needed to watch it in order to compute unit price : `product.price`
 - Finally display the needed information: `product.unit_price_value` and `product.unit_price_unit`
2021-03-18 09:48:32 +01:00
..
2021-01-11 16:49:56 +01:00
2021-01-08 11:23:23 +01:00
2020-06-29 20:07:08 +02:00
2020-09-10 17:36:25 +01:00
2020-11-04 17:37:11 -03:00
2021-01-11 16:49:56 +01:00
2021-01-11 16:49:56 +01:00
2021-03-01 16:40:02 +01:00
2021-02-16 15:26:21 +01:00
2021-01-11 16:49:56 +01:00
2020-04-01 12:03:39 +01:00