-
Notifications
You must be signed in to change notification settings - Fork 71
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
招待URL作成ページを追加 #7542
招待URL作成ページを追加 #7542
Conversation
8c13ad5
to
f8ebbf7
Compare
@machida |
@naokinaokiboo 承知しましたー🙆♂️ |
お待たせしました!!デザイン入れましたー |
b0ed1a4
to
f08f9e8
Compare
@umizaru |
@naokinaokiboo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
大変お待たせしました!
コードレビューしましたのでご確認お願いします🙏
course = Course.order(:created_at).first | ||
expected = "#{@new_user_url}?company_id=#{company.id}&course_id=#{course.id}&role=#{role}&token=token" | ||
|
||
Timeout.timeout(Capybara.default_max_wait_time, StandardError) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timeoutの処理が重複しているので1つのメソッドにまとめてはどうでしょう?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timeoutの処理、全く同一でしたね。😅
これはメソッドにまとめたいと思います!ありがとうございます👍
|
||
class API::Admin::InvitationUrlController < API::Admin::BaseController | ||
def index | ||
url = new_user_url( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_url
だとURIを絶対パスで指定できるんですね。
URLヘルパーメソッドは_path
しか知らなかったので勉強になりました!
_pathメソッドと_urlメソッドの使い分け
https://qiita.com/higeaaa/items/df8feaa5b6f12e13fb6f
「Rails」urlとpathの違いを初心者向けに解説
https://qiita.com/nichidai3_0514/items/582b466b4a8cf9505dac
@@ -0,0 +1,45 @@ | |||
document.addEventListener('DOMContentLoaded', async () => { | |||
const invitationElements = Array.from( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CSSセレクタのselect
を変数名に反映してあげてselectedInvitationElements
でも良いかな、と思いました。
ただ、他の変数名がinvitationXX
で統一されていますし少し悩むところで採否はお任せします!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちら、私も悩ましいところではあるのですが、今回はinvitationXX
で統一するのを優先する方向でいきたいと思います🙏
ありがとうございます👍
@umizaru |
@naokinaokiboo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conflictの修正をお願い致します~。
@komagata |
@@ -0,0 +1,13 @@ | |||
# frozen_string_literal: true | |||
|
|||
class API::Admin::InvitationUrlController < API::Admin::BaseController |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
例えばですが、JavaScriptの変数としてこれらが定義してあれば、時間のかかるHTTPリクエストを飛ばさずにプルダウンが表示できるかなと思いました。
afc0019
to
67537ec
Compare
67537ec
to
ea7a2ca
Compare
@komagata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
いい感じになったとおもいます!
確認させていただきました。OKです~👌
Issue
概要
管理画面に以下の項目を選択して、招待用URLを作成するページを作成しました。
変更確認方法
feature/add-invitation-url-page
をローカルに取り込む。/admin/invitation_url
にアクセスする。※以下、参加登録画面に反映される項目の表示例です。
Screenshot
変更前
新規ページのため無し
変更後