From 2a09a5b42a8f23c537feaf61b0596d7530a90bc6 Mon Sep 17 00:00:00 2001 From: appsu-mi Date: Sat, 7 Mar 2026 09:33:42 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=E8=BF=91=E6=97=A5=E9=96=8B=E5=82=AC?= =?UTF-8?q?=E3=81=AE=E3=83=9A=E3=82=A2=E3=83=AF=E3=83=BC=E3=82=AF=E3=81=8C?= =?UTF-8?q?=E3=83=A1=E3=83=B3=E3=82=BF=E3=83=BC=E3=80=81=E3=82=A2=E3=83=89?= =?UTF-8?q?=E3=83=90=E3=82=A4=E3=82=B6=E3=83=BC=E3=81=AE=E3=83=80=E3=83=83?= =?UTF-8?q?=E3=82=B7=E3=83=A5=E3=83=9C=E3=83=BC=E3=83=89=E3=81=A7=E3=82=82?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/home/_adviser_dashboard.html.slim | 2 ++ app/views/home/_mentor_dashboard.html.slim | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/views/home/_adviser_dashboard.html.slim b/app/views/home/_adviser_dashboard.html.slim index f2cd7a2f3a8..e17a0a4a11b 100644 --- a/app/views/home/_adviser_dashboard.html.slim +++ b/app/views/home/_adviser_dashboard.html.slim @@ -9,6 +9,8 @@ .dashboard-category__body .a-panels .a-panels__items + - if @upcoming_pair_works.present? + = render 'upcoming_pair_works', upcoming_pair_works: @upcoming_pair_works - if @upcoming_events_groups.present? = render 'upcoming_events_groups', upcoming_events_groups: @upcoming_events_groups .a-panels__item diff --git a/app/views/home/_mentor_dashboard.html.slim b/app/views/home/_mentor_dashboard.html.slim index 45abef7ddad..9d77a3daa70 100644 --- a/app/views/home/_mentor_dashboard.html.slim +++ b/app/views/home/_mentor_dashboard.html.slim @@ -25,6 +25,8 @@ .dashboard-category__body .a-panels .a-panels__items + - if @upcoming_pair_works.present? + = render 'upcoming_pair_works', upcoming_pair_works: @upcoming_pair_works - if @upcoming_events_groups.present? = render 'upcoming_events_groups', upcoming_events_groups: @upcoming_events_groups - if @announcements.present? From 5ea892bed80a7a2a4e7b7a76bd5645fbe5a7516c Mon Sep 17 00:00:00 2001 From: appsu-mi Date: Sat, 7 Mar 2026 09:34:01 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=E5=8B=95=E4=BD=9C=E7=A2=BA=E8=AA=8D?= =?UTF-8?q?=E3=82=92=E6=A5=BD=E3=81=AB=E3=81=99=E3=82=8B=E3=81=9F=E3=82=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/fixtures/pair_works.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/fixtures/pair_works.yml b/db/fixtures/pair_works.yml index 32741e3d1d9..9b5e58e155e 100644 --- a/db/fixtures/pair_works.yml +++ b/db/fixtures/pair_works.yml @@ -26,7 +26,7 @@ pair_work3: reserved_at: <%= Time.current.beginning_of_day + 23.hours %> user: kimura practice: null - buddy: sotugyou + buddy: advijirou published_at: <%= Time.current %> created_at: <%= Time.current %> wip: false From 9ad90d5190bf9051395df24f0fe62f21e8a6c4da Mon Sep 17 00:00:00 2001 From: machida Date: Fri, 1 May 2026 19:45:28 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E3=83=A1=E3=83=B3=E3=82=BF=E3=83=BC?= =?UTF-8?q?=E3=83=80=E3=83=83=E3=82=B7=E3=83=A5=E3=83=9C=E3=83=BC=E3=83=89?= =?UTF-8?q?=E5=86=85=E3=81=AE=E3=83=9A=E3=82=A2=E3=83=AF=E3=83=BC=E3=82=AF?= =?UTF-8?q?=E3=81=AE=E4=B8=80=E8=A6=A7=E3=81=AE=E4=BD=8D=E7=BD=AE=E3=82=92?= =?UTF-8?q?=E7=A7=BB=E5=8B=95=E3=80=81=E3=83=9A=E3=82=A2=E3=83=AF=E3=83=BC?= =?UTF-8?q?=E3=82=AF=E6=99=82=E9=96=93=E9=81=B8=E6=8A=9E=E3=81=AEdisabled?= =?UTF-8?q?=E3=81=AE=E3=83=87=E3=82=B6=E3=82=A4=E3=83=B3=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 --- app/helpers/pair_works_helper.rb | 5 +++++ app/views/home/_mentor_dashboard.html.slim | 6 ++++-- app/views/home/_upcoming_pair_work.html.slim | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/helpers/pair_works_helper.rb b/app/helpers/pair_works_helper.rb index 783b07fab4e..a153af56ec2 100644 --- a/app/helpers/pair_works_helper.rb +++ b/app/helpers/pair_works_helper.rb @@ -45,4 +45,9 @@ def meta_label_by_status(upcoming_pair_work) today = upcoming_pair_work.reserved_at.to_date == Time.current.to_date today ? 'a-meta__label is-important' : 'a-meta__label' end + + def meta_value_by_status(upcoming_pair_work) + today = upcoming_pair_work.reserved_at.to_date == Time.current.to_date + today ? 'a-meta__value is-important' : 'a-meta__value' + end end diff --git a/app/views/home/_mentor_dashboard.html.slim b/app/views/home/_mentor_dashboard.html.slim index 9d77a3daa70..17efc67edb1 100644 --- a/app/views/home/_mentor_dashboard.html.slim +++ b/app/views/home/_mentor_dashboard.html.slim @@ -3,6 +3,10 @@ .dashboard-contents__cols .dashboard-contents__col.is-sub.is-only-mentor .dashboard-contents__categories + - if @upcoming_pair_works.present? + .dashboard-category + = render 'upcoming_pair_works', upcoming_pair_works: @upcoming_pair_works + .dashboard-category - unchecked_report_count = Cache.unchecked_report_count - if unchecked_report_count > 100 @@ -25,8 +29,6 @@ .dashboard-category__body .a-panels .a-panels__items - - if @upcoming_pair_works.present? - = render 'upcoming_pair_works', upcoming_pair_works: @upcoming_pair_works - if @upcoming_events_groups.present? = render 'upcoming_events_groups', upcoming_events_groups: @upcoming_events_groups - if @announcements.present? diff --git a/app/views/home/_upcoming_pair_work.html.slim b/app/views/home/_upcoming_pair_work.html.slim index 34f77dc44cc..ab6a29bf237 100644 --- a/app/views/home/_upcoming_pair_work.html.slim +++ b/app/views/home/_upcoming_pair_work.html.slim @@ -16,6 +16,6 @@ .a-meta span class=meta_label_by_status(upcoming_pair_work) | 開催日時 - span class=meta_label_by_status(upcoming_pair_work) + span class=meta_value_by_status(upcoming_pair_work) time datetime=upcoming_pair_work.reserved_at.iso8601 = l upcoming_pair_work.reserved_at From 1b5d2c280c9dec63217d2b2d6436f2d5a8c8116f Mon Sep 17 00:00:00 2001 From: machida Date: Sat, 2 May 2026 00:26:07 +0900 Subject: [PATCH 4/4] =?UTF-8?q?meta=5Fvalue=5Fby=5Fstatus=E3=81=AE?= =?UTF-8?q?=E3=83=86=E3=82=B9=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/helpers/pair_works_helper_test.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/helpers/pair_works_helper_test.rb b/test/helpers/pair_works_helper_test.rb index 8579dfe36b0..2cb4e160bfa 100644 --- a/test/helpers/pair_works_helper_test.rb +++ b/test/helpers/pair_works_helper_test.rb @@ -89,4 +89,19 @@ def current_user assert_not_equal normal_meta_label, meta_label_by_status(pair_work) end end + + test 'meta_value_by_status' do + pair_work = pair_works(:pair_work2) + normal_meta_value = 'a-meta__value' + important_meta_value = 'a-meta__value is-important' + + assert_equal normal_meta_value, meta_value_by_status(pair_work) + assert_not_equal important_meta_value, meta_value_by_status(pair_work) + + reserved_on = Time.zone.local(2025, 1, 2) + travel_to reserved_on do + assert_equal important_meta_value, meta_value_by_status(pair_work) + assert_not_equal normal_meta_value, meta_value_by_status(pair_work) + end + end end