mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Filter relationships by permission
This commit is contained in:
@@ -10,6 +10,18 @@ angular.module("ofn.admin").controller "AdminEnterpriseRelationshipsCtrl", ($sco
|
||||
if confirm("Are you sure?")
|
||||
$scope.EnterpriseRelationships.delete enterprise_relationship
|
||||
|
||||
$scope.toggleKeyword = (string, key) ->
|
||||
string = '' unless string
|
||||
words = string.split ' '
|
||||
words = words.filter (s) ->
|
||||
s
|
||||
index = words.indexOf key
|
||||
if index > -1
|
||||
words.splice index, 1
|
||||
else
|
||||
words.push key
|
||||
words.join ' '
|
||||
|
||||
$scope.allPermissionsChecked = ->
|
||||
for i in EnterpriseRelationships.all_permissions
|
||||
if !$scope.permissions[i]
|
||||
|
||||
Reference in New Issue
Block a user