diff --git a/config/locales/en.yml b/config/locales/en.yml index 804ccbbcef..e407732f70 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2816,6 +2816,14 @@ See the %{link} to find out more about %{sitename}'s features and to start using order_management: reports: + enterprise_fee_summaries: + filters: + date_range: "Date Range" + report_format_csv: "Download as CSV" + generate_report: "Generate Report" + report: + none: "None" + select_and_search: "Select filters and click on GENERATE REPORT to access your data." enterprise_fee_summary: date_end_before_start_error: "must be after start" parameter_not_allowed_error: "You are not authorized to use one or more selected filters for this report." @@ -3318,14 +3326,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using bulk_coop_allocation: 'Bulk Co-op - Allocation' bulk_coop_packing_sheets: 'Bulk Co-op - Packing Sheets' bulk_coop_customer_payments: 'Bulk Co-op - Customer Payments' - enterprise_fee_summaries: - filters: - date_range: "Date Range" - report_format_csv: "Download as CSV" - generate_report: "Generate Report" - report: - none: "None" - select_and_search: "Select filters and click on GENERATE REPORT to access your data." users: index: listing_users: "Listing Users" diff --git a/engines/order_management/app/views/order_management/reports/enterprise_fee_summaries/_filters.html.haml b/engines/order_management/app/views/order_management/reports/enterprise_fee_summaries/_filters.html.haml index 744097e9a5..0aee85d71e 100644 --- a/engines/order_management/app/views/order_management/reports/enterprise_fee_summaries/_filters.html.haml +++ b/engines/order_management/app/views/order_management/reports/enterprise_fee_summaries/_filters.html.haml @@ -1,4 +1,4 @@ -= form_for @report_parameters, as: :report, url: spree.admin_reports_enterprise_fee_summary_path, method: :post do |f| += form_for @report_parameters, as: :report, url: main_app.order_management_reports_enterprise_fee_summary_path, method: :post do |f| .row.date-range-filter .sixteen.columns.alpha = label_tag nil, t(".date_range") diff --git a/engines/order_management/app/views/order_management/reports/enterprise_fee_summaries/_report.html.haml b/engines/order_management/app/views/order_management/reports/enterprise_fee_summaries/_report.html.haml index 4427c511ba..332253b143 100644 --- a/engines/order_management/app/views/order_management/reports/enterprise_fee_summaries/_report.html.haml +++ b/engines/order_management/app/views/order_management/reports/enterprise_fee_summaries/_report.html.haml @@ -13,7 +13,7 @@ - if @renderer.data_rows.empty? %tr - %td{colspan: @renderer.header.length}= t(:none) + %td{colspan: @renderer.header.length}= t('.none') - else %p.report__message = t(".select_and_search") diff --git a/spec/features/admin/reports/enterprise_fee_summaries_spec.rb b/engines/order_management/spec/features/order_management/reports/enterprise_fee_summaries_spec.rb similarity index 93% rename from spec/features/admin/reports/enterprise_fee_summaries_spec.rb rename to engines/order_management/spec/features/order_management/reports/enterprise_fee_summaries_spec.rb index 57a8de346e..7930ea75a3 100644 --- a/spec/features/admin/reports/enterprise_fee_summaries_spec.rb +++ b/engines/order_management/spec/features/order_management/reports/enterprise_fee_summaries_spec.rb @@ -41,7 +41,7 @@ feature "enterprise fee summaries", js: true do it "does not allow access to the report" do visit spree.admin_reports_path expect(page).to have_no_link(I18n.t("admin.reports.enterprise_fee_summary.name")) - visit spree.new_admin_reports_enterprise_fee_summary_path + visit main_app.new_order_management_reports_enterprise_fee_summary_path expect(page).to have_content(I18n.t("unauthorized")) end end @@ -49,7 +49,7 @@ feature "enterprise fee summaries", js: true do describe "smoke test for filters" do before do - visit spree.new_admin_reports_enterprise_fee_summary_path + visit main_app.new_order_management_reports_enterprise_fee_summary_path end context "when logged in as admin" do @@ -80,7 +80,7 @@ feature "enterprise fee summaries", js: true do describe "smoke test for generation of report based on permissions" do before do - visit spree.new_admin_reports_enterprise_fee_summary_path + visit main_app.new_order_management_reports_enterprise_fee_summary_path end context "when logged in as admin" do @@ -138,7 +138,7 @@ feature "enterprise fee summaries", js: true do let(:current_user) { create(:admin_user) } before do - visit spree.new_admin_reports_enterprise_fee_summary_path + visit main_app.new_order_management_reports_enterprise_fee_summary_path end it "generates file with data for selected order cycle" do @@ -155,6 +155,6 @@ feature "enterprise fee summaries", js: true do end def i18n_scope - "spree.admin.reports.enterprise_fee_summaries" + "order_management.reports.enterprise_fee_summaries" end end