motor-admin 0.2.68 → 0.2.69
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 +4 -4
- data/app/controllers/motor/active_storage_attachments_controller.rb +16 -15
- data/config/locales/el.yml +2 -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/version.rb +1 -1
- data/ui/dist/{main-f0622588acc207c89190.css.gz → main-193823ff82e028dd5887.css.gz} +0 -0
- data/ui/dist/main-193823ff82e028dd5887.js.gz +0 -0
- data/ui/dist/manifest.json +5 -5
- metadata +4 -4
- data/ui/dist/main-f0622588acc207c89190.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: ecd151cc5a37089827f85405b84aefc194a57dc95000ea8c5e9372ed5cdfc00b
|
|
4
|
+
data.tar.gz: 283a02208d984f0ec91201774944bbf80b0eb3b8a4c61ced9d5f585e40931982
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3df0bd92070c470e9e7100c0fb16975c4f08aa936b2d52b1411a5f9c070397bbf4a4f070a5ad7f8808a015f631733f28f827a0ad698ceb29e883d160cf008bee
|
|
7
|
+
data.tar.gz: ce24ce1a1499f5d4899aeda240cd1769e21a19e53f92882fd60a903eb659d0ec9d88aed412536ac87303aed45833d88fe94033df5561ae9613eecced11038645
|
|
@@ -9,29 +9,30 @@ module Motor
|
|
|
9
9
|
load_and_authorize_resource :attachment, class: 'ActiveStorage::Attachment', parent: false
|
|
10
10
|
|
|
11
11
|
def create
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
@attachment.assign_attributes(blob: ActiveStorage::Blob.create_and_upload!(file_params), record: record)
|
|
13
|
+
@attachment.assign_attributes(record_type: '', record_id: 0) unless record
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
if @attachment.save(validate: false)
|
|
16
|
+
render json: { data: Motor::ApiQuery::BuildJson.call(@attachment, params, current_ability) }
|
|
16
17
|
else
|
|
17
|
-
|
|
18
|
+
render json: { errors: @attachment.errors }, status: :unprocessable_entity
|
|
18
19
|
end
|
|
19
20
|
end
|
|
20
21
|
|
|
21
22
|
private
|
|
22
23
|
|
|
23
24
|
def record
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
@record ||=
|
|
26
|
+
if @attachment.record
|
|
27
|
+
record_pk = @attachment.record.class.primary_key
|
|
28
|
+
|
|
29
|
+
Motor::Resources::FetchConfiguredModel.call(
|
|
30
|
+
@attachment.record.class,
|
|
31
|
+
cache_key: Motor::Resource.maximum(:updated_at)
|
|
32
|
+
).find_by(record_pk => @attachment.record[record_pk])
|
|
33
|
+
else
|
|
34
|
+
current_user
|
|
35
|
+
end
|
|
35
36
|
end
|
|
36
37
|
|
|
37
38
|
def file_params
|
data/config/locales/el.yml
CHANGED
|
@@ -304,6 +304,8 @@ el:
|
|
|
304
304
|
action_has_been_removed: Η ενέργεια αυτή έχει καταργηθεί
|
|
305
305
|
html: HTML
|
|
306
306
|
edit_html: Edit HTML
|
|
307
|
+
there_are_unsaved_changes_close_form: "There are unsaved changes. Close form?"
|
|
308
|
+
send_file_url: Send file URL
|
|
307
309
|
i:
|
|
308
310
|
locale: el
|
|
309
311
|
select:
|
data/config/locales/en.yml
CHANGED
data/config/locales/es.yml
CHANGED
|
@@ -304,6 +304,8 @@ es:
|
|
|
304
304
|
action_has_been_removed: Esta acción ha sido eliminada
|
|
305
305
|
html: HTML
|
|
306
306
|
edit_html: Edit HTML
|
|
307
|
+
there_are_unsaved_changes_close_form: "There are unsaved changes. Close form?"
|
|
308
|
+
send_file_url: Send file URL
|
|
307
309
|
i:
|
|
308
310
|
locale: es
|
|
309
311
|
select:
|
data/config/locales/pt.yml
CHANGED
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-193823ff82e028dd5887.css.gz": "main-193823ff82e028dd5887.css.gz",
|
|
2605
|
+
"main-193823ff82e028dd5887.js.LICENSE.txt": "main-193823ff82e028dd5887.js.LICENSE.txt",
|
|
2606
|
+
"main-193823ff82e028dd5887.js.gz": "main-193823ff82e028dd5887.js.gz",
|
|
2607
|
+
"main.css": "main-193823ff82e028dd5887.css",
|
|
2608
|
+
"main.js": "main-193823ff82e028dd5887.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.69
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pete Matsyburka
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-05-
|
|
11
|
+
date: 2022-05-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord-filter
|
|
@@ -1534,8 +1534,8 @@ files:
|
|
|
1534
1534
|
- ui/dist/icons/zoom-money.svg.gz
|
|
1535
1535
|
- ui/dist/icons/zoom-out.svg.gz
|
|
1536
1536
|
- ui/dist/icons/zoom-question.svg.gz
|
|
1537
|
-
- ui/dist/main-
|
|
1538
|
-
- ui/dist/main-
|
|
1537
|
+
- ui/dist/main-193823ff82e028dd5887.css.gz
|
|
1538
|
+
- ui/dist/main-193823ff82e028dd5887.js.gz
|
|
1539
1539
|
- ui/dist/manifest.json
|
|
1540
1540
|
homepage:
|
|
1541
1541
|
licenses:
|
|
Binary file
|