diff --git a/app/serializers/api/admin/index_enterprise_serializer.rb b/app/serializers/api/admin/index_enterprise_serializer.rb index 189e6a08b5..0c5aef1b8e 100644 --- a/app/serializers/api/admin/index_enterprise_serializer.rb +++ b/app/serializers/api/admin/index_enterprise_serializer.rb @@ -1,8 +1,12 @@ class Api::Admin::IndexEnterpriseSerializer < ActiveModel::Serializer - attributes :name, :id, :permalink, :is_primary_producer, :sells, :producer_profile_only, :owned + attributes :name, :id, :permalink, :is_primary_producer, :sells, :producer_profile_only, :owned, :edit_path def owned return true if options[:spree_current_user].admin? object.owner == options[:spree_current_user] end + + def edit_path + edit_admin_enterprise_path(object) + end end diff --git a/app/views/admin/enterprises/index.html.haml b/app/views/admin/enterprises/index.html.haml index df8e2d4c49..662e1f6cb0 100644 --- a/app/views/admin/enterprises/index.html.haml +++ b/app/views/admin/enterprises/index.html.haml @@ -65,7 +65,7 @@ %td.status.panel-toggle.text-center{ ng: { show: 'columns.status.visible' }, name: "status" } %h5 Status %td.manage{ ng: { show: 'columns.manage.visible' } } - %a.button.fullwidth{ href: '#' } + %a.button.fullwidth{ bo: { href: 'enterprise.edit_path' } } Manage %i.icon-arrow-right