Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GO-128 Download messages from FS #483

Merged
merged 38 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bb0a0a0
Draft downloading sent FS message
luciajanikova Oct 15, 2024
0ac9aa8
Move creating message with thread to Fs::Message
luciajanikova Oct 15, 2024
ce6ab5b
Save correlation_id to Fs::MessageDraft
luciajanikova Oct 16, 2024
95e9b4e
Update downloading FS sent messages & Add downloading received messages
luciajanikova Oct 16, 2024
154ee47
Remove format_html_visualization method
luciajanikova Oct 16, 2024
6e6ac84
Update Fs::Api
luciajanikova Oct 16, 2024
823fe35
Small syntax updates
luciajanikova Oct 16, 2024
0dbe7f0
Draft custom FS visualizations
luciajanikova Oct 17, 2024
41e10c9
Update visualizations
luciajanikova Oct 22, 2024
47899d5
Create PDF from message HTML visualization
luciajanikova Oct 22, 2024
fdbe251
Update FS HTML visualizations templates
luciajanikova Oct 22, 2024
a32b402
Update datetime operations & FS API response updates
luciajanikova Oct 22, 2024
8ac7511
Add submission_type_identifier attribute to Fs::Form
luciajanikova Oct 22, 2024
2f935b6
Use paging when requesting FS messages
luciajanikova Oct 22, 2024
351dce0
Draft Fs boxes sync
luciajanikova Oct 23, 2024
fd14363
Update brakeman ignore
luciajanikova Oct 23, 2024
be51628
Update checks in download messages jobs
luciajanikova Oct 23, 2024
e19f6e4
Small syntax updates
luciajanikova Oct 23, 2024
1b81b73
Update sync FS box jobs
luciajanikova Oct 23, 2024
7d2fd3e
Formatting updates
luciajanikova Oct 23, 2024
0747cc4
Update Fs::MessageDraft visualizations
luciajanikova Oct 23, 2024
6840c4f
Add display_url to generated PDF
luciajanikova Oct 23, 2024
50ca8c5
Small fixes after PROD testing
luciajanikova Oct 23, 2024
6dbbe2c
Update Fs::DownloadSentMessageJob
luciajanikova Oct 24, 2024
58bfcc2
Merge branch 'main' into GO-128/download_messages_from_fs
luciajanikova Oct 24, 2024
63ce7b3
Schedule Fs::FetchFormsJob in latest migration
luciajanikova Oct 25, 2024
a5167d9
Add style to Fs::Messages HTML visualizations (to use same font as in…
luciajanikova Oct 25, 2024
1c38460
Merge branch 'main' into GO-128/download_messages_from_fs
luciajanikova Oct 29, 2024
266ffa0
Make download jobs fail if any error
luciajanikova Nov 6, 2024
84f1650
Send uuids to FS API when submitting
luciajanikova Nov 7, 2024
dcfd011
Copy tags to downloaded FS outbox message from draft
luciajanikova Nov 11, 2024
5d9e89d
Update Automation::Condition in order to be able to create Automation…
luciajanikova Nov 11, 2024
5d135b3
Add missing fixtures
luciajanikova Nov 12, 2024
7307fae
Add missing fixtures 2
luciajanikova Nov 12, 2024
9de9135
Update automation to be able to add tag to thread after form object i…
luciajanikova Nov 12, 2024
16dc11c
make grover work in docker container
celuchmarek Nov 12, 2024
6a97f21
Update download message object event
luciajanikova Nov 12, 2024
8474ba5
Try to update Dockerfile
luciajanikova Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ def before_render
@trigger_events_list = [
[t('message_created'), 'message_created'],
[t('message_draft_submitted'), 'message_draft_submitted'],
[t('form_object_downloaded'), 'form_object_downloaded'],
]
end
end
5 changes: 5 additions & 0 deletions app/controllers/message_objects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def show

def download
authorize @message_object

EventBus.publish(:form_object_downloaded, @message_object.message) if @message_object.form?
jsuchal marked this conversation as resolved.
Show resolved Hide resolved

send_data @message_object.content, filename: MessageObjectHelper.displayable_name(@message_object), type: @message_object.mimetype, disposition: :download
end

Expand All @@ -34,6 +37,8 @@ def download_pdf

pdf_content = @message_object.prepare_pdf_visualization
if pdf_content
EventBus.publish(:form_object_downloaded, @message_object.message) if @message_object.form?

send_data pdf_content, filename: MessageObjectHelper.pdf_name(@message_object), type: 'application/pdf', disposition: :download
else
redirect_back fallback_location: message_thread_path(@message_object.message.thread), alert: "Obsah nie je možné stiahnuť."
Expand Down
2 changes: 1 addition & 1 deletion app/lib/event_bus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def self.reset!
# wiring

# automation
[:message_thread_created, :message_created, :message_draft_submitted].each do |event|
[:message_thread_created, :message_created, :message_draft_submitted, :form_object_downloaded].each do |event|
EventBus.subscribe_job event, Automation::ApplyRulesForEventJob
end

Expand Down
1 change: 1 addition & 0 deletions config/locales/sk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ sk:
message_updated: "Upravená správa"
message_thread_changed: "Zmena vo vlákne správ"
message_draft_submitted: "Odoslaná správa"
form_object_downloaded: "Stiahnutá správa"
"Automation::ContainsCondition": "obsahuje"
"Automation::AttachmentContentContainsCondition": "obsahuje"
"Automation::MetadataValueCondition": "v metadátach obsahuje"
Expand Down
Loading