mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Switch Taxons input over to category selection on BPE, clean up interface
This commit is contained in:
@@ -3,6 +3,11 @@ angular.module("ofn.admin").factory "Taxons", (taxons, $filter) ->
|
||||
constructor: ->
|
||||
@taxons = taxons
|
||||
|
||||
# For finding a single Taxon
|
||||
findByID: (id) ->
|
||||
$filter('filter')(@taxons, {id: id}, true)[0]
|
||||
|
||||
# For finding multiple Taxons represented by comma delimited string
|
||||
findByIDs: (ids) ->
|
||||
taxon for taxon in @taxons when taxon.id.toString() in ids.split(",")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user