From ae8f1a92e8d6faa165bb66ff86681550927d0acc Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Thu, 9 May 2019 23:34:19 +0100 Subject: [PATCH] Remove "profiles" from /shops --- app/views/groups/show.html.haml | 4 ++-- .../shared/components/_show_profiles.html.haml | 7 ------- app/views/shops/_filters.html.haml | 4 +--- app/views/shops/_hubs_table.html.haml | 2 +- spec/features/consumer/shops_spec.rb | 15 --------------- 5 files changed, 4 insertions(+), 28 deletions(-) delete mode 100644 app/views/shared/components/_show_profiles.html.haml diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index bd15ce9a76..c0179e50f0 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -89,13 +89,13 @@ = t :groups_hubs = render "shared/components/enterprise_search" - = render "shops/filters", resource: "group_hubs", property_filters: "| searchEnterprises:query | taxons:activeTaxons | shipping:shippingTypes | showHubProfiles:show_profiles" + = render "shops/filters", resource: "group_hubs", property_filters: "| searchEnterprises:query | taxons:activeTaxons | shipping:shippingTypes" .row .small-12.columns .active_table %hub.active_table_node.row.animate-repeat{id: "{{hub.hash}}", - "ng-repeat" => "hub in filteredEnterprises = (group_hubs | searchEnterprises:query | taxons:activeTaxons | shipping:shippingTypes | showHubProfiles:show_profiles | properties:activeProperties:'distributed_properties' | orderBy:['-active', '+orders_close_at'])", + "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"} .small-12.columns diff --git a/app/views/shared/components/_show_profiles.html.haml b/app/views/shared/components/_show_profiles.html.haml deleted file mode 100644 index 5a1b5ec1db..0000000000 --- a/app/views/shared/components/_show_profiles.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -.small-12.medium-6.columns.text-right - .profile-checkbox - %button.button.secondary.tiny.right.help-btn.ng-scope{:popover => t(:components_profiles_popover, sitename: Spree::Config[:site_name]), "popover-placement" => "left"}>< - %i.ofn-i_013-help - %label - %input{"ng-model" => "show_profiles", type: "checkbox", name: "profile"} - = t :components_profiles_show diff --git a/app/views/shops/_filters.html.haml b/app/views/shops/_filters.html.haml index dedc473808..33d5ac3a5e 100644 --- a/app/views/shops/_filters.html.haml +++ b/app/views/shops/_filters.html.haml @@ -1,10 +1,8 @@ - resource ||= "visibleMatches" -- property_filters ||= "| closedShops:show_closed | taxons:activeTaxons | shipping:shippingTypes | showHubProfiles:show_profiles" +- property_filters ||= "| closedShops:show_closed | taxons:activeTaxons | shipping:shippingTypes" .row = render 'shared/components/filter_controls' - -# .small-12.medium-6.columns   - = render 'shared/components/show_profiles' .row.animate-show.filter-row{"ng-show" => "filtersActive"} .small-12.columns diff --git a/app/views/shops/_hubs_table.html.haml b/app/views/shops/_hubs_table.html.haml index 0c0b1a4442..76bd2a6695 100644 --- a/app/views/shops/_hubs_table.html.haml +++ b/app/views/shops/_hubs_table.html.haml @@ -1,5 +1,5 @@ .active_table - %hub.active_table_node.row{"ng-repeat" => "hub in #{enterprises}Filtered = (#{enterprises} | closedShops:show_closed | taxons:activeTaxons | properties:activeProperties:'distributed_properties' | shipping:shippingTypes | showHubProfiles:show_profiles | orderBy:['-active', '+distance', '+orders_close_at'])", + %hub.active_table_node.row{"ng-repeat" => "hub in #{enterprises}Filtered = (#{enterprises} | closedShops:show_closed | taxons:activeTaxons | properties:activeProperties:'distributed_properties' | shipping:shippingTypes | orderBy:['-active', '+distance', '+orders_close_at'])", "ng-class" => "{'is_profile' : hub.category == 'hub_profile', 'closed' : !open(), 'open' : open(), 'inactive' : !hub.active, 'current' : current()}", "ng-controller" => "HubNodeCtrl", id: "{{hub.hash}}"} diff --git a/spec/features/consumer/shops_spec.rb b/spec/features/consumer/shops_spec.rb index ea919341eb..f422a65a79 100644 --- a/spec/features/consumer/shops_spec.rb +++ b/spec/features/consumer/shops_spec.rb @@ -55,21 +55,6 @@ feature 'Shops', js: true do follow_active_table_node distributor.name expect(page).to have_current_path enterprise_shop_path(distributor) end - - describe "showing profiles" do - before do - check "Show profiles" - end - - it "still shows hubs" do - expect(page).to have_content distributor.name - end - - # https://github.com/openfoodfoundation/openfoodnetwork/issues/1718 - it "shows profiles" do - expect(page).to have_content profile.name - end - end end describe "showing available hubs" do