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
席予約機能の追加 #1230
席予約機能の追加 #1230
Conversation
@@ -0,0 +1,48 @@ | |||
# frozen_string_literal: true |
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.
この画面だったらメモも遷移せずにかけるといいかもですね。
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.
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.
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.
@s4na メモ追加は日にちにメモするためのもので、座席にメモをするものではないので、
「席予約一覧」に管理者だけ「メモ追加欄」が表示するような実装
の認識でした。
ユースケースは、今日は工事があるのでオフィスが使えません、午後はXXXがあってオフィスが使えません、のようなことを書き込むのに使う予定でした。
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.
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.
@machida 日にちにメモするというのは僕も同じ認識です。
UI的に下記のどちらなのかというのが気になっているところです。
- メモ一覧ページで入力する。
- カレンダーが表示されてるページでメモが入力できる。
僕は後者の認識でした〜
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.
machidaさんに確認したところ、「後者」の認識でしたので、「カレンダーが表示されてるページでメモが入力できる。」で実装します!
render :create, status: :created | ||
else | ||
if @reservation.errors.nil? | ||
head :bad_request |
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.
これってどういう場合でしょう?
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.
すいません勘違いしてました
なさそうなので、分岐削除しました。
ご確認お願いいたします。
要件machidaさん
|
@s4na mergeコミットができちゃってるのでrebaseでお願いします。 conflictの解消お願いします。 |
71aa439
to
5ce20f0
Compare
解消しました! |
# frozen_string_literal: true | ||
|
||
class API::ReservationsController < API::BaseController | ||
before_action :require_login |
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.
API::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.
@komagata ありがとうございます!修正しました!
@s4na こちら古い状態でrebaseされているようなので現在のmasterでのrebaseお願いします〜 |
if memo.save | ||
render json: { status: 201, id: memo.id, body: memo.body }, status: :created | ||
else | ||
head :bad_request |
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.
一律:bad_request
ではなく、
render json: memo.errors, status: :unprocessable_entity
のようにエラーの内容も返せるようなものがいいです〜
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.
ありがとうございます!
reservations_controller
に合わせて、下記のように修正してみました。
render status: :unprocessable_entity, json: { status: 422, message: memo.errors.full_messages }
5ce20f0
to
ffc721f
Compare
すいません! 新しい状態でのrebaseやってみました! |
ffc721f
to
223c895
Compare
c9d0e5b
to
f282584
Compare
f282584
to
28768a4
Compare
43d97b1
to
ef293e7
Compare
ef293e7
to
7410978
Compare
Ref: #1148
変更内容
席予約機能の追加
画面
席予約一覧画面(管理者)
席予約一覧画面(非管理者)
席一覧画面
komagataさんレビュー後の作業予定
machidaさんにデザインを依頼
内容
イメージ