From 7afb55f509e96caf8261be7f9d4d99b519a2e4d5 Mon Sep 17 00:00:00 2001 From: fuwa Date: Fri, 1 Sep 2023 20:58:32 +0900 Subject: [PATCH 01/35] =?UTF-8?q?=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=81=8C=E6=96=B0=E8=A6=8F=E4=BD=9C=E6=88=90=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=82=A8=E3=83=A9=E3=83=BC=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/initializers/newspaper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/newspaper.rb b/config/initializers/newspaper.rb index 0b8da27526d..a5b04051d55 100644 --- a/config/initializers/newspaper.rb +++ b/config/initializers/newspaper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -Rails.configuration.to_prepare do +Rails.application.config.after_initialize do Newspaper.subscribe(:event_create, EventOrganizerWatcher.new) Newspaper.subscribe(:answer_create, AnswerNotifier.new) Newspaper.subscribe(:answer_create, NotifierToWatchingUser.new) From 8dd04e2487e889a40ddfbc9f28228ffbb574e914 Mon Sep 17 00:00:00 2001 From: fuwa Date: Fri, 1 Sep 2023 21:52:25 +0900 Subject: [PATCH 02/35] =?UTF-8?q?=E5=85=A8=E3=81=A6=E3=81=AE=E5=AE=9A?= =?UTF-8?q?=E6=9C=9F=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88=E3=82=92=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA&=E5=8F=82=E5=8A=A0=E7=99=BB=E9=8C=B2=E6=B8=88?= =?UTF-8?q?=E3=81=AE=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88=E3=81=AE=E8=A1=A8?= =?UTF-8?q?=E8=A8=98=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/home_controller.rb | 7 ++++--- app/views/home/_events.html.slim | 12 ++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index a3523bbb769..3ad8951eb47 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -49,14 +49,15 @@ def display_dashboard def display_events_on_dashboard @today_events = (Event.today_events.related_to(current_user) \ - + RegularEvent.today_events.participated_by(current_user)) + + RegularEvent.today_events) .sort_by { |e| e.start_at.strftime('%H:%M') } @tomorrow_events = (Event.tomorrow_events.related_to(current_user) \ - + RegularEvent.tomorrow_events.participated_by(current_user)) + + RegularEvent.tomorrow_events) .sort_by { |e| e.start_at.strftime('%H:%M') } @day_after_tomorrow_events = (Event.day_after_tomorrow_events.related_to(current_user) \ - + RegularEvent.day_after_tomorrow_events.participated_by(current_user)) + + RegularEvent.day_after_tomorrow_events) .sort_by { |e| e.start_at.strftime('%H:%M') } + .sort_by { |e| e.start_at.strftime('%H:%M') } end def display_welcome_message_for_adviser diff --git a/app/views/home/_events.html.slim b/app/views/home/_events.html.slim index e3f515e72cc..051be7e11d0 100644 --- a/app/views/home/_events.html.slim +++ b/app/views/home/_events.html.slim @@ -10,8 +10,12 @@ - @today_events.each do |today_event| - case today_event - when Event + - if today_event.participants.include?(current_user) + = '参加登録済' = render partial: 'special_event', object: today_event, as: :special_event - when RegularEvent + - if today_event.participants.include?(current_user) + = '参加登録済' = render partial: 'regular_event', locals: { regular_event: today_event, holding_date: Time.zone.today } - else .card-list-item @@ -25,8 +29,12 @@ - @tomorrow_events.each do |tomorrow_event| - case tomorrow_event - when Event + - if tomorrow_event.participants.include?(current_user) + = '参加登録済' = render partial: 'special_event', object: tomorrow_event, as: :special_event - when RegularEvent + - if tomorrow_event.participants.include?(current_user) + = '参加登録済' = render partial: 'regular_event', locals: { regular_event: tomorrow_event, holding_date: Time.zone.tomorrow } - else .card-list-item @@ -40,8 +48,12 @@ - @day_after_tomorrow_events.each do |day_after_tomorrow_event| - case day_after_tomorrow_event - when Event + - if day_after_tomorrow_event.participants.include?(current_user) + = '参加登録済' = render partial: 'special_event', object: day_after_tomorrow_event, as: :special_event - when RegularEvent + - if day_after_tomorrow_event.participants.include?(current_user) + = '参加登録済' = render partial: 'regular_event', locals: { regular_event: day_after_tomorrow_event, holding_date: Time.zone.tomorrow + 1.day } - else .card-list-item From eeab866c79ce2474213b53ec452b071c9f09e250 Mon Sep 17 00:00:00 2001 From: fuwa Date: Sat, 2 Sep 2023 19:30:26 +0900 Subject: [PATCH 03/35] =?UTF-8?q?=E5=8F=82=E5=8A=A0=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E6=B8=88=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E5=A0=B4?= =?UTF-8?q?=E6=89=80=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/home/_events.html.slim | 12 --------- app/views/home/_regular_event.html.slim | 2 ++ app/views/home/_special_event.html.slim | 36 +++++++++++++------------ 3 files changed, 21 insertions(+), 29 deletions(-) diff --git a/app/views/home/_events.html.slim b/app/views/home/_events.html.slim index 051be7e11d0..e3f515e72cc 100644 --- a/app/views/home/_events.html.slim +++ b/app/views/home/_events.html.slim @@ -10,12 +10,8 @@ - @today_events.each do |today_event| - case today_event - when Event - - if today_event.participants.include?(current_user) - = '参加登録済' = render partial: 'special_event', object: today_event, as: :special_event - when RegularEvent - - if today_event.participants.include?(current_user) - = '参加登録済' = render partial: 'regular_event', locals: { regular_event: today_event, holding_date: Time.zone.today } - else .card-list-item @@ -29,12 +25,8 @@ - @tomorrow_events.each do |tomorrow_event| - case tomorrow_event - when Event - - if tomorrow_event.participants.include?(current_user) - = '参加登録済' = render partial: 'special_event', object: tomorrow_event, as: :special_event - when RegularEvent - - if tomorrow_event.participants.include?(current_user) - = '参加登録済' = render partial: 'regular_event', locals: { regular_event: tomorrow_event, holding_date: Time.zone.tomorrow } - else .card-list-item @@ -48,12 +40,8 @@ - @day_after_tomorrow_events.each do |day_after_tomorrow_event| - case day_after_tomorrow_event - when Event - - if day_after_tomorrow_event.participants.include?(current_user) - = '参加登録済' = render partial: 'special_event', object: day_after_tomorrow_event, as: :special_event - when RegularEvent - - if day_after_tomorrow_event.participants.include?(current_user) - = '参加登録済' = render partial: 'regular_event', locals: { regular_event: day_after_tomorrow_event, holding_date: Time.zone.tomorrow + 1.day } - else .card-list-item diff --git a/app/views/home/_regular_event.html.slim b/app/views/home/_regular_event.html.slim index cc4e8a8a49b..22980f9d7ca 100644 --- a/app/views/home/_regular_event.html.slim +++ b/app/views/home/_regular_event.html.slim @@ -1,4 +1,6 @@ .card-list-item + - if regular_event.participants.include?(current_user) + | 参加登録済 .card-list-item__inner - if regular_event.holding?(holding_date) .card-list-item__label class="is-#{regular_event.category}" diff --git a/app/views/home/_special_event.html.slim b/app/views/home/_special_event.html.slim index e769ebc7cb2..1c59dcb6432 100644 --- a/app/views/home/_special_event.html.slim +++ b/app/views/home/_special_event.html.slim @@ -1,18 +1,20 @@ .card-list-item - .card-list-item__inner - .card-list-item__label.is-special - | 特別イベント - .card-list-item__rows - .card-list-item__row - header.card-list-item-title - h2.card-list-item-title__title - = link_to special_event, class: 'card-list-item-title__link a-text-link' do - = special_event.title - .card-list-item-meta - .card-list-item-meta__items - .card-list-item-meta__item - time.a-meta(datetime="" pubdate='pubdate') - span.a-meta__label - | 開催日時 - span.a-meta__value - = l special_event.start_at + - if special_event.participants.include?(current_user) + | 参加登録済 + .card-list-item__inner + .card-list-item__label.is-special + | 特別イベント + .card-list-item__rows + .card-list-item__row + header.card-list-item-title + h2.card-list-item-title__title + = link_to special_event, class: 'card-list-item-title__link a-text-link' do + = special_event.title + .card-list-item-meta + .card-list-item-meta__items + .card-list-item-meta__item + time.a-meta(datetime="" pubdate='pubdate') + span.a-meta__label + | 開催日時 + span.a-meta__value + = l special_event.start_at From 8459742755bca3f6bc1a0789d8001425a32f20fc Mon Sep 17 00:00:00 2001 From: fuwa Date: Sat, 2 Sep 2023 23:31:45 +0900 Subject: [PATCH 04/35] =?UTF-8?q?=E7=89=B9=E5=88=A5=E3=82=A4=E3=83=99?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=81=8C=E5=8F=82=E5=8A=A0=E6=B8=88=E4=BB=A5?= =?UTF-8?q?=E5=A4=96=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84?= =?UTF-8?q?=E4=B8=8D=E5=85=B7=E5=90=88=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/home/_special_event.html.slim | 34 ++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/app/views/home/_special_event.html.slim b/app/views/home/_special_event.html.slim index 1c59dcb6432..f651f3c205e 100644 --- a/app/views/home/_special_event.html.slim +++ b/app/views/home/_special_event.html.slim @@ -1,20 +1,20 @@ .card-list-item - if special_event.participants.include?(current_user) | 参加登録済 - .card-list-item__inner - .card-list-item__label.is-special - | 特別イベント - .card-list-item__rows - .card-list-item__row - header.card-list-item-title - h2.card-list-item-title__title - = link_to special_event, class: 'card-list-item-title__link a-text-link' do - = special_event.title - .card-list-item-meta - .card-list-item-meta__items - .card-list-item-meta__item - time.a-meta(datetime="" pubdate='pubdate') - span.a-meta__label - | 開催日時 - span.a-meta__value - = l special_event.start_at + .card-list-item__inner + .card-list-item__label.is-special + | 特別イベント + .card-list-item__rows + .card-list-item__row + header.card-list-item-title + h2.card-list-item-title__title + = link_to special_event, class: 'card-list-item-title__link a-text-link' do + = special_event.title + .card-list-item-meta + .card-list-item-meta__items + .card-list-item-meta__item + time.a-meta(datetime="" pubdate='pubdate') + span.a-meta__label + | 開催日時 + span.a-meta__value + = l special_event.start_at From e96993437d8b72931334092a3aa3089dd7932dc1 Mon Sep 17 00:00:00 2001 From: fuwa Date: Sun, 3 Sep 2023 18:36:27 +0900 Subject: [PATCH 05/35] =?UTF-8?q?=E5=B0=B1=E8=81=B7=E4=B8=AD=E3=81=AE?= =?UTF-8?q?=E4=BA=BA=E3=81=AE=E3=83=86=E3=82=B9=E3=83=88=E3=81=AF=E9=80=9A?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/home_test.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/system/home_test.rb b/test/system/home_test.rb index d8bfcbb0f18..d07ac1cf8e9 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -216,7 +216,7 @@ class HomeTest < ApplicationSystemTestCase end end - test 'show regular events for only participant and special events on dashbord' do + test 'show all regular events and special events on dashbord' do travel_to Time.zone.local(2017, 4, 3, 10, 0, 0) do visit_with_auth '/', 'kimura' today_event_label = find('.card-list__label', text: '今日開催') @@ -225,6 +225,7 @@ class HomeTest < ApplicationSystemTestCase today_events_texts = [ { category: '特別イベント', title: '直近イベントの表示テスト用(当日)', start_at: '2017年04月03日(月) 09:00' }, + { category: '質問', title: '質問・雑談タイム', start_at: '2017年04月03日(月) 16:00' }, { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月03日(月) 21:00' } ] tomorrow_events_texts = [ @@ -232,7 +233,8 @@ class HomeTest < ApplicationSystemTestCase { category: '特別イベント', title: '直近イベントの表示テスト用(翌日)', start_at: '2017年04月04日(火) 22:00' } ] day_after_tomorrow_events_texts = [ - { category: '特別イベント', title: '直近イベントの表示テスト用(明後日)', start_at: '2017年04月05日(水) 09:00' } + { category: '特別イベント', title: '直近イベントの表示テスト用(明後日)', start_at: '2017年04月05日(水) 09:00' }, + { category: '輪読会', title: '独習Git輪読会', start_at: '2017年04月05日(水) 21:00' } ] assert_event_card(today_event_label, today_events_texts) @@ -242,8 +244,8 @@ class HomeTest < ApplicationSystemTestCase logout visit_with_auth '/', 'komagata' - assert_no_text '今日01月30日は 「ダッシュボード表示確認用テスト定期イベント」' - assert_no_text '明日01月31日は 「ダッシュボード表示確認用テスト定期イベント」' + #assert_text '今日01月30日は 「ダッシュボード表示確認用テスト定期イベント」' + #assert_text '明日01月31日は 「ダッシュボード表示確認用テスト定期イベント」' end end From e143bdd6e870b7efe489175de97891d825bb01dd Mon Sep 17 00:00:00 2001 From: Kassy0220 Date: Fri, 1 Sep 2023 15:12:50 +0900 Subject: [PATCH 06/35] =?UTF-8?q?=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=81=8C=E4=BC=91=E3=81=BF=E3=81=AE=E8=A1=A8=E7=A4=BA=E3=82=92?= =?UTF-8?q?=E7=A2=BA=E8=AA=8D=E3=81=99=E3=82=8B=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/fixtures/regular_event_participations.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/fixtures/regular_event_participations.yml b/test/fixtures/regular_event_participations.yml index 42a86ad324b..ecb8b932e04 100644 --- a/test/fixtures/regular_event_participations.yml +++ b/test/fixtures/regular_event_participations.yml @@ -15,5 +15,5 @@ regular_event_participation4: regular_event: regular_event26 regular_event_participation5: - user: hatsuno - regular_event: regular_event32 + user: kimura + regular_event: regular_event7 From 1e114cf2a41b8ce3539f740c01c5f1275c5adf27 Mon Sep 17 00:00:00 2001 From: fuwa Date: Sun, 3 Sep 2023 22:07:18 +0900 Subject: [PATCH 07/35] =?UTF-8?q?=E5=8F=82=E5=8A=A0=E3=81=97=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=81=AA=E3=81=84=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=81=AE=E3=83=87=E3=83=BC=E3=82=BF=E3=81=A8=E3=83=86=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/home_test.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/system/home_test.rb b/test/system/home_test.rb index d07ac1cf8e9..06e78cc4fca 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -226,14 +226,17 @@ class HomeTest < ApplicationSystemTestCase today_events_texts = [ { category: '特別イベント', title: '直近イベントの表示テスト用(当日)', start_at: '2017年04月03日(月) 09:00' }, { category: '質問', title: '質問・雑談タイム', start_at: '2017年04月03日(月) 16:00' }, + { category: '輪読会', title: '誰も参加していない輪読会', start_at: '2017年04月03日(月) 18:00' }, { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月03日(月) 21:00' } ] tomorrow_events_texts = [ + { category: '輪読会', title: '誰も参加していない輪読会', start_at: '2017年04月04日(火) 18:00' }, { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月04日(火) 21:00' }, { category: '特別イベント', title: '直近イベントの表示テスト用(翌日)', start_at: '2017年04月04日(火) 22:00' } ] day_after_tomorrow_events_texts = [ { category: '特別イベント', title: '直近イベントの表示テスト用(明後日)', start_at: '2017年04月05日(水) 09:00' }, + { category: '輪読会', title: '誰も参加していない輪読会', start_at: '2017年04月05日(水) 18:00' }, { category: '輪読会', title: '独習Git輪読会', start_at: '2017年04月05日(水) 21:00' } ] From d517dd70ebf7502b82ad87786a07ff1d826994f3 Mon Sep 17 00:00:00 2001 From: fuwa Date: Sun, 3 Sep 2023 22:25:28 +0900 Subject: [PATCH 08/35] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=9D=E3=81=86?= =?UTF-8?q?=E3=81=AA=E3=83=86=E3=82=B9=E3=83=88=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/home_test.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/system/home_test.rb b/test/system/home_test.rb index 06e78cc4fca..933d1f8cfa9 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -243,12 +243,6 @@ class HomeTest < ApplicationSystemTestCase assert_event_card(today_event_label, today_events_texts) assert_event_card(tomorrow_event_label, tomorrow_events_texts) assert_event_card(day_after_tomorrow_event_label, day_after_tomorrow_events_texts) - - logout - - visit_with_auth '/', 'komagata' - #assert_text '今日01月30日は 「ダッシュボード表示確認用テスト定期イベント」' - #assert_text '明日01月31日は 「ダッシュボード表示確認用テスト定期イベント」' end end From 8ac1d4243d23922d15d7b6cce570a2933213e629 Mon Sep 17 00:00:00 2001 From: fuwa Date: Sun, 3 Sep 2023 23:09:21 +0900 Subject: [PATCH 09/35] =?UTF-8?q?=E5=8F=82=E5=8A=A0=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E6=B8=88=E3=81=AE=E3=82=AF=E3=83=A9=E3=82=B9=E3=82=92=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/home/_regular_event.html.slim | 3 ++- app/views/home/_special_event.html.slim | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/home/_regular_event.html.slim b/app/views/home/_regular_event.html.slim index 22980f9d7ca..ad76ba49305 100644 --- a/app/views/home/_regular_event.html.slim +++ b/app/views/home/_regular_event.html.slim @@ -1,6 +1,7 @@ .card-list-item - if regular_event.participants.include?(current_user) - | 参加登録済 + .participation-registration + | 参加登録済 .card-list-item__inner - if regular_event.holding?(holding_date) .card-list-item__label class="is-#{regular_event.category}" diff --git a/app/views/home/_special_event.html.slim b/app/views/home/_special_event.html.slim index f651f3c205e..614d1fdfb0c 100644 --- a/app/views/home/_special_event.html.slim +++ b/app/views/home/_special_event.html.slim @@ -1,6 +1,7 @@ .card-list-item - if special_event.participants.include?(current_user) - | 参加登録済 + .participation-registration + | 参加登録済 .card-list-item__inner .card-list-item__label.is-special | 特別イベント From 1493bef9d1cfbecd2c1d6bcaf31550e27739bff7 Mon Sep 17 00:00:00 2001 From: fuwa Date: Mon, 4 Sep 2023 13:28:55 +0900 Subject: [PATCH 10/35] =?UTF-8?q?=E5=8F=82=E5=8A=A0=E3=81=97=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=82=8B=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88=E3=81=AB?= =?UTF-8?q?=E3=81=AE=E3=81=BF=E5=8F=82=E5=8A=A0=E7=99=BB=E9=8C=B2=E6=B8=88?= =?UTF-8?q?=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=82=8B=E3=81=93?= =?UTF-8?q?=E3=81=A8=E3=81=AE=E3=83=86=E3=82=B9=E3=83=88=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/fixtures/events.yml | 11 ++++++++ db/fixtures/participations.yml | 5 ++++ test/fixtures/events.yml | 11 ++++++++ test/fixtures/participations.yml | 5 ++++ .../fixtures/regular_event_participations.yml | 4 +++ test/system/home_test.rb | 25 +++++++++++++++++++ 6 files changed, 61 insertions(+) diff --git a/db/fixtures/events.yml b/db/fixtures/events.yml index bbe80f66009..e8b998f1e59 100644 --- a/db/fixtures/events.yml +++ b/db/fixtures/events.yml @@ -147,3 +147,14 @@ event30: open_start_at: <%= Time.zone.tomorrow.midnight %> open_end_at: <%= Time.zone.tomorrow + 1.day - 1.hours %> user: komagata + +event31: + title: "kimura専用イベント" + description: "kimura専用イベント" + location: "FJORDオフィス" + capacity: 10 + start_at: <%= Date.current %> + end_at: 2019-12-17 12:00:00 + open_start_at: 2019-12-10 9:00 + open_end_at: 2019-12-16 9:00 + user: kimura diff --git a/db/fixtures/participations.yml b/db/fixtures/participations.yml index 21ea37d0154..2287a802f11 100644 --- a/db/fixtures/participations.yml +++ b/db/fixtures/participations.yml @@ -25,3 +25,8 @@ participation5: user: sotugyou event: event2 enable: true + +participation6: + user: kimura + event: event31 + enable: true diff --git a/test/fixtures/events.yml b/test/fixtures/events.yml index fe5db0a0f00..f2dd492a64d 100644 --- a/test/fixtures/events.yml +++ b/test/fixtures/events.yml @@ -169,3 +169,14 @@ event32: open_start_at: 2017-3-26 9:00 open_end_at: 2017-4-03 9:00 user: komagata + +event33: + title: "kimura専用イベント" + description: "kimura専用イベント" + location: "FJORDオフィス" + capacity: 10 + start_at: 2017-04-03 00:00:00 + end_at: 2017-4-3 12:00:00 + open_start_at: 2017-3-25 9:00 + open_end_at: 2017-4-01 9:00 + user: kimura diff --git a/test/fixtures/participations.yml b/test/fixtures/participations.yml index 5fa70ed1a55..9b963db9c6c 100644 --- a/test/fixtures/participations.yml +++ b/test/fixtures/participations.yml @@ -30,3 +30,8 @@ participation6: user: hatsuno event: event5 enable: true + +participation7: + user: kimura + event: event33 + enable: true diff --git a/test/fixtures/regular_event_participations.yml b/test/fixtures/regular_event_participations.yml index ecb8b932e04..f3dc371e086 100644 --- a/test/fixtures/regular_event_participations.yml +++ b/test/fixtures/regular_event_participations.yml @@ -17,3 +17,7 @@ regular_event_participation4: regular_event_participation5: user: kimura regular_event: regular_event7 + +regular_event_participation6: + user: kimura + regular_event: regular_event2 diff --git a/test/system/home_test.rb b/test/system/home_test.rb index 933d1f8cfa9..5c591d07f96 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -266,6 +266,31 @@ def assert_events_count(event_label, count) assert_no_selector(:xpath, event_xpath(event_label, count)) end + test 'show registered to participate only participating events' do + Event.where.not(title: ['kimura専用イベント', '直近イベントの表示テスト用(当日)']).destroy_all + RegularEvent.where.not(title: ['誰も参加していない輪読会','質問・雑談タイム'] ).destroy_all + + travel_to Time.zone.local(2017, 4, 3, 10, 0, 0) do + visit_with_auth '/', 'kimura' + within all('.card-list-item')[0] do + assert_text '直近イベントの表示テスト用(当日)' + assert_no_text '参加登録済' + end + within all('.card-list-item')[1] do + assert_text 'kimura専用イベント' + assert_text '参加登録済' + end + within all('.card-list-item')[2] do + assert_text '質問・雑談タイム' + assert_text '参加登録済' + end + within all('.card-list-item')[3] do + assert_text '誰も参加していない輪読会' + assert_no_text '参加登録済' + end + end + end + test 'show grass hide button for graduates' do visit_with_auth '/', 'kimura' assert_not has_button? '非表示' From fe902744fa4ab7cf324d5d5ac74147dc7bca0421 Mon Sep 17 00:00:00 2001 From: fuwa Date: Mon, 4 Sep 2023 14:25:26 +0900 Subject: [PATCH 11/35] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=82=A4=E3=83=99?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=81=AE=E3=83=86=E3=82=B9=E3=83=88=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/home_test.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/system/home_test.rb b/test/system/home_test.rb index 5c591d07f96..a1badf26c1f 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -225,6 +225,7 @@ class HomeTest < ApplicationSystemTestCase today_events_texts = [ { category: '特別イベント', title: '直近イベントの表示テスト用(当日)', start_at: '2017年04月03日(月) 09:00' }, + { category: '特別イベント', title: 'kimura専用イベント', start_at: '2017年04月03日(月) 09:00' }, { category: '質問', title: '質問・雑談タイム', start_at: '2017年04月03日(月) 16:00' }, { category: '輪読会', title: '誰も参加していない輪読会', start_at: '2017年04月03日(月) 18:00' }, { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月03日(月) 21:00' } From 26394726b35774682f81b473c85bf948898b87f8 Mon Sep 17 00:00:00 2001 From: fuwa Date: Mon, 4 Sep 2023 14:32:30 +0900 Subject: [PATCH 12/35] =?UTF-8?q?rubocop=E3=82=92=E9=80=9A=E3=81=97?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/home_controller.rb | 2 +- test/system/home_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 3ad8951eb47..a1828d589a8 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -57,7 +57,7 @@ def display_events_on_dashboard @day_after_tomorrow_events = (Event.day_after_tomorrow_events.related_to(current_user) \ + RegularEvent.day_after_tomorrow_events) .sort_by { |e| e.start_at.strftime('%H:%M') } - .sort_by { |e| e.start_at.strftime('%H:%M') } + .sort_by { |e| e.start_at.strftime('%H:%M') } end def display_welcome_message_for_adviser diff --git a/test/system/home_test.rb b/test/system/home_test.rb index a1badf26c1f..cc57021d6ce 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -269,7 +269,7 @@ def assert_events_count(event_label, count) test 'show registered to participate only participating events' do Event.where.not(title: ['kimura専用イベント', '直近イベントの表示テスト用(当日)']).destroy_all - RegularEvent.where.not(title: ['誰も参加していない輪読会','質問・雑談タイム'] ).destroy_all + RegularEvent.where.not(title: ['誰も参加していない輪読会', '質問・雑談タイム']).destroy_all travel_to Time.zone.local(2017, 4, 3, 10, 0, 0) do visit_with_auth '/', 'kimura' From bd25e599a910888a21de37d157b37649f939ee4a Mon Sep 17 00:00:00 2001 From: fuwa Date: Mon, 4 Sep 2023 16:20:14 +0900 Subject: [PATCH 13/35] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AA=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=87=E3=83=BC=E3=82=BF=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4=E3=81=97=E3=81=A6=E3=83=86=E3=82=B9=E3=83=88=E3=82=92?= =?UTF-8?q?=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/fixtures/regular_event_participations.yml | 4 ---- test/system/home_test.rb | 11 ++++------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/test/fixtures/regular_event_participations.yml b/test/fixtures/regular_event_participations.yml index f3dc371e086..ecb8b932e04 100644 --- a/test/fixtures/regular_event_participations.yml +++ b/test/fixtures/regular_event_participations.yml @@ -17,7 +17,3 @@ regular_event_participation4: regular_event_participation5: user: kimura regular_event: regular_event7 - -regular_event_participation6: - user: kimura - regular_event: regular_event2 diff --git a/test/system/home_test.rb b/test/system/home_test.rb index cc57021d6ce..e60cc905173 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -227,17 +227,14 @@ class HomeTest < ApplicationSystemTestCase { category: '特別イベント', title: '直近イベントの表示テスト用(当日)', start_at: '2017年04月03日(月) 09:00' }, { category: '特別イベント', title: 'kimura専用イベント', start_at: '2017年04月03日(月) 09:00' }, { category: '質問', title: '質問・雑談タイム', start_at: '2017年04月03日(月) 16:00' }, - { category: '輪読会', title: '誰も参加していない輪読会', start_at: '2017年04月03日(月) 18:00' }, { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月03日(月) 21:00' } ] tomorrow_events_texts = [ - { category: '輪読会', title: '誰も参加していない輪読会', start_at: '2017年04月04日(火) 18:00' }, { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月04日(火) 21:00' }, { category: '特別イベント', title: '直近イベントの表示テスト用(翌日)', start_at: '2017年04月04日(火) 22:00' } ] day_after_tomorrow_events_texts = [ { category: '特別イベント', title: '直近イベントの表示テスト用(明後日)', start_at: '2017年04月05日(水) 09:00' }, - { category: '輪読会', title: '誰も参加していない輪読会', start_at: '2017年04月05日(水) 18:00' }, { category: '輪読会', title: '独習Git輪読会', start_at: '2017年04月05日(水) 21:00' } ] @@ -269,7 +266,7 @@ def assert_events_count(event_label, count) test 'show registered to participate only participating events' do Event.where.not(title: ['kimura専用イベント', '直近イベントの表示テスト用(当日)']).destroy_all - RegularEvent.where.not(title: ['誰も参加していない輪読会', '質問・雑談タイム']).destroy_all + RegularEvent.where.not(title: ['ダッシュボード表示確認用テスト定期イベント', '質問・雑談タイム']).destroy_all travel_to Time.zone.local(2017, 4, 3, 10, 0, 0) do visit_with_auth '/', 'kimura' @@ -283,11 +280,11 @@ def assert_events_count(event_label, count) end within all('.card-list-item')[2] do assert_text '質問・雑談タイム' - assert_text '参加登録済' + assert_no_text '参加登録済' end within all('.card-list-item')[3] do - assert_text '誰も参加していない輪読会' - assert_no_text '参加登録済' + assert_text 'ダッシュボード表示確認用テスト定期イベント' + assert_text '参加登録済' end end end From 63cea6c4b8da9a93ad39edba117e867803638130 Mon Sep 17 00:00:00 2001 From: machida Date: Wed, 6 Sep 2023 15:56:10 +0900 Subject: [PATCH 14/35] =?UTF-8?q?=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E5=91=A8=E3=82=8A=E3=81=AE=E3=83=9E?= =?UTF-8?q?=E3=83=BC=E3=82=AF=E3=82=A2=E3=83=83=E3=83=97=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/events/edit.html.slim | 29 ++++++-- app/views/events/index.html.slim | 5 +- app/views/events/new.html.slim | 33 ++++---- app/views/events/show.html.slim | 95 +++++++++++++----------- app/views/home/_special_event.html.slim | 2 +- app/views/regular_events/edit.html.slim | 29 ++++++-- app/views/regular_events/index.html.slim | 3 + app/views/regular_events/new.html.slim | 34 +++++---- app/views/regular_events/show.html.slim | 71 ++++++++++-------- 9 files changed, 180 insertions(+), 121 deletions(-) diff --git a/app/views/events/edit.html.slim b/app/views/events/edit.html.slim index 399d72e5de4..0c844ab9315 100644 --- a/app/views/events/edit.html.slim +++ b/app/views/events/edit.html.slim @@ -1,11 +1,24 @@ - title '特別イベント編集' - set_meta_tags description: '特別イベント編集ページです。' -header.page-header - .container - .page-header__inner - h2.page-header__title = title -hr.a-border -.page-body - .container.is-xxl - = render 'form', event: @event += render 'events/header' += render 'events/tabs' + +.page-main + header.page-main-header + .container + .page-main-header__inner + .page-main-header__start + h2.page-header__title + = title + .page-main-header__end + .page-main-header-actions + ul.page-main-header-actions__items + li.page-main-header-actions__item + = link_to events_path, class: 'a-button is-md is-secondary is-block is-back' do + | 特別イベント一覧 + hr.a-border + + .page-body + .container.is-xxl + = render 'form', event: @event diff --git a/app/views/events/index.html.slim b/app/views/events/index.html.slim index a86f1374c56..ea474c9df8a 100644 --- a/app/views/events/index.html.slim +++ b/app/views/events/index.html.slim @@ -1,4 +1,5 @@ -- title 'イベント' +- title '特別イベント' +- set_meta_tags description: '特別イベント一覧ページです。' = render 'events/header' = render 'events/tabs' @@ -8,6 +9,8 @@ .container .page-main-header__inner .page-main-header__start + h2.page-header__title + = title .page-main-header__end .page-main-header-actions ul.page-main-header-actions__items diff --git a/app/views/events/new.html.slim b/app/views/events/new.html.slim index 77ea0cf1f1d..7fdedff3bbf 100644 --- a/app/views/events/new.html.slim +++ b/app/views/events/new.html.slim @@ -1,16 +1,23 @@ - title '特別イベント作成' - set_meta_tags description: '特別イベント作成ページです。' -header.page-header - .container - .page-header__inner - h2.page-header__title = title - .page-header-actions - .page-header-actions__items - .page-header-actions__item - = link_to events_path, class: 'a-button is-md is-secondary is-block is-back' do - | 特別イベント一覧 -hr.a-border -.page-body - .container.is-xxl - = render 'form', event: @event += render 'events/header' += render 'events/tabs' + +.page-main + header.page-main-header + .container + .page-main-header__inner + .page-main-header__start + h2.page-header__title + = title + .page-main-header__end + .page-main-header-actions + ul.page-main-header-actions__items + li.page-main-header-actions__item + = link_to events_path, class: 'a-button is-md is-secondary is-block is-back' do + | 特別イベント一覧 + hr.a-border + .page-body + .container.is-xxl + = render 'form', event: @event diff --git a/app/views/events/show.html.slim b/app/views/events/show.html.slim index fa495a86c25..e1b451fb52c 100644 --- a/app/views/events/show.html.slim +++ b/app/views/events/show.html.slim @@ -1,58 +1,63 @@ - title @event.title - set_meta_tags description: "特別イベント「#{@event.title}」のページです。#{@event.period}に開催。" -header.page-header - .container - .page-header__inner - .page-header__title - | イベント - .page-header-actions - ul.page-header-actions__items - - if admin_or_mentor_login? - li.page-header-actions__item.is-only-mentor - = link_to new_event_path, class: 'a-button is-md is-secondary is-block' do - i.fa-regular.fa-plus - | 特別イベント作成 - li.page-header-actions__item - = link_to events_path, class: 'a-button is-md is-secondary is-block is-back' do - | 特別イベント一覧 - += render 'events/header' = render 'events/tabs' -- if @event.wip? - .a-page-notice.is-danger - .container.is-md - .a-page-notice__inner - p - | 公開されるまでお待ちください。 -- elsif !@event.opening? +.page-main + header.page-main-header + .container + .page-main-header__inner + .page-main-header__start + .page-header__title + | 特別イベント + .page-main-header__end + .page-main-header-actions + ul.page-main-header-actions__items + li.page-main-header-actions__item + = link_to new_event_path, class: 'a-button is-md is-secondary is-block' do + i.fa-regular.fa-plus + | 特別イベント作成 + li.page-main-header-actions__item + = link_to events_path, class: 'a-button is-md is-secondary is-block is-back' do + | 特別イベント一覧 + - if @event.wip? .a-page-notice.is-danger .container.is-md .a-page-notice__inner p | 公開されるまでお待ちください。 - - elsif @event.before_opening? - .a-page-notice.is-danger - .container.is-md - .a-page-notice__inner - p - | 募集開始までお待ち下さい。 - - elsif @event.closing? - .a-page-notice.is-muted - .container.is-md - .a-page-notice__inner - p - | 募集受付は終了しました。 + - elsif !@event.opening? + - if @event.wip? + .a-page-notice.is-danger + .container.is-md + .a-page-notice__inner + p + | 公開されるまでお待ちください。 + - elsif @event.before_opening? + .a-page-notice.is-danger + .container.is-md + .a-page-notice__inner + p + | 募集開始までお待ち下さい。 + - elsif @event.closing? + .a-page-notice.is-muted + .container.is-md + .a-page-notice__inner + p + | 募集受付は終了しました。 + - else + .a-page-notice.is-muted + .container.is-md + .a-page-notice__inner + p + | このイベントは終了しました。 - else - .a-page-notice.is-muted - .container.is-md - .a-page-notice__inner - p - | このイベントは終了しました。 + hr.a-border -.page-body - .container.is-md - = render 'event', event: @event - #js-comments(data-commentable-id="#{@event.id}" data-commentable-type='Event' data-current-user-id="#{current_user.id}") - div(data-vue='Footprints' data-vue-footprintable-id="#{@event.id}" data-vue-footprintable-type='Event') + .page-body + .container.is-md + = render 'event', event: @event + #js-comments(data-commentable-id="#{@event.id}" data-commentable-type='Event' data-current-user-id="#{current_user.id}") + div(data-vue='Footprints' data-vue-footprintable-id="#{@event.id}" data-vue-footprintable-type='Event') diff --git a/app/views/home/_special_event.html.slim b/app/views/home/_special_event.html.slim index 614d1fdfb0c..1db31e99602 100644 --- a/app/views/home/_special_event.html.slim +++ b/app/views/home/_special_event.html.slim @@ -4,7 +4,7 @@ | 参加登録済 .card-list-item__inner .card-list-item__label.is-special - | 特別イベント + | 特別
イベント .card-list-item__rows .card-list-item__row header.card-list-item-title diff --git a/app/views/regular_events/edit.html.slim b/app/views/regular_events/edit.html.slim index df5b55d5dfb..974bedb2877 100644 --- a/app/views/regular_events/edit.html.slim +++ b/app/views/regular_events/edit.html.slim @@ -1,10 +1,23 @@ - title '定期イベント編集' +- set_meta_tags description: '定期イベント編集ページです。' -header.page-header - .container - .page-header__inner - h2.page-header__title = title -hr.a-border -.page-body - .container.is-xxl - = render 'form', regular_event: @regular_event += render 'events/header' += render 'events/tabs' + +.page-main + header.page-main-header + .container + .page-main-header__inner + .page-main-header__start + h2.page-header__title + = title + .page-main-header__end + .page-main-header-actions + ul.page-main-header-actions__items + li.page-main-header-actions__item + = link_to regular_events_path, class: 'a-button is-md is-secondary is-block is-back' do + | 定期イベント一覧 + hr.a-border + .page-body + .container.is-xxl + = render 'form', regular_event: @regular_event diff --git a/app/views/regular_events/index.html.slim b/app/views/regular_events/index.html.slim index 8df41779e23..50dc8ab5418 100644 --- a/app/views/regular_events/index.html.slim +++ b/app/views/regular_events/index.html.slim @@ -1,4 +1,5 @@ - title '定期イベント' +- set_meta_tags description: '定期イベント一覧ページです。' = render 'events/header' = render 'events/tabs' @@ -8,6 +9,8 @@ .container .page-main-header__inner .page-main-header__start + h2.page-header__title + = title .page-main-header__end .page-main-header-actions ul.page-main-header-actions__items diff --git a/app/views/regular_events/new.html.slim b/app/views/regular_events/new.html.slim index 81a1c6d9ac4..b8ed70b8158 100644 --- a/app/views/regular_events/new.html.slim +++ b/app/views/regular_events/new.html.slim @@ -1,15 +1,23 @@ - title '定期イベント作成' +- set_meta_tags description: '定期イベント作成ページです。' -header.page-header - .container - .page-header__inner - h2.page-header__title = title - .page-header-actions - .page-header-actions__items - .page-header-actions__item - = link_to regular_events_path, class: 'a-button is-md is-secondary is-block is-back' do - | 定期イベント一覧 -hr.a-border -.page-body - .container.is-xxl - = render 'form', regular_event: @regular_event += render 'events/header' += render 'events/tabs' + +.page-main + header.page-main-header + .container + .page-main-header__inner + .page-main-header__start + h2.page-header__title + = title + .page-main-header__end + .page-main-header-actions + ul.page-main-header-actions__items + li.page-main-header-actions__item + = link_to regular_events_path, class: 'a-button is-md is-secondary is-block is-back' do + | 定期イベント一覧 + hr.a-border + .page-body + .container.is-xxl + = render 'form', regular_event: @regular_event diff --git a/app/views/regular_events/show.html.slim b/app/views/regular_events/show.html.slim index a5dad587d1e..db578154e2f 100644 --- a/app/views/regular_events/show.html.slim +++ b/app/views/regular_events/show.html.slim @@ -1,36 +1,43 @@ - title @regular_event.title - set_meta_tags description: "定期イベント「#{@regular_event.title}」募集ページです。" -header.page-header - .container - .page-header__inner - .page-header__title - | 定期イベント - .page-header-actions - ul.page-header-actions__items - li.page-header-actions__item - = link_to new_regular_event_path, class: 'a-button is-md is-secondary is-block' do - i.fa-regular.fa-plus - | 定期イベント作成 - li.page-header-actions__item - = link_to regular_events_path, class: 'a-button is-md is-secondary is-block is-back' do - | 定期イベント一覧 -hr.a-border -- if @regular_event.wip? - .a-page-notice.is-danger - .container.is-md - .a-page-notice__inner - p - | 公開されるまでお待ちください。 -- elsif @regular_event.finished - .a-page-notice.is-danger - .container.is-md - .a-page-notice__inner - p - | 定期イベントは終了しました。 += render 'events/header' += render 'events/tabs' -.page-body - .container.is-md - = render 'regular_event', regular_event: @regular_event - #js-comments(data-commentable-id="#{@regular_event.id}" data-commentable-type='RegularEvent' data-current-user-id="#{current_user.id}") - div(data-vue='Footprints' data-vue-footprintable-id="#{@regular_event.id}" data-vue-footprintable-type='RegularEvent') +.page-main + header.page-main-header + .container + .page-main-header__inner + .page-main-header__start + .page-header__title + | 定期イベント + .page-main-header__end + .page-main-header-actions + ul.page-main-header-actions__items + li.page-main-header-actions__item + = link_to new_regular_event_path, class: 'a-button is-md is-secondary is-block' do + i.fa-regular.fa-plus + | 定期イベント作成 + li.page-main-header-actions__item + = link_to regular_events_path, class: 'a-button is-md is-secondary is-block is-back' do + | 定期イベント一覧 + - if @regular_event.wip? + .a-page-notice.is-danger + .container.is-md + .a-page-notice__inner + p + | 公開されるまでお待ちください。 + - elsif @regular_event.finished + .a-page-notice.is-muted + .container.is-md + .a-page-notice__inner + p + | 定期イベントは終了しました。 + - else + hr.a-border + + .page-body + .container.is-md + = render 'regular_event', regular_event: @regular_event + #js-comments(data-commentable-id="#{@regular_event.id}" data-commentable-type='RegularEvent' data-current-user-id="#{current_user.id}") + div(data-vue='Footprints' data-vue-footprintable-id="#{@regular_event.id}" data-vue-footprintable-type='RegularEvent') From 9cf9e3f3163357a0093161e612ef808f88cd0712 Mon Sep 17 00:00:00 2001 From: machida Date: Wed, 6 Sep 2023 15:57:04 +0900 Subject: [PATCH 15/35] =?UTF-8?q?=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AE=E3=82=BF=E3=82=A4=E3=83=88?= =?UTF-8?q?=E3=83=AB=E9=83=A8=E5=88=86=E3=81=AE=E3=83=9E=E3=83=BC=E3=82=AF?= =?UTF-8?q?=E3=82=A2=E3=83=83=E3=83=97=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/events/show.html.slim | 2 +- app/views/regular_events/show.html.slim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/events/show.html.slim b/app/views/events/show.html.slim index e1b451fb52c..057429fb612 100644 --- a/app/views/events/show.html.slim +++ b/app/views/events/show.html.slim @@ -9,7 +9,7 @@ .container .page-main-header__inner .page-main-header__start - .page-header__title + .page-main-header__title | 特別イベント .page-main-header__end .page-main-header-actions diff --git a/app/views/regular_events/show.html.slim b/app/views/regular_events/show.html.slim index db578154e2f..ba8668b45b6 100644 --- a/app/views/regular_events/show.html.slim +++ b/app/views/regular_events/show.html.slim @@ -9,7 +9,7 @@ .container .page-main-header__inner .page-main-header__start - .page-header__title + .page-main-header__title | 定期イベント .page-main-header__end .page-main-header-actions From 3d6d6dc730cca3bc28fe071c66a6b249154c439c Mon Sep 17 00:00:00 2001 From: machida Date: Thu, 7 Sep 2023 17:21:28 +0900 Subject: [PATCH 16/35] =?UTF-8?q?=E8=BF=91=E6=97=A5=E9=96=8B=E5=82=AC?= =?UTF-8?q?=E3=81=AE=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88=E3=81=AB=E5=8F=82?= =?UTF-8?q?=E5=8A=A0=E3=81=AE=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3=E3=82=92?= =?UTF-8?q?=E5=85=A5=E3=82=8C=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/stylesheets/atoms/_a-text-link.sass | 5 +++++ .../shared/blocks/card-list/_card-list-item.sass | 3 +++ app/views/home/_regular_event.html.slim | 12 +++++++----- app/views/home/_special_event.html.slim | 12 +++++++----- test/system/home_test.rb | 8 ++++---- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/app/javascript/stylesheets/atoms/_a-text-link.sass b/app/javascript/stylesheets/atoms/_a-text-link.sass index ceb75422f38..7302b5bf325 100644 --- a/app/javascript/stylesheets/atoms/_a-text-link.sass +++ b/app/javascript/stylesheets/atoms/_a-text-link.sass @@ -1,6 +1,11 @@ .a-text-link +hover-link-reversal +default-link + &.has-badge + text-decoration: none + .a-text-link__text + +hover-link-reversal + +default-link .a-hover-link +hover-link diff --git a/app/javascript/stylesheets/shared/blocks/card-list/_card-list-item.sass b/app/javascript/stylesheets/shared/blocks/card-list/_card-list-item.sass index edac9f040ee..bbee9a07ac9 100644 --- a/app/javascript/stylesheets/shared/blocks/card-list/_card-list-item.sass +++ b/app/javascript/stylesheets/shared/blocks/card-list/_card-list-item.sass @@ -229,3 +229,6 @@ a.card-list-item__inner .card-list-item__empty +text-block(.8125rem 1.4, center) color: var(--muted-text) + +.card-list-item__registered + margin-right: .25rem diff --git a/app/views/home/_regular_event.html.slim b/app/views/home/_regular_event.html.slim index ad76ba49305..1f4cc2fee97 100644 --- a/app/views/home/_regular_event.html.slim +++ b/app/views/home/_regular_event.html.slim @@ -1,7 +1,4 @@ .card-list-item - - if regular_event.participants.include?(current_user) - .participation-registration - | 参加登録済 .card-list-item__inner - if regular_event.holding?(holding_date) .card-list-item__label class="is-#{regular_event.category}" @@ -16,8 +13,13 @@ .card-list-item__row header.card-list-item-title h2.card-list-item-title__title - = link_to regular_event, class: "card-list-item-title__link #{regular_event.holding?(holding_date) ? 'a-text-link' : 'a-muted-text-link'}" do - = regular_event.title + = link_to regular_event, class: "card-list-item-title__link has-badge #{not_held ? 'a-muted-text-link' : 'a-text-link'}" do + - if regular_event.participants.include?(current_user) + span.card-list-item__registered + span.a-badge.is-xs.is-danger + | 参加 + span.a-text-link__text + = regular_event.title .card-list-item__row .card-list-item-meta .card-list-item-meta__items diff --git a/app/views/home/_special_event.html.slim b/app/views/home/_special_event.html.slim index 1db31e99602..dcd710939cf 100644 --- a/app/views/home/_special_event.html.slim +++ b/app/views/home/_special_event.html.slim @@ -1,7 +1,4 @@ .card-list-item - - if special_event.participants.include?(current_user) - .participation-registration - | 参加登録済 .card-list-item__inner .card-list-item__label.is-special | 特別
イベント @@ -9,8 +6,13 @@ .card-list-item__row header.card-list-item-title h2.card-list-item-title__title - = link_to special_event, class: 'card-list-item-title__link a-text-link' do - = special_event.title + = link_to special_event, class: 'card-list-item-title__link a-text-link has-badge' do + - if special_event.participants.include?(current_user) + span.a-badge.is-xs.is-danger + | 参加 + span.a-text-link__text + = special_event.title + .card-list-item__row .card-list-item-meta .card-list-item-meta__items .card-list-item-meta__item diff --git a/test/system/home_test.rb b/test/system/home_test.rb index e60cc905173..c3b33a1f379 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -272,19 +272,19 @@ def assert_events_count(event_label, count) visit_with_auth '/', 'kimura' within all('.card-list-item')[0] do assert_text '直近イベントの表示テスト用(当日)' - assert_no_text '参加登録済' + assert_no_text '参加' end within all('.card-list-item')[1] do assert_text 'kimura専用イベント' - assert_text '参加登録済' + assert_text '参加' end within all('.card-list-item')[2] do assert_text '質問・雑談タイム' - assert_no_text '参加登録済' + assert_no_text '参加' end within all('.card-list-item')[3] do assert_text 'ダッシュボード表示確認用テスト定期イベント' - assert_text '参加登録済' + assert_text '参加' end end end From c55176345847cfef643b38442bd277791f6b4f7d Mon Sep 17 00:00:00 2001 From: machida Date: Thu, 7 Sep 2023 18:37:31 +0900 Subject: [PATCH 17/35] =?UTF-8?q?=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E8=AA=BF=E6=95=B4=E3=81=AB=E4=BC=B4=E3=81=86=E3=83=86=E3=82=B9?= =?UTF-8?q?=E3=83=88=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/home_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/system/home_test.rb b/test/system/home_test.rb index c3b33a1f379..6a758e6e939 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -224,17 +224,17 @@ class HomeTest < ApplicationSystemTestCase day_after_tomorrow_event_label = find('.card-list__label', text: '明後日開催') today_events_texts = [ - { category: '特別イベント', title: '直近イベントの表示テスト用(当日)', start_at: '2017年04月03日(月) 09:00' }, - { category: '特別イベント', title: 'kimura専用イベント', start_at: '2017年04月03日(月) 09:00' }, + { category: '特別\nイベント', title: '直近イベントの表示テスト用(当日)', start_at: '2017年04月03日(月) 09:00' }, + { category: '特別\nイベント', title: 'kimura専用イベント', start_at: '2017年04月03日(月) 09:00' }, { category: '質問', title: '質問・雑談タイム', start_at: '2017年04月03日(月) 16:00' }, { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月03日(月) 21:00' } ] tomorrow_events_texts = [ { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月04日(火) 21:00' }, - { category: '特別イベント', title: '直近イベントの表示テスト用(翌日)', start_at: '2017年04月04日(火) 22:00' } + { category: '特別\nイベント', title: '直近イベントの表示テスト用(翌日)', start_at: '2017年04月04日(火) 22:00' } ] day_after_tomorrow_events_texts = [ - { category: '特別イベント', title: '直近イベントの表示テスト用(明後日)', start_at: '2017年04月05日(水) 09:00' }, + { category: '特別\nイベント', title: '直近イベントの表示テスト用(明後日)', start_at: '2017年04月05日(水) 09:00' }, { category: '輪読会', title: '独習Git輪読会', start_at: '2017年04月05日(水) 21:00' } ] From a79b09bf706278b96a2c627c62f6dd7518461454 Mon Sep 17 00:00:00 2001 From: machida Date: Thu, 7 Sep 2023 21:11:03 +0900 Subject: [PATCH 18/35] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=81=AE?= =?UTF-8?q?=E6=94=B9=E8=A1=8C=E3=81=AE=E6=9B=B8=E3=81=8D=E6=96=B9=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/home_test.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/system/home_test.rb b/test/system/home_test.rb index 6a758e6e939..b600d356745 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -224,17 +224,17 @@ class HomeTest < ApplicationSystemTestCase day_after_tomorrow_event_label = find('.card-list__label', text: '明後日開催') today_events_texts = [ - { category: '特別\nイベント', title: '直近イベントの表示テスト用(当日)', start_at: '2017年04月03日(月) 09:00' }, - { category: '特別\nイベント', title: 'kimura専用イベント', start_at: '2017年04月03日(月) 09:00' }, + { category: '特別\\nイベント', title: '直近イベントの表示テスト用(当日)', start_at: '2017年04月03日(月) 09:00' }, + { category: '特別\\nイベント', title: 'kimura専用イベント', start_at: '2017年04月03日(月) 09:00' }, { category: '質問', title: '質問・雑談タイム', start_at: '2017年04月03日(月) 16:00' }, { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月03日(月) 21:00' } ] tomorrow_events_texts = [ { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月04日(火) 21:00' }, - { category: '特別\nイベント', title: '直近イベントの表示テスト用(翌日)', start_at: '2017年04月04日(火) 22:00' } + { category: '特別\\nイベント', title: '直近イベントの表示テスト用(翌日)', start_at: '2017年04月04日(火) 22:00' } ] day_after_tomorrow_events_texts = [ - { category: '特別\nイベント', title: '直近イベントの表示テスト用(明後日)', start_at: '2017年04月05日(水) 09:00' }, + { category: '特別\\nイベント', title: '直近イベントの表示テスト用(明後日)', start_at: '2017年04月05日(水) 09:00' }, { category: '輪読会', title: '独習Git輪読会', start_at: '2017年04月05日(水) 21:00' } ] @@ -330,7 +330,7 @@ def assert_events_count(event_label, count) products(:product71).update!(checker: users(:mentormentaro)) visit current_path - assert_text "しばらく5日経過に到達する\n提出物はありません。" + assert_text "しばらく5日経過に到達する\\n提出物はありません。" end test 'work link of passed almost 5days' do From eea7f0d9750a878bf45b9c75b53200c2ca43f5df Mon Sep 17 00:00:00 2001 From: machida Date: Thu, 7 Sep 2023 21:24:37 +0900 Subject: [PATCH 19/35] :cop: --- test/system/home_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/system/home_test.rb b/test/system/home_test.rb index b600d356745..cba64d4a9be 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -330,7 +330,7 @@ def assert_events_count(event_label, count) products(:product71).update!(checker: users(:mentormentaro)) visit current_path - assert_text "しばらく5日経過に到達する\\n提出物はありません。" + assert_text 'しばらく5日経過に到達する\\n提出物はありません。' end test 'work link of passed almost 5days' do From 747bdc660990a6eb21cf1fe9f02e0193ee89712e Mon Sep 17 00:00:00 2001 From: machida Date: Fri, 8 Sep 2023 07:59:26 +0900 Subject: [PATCH 20/35] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=81=A7?= =?UTF-8?q?=E4=BD=BF=E3=81=A3=E3=81=A6=E3=81=84=E3=82=8B=E3=82=A4=E3=83=99?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=82=AB=E3=83=86=E3=82=B4=E3=83=AA=E3=83=BC?= =?UTF-8?q?=E5=90=8D=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/home_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/system/home_test.rb b/test/system/home_test.rb index cba64d4a9be..c01524c57bc 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -224,17 +224,17 @@ class HomeTest < ApplicationSystemTestCase day_after_tomorrow_event_label = find('.card-list__label', text: '明後日開催') today_events_texts = [ - { category: '特別\\nイベント', title: '直近イベントの表示テスト用(当日)', start_at: '2017年04月03日(月) 09:00' }, - { category: '特別\\nイベント', title: 'kimura専用イベント', start_at: '2017年04月03日(月) 09:00' }, + { category: '特別', title: '直近イベントの表示テスト用(当日)', start_at: '2017年04月03日(月) 09:00' }, + { category: '特別', title: 'kimura専用イベント', start_at: '2017年04月03日(月) 09:00' }, { category: '質問', title: '質問・雑談タイム', start_at: '2017年04月03日(月) 16:00' }, { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月03日(月) 21:00' } ] tomorrow_events_texts = [ { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月04日(火) 21:00' }, - { category: '特別\\nイベント', title: '直近イベントの表示テスト用(翌日)', start_at: '2017年04月04日(火) 22:00' } + { category: '特別', title: '直近イベントの表示テスト用(翌日)', start_at: '2017年04月04日(火) 22:00' } ] day_after_tomorrow_events_texts = [ - { category: '特別\\nイベント', title: '直近イベントの表示テスト用(明後日)', start_at: '2017年04月05日(水) 09:00' }, + { category: '特別', title: '直近イベントの表示テスト用(明後日)', start_at: '2017年04月05日(水) 09:00' }, { category: '輪読会', title: '独習Git輪読会', start_at: '2017年04月05日(水) 21:00' } ] From 27eb13e77a590dc3f67763e31ecd72c0ed15310c Mon Sep 17 00:00:00 2001 From: machida Date: Fri, 8 Sep 2023 08:19:33 +0900 Subject: [PATCH 21/35] =?UTF-8?q?=E6=94=B9=E8=A1=8C=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/home_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/system/home_test.rb b/test/system/home_test.rb index c01524c57bc..25c6c062878 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -330,7 +330,7 @@ def assert_events_count(event_label, count) products(:product71).update!(checker: users(:mentormentaro)) visit current_path - assert_text 'しばらく5日経過に到達する\\n提出物はありません。' + assert_text 'しばらく5日経過に到達する\n提出物はありません。' end test 'work link of passed almost 5days' do From eceeead19a60ee540781b2cd976be41d31609432 Mon Sep 17 00:00:00 2001 From: fuwa Date: Sat, 16 Sep 2023 15:03:42 +0900 Subject: [PATCH 22/35] =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89?= =?UTF-8?q?=E5=90=8D=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/home/_regular_event.html.slim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/_regular_event.html.slim b/app/views/home/_regular_event.html.slim index 1f4cc2fee97..ca77d50ae64 100644 --- a/app/views/home/_regular_event.html.slim +++ b/app/views/home/_regular_event.html.slim @@ -13,7 +13,7 @@ .card-list-item__row header.card-list-item-title h2.card-list-item-title__title - = link_to regular_event, class: "card-list-item-title__link has-badge #{not_held ? 'a-muted-text-link' : 'a-text-link'}" do + = link_to regular_event, class: "card-list-item-title__link has-badge #{regular_event.holding?(holding_date)? 'a-muted-text-link' : 'a-text-link'}" do - if regular_event.participants.include?(current_user) span.card-list-item__registered span.a-badge.is-xs.is-danger From 071dc655c886d9eee268d4e9a715b5fc65726687 Mon Sep 17 00:00:00 2001 From: fuwa Date: Sat, 16 Sep 2023 15:05:45 +0900 Subject: [PATCH 23/35] =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=9F=E3=83=86=E3=82=B9=E3=83=88=E3=83=87=E3=83=BC=E3=82=BF?= =?UTF-8?q?=E5=88=86=E3=82=92=E5=8F=8D=E6=98=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/home_test.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/system/home_test.rb b/test/system/home_test.rb index 25c6c062878..f7c269c3d2f 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -227,6 +227,7 @@ class HomeTest < ApplicationSystemTestCase { category: '特別', title: '直近イベントの表示テスト用(当日)', start_at: '2017年04月03日(月) 09:00' }, { category: '特別', title: 'kimura専用イベント', start_at: '2017年04月03日(月) 09:00' }, { category: '質問', title: '質問・雑談タイム', start_at: '2017年04月03日(月) 16:00' }, + { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月03日(月) 21:00' }, { category: '輪読会', title: 'ダッシュボード表示確認用テスト定期イベント', start_at: '2017年04月03日(月) 21:00' } ] tomorrow_events_texts = [ From 1278a5b4abbcefe429190db5b16601c947bb6aa4 Mon Sep 17 00:00:00 2001 From: fuwa Date: Sat, 16 Sep 2023 23:53:55 +0900 Subject: [PATCH 24/35] =?UTF-8?q?=E3=83=80=E3=83=96=E3=83=AB=E3=82=AF?= =?UTF-8?q?=E3=82=A9=E3=83=BC=E3=83=88=E3=81=AB=E6=88=BB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/home_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/system/home_test.rb b/test/system/home_test.rb index f7c269c3d2f..01989257b0d 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -331,7 +331,7 @@ def assert_events_count(event_label, count) products(:product71).update!(checker: users(:mentormentaro)) visit current_path - assert_text 'しばらく5日経過に到達する\n提出物はありません。' + assert_text "しばらく5日経過に到達する\n提出物はありません。" end test 'work link of passed almost 5days' do From 8e40d2cd3d06264a13152bc8fe48b4b527b2806c Mon Sep 17 00:00:00 2001 From: fuwa Date: Mon, 18 Sep 2023 16:56:06 +0900 Subject: [PATCH 25/35] =?UTF-8?q?CI=E3=81=AEcheck=E3=81=AE=E6=8C=87?= =?UTF-8?q?=E6=91=98=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/home/_regular_event.html.slim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/_regular_event.html.slim b/app/views/home/_regular_event.html.slim index ca77d50ae64..89778002ea8 100644 --- a/app/views/home/_regular_event.html.slim +++ b/app/views/home/_regular_event.html.slim @@ -13,7 +13,7 @@ .card-list-item__row header.card-list-item-title h2.card-list-item-title__title - = link_to regular_event, class: "card-list-item-title__link has-badge #{regular_event.holding?(holding_date)? 'a-muted-text-link' : 'a-text-link'}" do + = link_to regular_event, class: "card-list-item-title__link has-badge #{regular_event.holding?(holding_date) ? 'a-muted-text-link' : 'a-text-link'}" do - if regular_event.participants.include?(current_user) span.card-list-item__registered span.a-badge.is-xs.is-danger From 83b3fd2be972f7fb0bef7416f08148520a6401a0 Mon Sep 17 00:00:00 2001 From: fuwa Date: Wed, 27 Sep 2023 23:51:35 +0900 Subject: [PATCH 26/35] =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=95=E3=83=AA?= =?UTF-8?q?=E3=82=AF=E3=83=88=E3=82=92=E8=A7=A3=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/fixtures/regular_event_participations.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/fixtures/regular_event_participations.yml b/test/fixtures/regular_event_participations.yml index ecb8b932e04..bb26a1b4e5a 100644 --- a/test/fixtures/regular_event_participations.yml +++ b/test/fixtures/regular_event_participations.yml @@ -15,5 +15,9 @@ regular_event_participation4: regular_event: regular_event26 regular_event_participation5: + user: hatsuno + regular_event: regular_event32 + +regular_event_participation6: user: kimura regular_event: regular_event7 From 797e0d01dbfa974bfae0bb64998ef816d70b1784 Mon Sep 17 00:00:00 2001 From: fuwa Date: Wed, 27 Sep 2023 23:57:19 +0900 Subject: [PATCH 27/35] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AA=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/initializers/newspaper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/newspaper.rb b/config/initializers/newspaper.rb index a5b04051d55..0b8da27526d 100644 --- a/config/initializers/newspaper.rb +++ b/config/initializers/newspaper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -Rails.application.config.after_initialize do +Rails.configuration.to_prepare do Newspaper.subscribe(:event_create, EventOrganizerWatcher.new) Newspaper.subscribe(:answer_create, AnswerNotifier.new) Newspaper.subscribe(:answer_create, NotifierToWatchingUser.new) From 368c1b76c5232db957cb65904050cb3015f98658 Mon Sep 17 00:00:00 2001 From: fuwa Date: Tue, 10 Oct 2023 21:52:48 +0900 Subject: [PATCH 28/35] =?UTF-8?q?=E9=87=8D=E8=A4=87=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/home_controller.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index a1828d589a8..0cc10579caa 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -57,7 +57,6 @@ def display_events_on_dashboard @day_after_tomorrow_events = (Event.day_after_tomorrow_events.related_to(current_user) \ + RegularEvent.day_after_tomorrow_events) .sort_by { |e| e.start_at.strftime('%H:%M') } - .sort_by { |e| e.start_at.strftime('%H:%M') } end def display_welcome_message_for_adviser From f8603864239dab4d828225df7c76b38b1cfbcb0c Mon Sep 17 00:00:00 2001 From: fuwa Date: Thu, 19 Oct 2023 22:27:37 +0900 Subject: [PATCH 29/35] =?UTF-8?q?=E5=B0=B1=E6=B4=BB=E4=B8=AD=E3=81=AE?= =?UTF-8?q?=E4=BA=BA=E4=BB=A5=E5=A4=96=E3=81=AB=E3=82=82=E5=B0=B1=E6=B4=BB?= =?UTF-8?q?=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88=E3=82=92=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/home_controller.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 0cc10579caa..817e43df2b0 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -48,14 +48,11 @@ def display_dashboard end def display_events_on_dashboard - @today_events = (Event.today_events.related_to(current_user) \ - + RegularEvent.today_events) + @today_events = (Event.today_events + RegularEvent.today_events) .sort_by { |e| e.start_at.strftime('%H:%M') } - @tomorrow_events = (Event.tomorrow_events.related_to(current_user) \ - + RegularEvent.tomorrow_events) + @tomorrow_events = (Event.tomorrow_events + RegularEvent.tomorrow_events) .sort_by { |e| e.start_at.strftime('%H:%M') } - @day_after_tomorrow_events = (Event.day_after_tomorrow_events.related_to(current_user) \ - + RegularEvent.day_after_tomorrow_events) + @day_after_tomorrow_events = (Event.day_after_tomorrow_events + RegularEvent.day_after_tomorrow_events) .sort_by { |e| e.start_at.strftime('%H:%M') } end From 55be3f26254d6c322e208d89f9cd56415ca1c936 Mon Sep 17 00:00:00 2001 From: fuwa Date: Thu, 19 Oct 2023 23:19:45 +0900 Subject: [PATCH 30/35] =?UTF-8?q?=E5=B0=B1=E6=B4=BB=E3=82=A4=E3=83=99?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=81=AB=E8=A1=A8=E7=A4=BA=E3=82=92=E3=81=A4?= =?UTF-8?q?=E3=81=91=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/home/_special_event.html.slim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/views/home/_special_event.html.slim b/app/views/home/_special_event.html.slim index dcd710939cf..057e2567580 100644 --- a/app/views/home/_special_event.html.slim +++ b/app/views/home/_special_event.html.slim @@ -11,6 +11,9 @@ span.a-badge.is-xs.is-danger | 参加 span.a-text-link__text + - if special_event.job_hunting? + span.a-badge.is-xs.is-danger + | 就活 = special_event.title .card-list-item__row .card-list-item-meta From b8eb2025d34602344cf79d3acee2e7e99bb90e86 Mon Sep 17 00:00:00 2001 From: fuwa Date: Sat, 21 Oct 2023 19:49:43 +0900 Subject: [PATCH 31/35] =?UTF-8?q?=E5=85=A8=E3=81=A6=E3=81=AE=E3=83=A6?= =?UTF-8?q?=E3=83=BC=E3=82=B6=E3=83=BC=E3=81=8C=E3=83=80=E3=83=83=E3=82=B7?= =?UTF-8?q?=E3=83=A5=E3=83=9C=E3=83=BC=E3=83=89=E3=81=AB=E5=B0=B1=E6=B4=BB?= =?UTF-8?q?=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88=E3=81=8C=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=82=8B=E3=83=86=E3=82=B9=E3=83=88=E3=81=AB?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/home_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/system/home_test.rb b/test/system/home_test.rb index 01989257b0d..7c99c152447 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -201,7 +201,7 @@ class HomeTest < ApplicationSystemTestCase assert_no_selector 'h2.card-header__title', text: '学習時間' end - test 'show events on dashboard for only related to user' do + test 'show job hunting events on dashboard for all user' do travel_to Time.zone.local(2017, 4, 2, 10, 0, 0) do visit_with_auth '/', 'jobseeker' assert_text '直近イベントの表示テスト用(当日)' @@ -212,7 +212,7 @@ class HomeTest < ApplicationSystemTestCase visit_with_auth '/', 'komagata' assert_text '直近イベントの表示テスト用(当日)' assert_text '直近イベントの表示テスト用(翌日)' - assert_no_text '就職関係かつ直近イベントの表示テスト用' + assert_text '就職関係かつ直近イベントの表示テスト用' end end From b520af717214c2b3bfc06102e17d6c0f0f246d1d Mon Sep 17 00:00:00 2001 From: fuwa Date: Sat, 21 Oct 2023 20:21:45 +0900 Subject: [PATCH 32/35] =?UTF-8?q?=E5=B0=B1=E6=B4=BB=E3=82=A4=E3=83=99?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=81=AB=E3=80=8C=E5=B0=B1=E6=B4=BB=E3=80=8D?= =?UTF-8?q?=E3=81=A8=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=82=8B=E3=81=8B?= =?UTF-8?q?=E3=81=AE=E3=83=86=E3=82=B9=E3=83=88=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/home_test.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/system/home_test.rb b/test/system/home_test.rb index 7c99c152447..dfcc4b24aae 100644 --- a/test/system/home_test.rb +++ b/test/system/home_test.rb @@ -537,4 +537,17 @@ def assert_events_count(event_label, count) assert_event_card(today_event_label, today_events_texts) end end + + test 'show job hunting on job hunting related events' do + Event.where.not(title: ['就職関係かつ直近イベントの表示テスト用']).destroy_all + RegularEvent.destroy_all + + travel_to Time.zone.local(2017, 4, 2, 10, 0, 0) do + visit_with_auth '/', 'kimura' + within all('.card-list-item')[0] do + assert_text '就職関係かつ直近イベントの表示テスト用' + assert_text '就活' + end + end + end end From a59b077a187836caaf4296665baed8b5fcb119e2 Mon Sep 17 00:00:00 2001 From: machida Date: Mon, 23 Oct 2023 15:30:04 +0900 Subject: [PATCH 33/35] =?UTF-8?q?=E3=82=AB=E3=83=86=E3=82=B4=E3=83=AA?= =?UTF-8?q?=E3=83=BC=E4=BB=98=E3=81=8D=E4=B8=80=E8=A6=A7=E3=81=AE=E8=A6=8B?= =?UTF-8?q?=E3=81=9F=E7=9B=AE=E3=82=92=E3=82=A2=E3=83=83=E3=83=97=E3=83=87?= =?UTF-8?q?=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/bookmark.vue | 3 +- app/javascript/components/regular-event.vue | 3 +- app/javascript/components/watch.vue | 18 +++++- app/javascript/searchable.vue | 12 +++- .../blocks/header/_header-dropdown.sass | 2 +- .../blocks/card-list/_card-list-item.sass | 58 +++---------------- app/views/api/watches/_watch.json.jbuilder | 1 + app/views/home/_bookmark.html.slim | 3 +- app/views/home/_regular_event.html.slim | 5 +- app/views/home/_special_event.html.slim | 14 +++-- app/views/home/_wip_items.html.slim | 2 +- .../_wip_announcements.html.slim | 3 +- app/views/users/comments/_comment.html.slim | 10 +++- app/views/users/events/_wip_events.html.slim | 3 +- app/views/users/pages/_wip_pages.html.slim | 3 +- .../users/products/_wip_products.html.slim | 3 +- .../users/questions/_wip_questions.html.slim | 3 +- .../users/reports/_wip_reports.html.slim | 3 +- test/system/home_test.rb | 2 +- 19 files changed, 74 insertions(+), 77 deletions(-) diff --git a/app/javascript/bookmark.vue b/app/javascript/bookmark.vue index 1e09ca3649d..bf3f1fcb9f8 100644 --- a/app/javascript/bookmark.vue +++ b/app/javascript/bookmark.vue @@ -2,7 +2,8 @@ .card-list-item(:class='isBookmarkClassName') .card-list-item__inner .card-list-item__label - | {{ bookmark.modelNameI18n }} + span.card-list-item__label-inner + | {{ bookmark.modelNameI18n }} .card-list-item__rows .card-list-item__row .card-list-item-title diff --git a/app/javascript/components/regular-event.vue b/app/javascript/components/regular-event.vue index f8fec3d4089..1a40225a25e 100644 --- a/app/javascript/components/regular-event.vue +++ b/app/javascript/components/regular-event.vue @@ -2,7 +2,8 @@ .card-list-item(:class='{ "is-wip": regularEvent.wip }') .card-list-item__inner .card-list-item__label(:class='[categoryClass]') - | {{ regularEvent.category }} + span.card-list-item__label-inner + | {{ regularEvent.category }} .card-list-item__rows .card-list-item__row .card-list-item-title diff --git a/app/javascript/components/watch.vue b/app/javascript/components/watch.vue index 715c591d23e..e43d13265d9 100644 --- a/app/javascript/components/watch.vue +++ b/app/javascript/components/watch.vue @@ -1,7 +1,23 @@