Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Admin] Add Refunds and Returns section with correlated index pages #5539

Merged
merged 8 commits into from
Dec 6, 2023
Next Next commit
Add refunds_and_returns section with tabs feature
  • Loading branch information
rainerdema committed Dec 6, 2023
commit c36513670077c09c0272d5c11418eec4e5452e16
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<%= page do %>
<%= page_header do %>
<%= page_header_title safe_join([
tag.div(t(".title")),
tag.div(t(".subtitle"), class: "body-small text-gray-500"),
]) %>
<% end %>
<%= page_header do %>
<% title = capture do %>
<% tabs.each do |tab_class, href|%>
<%= render component('ui/button').new(
tag: :a,
scheme: :ghost,
href: href,
text: tab_class.model_name.human.pluralize,
"aria-current" => tab_class == @current_class,
) %>
<% end %>
<% end %>
<%= page_header_title title %>
<%= page_header_actions do %>
<%= actions %>
<% end %>
<% end %>
<%= content %>
<% end %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

class SolidusAdmin::RefundsAndReturns::Component < SolidusAdmin::BaseComponent
include SolidusAdmin::Layout::PageHelpers
renders_one :actions

def initialize(current_class:)
@current_class = current_class
end

def tabs
{}
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
en:
title: "Refunds and Returns"
subtitle: "Configure refund reasons, reimbursement types, return reasons, adjustment reasons and store credit reasons"