diff --git a/.gitignore b/.gitignore index b587b3ce3..74edbc1b4 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,6 @@ yarn-debug.log* !/app/assets/builds/.keep .DS_Store + +coverage + diff --git a/.gitlab/auto-deploy-values.yaml b/.gitlab/auto-deploy-values.yaml index 3785d8cd5..4cdf3888d 100644 --- a/.gitlab/auto-deploy-values.yaml +++ b/.gitlab/auto-deploy-values.yaml @@ -12,15 +12,13 @@ ingress: livenessProbe: initialDelaySeconds: 5 timeoutSeconds: 5 - probeType: "exec" - command: - - "true" + probeType: "httpGet" + path: "/health" readinessProbe: initialDelaySeconds: 5 timeoutSeconds: 10 - probeType: "exec" - command: - - "true" + probeType: "httpGet" + path: "/health" resources: requests: memory: 600Mi diff --git a/.gitlab/prod-auto-deploy-values.yaml b/.gitlab/prod-auto-deploy-values.yaml index 82c5cb757..76ba9c370 100644 --- a/.gitlab/prod-auto-deploy-values.yaml +++ b/.gitlab/prod-auto-deploy-values.yaml @@ -12,15 +12,13 @@ ingress: livenessProbe: initialDelaySeconds: 5 timeoutSeconds: 5 - probeType: "exec" - command: - - "true" -readinessProbe: + probeType: "httpGet" + path: "/health" +eadinessProbe: initialDelaySeconds: 5 timeoutSeconds: 10 - probeType: "exec" - command: - - "true" + probeType: "httpGet" + path: "/health" resources: requests: memory: 700Mi diff --git a/.rubocop.yml b/.rubocop.yml index 09b6e01b8..14c74ee11 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -12,3 +12,9 @@ Style/WordArray: Enabled: false Style/Lambda: Enabled: false +Style/StringLiteralsInInterpolation: + EnforcedStyle: double_quotes +Style/ExplicitBlockArgument: + Enabled: false +Rails/Validation: + Enabled: false diff --git a/.tool-versions b/.tool-versions index cc8aff1b3..9bb544c2d 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ ruby 3.2.2 -nodejs 18.13.0 +nodejs 20.10.0 diff --git a/.vscode/settings.json b/.vscode/settings.json index 28da0cb5a..b80dda299 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,5 +21,11 @@ ], "[erb]": { "editor.defaultFormatter": "Jota0222.multi-formatter" + }, + "[markdown]": { + "editor.defaultFormatter": null + }, + "[ruby]": { + "editor.defaultFormatter": "Shopify.ruby-lsp" } } diff --git a/Gemfile b/Gemfile index 343cf16d6..c45aa0449 100644 --- a/Gemfile +++ b/Gemfile @@ -2,13 +2,13 @@ source 'https://rubygems.org' ruby '3.2.2' -gem 'rails', '~> 7.0' +gem 'rails', '~> 7.1' gem 'rails-i18n' gem 'pg', '~> 1.0' gem 'with_advisory_lock' -gem 'puma', '~> 5.0' +gem 'puma', '~> 6.0' gem 'turbo-rails' @@ -75,4 +75,5 @@ group :test do gem 'capybara' gem 'capybara-screenshot' gem 'webmock' + gem 'simplecov', require: false end diff --git a/Gemfile.lock b/Gemfile.lock index e6e703194..b7d9eb621 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,72 +2,81 @@ GEM remote: https://rubygems.org/ specs: Ascii85 (1.1.0) - actioncable (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) + actioncable (7.1.2) + actionpack (= 7.1.2) + activesupport (= 7.1.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.4.3) - actionpack (= 7.0.4.3) - activejob (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + zeitwerk (~> 2.6) + actionmailbox (7.1.2) + actionpack (= 7.1.2) + activejob (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.4.3) - actionpack (= 7.0.4.3) - actionview (= 7.0.4.3) - activejob (= 7.0.4.3) - activesupport (= 7.0.4.3) + actionmailer (7.1.2) + actionpack (= 7.1.2) + actionview (= 7.1.2) + activejob (= 7.1.2) + activesupport (= 7.1.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.4.3) - actionview (= 7.0.4.3) - activesupport (= 7.0.4.3) - rack (~> 2.0, >= 2.2.0) + rails-dom-testing (~> 2.2) + actionpack (7.1.2) + actionview (= 7.1.2) + activesupport (= 7.1.2) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.4.3) - actionpack (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.2) + actionpack (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.4.3) - activesupport (= 7.0.4.3) + actionview (7.1.2) + activesupport (= 7.1.2) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.4.3) - activesupport (= 7.0.4.3) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.2) + activesupport (= 7.1.2) globalid (>= 0.3.6) - activemodel (7.0.4.3) - activesupport (= 7.0.4.3) - activerecord (7.0.4.3) - activemodel (= 7.0.4.3) - activesupport (= 7.0.4.3) - activestorage (7.0.4.3) - actionpack (= 7.0.4.3) - activejob (= 7.0.4.3) - activerecord (= 7.0.4.3) - activesupport (= 7.0.4.3) + activemodel (7.1.2) + activesupport (= 7.1.2) + activerecord (7.1.2) + activemodel (= 7.1.2) + activesupport (= 7.1.2) + timeout (>= 0.4.0) + activestorage (7.1.2) + actionpack (= 7.1.2) + activejob (= 7.1.2) + activerecord (= 7.1.2) + activesupport (= 7.1.2) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.4.3) + activesupport (7.1.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) - addressable (2.8.4) + addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) afm (0.2.2) annotate (3.2.0) @@ -75,7 +84,8 @@ GEM rake (>= 10.4, < 14.0) ast (2.4.2) backport (1.2.0) - benchmark (0.2.1) + base64 (0.2.0) + benchmark (0.3.0) better_html (2.0.2) actionview (>= 6.0) activesupport (>= 6.0) @@ -83,10 +93,11 @@ GEM erubi (~> 1.4) parser (>= 2.4) smart_properties + bigdecimal (3.1.4) bindex (0.8.1) - bootsnap (1.16.0) + bootsnap (1.17.0) msgpack (~> 1.2) - brakeman (6.0.1) + brakeman (6.1.0) builder (3.2.4) byebug (11.1.3) capybara (3.39.2) @@ -106,20 +117,23 @@ GEM tzinfo coderay (1.1.3) concurrent-ruby (1.2.2) + connection_pool (2.4.1) crack (0.4.5) rexml crass (1.0.6) - date (3.3.3) + date (3.3.4) debug (1.8.0) irb (>= 1.5.0) reline (>= 0.3.1) diff-lcs (1.5.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) + docile (1.4.0) + domain_name (0.6.20231109) dotenv (2.8.1) dotenv-rails (2.8.1) dotenv (= 2.8.1) railties (>= 3.2) + drb (2.2.0) + ruby2_keywords e2mmap (0.1.0) erb_lint (0.5.0) activesupport @@ -131,25 +145,25 @@ GEM erubi (1.12.0) et-orbi (1.2.7) tzinfo - faraday (2.7.4) + faraday (2.7.12) + base64 faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) faraday-net_http (3.0.2) - ffi (1.15.5) + ffi (1.16.3) foreman (0.87.2) - fugit (1.8.1) + fugit (1.9.0) et-orbi (~> 1, >= 1.2.7) raabro (~> 1.4) - globalid (1.1.0) - activesupport (>= 5.0) - good_job (3.15.7) + globalid (1.2.1) + activesupport (>= 6.1) + good_job (3.21.2) activejob (>= 6.0.0) activerecord (>= 6.0.0) concurrent-ruby (>= 1.0.2) fugit (>= 1.1) railties (>= 6.0.0) thor (>= 0.14.1) - webrick (>= 1.3) hashdiff (1.0.1) hashery (2.1.2) hashie (5.0.0) @@ -157,23 +171,24 @@ GEM http-accept (1.7.0) http-cookie (1.0.5) domain_name (~> 0.5) - i18n (1.13.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) - importmap-rails (1.1.6) + importmap-rails (1.2.3) actionpack (>= 6.0.0) + activesupport (>= 6.0.0) railties (>= 6.0.0) io-console (0.6.0) - irb (1.8.1) + irb (1.10.1) rdoc reline (>= 0.3.8) - jaro_winkler (1.5.4) + jaro_winkler (1.5.6) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - jsbundling-rails (1.1.1) + jsbundling-rails (1.2.1) railties (>= 6.0.0) - json (2.6.3) - jwt (2.7.0) + json (2.7.1) + jwt (2.7.1) kramdown (2.4.0) rexml kramdown-parser-gfm (1.1.0) @@ -184,7 +199,7 @@ GEM listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.21.3) + loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -195,27 +210,28 @@ GEM marcel (1.0.2) matrix (0.4.2) method_source (1.0.0) - mime-types (3.4.1) + mime-types (3.5.1) mime-types-data (~> 3.2015) - mime-types-data (3.2023.0218.1) - mini_mime (1.1.2) - minitest (5.18.0) - msgpack (1.7.0) + mime-types-data (3.2023.1205) + mini_mime (1.1.5) + minitest (5.20.0) + msgpack (1.7.2) multi_xml (0.6.0) - net-imap (0.3.4) + mutex_m (0.2.0) + net-imap (0.4.7) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.3.3) + net-smtp (0.4.0) net-protocol netrc (0.11.0) - nio4r (2.5.9) - nokogiri (1.15.0-x86_64-darwin) + nio4r (2.7.0) + nokogiri (1.15.5-x86_64-darwin) racc (~> 1.4) - nokogiri (1.15.0-x86_64-linux) + nokogiri (1.15.5-x86_64-linux) racc (~> 1.4) oauth2 (2.0.9) faraday (>= 0.17.3, < 3.0) @@ -240,18 +256,20 @@ GEM actionpack (>= 4.2) omniauth (~> 2.0) parallel (1.23.0) - parser (3.2.2.1) + parser (3.2.2.4) ast (~> 2.4.1) + racc pdf-reader (2.11.0) Ascii85 (~> 1.0) afm (~> 0.2.1) hashery (~> 2.0) ruby-rc4 ttfunk - pg (1.5.3) + pg (1.5.4) pg_search (2.3.6) activerecord (>= 5.2) activesupport (>= 5.2) + prism (0.18.0) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) @@ -260,63 +278,71 @@ GEM pry (>= 0.13, < 0.15) pry-rails (0.3.9) pry (>= 0.10.4) - psych (5.1.1) + psych (5.1.1.1) stringio - public_suffix (5.0.1) - puma (5.6.5) + public_suffix (5.0.4) + puma (6.4.0) nio4r (~> 2.0) - pundit (2.3.0) + pundit (2.3.1) activesupport (>= 3.0.0) raabro (1.4.0) - racc (1.6.2) - rack (2.2.7) - rack-attack (6.6.1) - rack (>= 1.0, < 3) + racc (1.7.3) + rack (3.0.8) + rack-attack (6.7.0) + rack (>= 1.0, < 4) rack-protection (3.0.6) rack + rack-session (2.0.0) + rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.4.3) - actioncable (= 7.0.4.3) - actionmailbox (= 7.0.4.3) - actionmailer (= 7.0.4.3) - actionpack (= 7.0.4.3) - actiontext (= 7.0.4.3) - actionview (= 7.0.4.3) - activejob (= 7.0.4.3) - activemodel (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails (7.1.2) + actioncable (= 7.1.2) + actionmailbox (= 7.1.2) + actionmailer (= 7.1.2) + actionpack (= 7.1.2) + actiontext (= 7.1.2) + actionview (= 7.1.2) + activejob (= 7.1.2) + activemodel (= 7.1.2) + activerecord (= 7.1.2) + activestorage (= 7.1.2) + activesupport (= 7.1.2) bundler (>= 1.15.0) - railties (= 7.0.4.3) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + railties (= 7.1.2) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.5.0) - loofah (~> 2.19, >= 2.19.1) - rails-i18n (7.0.7) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + rails-i18n (7.0.8) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) - method_source + railties (7.1.2) + actionpack (= 7.1.2) + activesupport (= 7.1.2) + irb + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.0.6) + rake (13.1.0) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) rbs (2.8.4) rdbg (0.1.0) debug (>= 1.2.2) - rdoc (6.5.0) + rdoc (6.6.1) psych (>= 4.0.0) - regexp_parser (2.8.0) - reline (0.3.9) + regexp_parser (2.8.3) + reline (0.4.1) io-console (~> 0.5) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) @@ -325,31 +351,35 @@ GEM netrc (~> 0.8) reverse_markdown (2.1.1) nokogiri - rexml (3.2.5) - rollbar (3.4.0) - rubocop (1.52.0) + rexml (3.2.6) + rollbar (3.4.2) + rubocop (1.58.0) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + parser (>= 3.2.2.4) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.28.1) + rubocop-ast (1.30.0) parser (>= 3.2.1.0) - rubocop-rails (2.22.1) + rubocop-rails (2.22.2) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - ruby-lsp (0.11.1) + rubocop-ast (>= 1.30.0, < 2.0) + ruby-lsp (0.13.0) language_server-protocol (~> 3.17.0) + prism (>= 0.18.0, < 0.19) sorbet-runtime (>= 0.5.5685) - yarp (>= 0.12, < 0.13) - ruby-lsp-rails (0.2.6) - rails (>= 6.0) - ruby-lsp (>= 0.11.0, < 0.12.0) + ruby-lsp-rails (0.2.8) + actionpack (>= 6.0) + activerecord (>= 6.0) + railties (>= 6.0) + ruby-lsp (>= 0.13.0, < 0.14.0) sorbet-runtime (>= 0.5.9897) ruby-progressbar (1.13.0) ruby-rc4 (0.1.5) @@ -359,11 +389,17 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) smart_properties (1.17.0) snaky_hash (2.0.1) hashie version_gem (~> 1.1, >= 1.1.1) - solargraph (0.49.0) + solargraph (0.50.0) backport (~> 1.2) benchmark bundler (~> 2.0) @@ -379,37 +415,34 @@ GEM thor (~> 1.0) tilt (~> 2.0) yard (~> 0.9, >= 0.9.24) - sorbet-runtime (0.5.11068) - sprockets (4.2.0) + sorbet-runtime (0.5.11146) + sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - stimulus-rails (1.2.1) + stimulus-rails (1.3.0) railties (>= 6.0.0) - stringio (3.0.8) - tailwindcss-rails (2.0.29-x86_64-darwin) + stringio (3.1.0) + tailwindcss-rails (2.0.32-x86_64-darwin) railties (>= 6.0.0) - tailwindcss-rails (2.0.29-x86_64-linux) + tailwindcss-rails (2.0.32-x86_64-linux) railties (>= 6.0.0) - thor (1.2.2) - tilt (2.1.0) - timeout (0.3.2) + thor (1.3.0) + tilt (2.3.0) + timeout (0.4.1) ttfunk (1.7.0) - turbo-rails (1.4.0) + turbo-rails (1.5.0) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) - unicode-display_width (2.4.2) - version_gem (1.1.2) - view_component (3.0.0) + unicode-display_width (2.5.0) + version_gem (1.1.3) + view_component (3.8.0) activesupport (>= 5.2.0, < 8.0) concurrent-ruby (~> 1.0) method_source (~> 1.0) @@ -427,17 +460,16 @@ GEM crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) webrick (1.8.1) - websocket (1.2.9) - websocket-driver (0.7.5) + websocket (1.2.10) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - with_advisory_lock (4.6.0) - activerecord (>= 4.2) + with_advisory_lock (5.0.0) + activerecord (>= 6.1) xpath (3.2.0) nokogiri (~> 1.8) yard (0.9.34) - yarp (0.12.0) - zeitwerk (2.6.8) + zeitwerk (2.6.12) PLATFORMS x86_64-darwin-21 @@ -468,10 +500,10 @@ DEPENDENCIES pg_search pry-byebug pry-rails - puma (~> 5.0) + puma (~> 6.0) pundit rack-attack - rails (~> 7.0) + rails (~> 7.1) rails-i18n rdbg rest-client @@ -481,6 +513,7 @@ DEPENDENCIES ruby-lsp-rails rubyzip selenium-webdriver + simplecov solargraph sprockets-rails stimulus-rails diff --git a/app/components/admin/audit_logs/audit_log_table_row_component.html.erb b/app/components/admin/audit_logs/audit_log_table_row_component.html.erb index 41e86b3cc..879397460 100644 --- a/app/components/admin/audit_logs/audit_log_table_row_component.html.erb +++ b/app/components/admin/audit_logs/audit_log_table_row_component.html.erb @@ -1,5 +1,5 @@ - <%= @audit_log_item.happened_at.to_fs(:db) %> + <%= @audit_log_item.happened_at.to_fs(:db).in_time_zone %> <% if @view == :thread %> <% if @audit_log_item.actor %> <%= link_to @audit_log_item.actor_name, admin_audit_logs_path(actor: @audit_log_item.actor) %> diff --git a/app/components/admin/boxes/box_form_component.html.erb b/app/components/admin/boxes/box_form_component.html.erb index bb268c06f..5a055f230 100644 --- a/app/components/admin/boxes/box_form_component.html.erb +++ b/app/components/admin/boxes/box_form_component.html.erb @@ -29,7 +29,7 @@
- <%= form.select :color, @color_select_options, {}, class: "block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" %> + <%= form.select :color, helpers.color_select_options, {}, class: "block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" %>
diff --git a/app/components/admin/boxes/box_form_component.rb b/app/components/admin/boxes/box_form_component.rb index 284a5f09b..56dca61cb 100644 --- a/app/components/admin/boxes/box_form_component.rb +++ b/app/components/admin/boxes/box_form_component.rb @@ -1,7 +1,8 @@ class Admin::Boxes::BoxFormComponent < ViewComponent::Base + include ColorizedHelper + def initialize(box:, action:) @box = box @action = action - @color_select_options = Box.colors.keys.map { |color| [color, { class: "bg-#{color}-100 text-#{color}-600" }] } end end diff --git a/app/components/admin/boxes/box_rename_component.html.erb b/app/components/admin/boxes/box_rename_component.html.erb deleted file mode 100644 index 2949e405f..000000000 --- a/app/components/admin/boxes/box_rename_component.html.erb +++ /dev/null @@ -1,28 +0,0 @@ -
- - -
diff --git a/app/components/admin/boxes/box_rename_component.rb b/app/components/admin/boxes/box_rename_component.rb deleted file mode 100644 index 2e51070d0..000000000 --- a/app/components/admin/boxes/box_rename_component.rb +++ /dev/null @@ -1,5 +0,0 @@ -class Admin::Boxes::BoxRenameComponent < ViewComponent::Base - def initialize(box) - @box = box - end -end diff --git a/app/components/admin/boxes/boxes_list_row_component.html.erb b/app/components/admin/boxes/boxes_list_row_component.html.erb index fcea25a51..88959af9c 100644 --- a/app/components/admin/boxes/boxes_list_row_component.html.erb +++ b/app/components/admin/boxes/boxes_list_row_component.html.erb @@ -4,7 +4,7 @@
- <%= render Admin::Boxes::BoxRenameComponent.new(@box) %> + <%= render Common::InlineRenameComponent.new(name: @box.name, model: [:admin, @box.tenant, @box]) %>
<%= @box.uri %> diff --git a/app/components/admin/groups/group_form_component.html.erb b/app/components/admin/groups/group_form_component.html.erb index 7f4a7fcc7..ff5fa9005 100644 --- a/app/components/admin/groups/group_form_component.html.erb +++ b/app/components/admin/groups/group_form_component.html.erb @@ -1,4 +1,5 @@ <%= tag.turbo_frame id: "modal" do %> + <%= render Common::AlertComponent.new %>