avo 2.11.3.pre.2 → 2.11.3.pre.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/components/avo/views/resource_index_component.html.erb +7 -7
- data/app/components/avo/views/resource_show_component.html.erb +5 -3
- data/app/controllers/avo/application_controller.rb +1 -0
- data/app/controllers/avo/associations_controller.rb +1 -1
- data/lib/avo/base_card.rb +7 -8
- data/lib/avo/dashboards/chartkick_card.rb +3 -2
- data/lib/avo/version.rb +1 -1
- data/public/avo-assets/avo.css +0 -24
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33a3f78d32b04247f263b94f22dcfbc0e825e3ea99a311c1642866b30a46524f
|
4
|
+
data.tar.gz: 7344cfbc9197ac2537003045a2ab340165ba4964b095ef914e6ca49852881373
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25e7ee4600617e4786e3b0c43e6b1f03fa4e3e14ab861745d5c9915352cdeb2c66e4d1444ebf1e834c6cb82fea7d854f3440b274ca90a946630279370928cc69
|
7
|
+
data.tar.gz: 4363ffce5ed2b2172d0c992d98dd8c9bcc8c68e82e7e48dfec8040efe877f8b2aab9203e538110f1ac3a2f77fa2f2d90caa573fc24f7eddc6af6f619da791966
|
data/Gemfile.lock
CHANGED
@@ -17,17 +17,17 @@
|
|
17
17
|
<%= t('avo.attach_item', item: singular_resource_name).capitalize %>
|
18
18
|
<% end %>
|
19
19
|
<% end %>
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<%= a_link create_path,
|
20
|
+
<% if can_see_the_actions_button? %>
|
21
|
+
<%= render Avo::ActionsComponent.new actions: @actions, resource: @resource, view: @view %>
|
22
|
+
<% end %>
|
23
|
+
<% if can_see_the_create_button? %>
|
24
|
+
<%= a_link create_path,
|
26
25
|
icon: 'heroicons/outline/plus',
|
27
26
|
'data-target': 'create',
|
28
27
|
style: :primary,
|
29
28
|
color: :primary do %>
|
30
|
-
|
29
|
+
<%= t('avo.create_new_item', item: singular_resource_name.downcase ) %>
|
30
|
+
<% end %>
|
31
31
|
<% end %>
|
32
32
|
<% end %>
|
33
33
|
<% c.body do %>
|
@@ -5,9 +5,11 @@
|
|
5
5
|
selected_resources: [@resource.model.id],
|
6
6
|
**@resource.stimulus_data_attributes
|
7
7
|
} do %>
|
8
|
-
|
9
|
-
<%=
|
10
|
-
|
8
|
+
<% if @resource.cards.present? %>
|
9
|
+
<%= content_tag :div, class: "mb-6" do %>
|
10
|
+
<%= render Avo::CardsListComponent.new parent: @resource %>
|
11
|
+
<% end %>
|
12
|
+
<% end %>
|
11
13
|
<%= render Avo::PanelComponent.new(title: title, description: @resource.resource_description, display_breadcrumbs: @reflection.blank?, index: 0, data: { panel_id: "main" }) do |c| %>
|
12
14
|
<% c.tools do %>
|
13
15
|
<% if @reflection.present? && @resource.model.present? %>
|
@@ -7,7 +7,7 @@ module Avo
|
|
7
7
|
before_action :set_related_resource, only: [:show, :index, :new, :create, :destroy, :order]
|
8
8
|
before_action :set_reflection_field
|
9
9
|
before_action :set_related_model, only: [:show, :order]
|
10
|
-
before_action :hydrate_related_resource, only: [:show, :index, :
|
10
|
+
before_action :hydrate_related_resource, only: [:show, :index, :create, :destroy, :order]
|
11
11
|
before_action :set_reflection
|
12
12
|
before_action :set_attachment_class, only: [:show, :index, :new, :create, :destroy, :order]
|
13
13
|
before_action :set_attachment_resource, only: [:show, :index, :new, :create, :destroy, :order]
|
data/lib/avo/base_card.rb
CHANGED
@@ -69,7 +69,7 @@ module Avo
|
|
69
69
|
if parent_is_dashboard?
|
70
70
|
Avo::App.view_context.avo.dashboard_card_path(dashboard.id, id, turbo_frame: turbo_frame, index: index, range: enforced_range, **params.permit!.to_h)
|
71
71
|
elsif parent_is_resource?
|
72
|
-
Avo::App.root_path(paths: ["resources", parent.route_key, parent.model.id, "cards", id], query: {turbo_frame: turbo_frame, index: index, range: enforced_range
|
72
|
+
Avo::App.root_path(paths: ["resources", parent.route_key, parent.model.id, "cards", id], query: {**params.permit!.to_h, turbo_frame: turbo_frame, index: index, range: enforced_range})
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
@@ -87,14 +87,13 @@ module Avo
|
|
87
87
|
}
|
88
88
|
|
89
89
|
classes_for_rows = {
|
90
|
-
1 => " min-h-[
|
91
|
-
2 => " min-h-[
|
92
|
-
3 => " min-h-[
|
93
|
-
4 => " min-h-[
|
94
|
-
5 => " min-h-[
|
95
|
-
6 => " min-h-[
|
90
|
+
1 => " min-h-[8rem] row-span-1",
|
91
|
+
2 => " min-h-[16rem] row-span-2",
|
92
|
+
3 => " min-h-[24rem] row-span-3",
|
93
|
+
4 => " min-h-[32rem] row-span-4",
|
94
|
+
5 => " min-h-[40rem] row-span-5",
|
95
|
+
6 => " min-h-[48rem] row-span-6"
|
96
96
|
}
|
97
|
-
# puts ["cols->", cols, classes_for_cols, classes_for_rows, classes_for_cols[cols.to_i]].inspect
|
98
97
|
|
99
98
|
result += classes_for_cols[cols.to_i] if classes_for_cols[cols.to_i].present?
|
100
99
|
result += classes_for_rows[rows.to_i] if classes_for_rows[rows.to_i].present?
|
@@ -24,10 +24,11 @@ module Avo
|
|
24
24
|
|
25
25
|
def chartkick_options
|
26
26
|
card_height = 128
|
27
|
-
card_heading =
|
27
|
+
card_heading = 32
|
28
28
|
|
29
29
|
default = {
|
30
|
-
# figure our the available height for the chart
|
30
|
+
# figure our the available height for the chart.
|
31
|
+
# It's not ideal to work with magic numbers, I know.
|
31
32
|
height: "#{(rows * card_height) - card_heading}px",
|
32
33
|
colors: %w[#0B8AE2 #34C683 #2AB1EE #34C6A8],
|
33
34
|
library: {
|
data/lib/avo/version.rb
CHANGED
data/public/avo-assets/avo.css
CHANGED
@@ -6699,30 +6699,6 @@ trix-editor .attachment__metadata .attachment__size {
|
|
6699
6699
|
max-height:100%
|
6700
6700
|
}
|
6701
6701
|
|
6702
|
-
.min-h-\[9rem\]{
|
6703
|
-
min-height:9rem
|
6704
|
-
}
|
6705
|
-
|
6706
|
-
.min-h-\[18rem\]{
|
6707
|
-
min-height:18rem
|
6708
|
-
}
|
6709
|
-
|
6710
|
-
.min-h-\[27rem\]{
|
6711
|
-
min-height:27rem
|
6712
|
-
}
|
6713
|
-
|
6714
|
-
.min-h-\[36rem\]{
|
6715
|
-
min-height:36rem
|
6716
|
-
}
|
6717
|
-
|
6718
|
-
.min-h-\[45rem\]{
|
6719
|
-
min-height:45rem
|
6720
|
-
}
|
6721
|
-
|
6722
|
-
.min-h-\[54rem\]{
|
6723
|
-
min-height:54rem
|
6724
|
-
}
|
6725
|
-
|
6726
6702
|
.min-h-\[8rem\]{
|
6727
6703
|
min-height:8rem
|
6728
6704
|
}
|