Skip to content

Commit

Permalink
Add spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
pacodelaluna committed Dec 23, 2024
1 parent b40e8a1 commit 16506c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/helpers/admin/enterprises_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def enterprise_side_menu_items(enterprise)
show_connected_apps = can?(:manage_connected_apps, enterprise) &&
feature?(:connected_apps, spree_current_user, enterprise) &&
Spree::Config.connected_apps_enabled.present?
show_admin_only = spree_current_user.admin?

build_enterprise_side_menu_items(
is_shop:,
Expand All @@ -36,6 +37,7 @@ def enterprise_side_menu_items(enterprise)
show_payment_methods:,
show_enterprise_fees:,
show_connected_apps:,
show_admin_only:,
)
end

Expand All @@ -52,11 +54,12 @@ def build_enterprise_side_menu_items(
show_shipping_methods:,
show_payment_methods:,
show_enterprise_fees:,
show_connected_apps:
show_connected_apps:,
show_admin_only:
)
[
{ name: 'primary_details', icon_class: "icon-home", show: true, selected: 'selected' },
{ name: 'admin_only', icon_class: "icon-gear", show: spree_current_user.admin? },
{ name: 'admin_only', icon_class: "icon-gear", show: show_admin_only },
{ name: 'address', icon_class: "icon-map-marker", show: true },
{ name: 'contact', icon_class: "icon-phone", show: true },
{ name: 'social', icon_class: "icon-twitter", show: true },
Expand Down
2 changes: 2 additions & 0 deletions app/views/admin/enterprises/form/_primary_details.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
.five.columns.omega
= f.check_box :is_primary_producer, data: { action: "change->primary-details#primaryProducerChanged" }
= f.label :is_primary_producer, t('.producer')
%span{ style: "width: 30px; height: 30px;", class: "hidden", data: { "primary-details-target": "spinner" } }
= render partial: "components/admin_spinner"
.row
.three.columns.alpha
%label= t('.visible_in_search')
Expand Down

0 comments on commit 16506c4

Please sign in to comment.