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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df2bbffc1e4cccc31af216322ef484259e7acc71741bf721dc2359bbd9267c4e
4
- data.tar.gz: 8f8f8cfa03ab51e5f3ac697aaa3caf04803523689e8c240df130f2e59696b021
3
+ metadata.gz: 2b496961d80291a72ecf0017c07d68dee193fff1f89238bd510ad1ca85afe37b
4
+ data.tar.gz: 18222f2abe4752e73fddf640631b3dc179368d5dc55c0ee6e41a7a9111ad6391
5
5
  SHA512:
6
- metadata.gz: aaa0388d363a6d3a0116a6f78e6d212027152226cd89faabdcb832f622395426d7487d27a2dd3268d97d6112fb2df6175113183dd689940a9f6748ad306ca134
7
- data.tar.gz: b8837f8486c38a10e86f11415ceac1ace48f5bcb113db9a97cf2f0a3cd11cc798f8b401e03015b62594d5f75e1decb7e54c1be51001c60aa0d18e8540859ec97
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
 
@@ -284,3 +284,5 @@ en:
284
284
  hyphen: Hyphen
285
285
  comma: Comma
286
286
  slash: Slash
287
+ sql: SQL
288
+ api: API
@@ -284,6 +284,8 @@ es:
284
284
  hyphen: Guión
285
285
  comma: Coma
286
286
  slash: Slash
287
+ sql: SQL
288
+ api: API
287
289
  i:
288
290
  locale: es
289
291
  select:
@@ -280,6 +280,8 @@ pt:
280
280
  hyphen: Hífen
281
281
  comma: Vírgula
282
282
  slash: Slash
283
+ sql: SQL
284
+ api: API
283
285
  i:
284
286
  locale: pt
285
287
  select:
@@ -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: true
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[attrs[:name]] || Motor::Resource.new
75
+ record = resources_index.fetch(attrs[:name], Motor::Resource.new)
76
76
 
77
- next if record.updated_at && attrs[:updated_at] <= record.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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Motor
4
- VERSION = '0.2.29'
4
+ VERSION = '0.2.33'
5
5
  end
@@ -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-67a3a033614f741d7e27.css.gz": "main-67a3a033614f741d7e27.css.gz",
2605
- "main-67a3a033614f741d7e27.js.LICENSE.txt": "main-67a3a033614f741d7e27.js.LICENSE.txt",
2606
- "main-67a3a033614f741d7e27.js.gz": "main-67a3a033614f741d7e27.js.gz",
2607
- "main.css": "main-67a3a033614f741d7e27.css",
2608
- "main.js": "main-67a3a033614f741d7e27.js"
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.29
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-24 00:00:00.000000000 Z
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-67a3a033614f741d7e27.css.gz
1529
- - ui/dist/main-67a3a033614f741d7e27.js.gz
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: