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.
- checksums.yaml +4 -4
- data/README.md +12 -8
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/javascripts/spree/backend.js +0 -2
- data/app/assets/javascripts/spree/backend/adjustments.js +1 -1
- data/app/assets/javascripts/spree/backend/components/sortable_table.js +1 -0
- data/app/assets/javascripts/spree/backend/components/tabs.js +1 -0
- data/app/assets/javascripts/spree/backend/components/tooltips.js +21 -17
- data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +1 -1
- data/app/assets/javascripts/spree/backend/product_picker.js +1 -1
- data/app/assets/javascripts/spree/backend/shipments.js +7 -1
- data/app/assets/javascripts/spree/backend/stock_management.js +18 -0
- data/app/assets/javascripts/spree/backend/store_credits.js +18 -2
- data/app/assets/javascripts/spree/backend/taxons.js +1 -1
- data/app/assets/javascripts/spree/backend/templates/orders/line_item.hbs +1 -1
- data/app/assets/javascripts/spree/backend/templates/stock_items/stock_location_stock_item.hbs +24 -25
- data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
- data/app/assets/javascripts/spree/backend/variant_autocomplete.js +1 -1
- data/app/assets/javascripts/spree/backend/views/order/customer_select.js +1 -1
- data/app/assets/javascripts/spree/backend/views/order/summary.js +2 -2
- data/app/assets/javascripts/spree/backend/views/stock/add_stock_item.js +15 -4
- data/app/assets/javascripts/spree/backend/views/stock/edit_stock_item_row.js +46 -10
- data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +24 -16
- data/app/assets/stylesheets/spree/backend/components/_breadcrumb.scss +12 -0
- data/app/assets/stylesheets/spree/backend/components/_buttons.scss +18 -0
- data/app/assets/stylesheets/spree/backend/components/_image_placeholder.scss +2 -2
- data/app/assets/stylesheets/spree/backend/components/_list_group.scss +2 -2
- data/app/assets/stylesheets/spree/backend/components/_messages.scss +20 -12
- data/app/assets/stylesheets/spree/backend/components/_navigation.scss +45 -11
- data/app/assets/stylesheets/spree/backend/components/_progress.scss +3 -3
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +1 -2
- data/app/assets/stylesheets/spree/backend/components/_tabs.scss +14 -13
- data/app/assets/stylesheets/spree/backend/globals/_deprecated_variables.scss +24 -0
- data/app/assets/stylesheets/spree/backend/globals/_deprecation.scss +10 -1
- data/app/assets/stylesheets/spree/backend/globals/_functions.scss +2 -0
- data/app/assets/stylesheets/spree/backend/globals/_variables.scss +88 -57
- data/app/assets/stylesheets/spree/backend/globals/_variables_override.scss +1 -0
- data/app/assets/stylesheets/spree/backend/globals/mixins/_caret.scss +1 -1
- data/app/assets/stylesheets/spree/backend/globals/mixins/_line_through.scss +1 -1
- data/app/assets/stylesheets/spree/backend/sections/_log_entries.scss +8 -2
- data/app/assets/stylesheets/spree/backend/sections/_orders.scss +25 -6
- data/app/assets/stylesheets/spree/backend/sections/_products.scss +3 -1
- data/app/assets/stylesheets/spree/backend/sections/_promotions.scss +5 -5
- data/app/assets/stylesheets/spree/backend/sections/_stock_management.scss +77 -2
- data/app/assets/stylesheets/spree/backend/sections/_style_guide.scss +4 -4
- data/app/assets/stylesheets/spree/backend/sections/_taxonomies.scss +1 -1
- data/app/assets/stylesheets/spree/backend/shared/_fonts.scss +15 -0
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +27 -7
- data/app/assets/stylesheets/spree/backend/shared/_header.scss +2 -2
- data/app/assets/stylesheets/spree/backend/shared/_icons.scss +5 -1
- data/app/assets/stylesheets/spree/backend/shared/_layout.scss +5 -4
- data/app/assets/stylesheets/spree/backend/shared/_tables.scss +11 -6
- data/app/assets/stylesheets/spree/backend/shared/_typography.scss +10 -6
- data/app/assets/stylesheets/spree/backend/spree_admin.scss +3 -1
- data/app/controllers/spree/admin/cancellations_controller.rb +2 -2
- data/app/controllers/spree/admin/customer_returns_controller.rb +8 -1
- data/app/controllers/spree/admin/locale_controller.rb +1 -1
- data/app/controllers/spree/admin/log_entries_controller.rb +3 -0
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +8 -1
- data/app/controllers/spree/admin/orders_controller.rb +1 -12
- data/app/controllers/spree/admin/products_controller.rb +10 -6
- data/app/controllers/spree/admin/promotion_codes_controller.rb +19 -1
- data/app/controllers/spree/admin/promotions_controller.rb +1 -1
- data/app/controllers/spree/admin/reimbursements_controller.rb +7 -2
- data/app/controllers/spree/admin/resource_controller.rb +1 -0
- data/app/controllers/spree/admin/store_credit_reasons_controller.rb +8 -0
- data/app/controllers/spree/admin/store_credits_controller.rb +11 -11
- data/app/controllers/spree/admin/users_controller.rb +4 -2
- data/app/helpers/spree/admin/base_helper.rb +9 -3
- data/app/helpers/spree/admin/navigation_helper.rb +1 -1
- data/app/helpers/spree/admin/promotions_helper.rb +15 -0
- data/app/models/spree/backend_configuration.rb +38 -21
- data/app/views/spree/admin/cancellations/index.html.erb +3 -1
- data/app/views/spree/admin/images/_image_row.html.erb +1 -1
- data/app/views/spree/admin/images/edit.html.erb +3 -3
- data/app/views/spree/admin/images/index.html.erb +3 -3
- data/app/views/spree/admin/log_entries/index.html.erb +1 -19
- data/app/views/spree/admin/option_types/edit.html.erb +1 -1
- data/app/views/spree/admin/orders/_carton_manifest.html.erb +3 -1
- data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +1 -1
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +3 -1
- data/app/views/spree/admin/orders/confirm/_line_items.html.erb +3 -2
- data/app/views/spree/admin/orders/confirm/_shipment_manifest.html.erb +3 -1
- data/app/views/spree/admin/orders/index.html.erb +1 -1
- data/app/views/spree/admin/payments/_capture_events.html.erb +15 -18
- data/app/views/spree/admin/payments/_list.html.erb +1 -1
- data/app/views/spree/admin/payments/_log_entries.html.erb +29 -0
- data/app/views/spree/admin/payments/show.html.erb +13 -6
- data/app/views/spree/admin/payments/source_forms/{_storecredit.html.erb → _store_credit.html.erb} +0 -0
- data/app/views/spree/admin/payments/source_views/{_storecredit.html.erb → _store_credit.html.erb} +0 -0
- data/app/views/spree/admin/prices/_form.html.erb +1 -1
- data/app/views/spree/admin/product_properties/index.html.erb +1 -1
- data/app/views/spree/admin/products/_form.html.erb +23 -12
- data/app/views/spree/admin/products/edit.html.erb +5 -0
- data/app/views/spree/admin/products/index.html.erb +3 -1
- data/app/views/spree/admin/promotion_categories/index.html.erb +1 -1
- data/app/views/spree/admin/promotion_code_batches/index.html.erb +1 -1
- data/app/views/spree/admin/promotion_codes/index.html.erb +5 -1
- data/app/views/spree/admin/promotion_codes/new.html.erb +31 -0
- data/app/views/spree/admin/promotions/_actions.html.erb +1 -1
- data/app/views/spree/admin/promotions/_activations_edit.html.erb +1 -1
- data/app/views/spree/admin/promotions/_form.html.erb +6 -5
- data/app/views/spree/admin/promotions/_rules.html.erb +1 -1
- data/app/views/spree/admin/promotions/edit.html.erb +3 -1
- data/app/views/spree/admin/promotions/index.html.erb +4 -4
- data/app/views/spree/admin/refunds/new.html.erb +1 -1
- data/app/views/spree/admin/reimbursements/edit.html.erb +2 -2
- data/app/views/spree/admin/shared/_address_form.html.erb +10 -3
- data/app/views/spree/admin/shared/_edit_resource_links.html.erb +1 -1
- data/app/views/spree/admin/shared/_head.html.erb +1 -3
- data/app/views/spree/admin/shared/_image.html.erb +2 -2
- data/app/views/spree/admin/shared/_modal.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_sub_menu.html.erb +1 -1
- data/app/views/spree/admin/shared/_settings_checkout_tabs.html.erb +4 -0
- data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +3 -3
- data/app/views/spree/admin/shared/_tabs.html.erb +3 -2
- data/app/views/spree/admin/shared/_variant_search.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/_form.html.erb +10 -10
- data/app/views/spree/admin/stock_items/_stock_management.html.erb +56 -38
- data/app/views/spree/admin/stock_locations/_form.html.erb +133 -121
- data/app/views/spree/admin/stock_locations/edit.html.erb +4 -2
- data/app/views/spree/admin/store_credit_reasons/edit.html.erb +15 -0
- data/app/views/spree/admin/store_credit_reasons/index.html.erb +56 -0
- data/app/views/spree/admin/store_credit_reasons/new.html.erb +18 -0
- data/app/views/spree/admin/store_credit_reasons/shared/_form.html.erb +15 -0
- data/app/views/spree/admin/store_credits/_store_credit_reason_field.html.erb +7 -0
- data/app/views/spree/admin/store_credits/edit_amount.html.erb +1 -1
- data/app/views/spree/admin/store_credits/edit_validity.html.erb +2 -2
- data/app/views/spree/admin/store_credits/index.html.erb +1 -1
- data/app/views/spree/admin/store_credits/show.html.erb +3 -3
- data/app/views/spree/admin/stores/_form.html.erb +1 -0
- data/app/views/spree/admin/style_guide/topics/typography/_colors.html.erb +30 -20
- data/app/views/spree/admin/style_guide/topics/typography/_fonts.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/edit.html.erb +1 -1
- data/app/views/spree/admin/taxons/_form.html.erb +1 -1
- data/app/views/spree/admin/taxons/edit.html.erb +2 -2
- data/app/views/spree/admin/users/edit.html.erb +2 -2
- data/app/views/spree/admin/users/index.html.erb +2 -2
- data/app/views/spree/admin/users/items.html.erb +3 -1
- data/app/views/spree/admin/users/orders.html.erb +1 -1
- data/app/views/spree/admin/variants/_form.html.erb +1 -1
- data/app/views/spree/admin/variants/index.html.erb +1 -1
- data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
- data/config/routes.rb +2 -8
- data/lib/spree/backend.rb +1 -1
- data/solidus_backend.gemspec +3 -4
- data/spec/controllers/spree/admin/base_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/cancellations_controller_spec.rb +7 -3
- data/spec/controllers/spree/admin/locale_controller_spec.rb +45 -0
- data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +50 -2
- data/spec/controllers/spree/admin/orders_controller_spec.rb +25 -13
- data/spec/controllers/spree/admin/payments_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/products_controller_spec.rb +72 -0
- data/spec/controllers/spree/admin/promotion_codes_controller_spec.rb +13 -1
- data/spec/controllers/spree/admin/reimbursements_controller_spec.rb +11 -0
- data/spec/controllers/spree/admin/resource_controller_spec.rb +22 -0
- data/spec/controllers/spree/admin/stock_items_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/stock_locations_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/store_credits_controller_spec.rb +7 -7
- data/spec/features/admin/configuration/payment_methods_spec.rb +2 -2
- data/spec/features/admin/configuration/shipping_methods_spec.rb +2 -2
- data/spec/features/admin/homepage_spec.rb +1 -6
- data/spec/features/admin/locale_spec.rb +1 -2
- data/spec/features/admin/orders/adjustments_spec.rb +1 -1
- data/spec/features/admin/orders/customer_details_spec.rb +5 -7
- data/spec/features/admin/orders/customer_returns_spec.rb +28 -0
- data/spec/features/admin/orders/listing_spec.rb +2 -7
- data/spec/features/admin/orders/log_entries_spec.rb +2 -2
- data/spec/features/admin/orders/new_order_spec.rb +117 -0
- data/spec/features/admin/orders/new_refund_spec.rb +35 -0
- data/spec/features/admin/orders/order_details_spec.rb +10 -5
- data/spec/features/admin/orders/payments_spec.rb +82 -41
- data/spec/features/admin/orders/return_payment_state_spec.rb +3 -0
- data/spec/features/admin/orders/shipments_spec.rb +28 -0
- data/spec/features/admin/products/edit/products_spec.rb +25 -0
- data/spec/features/admin/products/edit/taxons_spec.rb +4 -0
- data/spec/features/admin/products/pricing_spec.rb +24 -6
- data/spec/features/admin/products/products_spec.rb +5 -5
- data/spec/features/admin/products/stock_management_spec.rb +27 -13
- data/spec/features/admin/products/variant_spec.rb +1 -1
- data/spec/features/admin/promotion_adjustments_spec.rb +12 -12
- data/spec/features/admin/promotions/option_value_rule_spec.rb +2 -2
- data/spec/features/admin/promotions/product_rule_spec.rb +1 -1
- data/spec/features/admin/promotions/promotion_spec.rb +52 -0
- data/spec/features/admin/promotions/tiered_calculator_spec.rb +1 -1
- data/spec/features/admin/promotions/user_rule_spec.rb +2 -2
- data/spec/features/admin/reimbursements_spec.rb +1 -1
- data/spec/features/admin/store_credits_spec.rb +51 -2
- data/spec/features/admin/taxons_spec.rb +35 -0
- data/spec/features/admin/users_spec.rb +44 -11
- data/spec/helpers/admin/navigation_helper_spec.rb +4 -2
- data/spec/helpers/admin/store_credit_events_helper_spec.rb +2 -2
- data/spec/javascripts/spec_helper.js +2 -0
- data/spec/models/spree/backend_configuration/menu_item_spec.rb +17 -0
- data/spec/models/spree/backend_configuration_spec.rb +22 -0
- data/spec/spec_helper.rb +2 -2
- data/spec/support/appear_before_matcher.rb +1 -1
- data/spec/support/feature/order_feature_helper.rb +1 -1
- data/spec/views/spree/admin/shared/navigation_footer_spec.rb +1 -1
- data/vendor/assets/fonts/inter/Inter-Regular.woff +0 -0
- data/vendor/assets/fonts/inter/Inter-Regular.woff2 +0 -0
- data/vendor/assets/fonts/inter/Inter-SemiBold.woff +0 -0
- data/vendor/assets/fonts/inter/Inter-SemiBold.woff2 +0 -0
- data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-US.js +10 -0
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_pagination.scss +4 -0
- metadata +38 -36
- data/.eslintrc +0 -21
- data/app/controllers/spree/admin/reports_controller.rb +0 -82
- data/app/views/spree/admin/reports/index.html.erb +0 -19
- data/app/views/spree/admin/reports/sales_total.html.erb +0 -35
- data/app/views/spree/admin/shared/_report_order_criteria.html.erb +0 -19
- data/app/views/spree/admin/store_credits/_update_reason_field.html.erb +0 -7
- data/spec/controllers/spree/admin/reports_controller_spec.rb +0 -133
- data/spec/features/admin/reports_spec.rb +0 -63
@@ -19,6 +19,8 @@
|
|
19
19
|
<%= render partial: 'spree/shared/error_messages', locals: { target: @stock_location } %>
|
20
20
|
|
21
21
|
<%= form_for [:admin, @stock_location] do |f| %>
|
22
|
-
|
23
|
-
|
22
|
+
<fieldset class="no-border-top">
|
23
|
+
<%= render 'form', f: f %>
|
24
|
+
<%= render 'spree/admin/shared/edit_resource_links' %>
|
25
|
+
</fieldset>
|
24
26
|
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= render 'spree/admin/shared/settings_checkout_tabs' %>
|
2
|
+
|
3
|
+
<% admin_breadcrumb t('spree.settings') %>
|
4
|
+
<% admin_breadcrumb t('spree.admin.tab.checkout') %>
|
5
|
+
<% admin_breadcrumb link_to plural_resource_name(Spree::StoreCreditReason), spree.admin_store_credit_reasons_path %>
|
6
|
+
<% admin_breadcrumb @object.name %>
|
7
|
+
|
8
|
+
<%= render partial: 'spree/shared/error_messages', locals: { target: @object } %>
|
9
|
+
|
10
|
+
<%= form_for [:admin, @object] do |f| %>
|
11
|
+
<fieldset class='no-border-top' data-hook='edit_store_credit_reason'>
|
12
|
+
<%= render partial: 'spree/admin/store_credit_reasons/shared/form', locals: { f: f } %>
|
13
|
+
<%= render partial: 'spree/admin/shared/edit_resource_links' %>
|
14
|
+
</fieldset>
|
15
|
+
<% end %>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<%= render 'spree/admin/shared/settings_checkout_tabs' %>
|
2
|
+
|
3
|
+
<% admin_breadcrumb(t('spree.settings')) %>
|
4
|
+
<% admin_breadcrumb(t('spree.admin.tab.checkout')) %>
|
5
|
+
<% admin_breadcrumb(plural_resource_name(Spree::StoreCreditReason)) %>
|
6
|
+
|
7
|
+
<% content_for :page_actions do %>
|
8
|
+
<ul class='actions inline-menu'>
|
9
|
+
<li>
|
10
|
+
<%= link_to t('spree.new_adjustment_reason'), new_object_url, id: 'admin_new_named_type', class: 'btn btn-primary' %>
|
11
|
+
</li>
|
12
|
+
</ul>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<% if @collection.any? %>
|
16
|
+
<table class='index' id='listing_store_credit_reasons'>
|
17
|
+
<colgroup>
|
18
|
+
<col style='width: 65%' />
|
19
|
+
<col style='width: 20%' />
|
20
|
+
<col style='width: 15%' />
|
21
|
+
</colgroup>
|
22
|
+
<thead>
|
23
|
+
<tr data-hook='store_credit_reasons_header'>
|
24
|
+
<th><%= Spree::StoreCreditReason.human_attribute_name(:name) %></th>
|
25
|
+
<th><%= Spree::StoreCreditReason.human_attribute_name(:state) %></th>
|
26
|
+
<th class='actions'></th>
|
27
|
+
</tr>
|
28
|
+
</thead>
|
29
|
+
<tbody>
|
30
|
+
<% @collection.each do |store_credit_reason| %>
|
31
|
+
<tr id='<%= spree_dom_id store_credit_reason %>' data-hook='store_credit_reason_row'>
|
32
|
+
<td>
|
33
|
+
<%= store_credit_reason.name %>
|
34
|
+
</td>
|
35
|
+
<td>
|
36
|
+
<span class="pill pill-<%= store_credit_reason.active? ? 'active' : 'inactive' %>">
|
37
|
+
<%= t(store_credit_reason.active? ? :active : :inactive, scope: 'spree') %>
|
38
|
+
</span>
|
39
|
+
</td>
|
40
|
+
<td class='actions'>
|
41
|
+
<%= link_to_edit store_credit_reason, no_text: true %>
|
42
|
+
<% if can?(:destroy, store_credit_reason) %>
|
43
|
+
<%= link_to_delete store_credit_reason, no_text: true %>
|
44
|
+
<% end %>
|
45
|
+
</td>
|
46
|
+
</tr>
|
47
|
+
<% end %>
|
48
|
+
</tbody>
|
49
|
+
</table>
|
50
|
+
<% else %>
|
51
|
+
<div class='no-objects-found'>
|
52
|
+
<%= render 'spree/admin/shared/no_objects_found',
|
53
|
+
resource: Spree::StoreCreditReason,
|
54
|
+
new_resource_url: new_object_url %>
|
55
|
+
</div>
|
56
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<%= render 'spree/admin/shared/settings_checkout_tabs' %>
|
2
|
+
|
3
|
+
<% admin_breadcrumb(t('spree.settings')) %>
|
4
|
+
<% admin_breadcrumb(t('spree.admin.tab.checkout')) %>
|
5
|
+
<% admin_breadcrumb(link_to plural_resource_name(Spree::StoreCreditReason), spree.admin_store_credit_reasons_path) %>
|
6
|
+
<% admin_breadcrumb(t('spree.new_store_credit_reason')) %>
|
7
|
+
|
8
|
+
<% content_for :page_actions do %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%= render partial: 'spree/shared/error_messages', locals: { target: @object } %>
|
12
|
+
|
13
|
+
<%= form_for [:admin, @object] do |f| %>
|
14
|
+
<fieldset class='no-border-top'>
|
15
|
+
<%= render partial: 'spree/admin/store_credit_reasons/shared/form', locals: { f: f } %>
|
16
|
+
<%= render partial: 'spree/admin/shared/new_resource_links' %>
|
17
|
+
</fieldset>
|
18
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div data-hook='admin_named_type_form_fields' class='row'>
|
2
|
+
<div class='col-3'>
|
3
|
+
<%= f.field_container :name do %>
|
4
|
+
<%= f.label :name, class: 'required' %><br />
|
5
|
+
<%= f.text_field :name, class: 'fullwidth' %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<div class='checkbox'>
|
9
|
+
<label>
|
10
|
+
<%= f.check_box :active %>
|
11
|
+
<%= t('spree.active') %>
|
12
|
+
</label>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= f.field_container :reason do %>
|
2
|
+
<%= f.label :store_credit_reason, t('spree.reason'), class: 'required' %>
|
3
|
+
<%= select_tag :store_credit_reason_id, options_from_collection_for_select(@store_credit_reasons, :id, :name),
|
4
|
+
include_blank: t('spree.choose_reason'), class: 'custom-select fullwidth',
|
5
|
+
placeholder: t('spree.admin.store_credits.select_amount_store_credit_reason') %>
|
6
|
+
<%= f.error_message_on :store_credit_reason %>
|
7
|
+
<% end %>
|
@@ -15,12 +15,12 @@
|
|
15
15
|
<legend align="center"><%= t('spree.admin.store_credits.invalidate_store_credit') %></legend>
|
16
16
|
<div data-hook="admin_store_credit_form_fields" class="row">
|
17
17
|
<div class="col-12">
|
18
|
-
<%= render partial: '
|
18
|
+
<%= render partial: 'store_credit_reason_field', locals: { f: f } %>
|
19
19
|
</div>
|
20
20
|
</div>
|
21
21
|
<div class="form-buttons filter-actions actions" data-hook="buttons">
|
22
22
|
<%= button_tag t('spree.store_credit.actions.invalidate'), class: 'btn btn-primary' %>
|
23
|
-
<%= link_to t('spree.actions.cancel'), admin_user_store_credit_path(@user, @store_credit), class: 'btn btn-
|
23
|
+
<%= link_to t('spree.actions.cancel'), admin_user_store_credit_path(@user, @store_credit), class: 'btn btn-default' %>
|
24
24
|
</div>
|
25
25
|
</fieldset>
|
26
26
|
<% end %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<%= render 'spree/admin/users/tabs', current: :store_credits %>
|
8
8
|
<% content_for :page_actions do %>
|
9
9
|
<% if can?(:create, Spree::StoreCredit) %>
|
10
|
-
<li><%= link_to t('spree.admin.store_credits.add'), new_admin_user_store_credit_path(@user), class: 'button' %></li>
|
10
|
+
<li><%= link_to t('spree.admin.store_credits.add'), new_admin_user_store_credit_path(@user), class: 'button btn btn-primary' %></li>
|
11
11
|
<% end %>
|
12
12
|
<% end %>
|
13
13
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<%= render 'spree/admin/users/tabs', current: :store_credits %>
|
9
9
|
<% content_for :page_actions do %>
|
10
10
|
<% if @store_credit.editable? && can?(:edit, @store_credit) %>
|
11
|
-
<li><%= link_to t('spree.admin.store_credits.change_amount'), edit_amount_admin_user_store_credit_path(@user, @store_credit), class: 'button' %></li>
|
11
|
+
<li><%= link_to t('spree.admin.store_credits.change_amount'), edit_amount_admin_user_store_credit_path(@user, @store_credit), class: 'button btn btn-primary' %></li>
|
12
12
|
<% end %>
|
13
13
|
<% if @store_credit.invalidateable? && can?(:invalidate, @store_credit) %>
|
14
14
|
<li><%= link_to t('spree.invalidate'), edit_validity_admin_user_store_credit_path(@user, @store_credit), class: 'button' %></li>
|
@@ -84,7 +84,7 @@
|
|
84
84
|
<th><%= t('spree.admin.store_credits.created_by') %></th>
|
85
85
|
<th><%= Spree::StoreCreditEvent.human_attribute_name(:user_total_amount) %></th>
|
86
86
|
<th><%= Spree::StoreCreditEvent.human_attribute_name(:amount_remaining) %></th>
|
87
|
-
<th><%= Spree::
|
87
|
+
<th><%= Spree::StoreCreditReason.human_attribute_name(:name) %></th>
|
88
88
|
</tr>
|
89
89
|
</thead>
|
90
90
|
<tbody>
|
@@ -98,7 +98,7 @@
|
|
98
98
|
<td><%= store_credit_event_originator_link(event) %></td>
|
99
99
|
<td><%= event.display_user_total_amount %></td>
|
100
100
|
<td><%= event.display_remaining_amount %></td>
|
101
|
-
<td><%= event.
|
101
|
+
<td><%= event.store_credit_reason.try!(:name) %></td>
|
102
102
|
</tr>
|
103
103
|
<% end %>
|
104
104
|
</tbody>
|
@@ -9,39 +9,49 @@
|
|
9
9
|
<%-
|
10
10
|
colors = [
|
11
11
|
{
|
12
|
-
name: '$color-
|
12
|
+
name: '$color-white',
|
13
13
|
value: '#FFFFFF',
|
14
|
-
used_for: '
|
14
|
+
used_for: 'Body background color.'
|
15
15
|
},
|
16
16
|
{
|
17
|
-
name: '$color-
|
18
|
-
value: '#
|
19
|
-
used_for: '
|
17
|
+
name: '$color-light',
|
18
|
+
value: '#F9FAFB',
|
19
|
+
used_for: 'Sidebar and header background color.'
|
20
20
|
},
|
21
21
|
{
|
22
|
-
name: '$color-
|
23
|
-
value: '#
|
24
|
-
used_for: '
|
22
|
+
name: '$color-light-dark',
|
23
|
+
value: '#E5E7EB',
|
24
|
+
used_for: 'Borders color.'
|
25
25
|
},
|
26
26
|
{
|
27
|
-
name: '$color-
|
28
|
-
value: '#
|
29
|
-
used_for: '
|
27
|
+
name: '$color-dark',
|
28
|
+
value: '#24282F',
|
29
|
+
used_for: 'Text and headings color.'
|
30
30
|
},
|
31
31
|
{
|
32
|
-
name: '$color-
|
33
|
-
value: '#
|
34
|
-
used_for: '
|
32
|
+
name: '$color-dark-light',
|
33
|
+
value: '#808C9E',
|
34
|
+
used_for: 'Main text color for navigation, tabs, breadcrumb.'
|
35
|
+
},
|
36
|
+
{
|
37
|
+
name: '$color-primary',
|
38
|
+
value: '#3D76F1',
|
39
|
+
used_for: 'Buttons primary actions, links, active states.'
|
35
40
|
},
|
36
41
|
{
|
37
|
-
name: '$color-
|
38
|
-
value: '#
|
39
|
-
used_for: '
|
42
|
+
name: '$color-success',
|
43
|
+
value: '#52B73B',
|
44
|
+
used_for: 'Success actions.'
|
45
|
+
},
|
46
|
+
{
|
47
|
+
name: '$color-error',
|
48
|
+
value: '#CE452A',
|
49
|
+
used_for: 'Errors, destructive action warnings.'
|
40
50
|
},
|
41
51
|
{
|
42
|
-
name: '$color-
|
43
|
-
value: '#
|
44
|
-
used_for: '
|
52
|
+
name: '$color-notice',
|
53
|
+
value: '#FFDD59',
|
54
|
+
used_for: 'Warnings actions.'
|
45
55
|
}
|
46
56
|
]
|
47
57
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="half">
|
2
2
|
<p>
|
3
|
-
The typography base is "
|
3
|
+
The typography base is "Inter" and Helvetica which we load by stylesheet with @font-face rule.
|
4
4
|
Set at 13px with no specified line-height.
|
5
5
|
</p>
|
6
6
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<%= render partial: 'form', locals: { f: f } %>
|
15
15
|
<div class="filter-actions actions">
|
16
16
|
<%= button_tag t('spree.actions.update'), class: 'btn btn-primary' %>
|
17
|
-
<%= link_to t('spree.actions.cancel'), admin_taxonomies_path, class: 'btn btn-
|
17
|
+
<%= link_to t('spree.actions.cancel'), admin_taxonomies_path, class: 'btn btn-default' %>
|
18
18
|
</div>
|
19
19
|
</fieldset>
|
20
20
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
<% content_for :page_actions do %>
|
5
5
|
<li>
|
6
|
-
<%= link_to t('spree.back_to_taxonomies_list'), spree.admin_taxonomies_path, class: 'btn btn-
|
6
|
+
<%= link_to t('spree.back_to_taxonomies_list'), spree.admin_taxonomies_path, class: 'btn btn-default' %>
|
7
7
|
</li>
|
8
8
|
<% end %>
|
9
9
|
|
@@ -14,6 +14,6 @@
|
|
14
14
|
|
15
15
|
<div class="form-buttons filter-actions" data-hook="buttons">
|
16
16
|
<%= button_tag t('spree.actions.update'), class: 'btn btn-primary' %>
|
17
|
-
<%= link_to t('spree.actions.cancel'), edit_admin_taxonomy_url(@taxonomy), class: 'btn btn-
|
17
|
+
<%= link_to t('spree.actions.cancel'), edit_admin_taxonomy_url(@taxonomy), class: 'btn btn-default' %>
|
18
18
|
</div>
|
19
19
|
<% end %>
|
@@ -41,8 +41,8 @@
|
|
41
41
|
|
42
42
|
</div>
|
43
43
|
<div class="filter-actions actions">
|
44
|
-
<%= button_to t('.clear_key'), spree.clear_api_key_admin_user_path(@user), method: :put, data: { confirm: t('.confirm_clear_key') }, class: 'btn btn-
|
45
|
-
<%= button_to t('.regenerate_key'), spree.generate_api_key_admin_user_path(@user), method: :put, data: { confirm: t('.confirm_regenerate_key') }, class: 'btn btn-
|
44
|
+
<%= button_to t('.clear_key'), spree.clear_api_key_admin_user_path(@user), method: :put, data: { confirm: t('.confirm_clear_key') }, class: 'btn btn-default' %>
|
45
|
+
<%= button_to t('.regenerate_key'), spree.generate_api_key_admin_user_path(@user), method: :put, data: { confirm: t('.confirm_regenerate_key') }, class: 'btn btn-default' %>
|
46
46
|
</div>
|
47
47
|
|
48
48
|
<% else %>
|
@@ -82,14 +82,14 @@
|
|
82
82
|
<tr id="<%= spree_dom_id user %>" data-hook="admin_users_index_rows">
|
83
83
|
<td class='user_email'><%=link_to user.email, edit_admin_user_url(user) %></td>
|
84
84
|
<td><%= user.spree_roles.map(&:name).to_sentence %></td>
|
85
|
-
<td class="align-center"><%= link_to user.
|
85
|
+
<td class="align-center"><%= link_to user.order_count, spree.orders_admin_user_path(user) %></td>
|
86
86
|
<td class="align-center"><%= link_to user.display_lifetime_value, spree.items_admin_user_path(user) %></td>
|
87
87
|
<td class="align-center"><%= l user.created_at.to_date %></td>
|
88
88
|
<td data-hook="admin_users_index_row_actions" class="actions">
|
89
89
|
<% if can?(:edit, user) %>
|
90
90
|
<%= link_to_edit user, no_text: true %>
|
91
91
|
<% end %>
|
92
|
-
<% if can?(:destroy, user) %>
|
92
|
+
<% if can?(:destroy, user) && user.orders.count.zero? %>
|
93
93
|
<%= link_to_delete user, no_text: true %>
|
94
94
|
<% end %>
|
95
95
|
</td>
|
@@ -41,7 +41,9 @@
|
|
41
41
|
<tr class="stock-item" data-item-quantity="<%= item.quantity %>">
|
42
42
|
<td class="order-completed-at"><%= l(order.completed_at.to_date) if order.completed_at %></td>
|
43
43
|
<td class="item-image">
|
44
|
-
<%= render 'spree/admin/shared/image',
|
44
|
+
<%= render 'spree/admin/shared/image',
|
45
|
+
image: (item.variant.gallery.images.first || item.variant.product.gallery.images.first),
|
46
|
+
size: :mini %>
|
45
47
|
</td>
|
46
48
|
<td class="item-name">
|
47
49
|
<%= item.product.name %><br><%= "(" + variant_options(item.variant) + ")" unless item.variant.option_values.empty? %>
|
@@ -74,7 +74,7 @@
|
|
74
74
|
<div class="no-objects-found">
|
75
75
|
<%= render 'spree/admin/shared/no_objects_found',
|
76
76
|
resource: Spree::Order,
|
77
|
-
new_resource_url: spree.new_admin_order_path %>
|
77
|
+
new_resource_url: spree.new_admin_order_path(user_id: @user.id) %>
|
78
78
|
</div>
|
79
79
|
<% end %>
|
80
80
|
|
@@ -65,7 +65,7 @@
|
|
65
65
|
<div class="col-3">
|
66
66
|
<div class="field" data-hook="price">
|
67
67
|
<%= f.label :price %>
|
68
|
-
<%= render "spree/admin/shared/number_with_currency", f: f, amount_attr: :price, currency: @variant.
|
68
|
+
<%= render "spree/admin/shared/number_with_currency", f: f, amount_attr: :price, currency: @variant.find_or_build_default_price.currency %>
|
69
69
|
</div>
|
70
70
|
</div>
|
71
71
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<%= zone_form.field_container :state_ids do %>
|
6
6
|
<%= zone_form.label :state_ids, plural_resource_name(Spree::State) %><br>
|
7
|
-
<%= zone_form.collection_select :state_ids, @states, :id, :
|
7
|
+
<%= zone_form.collection_select :state_ids, @states, :id, :state_with_country, {}, { multiple: true, class: "select2 fullwidth" } %>
|
8
8
|
<% end %>
|
9
9
|
</fieldset>
|
10
10
|
</div>
|
data/config/routes.rb
CHANGED
@@ -16,7 +16,7 @@ Spree::Core::Engine.routes.draw do
|
|
16
16
|
resources :promotions do
|
17
17
|
resources :promotion_rules
|
18
18
|
resources :promotion_actions
|
19
|
-
resources :promotion_codes, only: [:index]
|
19
|
+
resources :promotion_codes, only: [:index, :new, :create]
|
20
20
|
resources :promotion_code_batches, only: [:index, :new, :create] do
|
21
21
|
get '/download', to: "promotion_code_batches#download", defaults: { format: "csv" }
|
22
22
|
end
|
@@ -141,17 +141,11 @@ Spree::Core::Engine.routes.draw do
|
|
141
141
|
end
|
142
142
|
end
|
143
143
|
|
144
|
-
resources :reports, only: [:index] do
|
145
|
-
collection do
|
146
|
-
get :sales_total
|
147
|
-
post :sales_total
|
148
|
-
end
|
149
|
-
end
|
150
|
-
|
151
144
|
resources :reimbursement_types, only: [:index]
|
152
145
|
resources :adjustment_reasons, except: [:show, :destroy]
|
153
146
|
resources :refund_reasons, except: [:show, :destroy]
|
154
147
|
resources :return_reasons, except: [:show, :destroy]
|
148
|
+
resources :store_credit_reasons, except: [:show]
|
155
149
|
|
156
150
|
resources :shipping_methods
|
157
151
|
resources :shipping_categories
|