mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-19 00:27:25 +00:00
Allow reset of "on demand" for variant overrides
Change the UI control for "on demand" in the Inventory page from a checkbox to a SELECT field with three options: nil, true, and false. This resolves the following issues: * There is no way to tell between nil and false - both are represented by an unticked checkbox. * There is no way to go back to nil.
This commit is contained in:
@@ -13,6 +13,10 @@ angular.module("admin.variantOverrides").controller "AdminVariantOverridesCtrl",
|
||||
$scope.RequestMonitor = RequestMonitor
|
||||
$scope.selectView = Views.selectView
|
||||
$scope.currentView = -> Views.currentView
|
||||
$scope.onDemandOptions = [
|
||||
{ description: t('js.yes'), value: true },
|
||||
{ description: t('js.no'), value: false }
|
||||
]
|
||||
|
||||
$scope.views = Views.setViews
|
||||
inventory: { name: t('js.variant_overrides.inventory_products'), visible: true }
|
||||
|
||||
Reference in New Issue
Block a user