Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move reports from backend into an extension #2814

Merged
merged 1 commit into from
Oct 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 0 additions & 82 deletions backend/app/controllers/spree/admin/reports_controller.rb

This file was deleted.

6 changes: 0 additions & 6 deletions backend/app/models/spree/backend_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class BackendConfiguration < Preferences::Configuration
PRODUCT_TABS ||= [:products, :option_types, :properties,
:variants, :product_properties, :taxonomies,
:taxons]
REPORT_TABS ||= [:reports]
CONFIGURATION_TABS ||= [:stores, :tax_categories,
:tax_rates, :zones,
:payment_methods, :shipping_methods,
Expand Down Expand Up @@ -84,11 +83,6 @@ def menu_items
condition: -> { can?(:admin, Spree::Product) },
partial: 'spree/admin/shared/product_sub_menu'
),
MenuItem.new(
REPORT_TABS,
'file',
condition: -> { can?(:admin, :reports) },
),
MenuItem.new(
CONFIGURATION_TABS,
'wrench',
Expand Down
19 changes: 0 additions & 19 deletions backend/app/views/spree/admin/reports/index.html.erb

This file was deleted.

35 changes: 0 additions & 35 deletions backend/app/views/spree/admin/reports/sales_total.html.erb

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions backend/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,6 @@
end
end

resources :reports, only: [:index] do
collection do
get :sales_total
post :sales_total
end
end

resources :reimbursement_types, only: [:index]
resources :adjustment_reasons, except: [:show, :destroy]
resources :refund_reasons, except: [:show, :destroy]
Expand Down
133 changes: 0 additions & 133 deletions backend/spec/controllers/spree/admin/reports_controller_spec.rb

This file was deleted.

5 changes: 0 additions & 5 deletions backend/spec/features/admin/homepage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
expect(page).to have_link("Products", href: "/admin/products", count: 2)
end

it "should have a link to reports" do
expect(page).to have_link("Reports", href: "/admin/reports")
end

it "should have a link to configuration" do
expect(page).to have_link("Settings", href: "/admin/stores")
end
Expand Down Expand Up @@ -84,7 +80,6 @@
expect(page).to have_link('Orders')
expect(page).not_to have_link('Products')
expect(page).not_to have_link('Promotions')
expect(page).not_to have_link('Reports')
expect(page).not_to have_link('Settings')
end
end
Expand Down
Loading