-
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作成時に研修生を支払い方法別に選択可能にした・研修生の場合は会員登録時の支払い方法の指定を必須にした #8013
base: main
Are you sure you want to change the base?
招待URL作成時に研修生を支払い方法別に選択可能にした・研修生の場合は会員登録時の支払い方法の指定を必須にした #8013
Commits on Aug 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5bee5cd - Browse repository at this point
Copy the full SHA 5bee5cdView commit details -
・これまで管理者用の項目だった「請求書払いの設定」のUIを削除し、支払い方法(請求書orクレジットカード)を選択するためのチェックボックスを一般ユーザー向けの項目として新たに作成した。併せて、登録フォームに遷移する前の招待URL作成ページのロール欄でどれを選択したかによって、登録フォームが表示された初期状態でどちらの支払い方法にチェックが入っているか(または入っていないか)を振り分けるように修正した。
Configuration menu - View commit details
-
Copy full SHA for 0cb5fec - Browse repository at this point
Copy the full SHA 0cb5fecView commit details -
Configuration menu - View commit details
-
Copy full SHA for d049286 - Browse repository at this point
Copy the full SHA d049286View commit details -
インスタンス変数(@pay_by_invoice、@pay_by_credit_card)を廃止・カード番号入力フォームの表示切り替えを実…
…装・チェックボックスのパーシャルの名称を変更 ・コントローラーで研修生の支払い方法に関する情報を@pay_by_invoiceと@pay_by_credit_cardに格納していたが、params[:role]の参照で事足りるため、これら二つのインスタンス変数は廃止した。 ・「研修生(支払い方法を選択)」を選んだ場合は参加登録フォーム上でチェックボックスのチェックを変更できることから、カード番号入力フォームの表示/非表示を切り替えができる必要があったため実装した。 ・チェックボックスのパーシャルは既存のUIを流用したため名称が_invoice_paymentのままになっていたが、実態に即していないため変更した。
Configuration menu - View commit details
-
Copy full SHA for b57659b - Browse repository at this point
Copy the full SHA b57659bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ba33e9 - Browse repository at this point
Copy the full SHA 6ba33e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b97344f - Browse repository at this point
Copy the full SHA b97344fView commit details -
「請求書払い」のチェックボックスにバリデーションを追加・ビューでparamsを呼び出さないように変更・UsersControllerのne…
…wアクション内の条件分岐の書き方を変更 ・招待URL作成ページで「研修生(請求書払い)」を選択した場合は登録フォームの「請求書払い」のチェックボックスはtrueでなくてはならないため、そ のバリデーションを追加した。 ・ビューでparamsを直接呼び出すとURLに含まれるパラメーターに変更があった場合の対応が煩雑になる恐れがあるため、ビューで必要な情報はコントロー ラーでインスタンス変数に代入して使用することとした。 ・UsersControllerのnewアクションではparams[:role]の値によって分岐する処理をif文で記述していたが、case文で記述した方が可読性が高いと判断した ため変更した。
Configuration menu - View commit details
-
Copy full SHA for bf5a712 - Browse repository at this point
Copy the full SHA bf5a712View commit details -
card-form-display-switcher内のクレジットカードのチェックボックスの取得方法を変更
・クレジットカードのチェックボックスのDOM要素を取得する際getElementsByNameを使用していたが、対象の要素が見つからない場合でも空のNodeListが返ってしまい、条件分岐が正しく動作しないため、要素が見つからない場合にnullを返すquerySelectorに置き換えた。
Configuration menu - View commit details
-
Copy full SHA for bc0c8cc - Browse repository at this point
Copy the full SHA bc0c8ccView commit details -
・招待URL作成ページで選択された支払い方法のチェックボックスは登録フォームが表示された時点でチェック済みになっているが、これまではそのチェックを外すことができてしまっていた。そのため、誤操作でチェックを外してしまい無駄にバリデーションエラーになる可能性も考えられたため、ユーザーがチェックを外せないようにした。
Configuration menu - View commit details
-
Copy full SHA for 7b7cfdf - Browse repository at this point
Copy the full SHA 7b7cfdfView commit details -
「請求書払い」チェックボックスのバリデーションエラーが起きて登録フォームが再表示された際にチェックボックスが反応しなくなる不具合を解消
・バリデーションで引っかかった場合はrenderで再度newテンプレートが呼び出されるが、招待URL作成ページからの遷移でない場合は必要なパラメータがURLに含まれておらず、チェックボックスが操作不能になる不具合が出ていたため修正した。
Configuration menu - View commit details
-
Copy full SHA for 406c6b6 - Browse repository at this point
Copy the full SHA 406c6b6View commit details -
「研修生(支払い方法を選択)」が選択された場合のチェックボックスの挙動の制御を追加
・招待URL作成ページにて「研修生(支払い方法を選択)」が選択された場合、登録ページのチェックボックスの挙動が、 (1)「請求書払い」と「クレジットカード払い」のいずれか一方しかチェックできない、 (2)「クレジットカード払い」が選択されている時のみカード情報の入力フォームを表示する、 となるように実装した。 それに伴い、カード情報の入力フォームの表示/非表示の制御と2種類のチェックボックスの状態制御を同時に行う必要があったため、card-form-display-switcher.jsで行っていた処理をpayment-methods-check-boxes.jsに統合した。
Configuration menu - View commit details
-
Copy full SHA for abca2af - Browse repository at this point
Copy the full SHA abca2afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5833942 - Browse repository at this point
Copy the full SHA 5833942View commit details -
・DOMツリーにクレジットカード情報の入力フォームが存在すると、カード情報が空欄の場合や有効な番号でない場合にフォーム全体の送信を止める機能が実装されているが、招待URL作成ページで「研修生(支払い方法を選択)」を選んだ場合、クレジットカードフォームが空欄の状態であってもフォームが送信されなければならない(請求書払いを選択している)状況があり得ることになるため、「クレジットカード払い」のチェックボックスにチェックがない場合には当該バリデーションを無効化するように変更した。
Configuration menu - View commit details
-
Copy full SHA for 7bfebcf - Browse repository at this point
Copy the full SHA 7bfebcfView commit details -
Configuration menu - View commit details
-
Copy full SHA for b72a0c2 - Browse repository at this point
Copy the full SHA b72a0c2View commit details -
Stripeのカードフォームが正しくマウントされていなかったのを修正
・「研修生(クレジットカード払い)」を選択した場合の登録フォームでStripeのカード番号の入力欄が正しくマウントされていなかったため修正。
Configuration menu - View commit details
-
Copy full SHA for 8903062 - Browse repository at this point
Copy the full SHA 8903062View commit details -
Configuration menu - View commit details
-
Copy full SHA for 78ea52f - Browse repository at this point
Copy the full SHA 78ea52fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3bd04aa - Browse repository at this point
Copy the full SHA 3bd04aaView commit details -
「研修生(請求書払い)」の場合に登録フォームが送信できない不具合を修正
・支払い方法を選択できる場合の登録フォームにあるselectableCreditCardCheckBoxにチェックが入っているかどうかがフォームをそのまま送信するかクレジットカードのバリデーションを通すかの条件となっており、請求書払いが確定している登録フォーム上では存在しない要素のプロパティを呼び出すことになってしまいエラーとなっていたため修正した。
Configuration menu - View commit details
-
Copy full SHA for c297a3f - Browse repository at this point
Copy the full SHA c297a3fView commit details -
「研修生(クレジットカード払い)」の場合にカード番号を入力していなくてもフォームが送信できてしまう不具合を修正
・クレジットカードのバリデーションを作動させる条件にcheckedCreditCardCheckBoxが含まれておらず正常に動作していなかったため修正した。
Configuration menu - View commit details
-
Copy full SHA for bfcfd43 - Browse repository at this point
Copy the full SHA bfcfd43View commit details -
・メンター用の登録フォームの場合は「FBCメンター参加登録」と表示されていなければならないところ、一般受講生と同じ「FBC参加登録」となってしまっていたため修正した。
Configuration menu - View commit details
-
Copy full SHA for a549e57 - Browse repository at this point
Copy the full SHA a549e57View commit details -
Configuration menu - View commit details
-
Copy full SHA for 22c82cb - Browse repository at this point
Copy the full SHA 22c82cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for c597245 - Browse repository at this point
Copy the full SHA c597245View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b9a830 - Browse repository at this point
Copy the full SHA 7b9a830View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9cb8c8 - Browse repository at this point
Copy the full SHA a9cb8c8View commit details -
研修生がクレジットカードを使用して参加登録する際のテストを修正
・クレジットカード情報の入力を伴う他のテストに倣ってVCRでログをとるように修正した。
Configuration menu - View commit details
-
Copy full SHA for 5e99d94 - Browse repository at this point
Copy the full SHA 5e99d94View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0b2445 - Browse repository at this point
Copy the full SHA f0b2445View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a5022e - Browse repository at this point
Copy the full SHA 9a5022eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a9ae53 - Browse repository at this point
Copy the full SHA 2a9ae53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cef309 - Browse repository at this point
Copy the full SHA 6cef309View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83c4b31 - Browse repository at this point
Copy the full SHA 83c4b31View commit details -
Configuration menu - View commit details
-
Copy full SHA for 380de29 - Browse repository at this point
Copy the full SHA 380de29View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5684ba8 - Browse repository at this point
Copy the full SHA 5684ba8View commit details -
keepCheckBoxCheckedでチェックボックスの存在確認をしている部分を修正
・引数checkBoxesの要素である二つのチェックボックスのうち少なくとも一つは必ずnullが渡ってくるためif文で存在確認をしていたが、オプショナルチェーン演算子(?.)を使用するほうがより簡潔に書けるため変更した。
Configuration menu - View commit details
-
Copy full SHA for 2d50f53 - Browse repository at this point
Copy the full SHA 2d50f53View commit details -
Configuration menu - View commit details
-
Copy full SHA for c6b2cc9 - Browse repository at this point
Copy the full SHA c6b2cc9View commit details -
Configuration menu - View commit details
-
Copy full SHA for fcee79a - Browse repository at this point
Copy the full SHA fcee79aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0225806 - Browse repository at this point
Copy the full SHA 0225806View commit details -
Configuration menu - View commit details
-
Copy full SHA for e6d767c - Browse repository at this point
Copy the full SHA e6d767cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 36497e4 - Browse repository at this point
Copy the full SHA 36497e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c76d88 - Browse repository at this point
Copy the full SHA 7c76d88View commit details