fix: offset issue for Business hours on timezones with DST
This commit is contained in:
parent
54bdb2957f
commit
1f4685ae4b
2 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ json.chatwoot_website_channel do
|
||||||
json.csat_survey_enabled @web_widget.inbox.csat_survey_enabled
|
json.csat_survey_enabled @web_widget.inbox.csat_survey_enabled
|
||||||
json.working_hours @web_widget.inbox.working_hours
|
json.working_hours @web_widget.inbox.working_hours
|
||||||
json.out_of_office_message @web_widget.inbox.out_of_office_message
|
json.out_of_office_message @web_widget.inbox.out_of_office_message
|
||||||
json.utc_off_set ActiveSupport::TimeZone[@web_widget.inbox.timezone].formatted_offset
|
json.utc_off_set ActiveSupport::TimeZone[@web_widget.inbox.timezone].now.formatted_offset
|
||||||
end
|
end
|
||||||
json.chatwoot_widget_defaults do
|
json.chatwoot_widget_defaults do
|
||||||
json.use_inbox_avatar_for_bot ActiveModel::Type::Boolean.new.cast(ENV.fetch('USE_INBOX_AVATAR_FOR_BOT', false))
|
json.use_inbox_avatar_for_bot ActiveModel::Type::Boolean.new.cast(ENV.fetch('USE_INBOX_AVATAR_FOR_BOT', false))
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
csatSurveyEnabled: <%= @web_widget.inbox.csat_survey_enabled %>,
|
csatSurveyEnabled: <%= @web_widget.inbox.csat_survey_enabled %>,
|
||||||
workingHours: <%= @web_widget.inbox.working_hours.to_json.html_safe %>,
|
workingHours: <%= @web_widget.inbox.working_hours.to_json.html_safe %>,
|
||||||
outOfOfficeMessage: <%= @web_widget.inbox.out_of_office_message.to_json.html_safe %>,
|
outOfOfficeMessage: <%= @web_widget.inbox.out_of_office_message.to_json.html_safe %>,
|
||||||
utcOffset: '<%= ActiveSupport::TimeZone[@web_widget.inbox.timezone].formatted_offset %>'
|
utcOffset: '<%= ActiveSupport::TimeZone[@web_widget.inbox.timezone].now.formatted_offset %>'
|
||||||
}
|
}
|
||||||
window.chatwootWidgetDefaults = {
|
window.chatwootWidgetDefaults = {
|
||||||
useInboxAvatarForBot: <%= ActiveModel::Type::Boolean.new.cast(ENV.fetch('USE_INBOX_AVATAR_FOR_BOT', false)) %>,
|
useInboxAvatarForBot: <%= ActiveModel::Type::Boolean.new.cast(ENV.fetch('USE_INBOX_AVATAR_FOR_BOT', false)) %>,
|
||||||
|
|
Loading…
Reference in a new issue