-
Notifications
You must be signed in to change notification settings - Fork 75
日報・ブログのタブを修正する #8976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
日報・ブログのタブを修正する #8976
Changes from all commits
21d4b5e
0d13a48
bb4bd2c
c5a2d34
36cfdf9
d679b15
479fb77
eb3806b
bf80e78
4b05006
f8f0ca8
ab90c3a
e532b60
8889ba0
df52aa6
caba069
e9e41a9
875df59
13d68b0
a3a6886
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,29 @@ | ||
| - title 'みんなのブログ' | ||
| - content_for :title, 'みんなのブログ' | ||
| - set_meta_tags description: 'みんなのブログ一覧ページです。' | ||
|
|
||
| header.page-header | ||
| .container | ||
| .page-header__inner | ||
| .page-header__start | ||
| .page-header__title | ||
| | 日報・ブログ | ||
| .page-header__end | ||
| = render 'reports/new_report' | ||
|
|
||
| = report_page_tabs(active_tab: 'みんなのブログ') | ||
|
|
||
| - if current_user.feed_url.blank? | ||
| .a-page-notice.is-danger | ||
| .container.is-lg | ||
| .a-page-notice__inner | ||
| p | ||
| | #{current_user.login_name}さんのブログは | ||
| | まだ登録されていません。 | ||
| = link_to edit_current_user_path(anchor: 'form-blog-feed') do | ||
| | ブログのフィード URL の登録 | ||
| | をしてください。 | ||
| main.page-main | ||
| header.page-main-header | ||
| .container | ||
| .page-main-header__inner | ||
| .page-main-header__start | ||
| h1.page-main-header__title | ||
| | みんなのブログ | ||
| .page-main-header__end | ||
| .page-header-actions | ||
|
|
||
| hr.a-border | ||
|
|
||
| - if current_user.feed_url.blank? | ||
| .a-page-notice.is-danger | ||
| .container.is-lg | ||
| .a-page-notice__inner | ||
| p | ||
| | #{current_user.login_name}さんのブログは | ||
| | まだ登録されていません。 | ||
| = link_to edit_current_user_path(anchor: 'form-blog-feed') do | ||
| | ブログのフィード URL の登録 | ||
| | をしてください。 | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| = render('external_entries') | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,7 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| Rails.application.routes.draw do | ||
| namespace :reports do | ||
| resources :unchecked, only: %i(index) | ||
| end | ||
|
Comment on lines
-4
to
-6
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 未チェックの日報のページ自体なくなってしまって良かったんでしたっけ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. コメントありがとうございます。 |
||
|
|
||
| resources :reports do | ||
| resources :checks, only: %i[create destroy] | ||
| resources :checks, only: [:create, :destroy] | ||
| end | ||
| end | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| require 'application_system_test_case' | ||
|
|
||
| class ReportsPracticeFilterTest < ApplicationSystemTestCase | ||
| setup do | ||
| @user = users(:kimura) | ||
| @practice1 = practices(:practice1) | ||
| @practice2 = practices(:practice2) | ||
| @report1 = Report.create!( | ||
| user: @user, | ||
| title: 'レポート1', | ||
| description: 'テスト用レポート1', | ||
| reported_on: Time.zone.today | ||
| ) | ||
| @report1.practices << @practice1 | ||
|
|
||
| @report2 = Report.create!( | ||
| user: @user, | ||
| title: 'レポート2', | ||
| description: 'テスト用レポート2', | ||
| reported_on: Time.zone.today - 1.day | ||
| ) | ||
| @report2.practices << @practice2 | ||
|
|
||
| visit login_path | ||
| fill_in 'メールアドレス', with: @user.email | ||
| fill_in 'パスワード', with: 'testtest' | ||
| click_button 'ログイン' | ||
| end | ||
|
|
||
| test 'GET filter by practice works' do | ||
| visit reports_path(practice_id: @practice1.id) | ||
| assert_text 'レポート1', wait: 5 | ||
| assert_no_text 'レポート2', wait: 5 | ||
| end | ||
|
|
||
| test 'practice filter is hidden when unchecked parameter is present' do | ||
| visit reports_path(unchecked: true) | ||
| assert_no_selector 'select#js-choices-single-select', wait: 5 | ||
| end | ||
| end |
Uh oh!
There was an error while loading. Please reload this page.