This commit is contained in:
Pete Matsyburka
2026-01-02 16:07:04 +02:00
parent c55036a1b1
commit b10ed46ccc
20 changed files with 639 additions and 28 deletions
+9 -1
View File
@@ -265,6 +265,11 @@ module Submissions
e['type'] == 'verification' && e['submitter_uuid'] == submitter.uuid && submitter.values[e['uuid']].present?
end
is_kba_passed =
submission.template_fields.any? do |e|
e['type'] == 'kba' && e['submitter_uuid'] == submitter.uuid && submitter.values[e['uuid']].present?
end
info_rows = [
[
composer.document.layout.formatted_text_box(
@@ -288,6 +293,9 @@ module Submissions
is_id_verified && {
text: "#{I18n.t('identity_verification')}: #{I18n.t('verified')}\n"
},
is_kba_passed && {
text: "#{I18n.t('knowledge_based_authentication')}: #{I18n.t('passed')}\n"
},
completed_event.data['ip'] && { text: "IP: #{completed_event.data['ip']}\n" },
completed_event.data['sid'] && { text: "#{I18n.t('session_id')}: #{completed_event.data['sid']}\n" },
completed_event.data['ua'] && { text: "User agent: #{completed_event.data['ua']}\n" },
@@ -353,7 +361,7 @@ module Submissions
text_align: field_name.to_s.match?(RTL_REGEXP) ? :right : :left,
line_spacing: 1.3, padding: [0, 0, 2, 0]
),
if field['type'].in?(%w[image signature initials stamp]) &&
if field['type'].in?(%w[image signature initials stamp kba]) &&
(attachment = submitter.attachments.find { |a| a.uuid == value }) &&
attachment.image?
@@ -434,7 +434,7 @@ module Submissions
height: image.height * scale
)
end
when 'image', 'signature', 'initials', 'stamp'
when 'image', 'signature', 'initials', 'stamp', 'kba'
attachment = submitter.attachments.find { |a| a.uuid == value }
image =
+1 -1
View File
@@ -111,7 +111,7 @@ module Submitters
end
def fetch_field_value(field, value, attachments_index, expires_at: nil)
if field['type'].in?(%w[image signature initials stamp payment])
if field['type'].in?(%w[image signature initials stamp payment kba])
rails_storage_proxy_url(attachments_index[value], expires_at:)
elsif field['type'] == 'file'
Array.wrap(value).compact_blank.filter_map { |e| rails_storage_proxy_url(attachments_index[e], expires_at:) }