Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ gem "importmap-rails"
gem "jbuilder"
gem "jwt"
gem "kaminari"
gem "local_time"
gem "mission_control-jobs"
gem "ostruct"
gem "prawn"
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ GEM
kaminari-core (1.2.2)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
local_time (3.0.3)
logger (1.7.0)
loofah (2.25.0)
crass (~> 1.0.2)
Expand Down Expand Up @@ -507,6 +508,7 @@ DEPENDENCIES
jbuilder
jwt
kaminari
local_time
mission_control-jobs
ostruct
pdf-inspector
Expand Down
6 changes: 5 additions & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ def attr_table_value(value)
elsif value.is_a?(Date)
value.to_fs
elsif value.is_a?(Time)
value.to_fs
in_tz(value)
elsif value.is_a?(Integer)
value.to_fs(:delimited)
else
value
end
end

def in_tz(time)
local_time(time, Time::DATE_FORMATS[:default])
end

def book_format_options
placeholder_option = [["please select", ""]]

Expand Down
6 changes: 6 additions & 0 deletions app/javascript/application.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
import "@hotwired/turbo-rails"
import "controllers"

import LocalTime from "local-time"
LocalTime.start()
document.addEventListener("turbo:morph", () => {
LocalTime.run()
})
2 changes: 1 addition & 1 deletion app/views/analytics_reports/_detail.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
%tbody
- analytics_report.rows.each do |row|
%tr
%td= row.requested_at.to_fs
%td= in_tz row.requested_at
%td= link_to row.label, crud_apache_log_item_path(row.id)

= paginate analytics_report.paginated_items
4 changes: 2 additions & 2 deletions app/views/boops/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
%td.text-right= Boop.count
%tr
%td Oldest Known Boop
%td.text-right= Boop.oldest.created_at.to_fs
%td.text-right= in_tz Boop.oldest.created_at
%tr
%td Current Boop Latency
%td.text-right #{Boop.latency} seconds
Expand All @@ -85,4 +85,4 @@
%tr
%td= boop.number
%td= boop.display_type
%td.text-right= boop.created_at.to_fs
%td.text-right= in_tz boop.created_at
2 changes: 1 addition & 1 deletion app/views/crud/apache_log_files/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
%td= link_to apache_log_file.id, crud_apache_log_file_path(apache_log_file)
%td= apache_log_file.dateext
%td= apache_log_file.state
%td.text-right= apache_log_file.created_at.to_fs
%td.text-right= in_tz apache_log_file.created_at

= paginate apache_log_files
2 changes: 1 addition & 1 deletion app/views/crud/apache_log_items/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
- apache_log_items.each do |apache_log_item|
%tr
%td= link_to apache_log_item.id, crud_apache_log_item_path(apache_log_item)
%td.text-right= apache_log_item.created_at.to_fs
%td.text-right= in_tz apache_log_item.created_at

= paginate apache_log_items
2 changes: 1 addition & 1 deletion app/views/crud/books/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
%tr
%td= link_to book.id, crud_book_path(book)
%td= book.title
%td.text-right= book.created_at.to_fs
%td.text-right= in_tz book.created_at

= paginate books
2 changes: 1 addition & 1 deletion app/views/crud/boops/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
- boops.each do |boop|
%tr
%td= link_to boop.id, crud_boop_path(boop)
%td.text-right= boop.created_at.to_fs
%td.text-right= in_tz boop.created_at

= paginate boops
2 changes: 1 addition & 1 deletion app/views/crud/csv_uploads/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
%td= link_to csv_upload.id, crud_csv_upload_path(csv_upload.id)
%td= csv_upload.parser_class_name
%td= csv_upload.original_filename
%td.text-right= csv_upload.created_at.to_fs
%td.text-right= in_tz csv_upload.created_at

= paginate csv_uploads
2 changes: 1 addition & 1 deletion app/views/crud/financial_accounts/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
%tr
%td= link_to financial_account.id, crud_financial_account_path(financial_account)
%td= financial_account.name
%td.text-right= financial_account.created_at.to_fs
%td.text-right= in_tz financial_account.created_at

= paginate financial_accounts
2 changes: 1 addition & 1 deletion app/views/crud/financial_statements/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
%tr
%td= link_to financial_statement.id, crud_financial_account_financial_statement_path(financial_account, financial_statement)
%td= financial_statement.period_start_on.to_fs
%td.text-right= financial_statement.created_at.to_fs
%td.text-right= in_tz financial_statement.created_at

= paginate financial_statements
2 changes: 1 addition & 1 deletion app/views/crud/gift_ideas/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
%tr
%td= link_to gift_idea.id, crud_gift_idea_path(gift_idea)
%td= gift_idea.title
%td.text-right= gift_idea.created_at.to_fs
%td.text-right= in_tz gift_idea.created_at

= paginate gift_ideas
2 changes: 1 addition & 1 deletion app/views/crud/post_bin_requests/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
%tr
%td= link_to post_bin_request.id, crud_post_bin_request_path(post_bin_request)
%td= post_bin_request.body.first(100)
%td.text-right= post_bin_request.created_at.to_fs
%td.text-right= in_tz post_bin_request.created_at

= paginate post_bin_requests
2 changes: 1 addition & 1 deletion app/views/crud/projects/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
%tr
%td= link_to project.id, crud_project_path(project)
%td= project.name
%td.text-right= project.created_at.to_fs
%td.text-right= in_tz project.created_at

= paginate projects
2 changes: 1 addition & 1 deletion app/views/crud/raw_hooks/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
%tr
%td= link_to raw_hook.id, crud_raw_hook_path(raw_hook)
%td= raw_hook.body.first(100)
%td.text-right= raw_hook.created_at.to_fs
%td.text-right= in_tz raw_hook.created_at

= paginate raw_hooks
2 changes: 1 addition & 1 deletion app/views/crud/sneakers/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
%tr
%td= link_to sneaker.id, crud_sneaker_path(sneaker)
%td= sneaker.name
%td.text-right= sneaker.created_at.to_fs
%td.text-right= in_tz sneaker.created_at

= paginate sneakers
2 changes: 1 addition & 1 deletion app/views/crud/warm_fuzzies/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
%tr
%td= link_to warm_fuzzy.id, crud_warm_fuzzy_path(warm_fuzzy)
%td= warm_fuzzy.title
%td.text-right= warm_fuzzy.created_at.to_fs
%td.text-right= in_tz warm_fuzzy.created_at

= paginate warm_fuzzies
2 changes: 1 addition & 1 deletion app/views/crud/webhook_senders/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
%tr
%td= link_to webhook_sender.id, crud_webhook_sender_path(webhook_sender)
%td= webhook_sender.name
%td.text-right= webhook_sender.created_at.to_fs
%td.text-right= in_tz webhook_sender.created_at

= paginate webhook_senders
1 change: 1 addition & 0 deletions config/importmap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
pin_all_from "app/javascript/controllers", under: "controllers"
pin "@rails/actioncable", to: "actioncable.esm.js"
pin_all_from "app/javascript/channels", under: "channels"
pin "local-time" # @3.0.3
4 changes: 4 additions & 0 deletions vendor/javascript/local-time.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.