Skip to content
Open
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ yarn-debug.log*

/app/assets/builds/*
!/app/assets/builds/.keep
prod_db.sql
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ gem 'stimulus-rails'
gem 'tailwindcss-rails'
gem 'tiddle'
gem 'turbo-rails'
gem 'tzinfo-data'
gem 'view_component'

group :production do
Expand All @@ -45,6 +46,7 @@ end

group :development, :test do
gem 'bullet', '!= 6.0.0' # 6.0.0 seems to break with Turbolinks
gem 'dotenv-rails'
gem 'rails-controller-testing'
gem 'rubocop', require: false
gem 'rubocop-performance'
Expand All @@ -71,7 +73,6 @@ group :development do
gem 'annotate'
gem 'better_errors'
gem 'binding_of_caller'
gem 'dotenv-rails'

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'pry'
Expand Down
23 changes: 22 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ GEM
net-http (~> 0.5)
fastimage (2.2.4)
ffi (1.17.4)
ffi (1.17.4-x64-mingw-ucrt)
ffi (1.17.4-x86_64-linux-gnu)
fog-aws (3.33.2)
base64 (>= 0.2, < 0.4)
fog-core (~> 2.6)
Expand All @@ -198,6 +200,12 @@ GEM
google-protobuf (4.33.4)
bigdecimal
rake (>= 13)
google-protobuf (4.33.4-x64-mingw-ucrt)
bigdecimal
rake (>= 13)
google-protobuf (4.33.4-x86_64-linux-gnu)
bigdecimal
rake (>= 13)
has_scope (0.9.0)
actionpack (>= 7.0)
activesupport (>= 7.0)
Expand Down Expand Up @@ -279,6 +287,10 @@ GEM
nokogiri (1.19.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.19.3-x64-mingw-ucrt)
racc (~> 1.4)
nokogiri (1.19.3-x86_64-linux-gnu)
racc (~> 1.4)
oauth2 (2.0.18)
faraday (>= 0.17.3, < 4.0)
jwt (>= 1.0, < 4.0)
Expand Down Expand Up @@ -313,6 +325,8 @@ GEM
ast (~> 2.4.1)
racc
pg (1.6.3)
pg (1.6.3-x64-mingw-ucrt)
pg (1.6.3-x86_64-linux)
pg_query (6.2.2)
google-protobuf (>= 3.25.3)
pg_search (2.3.7)
Expand Down Expand Up @@ -498,7 +512,9 @@ GEM
tailwindcss-rails (4.6.0)
railties (>= 7.0.0)
tailwindcss-ruby (~> 4.0)
tailwindcss-ruby (4.3.1)
tailwindcss-ruby (4.1.16)
tailwindcss-ruby (4.1.16-x64-mingw-ucrt)
tailwindcss-ruby (4.1.16-x86_64-linux-gnu)
thor (1.5.0)
tiddle (1.8.1)
activerecord (>= 6.1.0)
Expand All @@ -510,6 +526,8 @@ GEM
railties (>= 7.1.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2026.2)
tzinfo (>= 1.0.0)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.2.0)
Expand Down Expand Up @@ -540,6 +558,8 @@ GEM

PLATFORMS
ruby
x64-mingw-ucrt
x86_64-linux

DEPENDENCIES
SyslogLogger
Expand Down Expand Up @@ -603,6 +623,7 @@ DEPENDENCIES
tailwindcss-rails
tiddle
turbo-rails
tzinfo-data
view_component
webmock

Expand Down
4 changes: 4 additions & 0 deletions app/components/table_components/table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ class TableComponents::Table < ViewComponent::Base
<%= render TableComponents::Column.with_collection(@row_component::columns(**@column_arguments), order_scope_name: @order_scope_name) %>
<% if @options[:turbo_id] %> <div id="turbo-separator" class='h-px' style="grid-column: 1/-1;"></div> <% end %>
<%= render @row_component.with_collection(@rows, pagy: @pagy, **@row_arguments) %>
<% if @rows.empty? && @options[:empty_message] %>
<div class="py-8 text-center text-gray-500" style="grid-column: 1/-1;"><%= @options[:empty_message] %></div>
<% end %>
</div>
</div>

ERB

# rubocop:disable Metrics/ParameterLists
Expand Down
2 changes: 1 addition & 1 deletion app/views/chapters/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<div id="new_chapter"></div>

<%= render TableComponents::Table.new(pagy: @pagy, rows: @chapters, row_component: TableComponents::ChapterRow) do |t|
<%= render TableComponents::Table.new(pagy: @pagy, rows: @chapters, row_component: TableComponents::ChapterRow,options: { empty_message: t(:no_chapters_found) }) do |t|
t.with_left do %>
<div class="flex items-center justify-between">
<div class="flex-1">
Expand Down
2 changes: 1 addition & 1 deletion app/views/groups/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
].compact) %>

<div id="new_group"></div>
<%= render TableComponents::Table.new(pagy: @pagy, rows: @groups, row_component: TableComponents::GroupRow) do |t|
<%= render TableComponents::Table.new(pagy: @pagy, rows: @groups, row_component: TableComponents::GroupRow,options: { empty_message: t(:no_groups_found) }) do |t|
t.with_left do %>
<div class="flex items-center justify-between">
<div class="flex-1">
Expand Down
2 changes: 1 addition & 1 deletion app/views/organizations/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<div id="new_organization"></div>

<%= render TableComponents::Table.new(pagy: @pagy, rows: @organizations, row_component: TableComponents::OrganizationRow) do |t|
<%= render TableComponents::Table.new(pagy: @pagy, rows: @organizations, row_component: TableComponents::OrganizationRow,options: { empty_message: t(:no_organizations_found) }) do |t|
t.with_left do %>
<div class="flex items-center justify-between">
<div class="flex-1">
Expand Down
2 changes: 1 addition & 1 deletion app/views/students/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
(CommonComponents::ButtonComponent.new(label: t(:add_student), href: new_student_path) if policy(Student).new?)
].compact) %>

<%= render TableComponents::Table.new(pagy: @pagy, rows: @student_rows, row_component: TableComponents::StudentRow) do |t|
<%= render TableComponents::Table.new(pagy: @pagy, rows: @student_rows, row_component: TableComponents::StudentRow, options: { empty_message: t(:no_students_found) }) do |t|
t.with_left do %>
<div class="flex items-center justify-between">
<div class="flex-1">
Expand Down
1 change: 1 addition & 0 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ default: &default
pool: 5
timeout: 5000
host: <%= ENV['DATABASE_HOST'] || 'localhost' %>
port: <%= ENV['DATABASE_PORT'] || 5432 %>
username: <%= ENV['DATABASE_USER'] || 'tracker' %>
password: <%= ENV['DATABASE_PASSWORD'] || 'tracker' %>

Expand Down
5 changes: 4 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ en:
health_insurance: Health Insurance
health_issues: Health Issues
hiv_tested: HIV Tested
no_students_found: "No Students found"
no_groups_found: "No Groups found"
no_chapters_found: "No Chapters found"
no_organizations_found: "No Organizations found"

confirm: Confirm
import: Import
Expand Down Expand Up @@ -451,7 +455,6 @@ en:
one: MLID
other: MLID


errors:
messages:
extension_whitelist_error: File is not an image
Expand Down
Loading
Loading