mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-03 22:06:07 +00:00
Make clear filters fetch products automatically without filters
The spec change is needed: fetchProducts() makes cleared filters values undefined in removeClearedValues.
This commit is contained in:
committed by
Luis Ramos
parent
ca458018ca
commit
c4e910a7c8
@@ -105,6 +105,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
$scope.producerFilter = "0"
|
||||
$scope.categoryFilter = "0"
|
||||
$scope.importDateFilter = "0"
|
||||
$scope.fetchProducts()
|
||||
|
||||
$scope.$watch 'sortOptions', (sort) ->
|
||||
return unless sort && sort.predicate != ""
|
||||
|
||||
@@ -903,8 +903,8 @@ describe "AdminProductEditCtrl", ->
|
||||
$scope.categoryFilter = "6"
|
||||
$scope.resetSelectFilters()
|
||||
expect($scope.query).toBe ""
|
||||
expect($scope.producerFilter).toBe "0"
|
||||
expect($scope.categoryFilter).toBe "0"
|
||||
expect($scope.producerFilter).toBeUndefined
|
||||
expect($scope.categoryFilter).toBeUndefined
|
||||
|
||||
|
||||
describe "converting arrays of objects with ids to an object with ids as keys", ->
|
||||
|
||||
Reference in New Issue
Block a user