motor-admin 0.1.85 → 0.1.86

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: 5a2fd68a96f2a2033d187962d8fc03ec70842efceea45b1c86e91d7139f01988
4
- data.tar.gz: 89bcddcdd72fbae9653b076bcfcb2a82a011819df1ae1df068a804477fbc790d
3
+ metadata.gz: 2bb133839954641be455cc1b9420ca0d27b42255b6debe02411d6c31585462b5
4
+ data.tar.gz: acd52a05f79ccfafd795f760ed218e89876db186c717965f02a4deb08aafc8a6
5
5
  SHA512:
6
- metadata.gz: 70ea1d8824c296e787bdd67047a0c0e1ccb49b96a3f8ec6a7a36077848bbce9546cd1a8114285ace191c30804c4982aa1cc6f11b3d500a1b5a6ecfe5cf4209fb
7
- data.tar.gz: 8e674039fb8b2d1c7e3910ea35f7467d5e93ad78348b7a6a6d06e6195307c89621e8b0d814fc177b2b646994f755e3863b1e5876fff1b52f18da79006b1ba59f
6
+ metadata.gz: c41b2f7e07342533c2e78c364d44721c53796f18b16c86aedeb85e32c733a4530f8a8c92f07a69b378c734488b2f98603c6f8ca03ca8e03a2fd546b4dfc3395b
7
+ data.tar.gz: a02597bcd00819a6b954df98105b6e075af4c1bb2945639a9fbcdef5b0ac4914d30490ab9629bcf90009c198863c1260079d417b3ef636fc3a436f1633b4213a
@@ -232,3 +232,8 @@ en:
232
232
  syntax_is_used_for_if_and_if_not_conditions_html: "<code>{{#variable}} ... {{/variable}}</code> and <code>{{^variable}} ... {{variable}}</code> syntax is used for <code>if</code> and <code>if not</code> conditions respectively:"
233
233
  current_user_variables_are_always_passed_explicitly_and_can_he_used_html: "<code>{{current_user_id}}</code> and <code>{{current_user_email}}</code> variables are always passed explicitly, and can be used to decide which data should be displayed for certain user:"
234
234
  create_new: Create New
235
+ conditional: Conditional
236
+ condition: Condition
237
+ field: Field
238
+ empty: Empty
239
+ not_empty: Not empty
@@ -232,6 +232,11 @@ es:
232
232
  syntax_is_used_for_if_and_if_not_conditions_html: "<code>{{#variable}} ... {{/variable}}</code> and <code>{{^variable}} ... {{variable}}</code> syntax is used for <code>if</code> and <code>if not</code> conditions respectively:"
233
233
  current_user_variables_are_always_passed_explicitly_and_can_he_used_html: "<code>{{current_user_id}}</code> and <code>{{current_user_email}}</code> variables are always passed explicitly, and can be used to decide which data should be displayed for certain user:"
234
234
  create_new: Crear nuevo
235
+ conditional: Condicional
236
+ condition: Condicion
237
+ field: Campo
238
+ empty: Vacío
239
+ not_empty: No vacío
235
240
  i:
236
241
  locale: es
237
242
  select:
@@ -25,6 +25,8 @@ module Motor
25
25
 
26
26
  # @return [Hash]
27
27
  def build_data(cache_keys = {}, current_user = nil, current_ability = nil)
28
+ configs_cache_key = cache_keys[:configs]
29
+
28
30
  {
29
31
  current_user: current_user&.as_json(only: %i[id email]),
30
32
  current_rules: current_ability.serialized_rules,
@@ -32,7 +34,8 @@ module Motor
32
34
  i18n: i18n_data,
33
35
  base_path: Motor::Admin.routes.url_helpers.motor_path,
34
36
  schema: Motor::BuildSchema.call(cache_keys, current_ability),
35
- header_links: header_links_data_hash(cache_keys[:configs]),
37
+ header_links: header_links_data_hash(configs_cache_key),
38
+ homepage_layout: homepage_layout_data_hash(configs_cache_key),
36
39
  queries: queries_data_hash(build_cache_key(cache_keys, :queries, current_user, current_ability),
37
40
  current_ability),
38
41
  dashboards: dashboards_data_hash(build_cache_key(cache_keys, :dashboards, current_user, current_ability),
@@ -58,6 +61,12 @@ module Motor
58
61
  configs.find { |c| c.key == 'header.links' }&.value || []
59
62
  end
60
63
 
64
+ def homepage_layout_data_hash(cache_key = nil)
65
+ configs = Motor::Configs::LoadFromCache.load_configs(cache_key: cache_key)
66
+
67
+ configs.find { |c| c.key == 'homepage.layout' }&.value || []
68
+ end
69
+
61
70
  def queries_data_hash(cache_key = nil, current_ability = nil)
62
71
  Motor::Configs::LoadFromCache.load_queries(cache_key: cache_key, current_ability: current_ability)
63
72
  .as_json(only: %i[id name updated_at],
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.1.85'
4
+ VERSION = '0.1.86'
5
5
  end
@@ -2068,11 +2068,11 @@
2068
2068
  "mail-opened.svg": "icons/mail-opened.svg",
2069
2069
  "mail.svg": "icons/mail.svg",
2070
2070
  "mailbox.svg": "icons/mailbox.svg",
2071
- "main-af320e6f7693ed0b936d.css.gz": "main-af320e6f7693ed0b936d.css.gz",
2072
- "main-af320e6f7693ed0b936d.js.LICENSE.txt": "main-af320e6f7693ed0b936d.js.LICENSE.txt",
2073
- "main-af320e6f7693ed0b936d.js.gz": "main-af320e6f7693ed0b936d.js.gz",
2074
- "main.css": "main-af320e6f7693ed0b936d.css",
2075
- "main.js": "main-af320e6f7693ed0b936d.js",
2071
+ "main-a06af18f26d72a62680f.css.gz": "main-a06af18f26d72a62680f.css.gz",
2072
+ "main-a06af18f26d72a62680f.js.LICENSE.txt": "main-a06af18f26d72a62680f.js.LICENSE.txt",
2073
+ "main-a06af18f26d72a62680f.js.gz": "main-a06af18f26d72a62680f.js.gz",
2074
+ "main.css": "main-a06af18f26d72a62680f.css",
2075
+ "main.js": "main-a06af18f26d72a62680f.js",
2076
2076
  "man.svg": "icons/man.svg",
2077
2077
  "manual-gearbox.svg": "icons/manual-gearbox.svg",
2078
2078
  "map-2.svg": "icons/map-2.svg",
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.1.85
4
+ version: 0.1.86
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-07-11 00:00:00.000000000 Z
11
+ date: 2021-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-filter
@@ -1495,8 +1495,8 @@ files:
1495
1495
  - ui/dist/icons/zoom-money.svg.gz
1496
1496
  - ui/dist/icons/zoom-out.svg.gz
1497
1497
  - ui/dist/icons/zoom-question.svg.gz
1498
- - ui/dist/main-af320e6f7693ed0b936d.css.gz
1499
- - ui/dist/main-af320e6f7693ed0b936d.js.gz
1498
+ - ui/dist/main-a06af18f26d72a62680f.css.gz
1499
+ - ui/dist/main-a06af18f26d72a62680f.js.gz
1500
1500
  - ui/dist/manifest.json
1501
1501
  homepage:
1502
1502
  licenses: