link to submission preview page in completed emails
This commit is contained in:
@@ -107,7 +107,7 @@ module Submissions
|
||||
"\n",
|
||||
{ text: 'Generated at: ', font: [FONT_BOLD_NAME, { variant: :bold }] },
|
||||
"#{I18n.l(document.created_at.in_time_zone(account.timezone), format: :long, locale: account.locale)} " \
|
||||
"#{timezone_abbr(account.timezone, document.created_at)}"
|
||||
"#{TimeUtils.timezone_abbr(account.timezone, document.created_at)}"
|
||||
], line_spacing: 1.8
|
||||
)
|
||||
]
|
||||
@@ -232,7 +232,7 @@ module Submissions
|
||||
submitter = submission.submitters.find { |e| e.id == event.submitter_id }
|
||||
[
|
||||
"#{I18n.l(event.event_timestamp.in_time_zone(account.timezone), format: :long, locale: account.locale)} " \
|
||||
"#{timezone_abbr(account.timezone, event.event_timestamp)}",
|
||||
"#{TimeUtils.timezone_abbr(account.timezone, event.event_timestamp)}",
|
||||
composer.document.layout.formatted_text_box(
|
||||
[
|
||||
{ text: SubmissionEvents::EVENT_NAMES[event.event_type.to_sym],
|
||||
@@ -268,14 +268,6 @@ module Submissions
|
||||
)
|
||||
end
|
||||
|
||||
def timezone_abbr(timezone, time = Time.current)
|
||||
tz_info = TZInfo::Timezone.get(
|
||||
ActiveSupport::TimeZone::MAPPING[timezone] || timezone || 'UTC'
|
||||
)
|
||||
|
||||
tz_info.abbreviation(time)
|
||||
end
|
||||
|
||||
def add_logo(column)
|
||||
column.image(PdfIcons.logo_io, width: 40, height: 40, position: :float)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user