Skip to content

Commit d67ef3e

Browse files
authored
Merge pull request #6160 from chaimann/admin-stock-locations-form
Admin stock locations form
2 parents 48de765 + 8f9d2b2 commit d67ef3e

File tree

75 files changed

+576
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+576
-175
lines changed

admin/app/components/solidus_admin/adjustment_reasons/edit/component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%= turbo_frame_tag :resource_modal, target: "_top" do %>
1+
<%= turbo_frame_tag :resource_form, target: "_top" do %>
22
<%= render component("ui/modal").new(title: t(".title")) do |modal| %>
33
<%= form_for @adjustment_reason, url: form_url, html: { id: form_id } do |f| %>
44
<div class="flex flex-col gap-6 pb-4">

admin/app/components/solidus_admin/adjustment_reasons/index/component.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ def page_actions
1818
tag: :a,
1919
text: t('.add'),
2020
href: solidus_admin.new_adjustment_reason_path(**search_filter_params),
21-
data: { turbo_frame: :resource_modal },
21+
data: { turbo_frame: :resource_form },
2222
icon: "add-line",
2323
class: "align-self-end w-full",
2424
)
2525
end
2626

2727
def turbo_frames
2828
%w[
29-
resource_modal
29+
resource_form
3030
]
3131
end
3232

@@ -52,15 +52,15 @@ def columns
5252
data: ->(adjustment_reason) do
5353
link_to adjustment_reason.name, edit_path(adjustment_reason),
5454
class: 'body-link',
55-
data: { turbo_frame: :resource_modal }
55+
data: { turbo_frame: :resource_form }
5656
end
5757
},
5858
{
5959
header: :code,
6060
data: ->(adjustment_reason) do
6161
link_to adjustment_reason.code, edit_path(adjustment_reason),
6262
class: 'body-link',
63-
data: { turbo_frame: :resource_modal }
63+
data: { turbo_frame: :resource_form }
6464
end
6565
},
6666
{

admin/app/components/solidus_admin/adjustment_reasons/new/component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%= turbo_frame_tag :resource_modal, target: "_top" do %>
1+
<%= turbo_frame_tag :resource_form, target: "_top" do %>
22
<%= render component("ui/modal").new(title: t(".title")) do |modal| %>
33
<%= form_for @adjustment_reason, url: form_url, html: { id: form_id } do |f| %>
44
<div class="flex flex-col gap-6 pb-4">

admin/app/components/solidus_admin/layout/page_helpers.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@ def page_header_actions(&block)
1313
end
1414

1515
def page_header_back(back_path)
16-
render component("ui/button").new(
17-
tag: :a,
18-
title: t(".back"),
19-
icon: "arrow-left-line",
20-
scheme: :secondary,
21-
href: back_path
22-
)
16+
render component("ui/button").back(path: back_path)
2317
end
2418

2519
def page_header_title(title, &block)

admin/app/components/solidus_admin/orders/show/address/component.html.erb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@
5050
) %>
5151
</form>
5252

53-
<%= render component("ui/button").new(
54-
tag: :button,
55-
text: t(".save"),
56-
form: form_id
57-
) %>
53+
<%= render component("ui/button").save(form: form_id) %>
5854
<% end %>
5955
<% end %>
6056
<% end %>

admin/app/components/solidus_admin/orders/show/address/component.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
en:
2-
save: Save
32
cancel: Cancel
43
back: Back
54
select_address: Select address

admin/app/components/solidus_admin/orders/show/component.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<%= page_header_back(solidus_admin.orders_path) %>
44
<%= page_header_title(t('.title', number: @order.number)) %>
55
<%= page_header_actions do %>
6-
<%= render component("ui/button").new(tag: :button, scheme: :secondary, text: t(".discard"), form: form_id) %>
7-
<%= render component("ui/button").new(tag: :button, text: t(".save"), form: form_id) %>
6+
<%= render component("ui/button").discard(path: solidus_admin.orders_path) %>
7+
<%= render component("ui/button").save(form: form_id) %>
88
<% end %>
99
<% end %>
1010

admin/app/components/solidus_admin/orders/show/component.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
en:
2-
save: Save
3-
discard: Discard
42
title: "Order %{number}"
53
customer: Customer
64
no_name: No name available
75
order_email: Order contact email
8-
back: Back to orders
96
same_as_shipping: Same as shipping address
107

118
edit_email: "Edit order email"

admin/app/components/solidus_admin/products/show/component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
target: :_blank,
2020
scheme: :ghost
2121
) %>
22-
<%= render component("ui/button").new(tag: :button, text: t(".save"), form: form_id) %>
22+
<%= render component("ui/button").save(form: form_id) %>
2323
<% end %>
2424
<% end %>
2525

admin/app/components/solidus_admin/products/show/component.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
en:
2-
save: "Save"
3-
back: "Back"
42
duplicate: "Duplicate"
53
view: "View online"
64
delete: "Delete"

0 commit comments

Comments
 (0)