motor-admin 0.2.29 → 0.2.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/config/locales/en.yml +2 -0
- data/config/locales/es.yml +2 -0
- data/config/locales/pt.yml +2 -0
- data/lib/motor/api_query/sort.rb +12 -1
- data/lib/motor/build_schema/active_storage_attachment_schema.rb +1 -1
- data/lib/motor/build_schema/find_icon.rb +2 -2
- data/lib/motor/configs/sync_from_hash.rb +6 -2
- data/lib/motor/version.rb +1 -1
- data/ui/dist/main-1d882f91707272b39943.css.gz +0 -0
- data/ui/dist/main-1d882f91707272b39943.js.gz +0 -0
- data/ui/dist/manifest.json +5 -5
- metadata +4 -4
- data/ui/dist/main-67a3a033614f741d7e27.css.gz +0 -0
- data/ui/dist/main-67a3a033614f741d7e27.js.gz +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b496961d80291a72ecf0017c07d68dee193fff1f89238bd510ad1ca85afe37b
|
4
|
+
data.tar.gz: 18222f2abe4752e73fddf640631b3dc179368d5dc55c0ee6e41a7a9111ad6391
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33de92dd60c1f53d6f833646ac388f86434a65be73c1bfde0ab5b037f8cca0f3cec8b51c8cd3fdaba788e4a2ef83c33369a79dba5f543726dfae8ce9e1aa6554
|
7
|
+
data.tar.gz: 1eb89d9c5cc284aba7a1b343c6ebb566075c2c4b7a262c214243f4b141ace04a8eaaa6e7f48cf6cadb17b40f904467b1cfd19694377d538d6a59a8bb7649f763
|
data/README.md
CHANGED
@@ -38,6 +38,7 @@ $ rails motor:install && rake db:migrate
|
|
38
38
|
* [I18n](#i18n)
|
39
39
|
* [Optimized for mobile](#optimized-for-mobile)
|
40
40
|
* [Configurations sync between environments](#configurations-sync)
|
41
|
+
* [Authentication](#authentication)
|
41
42
|
|
42
43
|
## [Pro](https://www.getmotoradmin.com/pro)
|
43
44
|
|
data/config/locales/en.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/locales/pt.yml
CHANGED
data/lib/motor/api_query/sort.rb
CHANGED
@@ -45,7 +45,18 @@ module Motor
|
|
45
45
|
|
46
46
|
arel_column = reflection_model.arel_table[field]
|
47
47
|
|
48
|
-
direction.present? ? arel_column.desc : arel_column.asc
|
48
|
+
arel_direction = direction.present? ? arel_column.desc : arel_column.asc
|
49
|
+
|
50
|
+
maybe_add_null_last(model, arel_direction)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def maybe_add_null_last(model, arel_direction)
|
55
|
+
if arel_direction.respond_to?(:nulls_last) &&
|
56
|
+
model.connection.class.name == 'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter'
|
57
|
+
arel_direction.nulls_last
|
58
|
+
else
|
59
|
+
arel_direction
|
49
60
|
end
|
50
61
|
end
|
51
62
|
end
|
@@ -115,7 +115,7 @@ module Motor
|
|
115
115
|
scopes: [],
|
116
116
|
actions: Motor::BuildSchema::Defaults.actions.reject { |e| e[:name] == 'edit' },
|
117
117
|
tabs: Motor::BuildSchema::Defaults.tabs,
|
118
|
-
visible:
|
118
|
+
visible: false
|
119
119
|
}.with_indifferent_access
|
120
120
|
end
|
121
121
|
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
@@ -87,8 +87,8 @@ module Motor
|
|
87
87
|
'district' => 'building-community',
|
88
88
|
'community' => 'building-community',
|
89
89
|
'activity' => 'activity',
|
90
|
-
'invoice' => 'invoice',
|
91
|
-
'settlement' => 'invoice',
|
90
|
+
'invoice' => 'file-invoice',
|
91
|
+
'settlement' => 'file-invoice',
|
92
92
|
'state' => 'map',
|
93
93
|
'note' => 'note',
|
94
94
|
'order' => 'truck-delivery',
|
@@ -72,10 +72,14 @@ module Motor
|
|
72
72
|
resources_index = Motor::Configs::LoadFromCache.load_resources.index_by(&:name)
|
73
73
|
|
74
74
|
configs_hash[:resources].each do |attrs|
|
75
|
-
record = resources_index
|
75
|
+
record = resources_index.fetch(attrs[:name], Motor::Resource.new)
|
76
76
|
|
77
|
-
next if record.updated_at && attrs[:updated_at]
|
77
|
+
next if record.updated_at && attrs[:updated_at] < record.updated_at
|
78
|
+
next if record.updated_at &&
|
79
|
+
attrs[:updated_at] == record.updated_at &&
|
80
|
+
attrs[:preferences] == record.preferences
|
78
81
|
|
82
|
+
record.updated_at_will_change!
|
79
83
|
record.update!(attrs)
|
80
84
|
end
|
81
85
|
end
|
data/lib/motor/version.rb
CHANGED
Binary file
|
Binary file
|
data/ui/dist/manifest.json
CHANGED
@@ -2601,9 +2601,9 @@
|
|
2601
2601
|
"icons/zoom-out.svg.gz": "icons/zoom-out.svg.gz",
|
2602
2602
|
"icons/zoom-question.svg": "icons/zoom-question.svg",
|
2603
2603
|
"icons/zoom-question.svg.gz": "icons/zoom-question.svg.gz",
|
2604
|
-
"main-
|
2605
|
-
"main-
|
2606
|
-
"main-
|
2607
|
-
"main.css": "main-
|
2608
|
-
"main.js": "main-
|
2604
|
+
"main-1d882f91707272b39943.css.gz": "main-1d882f91707272b39943.css.gz",
|
2605
|
+
"main-1d882f91707272b39943.js.LICENSE.txt": "main-1d882f91707272b39943.js.LICENSE.txt",
|
2606
|
+
"main-1d882f91707272b39943.js.gz": "main-1d882f91707272b39943.js.gz",
|
2607
|
+
"main.css": "main-1d882f91707272b39943.css",
|
2608
|
+
"main.js": "main-1d882f91707272b39943.js"
|
2609
2609
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motor-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Matsyburka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord-filter
|
@@ -1525,8 +1525,8 @@ files:
|
|
1525
1525
|
- ui/dist/icons/zoom-money.svg.gz
|
1526
1526
|
- ui/dist/icons/zoom-out.svg.gz
|
1527
1527
|
- ui/dist/icons/zoom-question.svg.gz
|
1528
|
-
- ui/dist/main-
|
1529
|
-
- ui/dist/main-
|
1528
|
+
- ui/dist/main-1d882f91707272b39943.css.gz
|
1529
|
+
- ui/dist/main-1d882f91707272b39943.js.gz
|
1530
1530
|
- ui/dist/manifest.json
|
1531
1531
|
homepage:
|
1532
1532
|
licenses:
|
Binary file
|
Binary file
|