Remove duplication of enterprise angular controllers

We can re-use the enterprise and producers controllers here in their respective groups tabs, no need for a third controller
This commit is contained in:
Matt-Yorkley
2019-05-10 14:08:48 +01:00
parent 9703d848ef
commit 11e83af0b6
2 changed files with 2 additions and 14 deletions

View File

@@ -1,12 +0,0 @@
Darkswarm.controller "GroupEnterpriseNodeCtrl", ($scope, CurrentHub) ->
$scope.active = false
$scope.toggle = ->
$scope.active = !$scope.active
$scope.open = ->
$scope.active
$scope.current = ->
$scope.hub.id is CurrentHub.hub.id

View File

@@ -63,7 +63,7 @@
.active_table
%producer.active_table_node.row.animate-repeat{id: "{{producer.path}}",
"ng-repeat" => "producer in filteredEnterprises = (group_producers | searchEnterprises:query | taxons:activeTaxons | properties:activeProperties:'supplied_properties')",
"ng-controller" => "GroupEnterpriseNodeCtrl",
"ng-controller" => "ProducerNodeCtrl",
"ng-class" => "{'closed' : !open(), 'open' : open(), 'inactive' : !producer.active}",
id: "{{producer.hash}}"}
@@ -91,7 +91,7 @@
%hub.active_table_node.row.animate-repeat{id: "{{hub.hash}}",
"ng-repeat" => "hub in filteredEnterprises = (group_hubs | searchEnterprises:query | taxons:activeTaxons | shipping:shippingTypes | properties:activeProperties:'distributed_properties' | orderBy:['-active', '+orders_close_at'])",
"ng-class" => "{'is_profile' : hub.category == 'hub_profile', 'closed' : !open(), 'open' : open(), 'inactive' : !hub.active, 'current' : current()}",
"ng-controller" => "GroupEnterpriseNodeCtrl"}
"ng-controller" => "HubNodeCtrl"}
.small-12.columns
= render 'shops/skinny'
= render 'shops/fat'