mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31:39 -05:00
Compare commits
3 commits
a06490517a
...
967e570e44
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
967e570e44 | ||
|
|
358cda922e | ||
|
|
727a4df2e4 |
6 changed files with 22 additions and 7 deletions
File diff suppressed because one or more lines are too long
|
|
@ -77,7 +77,7 @@
|
|||
<div class="form-control">
|
||||
<label class="label cursor-pointer justify-start gap-4">
|
||||
<%= f.check_box :digest_emails_enabled,
|
||||
checked: current_user.safe_settings.digest_emails_enabled,
|
||||
checked: current_user.safe_settings.digest_emails_enabled?,
|
||||
class: "toggle toggle-primary" %>
|
||||
<div>
|
||||
<span class="label-text font-medium">Year-End Digest Emails</span>
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@
|
|||
<div class="w-full my-5">
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h1 class="text-3xl font-bold">Statistics</h1>
|
||||
<%= link_to users_digests_path, class: 'btn btn-outline btn-sm' do %>
|
||||
<%= icon 'earth' %> Year-End Digests
|
||||
<% if Date.today >= Date.new(2025, 12, 31) %>
|
||||
<%= link_to users_digests_path, class: 'btn btn-outline btn-sm' do %>
|
||||
<%= icon 'earth' %> Year-End Digests
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ChangeDigestsDistanceToBigint < ActiveRecord::Migration[8.0]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
safety_assured { change_column :digests, :distance, :bigint, null: false, default: 0 }
|
||||
end
|
||||
|
||||
def down
|
||||
safety_assured { change_column :digests, :distance, :integer, null: false, default: 0 }
|
||||
end
|
||||
end
|
||||
4
db/schema.rb
generated
4
db/schema.rb
generated
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_12_27_000001) do
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_12_27_223614) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_catalog.plpgsql"
|
||||
enable_extension "postgis"
|
||||
|
|
@ -84,7 +84,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_12_27_000001) do
|
|||
t.bigint "user_id", null: false
|
||||
t.integer "year", null: false
|
||||
t.integer "period_type", default: 0, null: false
|
||||
t.integer "distance", default: 0, null: false
|
||||
t.bigint "distance", default: 0, null: false
|
||||
t.jsonb "toponyms", default: {}
|
||||
t.jsonb "monthly_distances", default: {}
|
||||
t.jsonb "time_spent_by_location", default: {}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ if Tag.none?
|
|||
{ name: 'Home', color: '#FF5733', icon: '🏡' },
|
||||
{ name: 'Work', color: '#33FF57', icon: '💼' },
|
||||
{ name: 'Favorite', color: '#3357FF', icon: '⭐' },
|
||||
{ name: 'Travel Plans', color: '#F1C40F', icon: '🗺️' },
|
||||
{ name: 'Travel Plans', color: '#F1C40F', icon: '🗺️' }
|
||||
]
|
||||
|
||||
User.find_each do |user|
|
||||
|
|
|
|||
Loading…
Reference in a new issue