motor-admin 0.1.80 → 0.1.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c02cf818464ed3ff45eb05320ce2abc80f72e7c37231ad3b37c08997c42c6d94
4
- data.tar.gz: 2a7a52aa00523bbc885150e07930a17e5d3dbded7bdfb1eef2d2f2d6f0b4c613
3
+ metadata.gz: 5a2fd68a96f2a2033d187962d8fc03ec70842efceea45b1c86e91d7139f01988
4
+ data.tar.gz: 89bcddcdd72fbae9653b076bcfcb2a82a011819df1ae1df068a804477fbc790d
5
5
  SHA512:
6
- metadata.gz: 6ebda0a5d098312d5fe76ae12d49f4a95a274c3e4cde6bcc15fdd7582825745a39eace2ff54620f778b57f3cb8f3d68032a33ced699a424ef23ac715a43520ff
7
- data.tar.gz: d6f7cb57a387935cb2f7cc7de8afa3930c3aee260b3f556f46631916571a63d16e3e63b057c7d53753fb4241f36d0848f69517aa88315643845dc9517c4342df
6
+ metadata.gz: 70ea1d8824c296e787bdd67047a0c0e1ccb49b96a3f8ec6a7a36077848bbce9546cd1a8114285ace191c30804c4982aa1cc6f11b3d500a1b5a6ecfe5cf4209fb
7
+ data.tar.gz: 8e674039fb8b2d1c7e3910ea35f7467d5e93ad78348b7a6a6d06e6195307c89621e8b0d814fc177b2b646994f755e3863b1e5876fff1b52f18da79006b1ba59f
@@ -228,3 +228,7 @@ en:
228
228
  color: Color
229
229
  link_text: Link text
230
230
  copied_to_the_clipboard: Copied to the clipboard
231
+ queries_can_contain_variable_via_syntax_html: "Queries can contain embed variables using <code>{{variable}}</code> syntax:"
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
+ 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
+ create_new: Create New
@@ -228,6 +228,10 @@ es:
228
228
  color: Color
229
229
  link_text: Texto del enlace
230
230
  copied_to_the_clipboard: Copiado al portapapeles
231
+ queries_can_contain_variable_via_syntax_html: "Queries can contain embed variables using <code>{{variable}}</code> syntax:"
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
+ 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
+ create_new: Crear nuevo
231
235
  i:
232
236
  locale: es
233
237
  select:
@@ -132,8 +132,13 @@ module Motor
132
132
  return DEFAULT_CURRENCY_FORMAT_HASH if column.name == 'price'
133
133
 
134
134
  inclusion_validator, = model.validators_on(column.name).grep(ActiveModel::Validations::InclusionValidator)
135
+
135
136
  return { select_options: inclusion_validator.send(:delimiter) } if inclusion_validator
136
137
 
138
+ enum = model.defined_enums[column.name]
139
+
140
+ return { select_options: enum.keys } if enum
141
+
137
142
  {}
138
143
  end
139
144
 
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.80'
4
+ VERSION = '0.1.85'
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-2aa68da97d816cf0f7f7.css.gz": "main-2aa68da97d816cf0f7f7.css.gz",
2072
- "main-2aa68da97d816cf0f7f7.js.LICENSE.txt": "main-2aa68da97d816cf0f7f7.js.LICENSE.txt",
2073
- "main-2aa68da97d816cf0f7f7.js.gz": "main-2aa68da97d816cf0f7f7.js.gz",
2074
- "main.css": "main-2aa68da97d816cf0f7f7.css",
2075
- "main.js": "main-2aa68da97d816cf0f7f7.js",
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",
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.80
4
+ version: 0.1.85
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-07 00:00:00.000000000 Z
11
+ date: 2021-07-11 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-2aa68da97d816cf0f7f7.css.gz
1499
- - ui/dist/main-2aa68da97d816cf0f7f7.js.gz
1498
+ - ui/dist/main-af320e6f7693ed0b936d.css.gz
1499
+ - ui/dist/main-af320e6f7693ed0b936d.js.gz
1500
1500
  - ui/dist/manifest.json
1501
1501
  homepage:
1502
1502
  licenses: