Skip to content

Commit 825077c

Browse files
author
Jonathan Tapia
committed
Move reports from backend into an extension
1 parent 425240b commit 825077c

File tree

13 files changed

+0
-408
lines changed

13 files changed

+0
-408
lines changed

backend/app/controllers/spree/admin/reports_controller.rb

-82
This file was deleted.

backend/app/models/spree/backend_configuration.rb

-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class BackendConfiguration < Preferences::Configuration
1010
PRODUCT_TABS ||= [:products, :option_types, :properties,
1111
:variants, :product_properties, :taxonomies,
1212
:taxons]
13-
REPORT_TABS ||= [:reports]
1413
CONFIGURATION_TABS ||= [:stores, :tax_categories,
1514
:tax_rates, :zones,
1615
:payment_methods, :shipping_methods,
@@ -84,11 +83,6 @@ def menu_items
8483
condition: -> { can?(:admin, Spree::Product) },
8584
partial: 'spree/admin/shared/product_sub_menu'
8685
),
87-
MenuItem.new(
88-
REPORT_TABS,
89-
'file',
90-
condition: -> { can?(:admin, :reports) },
91-
),
9286
MenuItem.new(
9387
CONFIGURATION_TABS,
9488
'wrench',

backend/app/views/spree/admin/reports/index.html.erb

-19
This file was deleted.

backend/app/views/spree/admin/reports/sales_total.html.erb

-35
This file was deleted.

backend/app/views/spree/admin/shared/_report_order_criteria.html.erb

-19
This file was deleted.

backend/config/routes.rb

-7
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,6 @@
141141
end
142142
end
143143

144-
resources :reports, only: [:index] do
145-
collection do
146-
get :sales_total
147-
post :sales_total
148-
end
149-
end
150-
151144
resources :reimbursement_types, only: [:index]
152145
resources :adjustment_reasons, except: [:show, :destroy]
153146
resources :refund_reasons, except: [:show, :destroy]

backend/spec/controllers/spree/admin/reports_controller_spec.rb

-133
This file was deleted.

backend/spec/features/admin/homepage_spec.rb

-5
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
expect(page).to have_link("Products", href: "/admin/products", count: 2)
2424
end
2525

26-
it "should have a link to reports" do
27-
expect(page).to have_link("Reports", href: "/admin/reports")
28-
end
29-
3026
it "should have a link to configuration" do
3127
expect(page).to have_link("Settings", href: "/admin/stores")
3228
end
@@ -84,7 +80,6 @@
8480
expect(page).to have_link('Orders')
8581
expect(page).not_to have_link('Products')
8682
expect(page).not_to have_link('Promotions')
87-
expect(page).not_to have_link('Reports')
8883
expect(page).not_to have_link('Settings')
8984
end
9085
end

0 commit comments

Comments
 (0)