solidus_backend 2.7.4 → 2.9.2

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 (214) 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/sortable_table.js +1 -0
  7. data/app/assets/javascripts/spree/backend/components/tabs.js +1 -0
  8. data/app/assets/javascripts/spree/backend/components/tooltips.js +21 -17
  9. data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +1 -1
  10. data/app/assets/javascripts/spree/backend/product_picker.js +1 -1
  11. data/app/assets/javascripts/spree/backend/shipments.js +7 -1
  12. data/app/assets/javascripts/spree/backend/stock_management.js +18 -0
  13. data/app/assets/javascripts/spree/backend/store_credits.js +18 -2
  14. data/app/assets/javascripts/spree/backend/taxons.js +1 -1
  15. data/app/assets/javascripts/spree/backend/templates/orders/line_item.hbs +1 -1
  16. data/app/assets/javascripts/spree/backend/templates/stock_items/stock_location_stock_item.hbs +24 -25
  17. data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
  18. data/app/assets/javascripts/spree/backend/variant_autocomplete.js +1 -1
  19. data/app/assets/javascripts/spree/backend/views/order/customer_select.js +1 -1
  20. data/app/assets/javascripts/spree/backend/views/order/summary.js +2 -2
  21. data/app/assets/javascripts/spree/backend/views/stock/add_stock_item.js +15 -4
  22. data/app/assets/javascripts/spree/backend/views/stock/edit_stock_item_row.js +46 -10
  23. data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +24 -16
  24. data/app/assets/stylesheets/spree/backend/components/_breadcrumb.scss +12 -0
  25. data/app/assets/stylesheets/spree/backend/components/_buttons.scss +18 -0
  26. data/app/assets/stylesheets/spree/backend/components/_image_placeholder.scss +2 -2
  27. data/app/assets/stylesheets/spree/backend/components/_list_group.scss +2 -2
  28. data/app/assets/stylesheets/spree/backend/components/_messages.scss +20 -12
  29. data/app/assets/stylesheets/spree/backend/components/_navigation.scss +45 -11
  30. data/app/assets/stylesheets/spree/backend/components/_progress.scss +3 -3
  31. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +1 -2
  32. data/app/assets/stylesheets/spree/backend/components/_tabs.scss +14 -13
  33. data/app/assets/stylesheets/spree/backend/globals/_deprecated_variables.scss +24 -0
  34. data/app/assets/stylesheets/spree/backend/globals/_deprecation.scss +10 -1
  35. data/app/assets/stylesheets/spree/backend/globals/_functions.scss +2 -0
  36. data/app/assets/stylesheets/spree/backend/globals/_variables.scss +88 -57
  37. data/app/assets/stylesheets/spree/backend/globals/_variables_override.scss +1 -0
  38. data/app/assets/stylesheets/spree/backend/globals/mixins/_caret.scss +1 -1
  39. data/app/assets/stylesheets/spree/backend/globals/mixins/_line_through.scss +1 -1
  40. data/app/assets/stylesheets/spree/backend/sections/_log_entries.scss +8 -2
  41. data/app/assets/stylesheets/spree/backend/sections/_orders.scss +25 -6
  42. data/app/assets/stylesheets/spree/backend/sections/_products.scss +3 -1
  43. data/app/assets/stylesheets/spree/backend/sections/_promotions.scss +5 -5
  44. data/app/assets/stylesheets/spree/backend/sections/_stock_management.scss +77 -2
  45. data/app/assets/stylesheets/spree/backend/sections/_style_guide.scss +4 -4
  46. data/app/assets/stylesheets/spree/backend/sections/_taxonomies.scss +1 -1
  47. data/app/assets/stylesheets/spree/backend/shared/_fonts.scss +15 -0
  48. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +27 -7
  49. data/app/assets/stylesheets/spree/backend/shared/_header.scss +2 -2
  50. data/app/assets/stylesheets/spree/backend/shared/_icons.scss +5 -1
  51. data/app/assets/stylesheets/spree/backend/shared/_layout.scss +5 -4
  52. data/app/assets/stylesheets/spree/backend/shared/_tables.scss +11 -6
  53. data/app/assets/stylesheets/spree/backend/shared/_typography.scss +10 -6
  54. data/app/assets/stylesheets/spree/backend/spree_admin.scss +3 -1
  55. data/app/controllers/spree/admin/cancellations_controller.rb +2 -2
  56. data/app/controllers/spree/admin/customer_returns_controller.rb +8 -1
  57. data/app/controllers/spree/admin/locale_controller.rb +1 -1
  58. data/app/controllers/spree/admin/log_entries_controller.rb +3 -0
  59. data/app/controllers/spree/admin/orders/customer_details_controller.rb +8 -1
  60. data/app/controllers/spree/admin/orders_controller.rb +1 -12
  61. data/app/controllers/spree/admin/products_controller.rb +10 -6
  62. data/app/controllers/spree/admin/promotion_codes_controller.rb +19 -1
  63. data/app/controllers/spree/admin/promotions_controller.rb +1 -1
  64. data/app/controllers/spree/admin/reimbursements_controller.rb +7 -2
  65. data/app/controllers/spree/admin/resource_controller.rb +1 -0
  66. data/app/controllers/spree/admin/store_credit_reasons_controller.rb +8 -0
  67. data/app/controllers/spree/admin/store_credits_controller.rb +11 -11
  68. data/app/controllers/spree/admin/users_controller.rb +4 -2
  69. data/app/helpers/spree/admin/base_helper.rb +9 -3
  70. data/app/helpers/spree/admin/navigation_helper.rb +1 -1
  71. data/app/helpers/spree/admin/promotions_helper.rb +15 -0
  72. data/app/models/spree/backend_configuration.rb +38 -21
  73. data/app/views/spree/admin/cancellations/index.html.erb +3 -1
  74. data/app/views/spree/admin/images/_image_row.html.erb +1 -1
  75. data/app/views/spree/admin/images/edit.html.erb +3 -3
  76. data/app/views/spree/admin/images/index.html.erb +3 -3
  77. data/app/views/spree/admin/log_entries/index.html.erb +1 -19
  78. data/app/views/spree/admin/option_types/edit.html.erb +1 -1
  79. data/app/views/spree/admin/orders/_carton_manifest.html.erb +3 -1
  80. data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +1 -1
  81. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +3 -1
  82. data/app/views/spree/admin/orders/confirm/_line_items.html.erb +3 -2
  83. data/app/views/spree/admin/orders/confirm/_shipment_manifest.html.erb +3 -1
  84. data/app/views/spree/admin/orders/index.html.erb +1 -1
  85. data/app/views/spree/admin/payments/_capture_events.html.erb +15 -18
  86. data/app/views/spree/admin/payments/_list.html.erb +1 -1
  87. data/app/views/spree/admin/payments/_log_entries.html.erb +29 -0
  88. data/app/views/spree/admin/payments/show.html.erb +13 -6
  89. data/app/views/spree/admin/payments/source_forms/{_storecredit.html.erb → _store_credit.html.erb} +0 -0
  90. data/app/views/spree/admin/payments/source_views/{_storecredit.html.erb → _store_credit.html.erb} +0 -0
  91. data/app/views/spree/admin/prices/_form.html.erb +1 -1
  92. data/app/views/spree/admin/product_properties/index.html.erb +1 -1
  93. data/app/views/spree/admin/products/_form.html.erb +23 -12
  94. data/app/views/spree/admin/products/edit.html.erb +5 -0
  95. data/app/views/spree/admin/products/index.html.erb +3 -1
  96. data/app/views/spree/admin/promotion_categories/index.html.erb +1 -1
  97. data/app/views/spree/admin/promotion_code_batches/index.html.erb +1 -1
  98. data/app/views/spree/admin/promotion_codes/index.html.erb +5 -1
  99. data/app/views/spree/admin/promotion_codes/new.html.erb +31 -0
  100. data/app/views/spree/admin/promotions/_actions.html.erb +1 -1
  101. data/app/views/spree/admin/promotions/_activations_edit.html.erb +1 -1
  102. data/app/views/spree/admin/promotions/_form.html.erb +6 -5
  103. data/app/views/spree/admin/promotions/_rules.html.erb +1 -1
  104. data/app/views/spree/admin/promotions/edit.html.erb +3 -1
  105. data/app/views/spree/admin/promotions/index.html.erb +4 -4
  106. data/app/views/spree/admin/refunds/new.html.erb +1 -1
  107. data/app/views/spree/admin/reimbursements/edit.html.erb +2 -2
  108. data/app/views/spree/admin/shared/_address_form.html.erb +10 -3
  109. data/app/views/spree/admin/shared/_edit_resource_links.html.erb +1 -1
  110. data/app/views/spree/admin/shared/_head.html.erb +1 -3
  111. data/app/views/spree/admin/shared/_image.html.erb +2 -2
  112. data/app/views/spree/admin/shared/_modal.html.erb +1 -1
  113. data/app/views/spree/admin/shared/_product_sub_menu.html.erb +1 -1
  114. data/app/views/spree/admin/shared/_settings_checkout_tabs.html.erb +4 -0
  115. data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +3 -3
  116. data/app/views/spree/admin/shared/_tabs.html.erb +3 -2
  117. data/app/views/spree/admin/shared/_variant_search.html.erb +1 -1
  118. data/app/views/spree/admin/shipping_methods/_form.html.erb +10 -10
  119. data/app/views/spree/admin/stock_items/_stock_management.html.erb +56 -38
  120. data/app/views/spree/admin/stock_locations/_form.html.erb +133 -121
  121. data/app/views/spree/admin/stock_locations/edit.html.erb +4 -2
  122. data/app/views/spree/admin/store_credit_reasons/edit.html.erb +15 -0
  123. data/app/views/spree/admin/store_credit_reasons/index.html.erb +56 -0
  124. data/app/views/spree/admin/store_credit_reasons/new.html.erb +18 -0
  125. data/app/views/spree/admin/store_credit_reasons/shared/_form.html.erb +15 -0
  126. data/app/views/spree/admin/store_credits/_store_credit_reason_field.html.erb +7 -0
  127. data/app/views/spree/admin/store_credits/edit_amount.html.erb +1 -1
  128. data/app/views/spree/admin/store_credits/edit_validity.html.erb +2 -2
  129. data/app/views/spree/admin/store_credits/index.html.erb +1 -1
  130. data/app/views/spree/admin/store_credits/show.html.erb +3 -3
  131. data/app/views/spree/admin/stores/_form.html.erb +1 -0
  132. data/app/views/spree/admin/style_guide/topics/typography/_colors.html.erb +30 -20
  133. data/app/views/spree/admin/style_guide/topics/typography/_fonts.html.erb +1 -1
  134. data/app/views/spree/admin/taxonomies/edit.html.erb +1 -1
  135. data/app/views/spree/admin/taxons/_form.html.erb +1 -1
  136. data/app/views/spree/admin/taxons/edit.html.erb +2 -2
  137. data/app/views/spree/admin/users/edit.html.erb +2 -2
  138. data/app/views/spree/admin/users/index.html.erb +2 -2
  139. data/app/views/spree/admin/users/items.html.erb +3 -1
  140. data/app/views/spree/admin/users/orders.html.erb +1 -1
  141. data/app/views/spree/admin/variants/_form.html.erb +1 -1
  142. data/app/views/spree/admin/variants/index.html.erb +1 -1
  143. data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
  144. data/config/routes.rb +2 -8
  145. data/lib/spree/backend.rb +1 -1
  146. data/solidus_backend.gemspec +3 -4
  147. data/spec/controllers/spree/admin/base_controller_spec.rb +1 -1
  148. data/spec/controllers/spree/admin/cancellations_controller_spec.rb +7 -3
  149. data/spec/controllers/spree/admin/locale_controller_spec.rb +45 -0
  150. data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +50 -2
  151. data/spec/controllers/spree/admin/orders_controller_spec.rb +25 -13
  152. data/spec/controllers/spree/admin/payments_controller_spec.rb +1 -1
  153. data/spec/controllers/spree/admin/products_controller_spec.rb +72 -0
  154. data/spec/controllers/spree/admin/promotion_codes_controller_spec.rb +13 -1
  155. data/spec/controllers/spree/admin/reimbursements_controller_spec.rb +11 -0
  156. data/spec/controllers/spree/admin/resource_controller_spec.rb +22 -0
  157. data/spec/controllers/spree/admin/stock_items_controller_spec.rb +1 -1
  158. data/spec/controllers/spree/admin/stock_locations_controller_spec.rb +1 -1
  159. data/spec/controllers/spree/admin/store_credits_controller_spec.rb +7 -7
  160. data/spec/features/admin/configuration/payment_methods_spec.rb +2 -2
  161. data/spec/features/admin/configuration/shipping_methods_spec.rb +2 -2
  162. data/spec/features/admin/homepage_spec.rb +1 -6
  163. data/spec/features/admin/locale_spec.rb +1 -2
  164. data/spec/features/admin/orders/adjustments_spec.rb +1 -1
  165. data/spec/features/admin/orders/customer_details_spec.rb +5 -7
  166. data/spec/features/admin/orders/customer_returns_spec.rb +28 -0
  167. data/spec/features/admin/orders/listing_spec.rb +2 -7
  168. data/spec/features/admin/orders/log_entries_spec.rb +2 -2
  169. data/spec/features/admin/orders/new_order_spec.rb +117 -0
  170. data/spec/features/admin/orders/new_refund_spec.rb +35 -0
  171. data/spec/features/admin/orders/order_details_spec.rb +10 -5
  172. data/spec/features/admin/orders/payments_spec.rb +82 -41
  173. data/spec/features/admin/orders/return_payment_state_spec.rb +3 -0
  174. data/spec/features/admin/orders/shipments_spec.rb +28 -0
  175. data/spec/features/admin/products/edit/products_spec.rb +25 -0
  176. data/spec/features/admin/products/edit/taxons_spec.rb +4 -0
  177. data/spec/features/admin/products/pricing_spec.rb +24 -6
  178. data/spec/features/admin/products/products_spec.rb +5 -5
  179. data/spec/features/admin/products/stock_management_spec.rb +27 -13
  180. data/spec/features/admin/products/variant_spec.rb +1 -1
  181. data/spec/features/admin/promotion_adjustments_spec.rb +12 -12
  182. data/spec/features/admin/promotions/option_value_rule_spec.rb +2 -2
  183. data/spec/features/admin/promotions/product_rule_spec.rb +1 -1
  184. data/spec/features/admin/promotions/promotion_spec.rb +52 -0
  185. data/spec/features/admin/promotions/tiered_calculator_spec.rb +1 -1
  186. data/spec/features/admin/promotions/user_rule_spec.rb +2 -2
  187. data/spec/features/admin/reimbursements_spec.rb +1 -1
  188. data/spec/features/admin/store_credits_spec.rb +51 -2
  189. data/spec/features/admin/taxons_spec.rb +35 -0
  190. data/spec/features/admin/users_spec.rb +44 -11
  191. data/spec/helpers/admin/navigation_helper_spec.rb +4 -2
  192. data/spec/helpers/admin/store_credit_events_helper_spec.rb +2 -2
  193. data/spec/javascripts/spec_helper.js +2 -0
  194. data/spec/models/spree/backend_configuration/menu_item_spec.rb +17 -0
  195. data/spec/models/spree/backend_configuration_spec.rb +22 -0
  196. data/spec/spec_helper.rb +2 -2
  197. data/spec/support/appear_before_matcher.rb +1 -1
  198. data/spec/support/feature/order_feature_helper.rb +1 -1
  199. data/spec/views/spree/admin/shared/navigation_footer_spec.rb +1 -1
  200. data/vendor/assets/fonts/inter/Inter-Regular.woff +0 -0
  201. data/vendor/assets/fonts/inter/Inter-Regular.woff2 +0 -0
  202. data/vendor/assets/fonts/inter/Inter-SemiBold.woff +0 -0
  203. data/vendor/assets/fonts/inter/Inter-SemiBold.woff2 +0 -0
  204. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-US.js +10 -0
  205. data/vendor/assets/stylesheets/solidus_admin/bootstrap/_pagination.scss +4 -0
  206. metadata +38 -36
  207. data/.eslintrc +0 -21
  208. data/app/controllers/spree/admin/reports_controller.rb +0 -82
  209. data/app/views/spree/admin/reports/index.html.erb +0 -19
  210. data/app/views/spree/admin/reports/sales_total.html.erb +0 -35
  211. data/app/views/spree/admin/shared/_report_order_criteria.html.erb +0 -19
  212. data/app/views/spree/admin/store_credits/_update_reason_field.html.erb +0 -7
  213. data/spec/controllers/spree/admin/reports_controller_spec.rb +0 -133
  214. data/spec/features/admin/reports_spec.rb +0 -63
@@ -48,7 +48,7 @@
48
48
 
49
49
  > a {
50
50
  font-size: 1.2rem;
51
- font-weight: 300;
51
+ font-weight: $font-weight-normal;
52
52
  }
53
53
  }
54
54
 
@@ -64,7 +64,7 @@
64
64
  }
65
65
 
66
66
  &-intro,
67
- &-section:not(:last-child) {
67
+ &-section {
68
68
  margin: 4rem 0;
69
69
  }
70
70
 
@@ -112,8 +112,8 @@
112
112
  table.with-actions-borders {
113
113
  th, td {
114
114
  &.actions {
115
- border-right: 1px solid #cee1f4 !important;
116
- border-bottom: 1px solid #cee1f4 !important;
115
+ border-right: 1px solid $color-style-guide-table-border !important;
116
+ border-bottom: 1px solid $color-style-guide-table-border !important;
117
117
  }
118
118
  }
119
119
  }
@@ -12,7 +12,7 @@
12
12
  }
13
13
 
14
14
  .taxon {
15
- background-color: very-light($color-3);
15
+ background-color: $color-light;
16
16
  border: 1px solid $color-border;
17
17
  border-radius: $border-radius;
18
18
  color: $body-color;
@@ -0,0 +1,15 @@
1
+ @font-face {
2
+ font-family: 'Inter';
3
+ font-style: normal;
4
+ font-weight: $font-weight-normal;
5
+ src: font-url("inter/Inter-Regular.woff2") format("woff2"),
6
+ font-url("inter/Inter-Regular.woff") format("woff");
7
+ }
8
+
9
+ @font-face {
10
+ font-family: 'Inter';
11
+ font-style: normal;
12
+ font-weight: $font-weight-bold;
13
+ src: font-url("inter/Inter-SemiBold.woff2") format("woff2"),
14
+ font-url("inter/Inter-SemiBold.woff") format("woff");
15
+ }
@@ -41,6 +41,8 @@ textarea {
41
41
  }
42
42
 
43
43
  label {
44
+ font-size: inherit;
45
+
44
46
  &.required:after {
45
47
  content: " *";
46
48
  }
@@ -64,7 +66,19 @@ button,
64
66
  // In order to avoid the clashing between using `:not(.btn)` and
65
67
  // `@extend .btn` we need to use an attribute selector of `[class*="btn"]`.
66
68
  @extend .btn;
67
- @include button-variant(theme-color("primary"), theme-color("primary"));
69
+ background: linear-gradient($color-white, lighten($color-light-dark, 2%));
70
+ color: $color-dark;
71
+ border-color: $color-dark-accent;
72
+
73
+ &:hover {
74
+ background: linear-gradient($color-white, $color-light-dark);
75
+ color: $color-primary;
76
+ }
77
+
78
+ &.disabled,
79
+ &:disabled {
80
+ color: $color-disabled;
81
+ }
68
82
  }
69
83
 
70
84
  &:before {
@@ -106,6 +120,10 @@ span.info {
106
120
  margin-top: 2.25rem;
107
121
  }
108
122
  }
123
+
124
+ label {
125
+ font-size: $label-font-size;
126
+ }
109
127
 
110
128
  ul {
111
129
  list-style: none;
@@ -131,21 +149,21 @@ span.info {
131
149
  &.withError {
132
150
  .field_with_errors {
133
151
  label {
134
- color: very-light(theme-color("danger"), 30);
152
+ color: theme-color("danger");
135
153
  }
136
154
 
137
155
  input {
138
- border-color: very-light(theme-color("danger"), 15);
156
+ border-color: theme-color("danger");
139
157
  }
140
158
  }
141
159
  .formError {
142
- color: very-light(theme-color("danger"), 30);
160
+ color: lighten(theme-color("danger"), 15);
143
161
  font-style: italic;
144
162
  font-size: 85%;
145
163
  }
146
164
  .select2-container {
147
165
  border-radius: 4px;
148
- border: 1px solid very-light(theme-color("danger"), 15);
166
+ border: 1px solid theme-color("danger");
149
167
  }
150
168
  }
151
169
  }
@@ -172,12 +190,14 @@ fieldset {
172
190
  }
173
191
 
174
192
  legend {
175
- color: $color-2;
176
- font-size: 16px;
193
+ color: $color-dark;
194
+ font-size: 14px;
177
195
  font-weight: $font-weight-bold;
178
196
  text-align: center;
179
197
  padding: 8px 15px;
180
198
  width: auto;
199
+ margin-left: auto;
200
+ margin-right: auto;
181
201
 
182
202
  -webkit-font-smoothing: antialiased;
183
203
  -moz-osx-font-smoothing: grayscale;
@@ -2,7 +2,7 @@
2
2
  display: flex;
3
3
  align-items: center;
4
4
  padding: 15px $grid-gutter-width;
5
- background-color: very-light($color-3, 4);
5
+ background-color: $color-header-bg;
6
6
  border-bottom: 1px solid $color-border;
7
7
  height: $main-header-height;
8
8
 
@@ -17,7 +17,7 @@
17
17
  -moz-osx-font-smoothing: grayscale;
18
18
 
19
19
  i {
20
- color: $color-2;
20
+ color: $color-primary;
21
21
  }
22
22
  }
23
23
 
@@ -14,6 +14,10 @@
14
14
  }
15
15
  }
16
16
 
17
+ .btn.fa {
18
+ font: normal normal $btn-font-weight #{$font-size-base}/#{$btn-line-height} "FontAwesome";
19
+ }
20
+
17
21
  .fa-email { @extend .fa-envelope }
18
22
  .fa-resume { @extend .fa-refresh }
19
23
  .fa-approve { @extend .fa-check }
@@ -26,7 +30,7 @@
26
30
 
27
31
  .fa-trash { @extend .fa-trash-o }
28
32
 
29
- .fa-capture { @extend .fa-check }
33
+ .fa-capture { @extend .fa-thumbs-up }
30
34
  .fa-credit { @extend .fa-check }
31
35
  .fa-approve { @extend .fa-check }
32
36
  .fa-icon-cogs { @extend .fa-cogs }
@@ -8,6 +8,10 @@ body {
8
8
  padding-left: $width-sidebar;
9
9
  }
10
10
 
11
+ .admin {
12
+ background-color: $admin-body-bg;
13
+ }
14
+
11
15
  .admin-nav {
12
16
  position: absolute;
13
17
  top: 0;
@@ -18,6 +22,7 @@ body {
18
22
  }
19
23
 
20
24
  .content-wrapper {
25
+ background-color: $content-wrapper-bg;
21
26
  padding-top: 1rem;
22
27
  padding-left: $grid-gutter-width;
23
28
  padding-right: $grid-gutter-width;
@@ -29,10 +34,6 @@ body {
29
34
  }
30
35
  }
31
36
 
32
- .content-main {
33
- overflow-x: hidden; // makes sure that the tabs are able to resize
34
- }
35
-
36
37
  #content {
37
38
  position: relative;
38
39
  padding: 0;
@@ -47,12 +47,12 @@ table {
47
47
 
48
48
  button[class*='fa-'] {
49
49
  color: $link-color;
50
- background-color: transparent;
50
+ background: transparent;
51
51
  border: 0 none;
52
52
  padding: 0 !important;
53
53
 
54
54
  &:hover {
55
- background-color: transparent;
55
+ background: transparent;
56
56
  }
57
57
  }
58
58
 
@@ -61,7 +61,7 @@ table {
61
61
  padding-left: 0px;
62
62
 
63
63
  &:hover {
64
- color: $color-3;
64
+ color: $color-dark-light;
65
65
  }
66
66
  }
67
67
 
@@ -108,14 +108,14 @@ table {
108
108
  }
109
109
 
110
110
  th a {
111
- color: $color-4;
111
+ color: $color-dark;
112
112
  }
113
113
 
114
114
  tbody {
115
115
  tr {
116
116
  &.deleted td {
117
- background-color: very-light(theme-color("danger"), 6);
118
- border-color: very-light(theme-color("danger"), 15);
117
+ background-color: lighten(theme-color("danger"), 6);
118
+ border-color: lighten(theme-color("danger"), 15);
119
119
  }
120
120
  }
121
121
 
@@ -123,4 +123,9 @@ table {
123
123
  border-top: none;
124
124
  }
125
125
  }
126
+
127
+ pre {
128
+ font-size: 100%;
129
+ margin-bottom: 0;
130
+ }
126
131
  }
@@ -7,7 +7,7 @@ html {
7
7
 
8
8
  body {
9
9
  padding: 0;
10
- font-weight: 400;
10
+ font-weight: $font-weight-normal;
11
11
  text-rendering: optimizeLegibility;
12
12
  }
13
13
 
@@ -17,6 +17,11 @@ hr {
17
17
  border-left: none;
18
18
  }
19
19
 
20
+ strong,
21
+ b {
22
+ font-weight: $font-weight-bold;
23
+ }
24
+
20
25
  // Headings
21
26
  //--------------------------------------------------------------
22
27
 
@@ -68,7 +73,6 @@ dl {
68
73
  width: 40%;
69
74
  font-weight: $font-weight-bold;
70
75
  padding-left: 0;
71
- font-size: 85%;
72
76
  clear: left;
73
77
  }
74
78
 
@@ -93,10 +97,10 @@ dl {
93
97
 
94
98
  .uppercase { text-transform: uppercase }
95
99
 
96
- .green { color: $color-2 }
97
- .blue { color: $color-3 }
98
- .red { color: $color-5 }
99
- .yellow { color: $color-6 }
100
+ .green { color: $color-green }
101
+ .blue { color: $color-primary }
102
+ .red { color: $color-red }
103
+ .yellow { color: $color-yellow }
100
104
 
101
105
  .negative { color: $red }
102
106
  input[type="number"].negative { color: $red } // needed to override blue style that is more specific than '.negative'
@@ -2,12 +2,14 @@
2
2
  @import 'spree/backend/globals/deprecation';
3
3
  @import 'spree/backend/globals/variables_override';
4
4
  @import 'spree/backend/globals/variables';
5
+ @import 'spree/backend/globals/deprecated_variables';
5
6
 
6
7
  @import 'bootstrap_custom';
7
8
  @import 'solidus_admin/bootstrap/bootstrap';
8
9
 
9
10
  @import 'spree/backend/globals/mixins';
10
11
 
12
+ @import 'spree/backend/shared/fonts';
11
13
  @import 'spree/backend/shared/typography';
12
14
  @import 'spree/backend/shared/images';
13
15
  @import 'spree/backend/shared/tables';
@@ -20,6 +22,7 @@
20
22
  @import 'spree/backend/components/states';
21
23
  @import 'spree/backend/components/actions';
22
24
  @import 'spree/backend/components/breadcrumb';
25
+ @import 'spree/backend/components/buttons';
23
26
  @import 'spree/backend/components/number_with_currency';
24
27
  @import 'spree/backend/components/hint';
25
28
  @import 'spree/backend/components/image_placeholder';
@@ -29,7 +32,6 @@
29
32
  @import 'spree/backend/components/table-filter';
30
33
  @import 'spree/backend/components/navigation';
31
34
  @import 'spree/backend/components/sidebar';
32
- @import 'spree/backend/components/stock_table';
33
35
  @import 'spree/backend/components/editable_table';
34
36
  @import 'spree/backend/components/pills';
35
37
  @import 'spree/backend/components/tabs';
@@ -20,7 +20,7 @@ module Spree
20
20
  flash[:error] = t('spree.no_inventory_selected')
21
21
  redirect_to admin_order_cancellations_path(@order)
22
22
  else
23
- @order.cancellations.short_ship(inventory_units, whodunnit: whodunnit)
23
+ @order.cancellations.short_ship(inventory_units, created_by: created_by)
24
24
 
25
25
  flash[:success] = t('spree.inventory_canceled')
26
26
  redirect_to edit_admin_order_url(@order)
@@ -29,7 +29,7 @@ module Spree
29
29
 
30
30
  private
31
31
 
32
- def whodunnit
32
+ def created_by
33
33
  try_spree_current_user.try(:email)
34
34
  end
35
35
 
@@ -10,6 +10,7 @@ module Spree
10
10
  before_action :load_form_data, only: [:new, :edit]
11
11
  before_action :build_return_items_from_params, only: [:create]
12
12
  create.fails :load_form_data
13
+ create.after :order_process_return
13
14
 
14
15
  def edit
15
16
  @pending_return_items = @customer_return.return_items.select(&:pending?)
@@ -23,6 +24,10 @@ module Spree
23
24
 
24
25
  private
25
26
 
27
+ def order_process_return
28
+ @customer_return.process_return!
29
+ end
30
+
26
31
  def location_after_save
27
32
  url_for([:edit, :admin, @order, @customer_return])
28
33
  end
@@ -60,11 +65,13 @@ module Spree
60
65
 
61
66
  def build_return_items_from_params
62
67
  return_items_params = permitted_resource_params.delete(:return_items_attributes).values
63
-
64
68
  @customer_return.return_items = return_items_params.map do |item_params|
65
69
  next unless item_params.delete('returned') == '1'
66
70
  return_item = item_params[:id] ? Spree::ReturnItem.find(item_params[:id]) : Spree::ReturnItem.new
67
71
  return_item.assign_attributes(item_params)
72
+
73
+ return_item.skip_customer_return_processing = true
74
+
68
75
  if item_params[:reception_status_event].blank?
69
76
  return redirect_to(new_object_url, flash: { error: 'Reception status choice required' })
70
77
  end
@@ -8,7 +8,7 @@ module Spree
8
8
 
9
9
  if locale && I18n.available_locales.include?(locale.to_sym)
10
10
  I18n.locale = locale
11
- session[:locale] = locale
11
+ session[set_user_language_locale_key] = locale
12
12
 
13
13
  respond_to do |format|
14
14
  format.json { render json: { locale: locale, location: spree.admin_url } }
@@ -6,6 +6,9 @@ module Spree
6
6
  before_action :find_order_and_payment
7
7
 
8
8
  def index
9
+ Spree::Deprecation.warn 'Using a dedicated route for payment log entries ' \
10
+ 'has been deprecated in favor of displaying the log entries on ' \
11
+ 'the payment screen itself.', caller_locations(0)
9
12
  @log_entries = @payment.log_entries
10
13
  end
11
14
 
@@ -13,7 +13,8 @@ module Spree
13
13
  end
14
14
 
15
15
  def edit
16
- country_id = Spree::Country.default.id
16
+ country_id = default_country_id
17
+
17
18
  @order.build_bill_address(country_id: country_id) if @order.bill_address.nil?
18
19
  @order.build_ship_address(country_id: country_id) if @order.ship_address.nil?
19
20
 
@@ -43,6 +44,12 @@ module Spree
43
44
 
44
45
  private
45
46
 
47
+ def default_country_id
48
+ country_id = Spree::Country.default.id
49
+
50
+ country_id if Spree::Country.available.pluck(:id).include?(country_id)
51
+ end
52
+
46
53
  def order_params
47
54
  params.require(:order).permit(
48
55
  :email,
@@ -14,7 +14,6 @@ module Spree
14
14
  respond_to :html
15
15
 
16
16
  def index
17
- query_present = params[:q]
18
17
  params[:q] ||= {}
19
18
  params[:q][:completed_at_not_null] ||= '1' if Spree::Config[:show_only_complete_orders_by_default]
20
19
  @show_only_completed = params[:q][:completed_at_not_null] == '1'
@@ -51,17 +50,7 @@ module Spree
51
50
  end
52
51
 
53
52
  @search = Spree::Order.accessible_by(current_ability, :index).ransack(params[:q])
54
-
55
- # lazy loading other models here (via includes) may result in an invalid query
56
- # e.g. SELECT DISTINCT DISTINCT "spree_orders".id, "spree_orders"."created_at" AS alias_0 FROM "spree_orders"
57
- # see https://github.com/spree/spree/pull/3919
58
- @orders = if query_present
59
- @search.result(distinct: true)
60
- else
61
- @search.result
62
- end
63
-
64
- @orders = @orders.
53
+ @orders = @search.result.includes([:user]).
65
54
  page(params[:page]).
66
55
  per(params[:per_page] || Spree::Config[:orders_per_page])
67
56