Sha256: 104a80e25f560c4b8461f0c464107b664bc2d4891bc5953c4ececa5ba60eaa35

Contents?: true

Size: 488 Bytes

Versions: 3

Compression:

Stored size: 488 Bytes

Contents

# frozen_string_literal: true

class SolidusAdmin::Roles::Edit::Component < SolidusAdmin::BaseComponent
  include SolidusAdmin::PermissionSetsHelper

  def initialize(page:, role:)
    @page = page
    @role = role
  end

  def form_id
    dom_id(@role, "#{stimulus_id}_edit_role_form")
  end

  private

  def permission_set_options
    @permission_set_options ||= organize_permissions(permission_sets: Spree::PermissionSet.all, view_label: t(".view"), edit_label: t(".edit"))
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
solidus_admin-0.3.2 app/components/solidus_admin/roles/edit/component.rb
solidus_admin-0.3.1 app/components/solidus_admin/roles/edit/component.rb
solidus_admin-0.3.0 app/components/solidus_admin/roles/edit/component.rb