solidus_backend 2.7.4 → 2.8.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_backend might be problematic. Click here for more details.

Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -8
  3. data/app/assets/images/favicon.ico +0 -0
  4. data/app/assets/javascripts/spree/backend.js +0 -2
  5. data/app/assets/javascripts/spree/backend/adjustments.js +1 -1
  6. data/app/assets/javascripts/spree/backend/components/tooltips.js +21 -17
  7. data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +1 -1
  8. data/app/assets/javascripts/spree/backend/product_picker.js +1 -1
  9. data/app/assets/javascripts/spree/backend/shipments.js +6 -1
  10. data/app/assets/javascripts/spree/backend/stock_management.js +9 -0
  11. data/app/assets/javascripts/spree/backend/store_credits.js +18 -2
  12. data/app/assets/javascripts/spree/backend/taxons.js +1 -1
  13. data/app/assets/javascripts/spree/backend/templates/stock_items/stock_location_stock_item.hbs +24 -25
  14. data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
  15. data/app/assets/javascripts/spree/backend/variant_autocomplete.js +1 -1
  16. data/app/assets/javascripts/spree/backend/views/order/customer_select.js +1 -1
  17. data/app/assets/javascripts/spree/backend/views/order/summary.js +2 -2
  18. data/app/assets/javascripts/spree/backend/views/stock/add_stock_item.js +15 -4
  19. data/app/assets/javascripts/spree/backend/views/stock/edit_stock_item_row.js +30 -10
  20. data/app/assets/stylesheets/spree/backend/globals/_functions.scss +1 -2
  21. data/app/assets/stylesheets/spree/backend/sections/_orders.scss +8 -0
  22. data/app/assets/stylesheets/spree/backend/sections/_stock_management.scss +77 -2
  23. data/app/assets/stylesheets/spree/backend/spree_admin.scss +0 -1
  24. data/app/controllers/spree/admin/cancellations_controller.rb +2 -2
  25. data/app/controllers/spree/admin/locale_controller.rb +1 -1
  26. data/app/controllers/spree/admin/orders/customer_details_controller.rb +8 -1
  27. data/app/controllers/spree/admin/orders_controller.rb +1 -11
  28. data/app/controllers/spree/admin/products_controller.rb +10 -6
  29. data/app/controllers/spree/admin/promotion_codes_controller.rb +19 -1
  30. data/app/controllers/spree/admin/promotions_controller.rb +1 -1
  31. data/app/controllers/spree/admin/reimbursements_controller.rb +7 -2
  32. data/app/controllers/spree/admin/resource_controller.rb +1 -0
  33. data/app/controllers/spree/admin/store_credit_reasons_controller.rb +8 -0
  34. data/app/controllers/spree/admin/store_credits_controller.rb +11 -11
  35. data/app/helpers/spree/admin/navigation_helper.rb +1 -1
  36. data/app/models/spree/backend_configuration.rb +38 -21
  37. data/app/views/spree/admin/cancellations/index.html.erb +3 -1
  38. data/app/views/spree/admin/images/_image_row.html.erb +1 -1
  39. data/app/views/spree/admin/images/edit.html.erb +3 -3
  40. data/app/views/spree/admin/images/index.html.erb +2 -2
  41. data/app/views/spree/admin/log_entries/index.html.erb +2 -2
  42. data/app/views/spree/admin/orders/_carton_manifest.html.erb +3 -1
  43. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +3 -1
  44. data/app/views/spree/admin/orders/confirm/_line_items.html.erb +3 -2
  45. data/app/views/spree/admin/orders/confirm/_shipment_manifest.html.erb +3 -1
  46. data/app/views/spree/admin/orders/index.html.erb +1 -1
  47. data/app/views/spree/admin/products/_form.html.erb +7 -7
  48. data/app/views/spree/admin/products/edit.html.erb +5 -0
  49. data/app/views/spree/admin/products/index.html.erb +3 -1
  50. data/app/views/spree/admin/promotion_categories/index.html.erb +1 -1
  51. data/app/views/spree/admin/promotion_code_batches/index.html.erb +1 -1
  52. data/app/views/spree/admin/promotion_codes/index.html.erb +5 -1
  53. data/app/views/spree/admin/promotion_codes/new.html.erb +31 -0
  54. data/app/views/spree/admin/promotions/_actions.html.erb +1 -1
  55. data/app/views/spree/admin/promotions/_activations_edit.html.erb +1 -1
  56. data/app/views/spree/admin/promotions/_form.html.erb +4 -3
  57. data/app/views/spree/admin/promotions/_rules.html.erb +1 -1
  58. data/app/views/spree/admin/promotions/edit.html.erb +3 -1
  59. data/app/views/spree/admin/refunds/new.html.erb +1 -1
  60. data/app/views/spree/admin/shared/_address_form.html.erb +10 -3
  61. data/app/views/spree/admin/shared/_edit_resource_links.html.erb +1 -1
  62. data/app/views/spree/admin/shared/_head.html.erb +1 -0
  63. data/app/views/spree/admin/shared/_image.html.erb +2 -2
  64. data/app/views/spree/admin/shared/_product_sub_menu.html.erb +1 -1
  65. data/app/views/spree/admin/shared/_settings_checkout_tabs.html.erb +4 -0
  66. data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +3 -3
  67. data/app/views/spree/admin/shared/_tabs.html.erb +3 -2
  68. data/app/views/spree/admin/shared/_variant_search.html.erb +1 -1
  69. data/app/views/spree/admin/stock_items/_stock_management.html.erb +56 -38
  70. data/app/views/spree/admin/stock_locations/_form.html.erb +133 -121
  71. data/app/views/spree/admin/stock_locations/edit.html.erb +4 -2
  72. data/app/views/spree/admin/store_credit_reasons/edit.html.erb +15 -0
  73. data/app/views/spree/admin/store_credit_reasons/index.html.erb +56 -0
  74. data/app/views/spree/admin/store_credit_reasons/new.html.erb +18 -0
  75. data/app/views/spree/admin/store_credit_reasons/shared/_form.html.erb +15 -0
  76. data/app/views/spree/admin/store_credits/_store_credit_reason_field.html.erb +7 -0
  77. data/app/views/spree/admin/store_credits/edit_amount.html.erb +1 -1
  78. data/app/views/spree/admin/store_credits/edit_validity.html.erb +1 -1
  79. data/app/views/spree/admin/store_credits/show.html.erb +2 -2
  80. data/app/views/spree/admin/users/items.html.erb +3 -1
  81. data/app/views/spree/admin/users/orders.html.erb +1 -1
  82. data/config/routes.rb +2 -8
  83. data/lib/spree/backend.rb +1 -1
  84. data/solidus_backend.gemspec +3 -4
  85. data/spec/controllers/spree/admin/base_controller_spec.rb +1 -1
  86. data/spec/controllers/spree/admin/cancellations_controller_spec.rb +7 -3
  87. data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +50 -2
  88. data/spec/controllers/spree/admin/orders_controller_spec.rb +23 -11
  89. data/spec/controllers/spree/admin/payments_controller_spec.rb +1 -1
  90. data/spec/controllers/spree/admin/products_controller_spec.rb +72 -0
  91. data/spec/controllers/spree/admin/promotion_codes_controller_spec.rb +13 -1
  92. data/spec/controllers/spree/admin/reimbursements_controller_spec.rb +11 -0
  93. data/spec/controllers/spree/admin/resource_controller_spec.rb +22 -0
  94. data/spec/controllers/spree/admin/stock_items_controller_spec.rb +1 -1
  95. data/spec/controllers/spree/admin/store_credits_controller_spec.rb +7 -7
  96. data/spec/features/admin/configuration/payment_methods_spec.rb +2 -2
  97. data/spec/features/admin/configuration/shipping_methods_spec.rb +2 -2
  98. data/spec/features/admin/homepage_spec.rb +1 -6
  99. data/spec/features/admin/orders/listing_spec.rb +1 -1
  100. data/spec/features/admin/orders/new_order_spec.rb +117 -0
  101. data/spec/features/admin/orders/new_refund_spec.rb +35 -0
  102. data/spec/features/admin/orders/order_details_spec.rb +2 -2
  103. data/spec/features/admin/orders/payments_spec.rb +2 -2
  104. data/spec/features/admin/orders/return_payment_state_spec.rb +3 -0
  105. data/spec/features/admin/orders/shipments_spec.rb +28 -0
  106. data/spec/features/admin/products/products_spec.rb +1 -1
  107. data/spec/features/admin/products/stock_management_spec.rb +10 -13
  108. data/spec/features/admin/promotion_adjustments_spec.rb +12 -12
  109. data/spec/features/admin/promotions/option_value_rule_spec.rb +2 -2
  110. data/spec/features/admin/promotions/product_rule_spec.rb +1 -1
  111. data/spec/features/admin/promotions/tiered_calculator_spec.rb +1 -1
  112. data/spec/features/admin/promotions/user_rule_spec.rb +2 -2
  113. data/spec/features/admin/reimbursements_spec.rb +1 -1
  114. data/spec/features/admin/store_credits_spec.rb +51 -2
  115. data/spec/features/admin/taxons_spec.rb +35 -0
  116. data/spec/features/admin/users_spec.rb +22 -11
  117. data/spec/helpers/admin/navigation_helper_spec.rb +4 -2
  118. data/spec/helpers/admin/store_credit_events_helper_spec.rb +2 -2
  119. data/spec/javascripts/spec_helper.js +2 -0
  120. data/spec/models/spree/backend_configuration/menu_item_spec.rb +17 -0
  121. data/spec/models/spree/backend_configuration_spec.rb +22 -0
  122. data/spec/spec_helper.rb +1 -0
  123. data/spec/support/feature/order_feature_helper.rb +1 -1
  124. data/spec/views/spree/admin/shared/navigation_footer_spec.rb +1 -1
  125. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-US.js +10 -0
  126. metadata +26 -34
  127. data/app/controllers/spree/admin/reports_controller.rb +0 -82
  128. data/app/views/spree/admin/reports/index.html.erb +0 -19
  129. data/app/views/spree/admin/reports/sales_total.html.erb +0 -35
  130. data/app/views/spree/admin/shared/_report_order_criteria.html.erb +0 -19
  131. data/app/views/spree/admin/store_credits/_update_reason_field.html.erb +0 -7
  132. data/spec/controllers/spree/admin/reports_controller_spec.rb +0 -133
  133. data/spec/features/admin/reports_spec.rb +0 -63
@@ -1,63 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'spec_helper'
4
-
5
- describe "Reports", type: :feature do
6
- stub_authorization!
7
-
8
- context "visiting the admin reports page" do
9
- it "should have the right content" do
10
- visit spree.admin_path
11
- click_link "Reports"
12
- click_link "Sales Total"
13
-
14
- expect(page).to have_content("ReportsSales Total")
15
- expect(page).to have_content("Item Total")
16
- expect(page).to have_content("Adjustment Total")
17
- expect(page).to have_content("Sales Total")
18
- end
19
- end
20
-
21
- context "searching the admin reports page" do
22
- before do
23
- order = create(:order)
24
- order.update_columns({ adjustment_total: 100 })
25
- order.completed_at = Time.current
26
- order.save!
27
-
28
- order = create(:order)
29
- order.update_columns({ adjustment_total: 200 })
30
- order.completed_at = Time.current
31
- order.save!
32
-
33
- # incomplete order
34
- order = create(:order)
35
- order.update_columns({ adjustment_total: 50 })
36
- order.save!
37
-
38
- order = create(:order)
39
- order.update_columns({ adjustment_total: 200 })
40
- order.completed_at = 3.years.ago
41
- order.created_at = 3.years.ago
42
- order.save!
43
-
44
- order = create(:order)
45
- order.update_columns({ adjustment_total: 200 })
46
- order.completed_at = 3.years.from_now
47
- order.created_at = 3.years.from_now
48
- order.save!
49
- end
50
-
51
- it "should allow me to search for reports" do
52
- visit spree.admin_path
53
- click_link "Reports"
54
- click_link "Sales Total"
55
-
56
- fill_in "q_completed_at_gt", with: 1.week.ago
57
- fill_in "q_completed_at_lt", with: 1.week.from_now
58
- click_button "Search"
59
-
60
- expect(page).to have_content("$300.00")
61
- end
62
- end
63
- end