Skip to content
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

マイページ画面周りの実装 #30

Closed
1 of 3 tasks
subaru-hello opened this issue Oct 16, 2021 · 2 comments
Closed
1 of 3 tasks

マイページ画面周りの実装 #30

subaru-hello opened this issue Oct 16, 2021 · 2 comments
Labels
技術相談 実装に躓いているポイント 機能追加 Further information is requested

Comments

@subaru-hello
Copy link
Owner

subaru-hello commented Oct 16, 2021

概要

プロフィールページを作成する。
プロフィール編集機能を作成する。

詳細

  • マイページの作成
    URLは/profileに設定する。
    ニックネーム、アドレス、プロフィール画像が記載いてあるプロフィールカードを作成する。

  • 過去の酒ケジュールカレンダー表示画面
    カレンダーが表示されて、日付をクリックすると、カレンダーの下部に酒ケジュールを表示されるようにする。
    Image from Gyazo
    作成した酒(シュ)ケジュール

Image from Gyazo

表示したい項目

  1. お酒の強さ
  2. 飲んだお酒の順番
  3. タイトル
    下記記事、公式を参考にする。
    https://vcalendar.io/
    https://qiita.com/kanary/items/442bd44c2896a534768b
    https://docs.vcalendar.io/data.html
  • プロフィールの編集機能を作成する。
    「編集する」ボタンをクリックするとプロフィール編集用のダイアログが表示され、「パスワードを変更する場合はこちら」をクリックするとパスワード編集用のダイアログが表示される。

「プロフィール編集用のダイアログ」、「パスワード編集用のダイアログ」は互いに切り替えれるようにする。

railsのルーティングを設定する。

プロフィール更新

PATCH /api/profile(.:format) api/profiles#update

パスワード更新

PATCH /api/profile/password(.:format) api/profiles#password
sorceryのreset_passwordモジュールを導入する
passwardを更新するロジックで使用する為。

@subaru-hello subaru-hello added 技術相談 実装に躓いているポイント 機能追加 Further information is requested labels Nov 30, 2021
@subaru-hello
Copy link
Owner Author

subaru-hello commented Nov 30, 2021

実現したい挙動を整理

  • サーバーに保存されている診断結果を取得。
  • 診断結果(analyzes)に紐づくお酒データ(alcohols)を全て取得。
  • 「お酒データを作成した日にち」 と v-date-pickerの:eventsを紐付ける。
  • v-date-pickerにv-model="createdShuchedule"を付与し、日付をクリックしたら{{createdShuchedule}}に過去の酒データが出力されるようにする。

クリック時の挙動

  • モーダル表示?
  • v-showを使って条件分岐ロジックを構築する?

現状の案

  • created_atで過去の酒ケジュール作成履歴を絞り出す。
  1. 下記のように、ユーザーの過去の診断結果はcreated_atで取得することができる。
User.first.analyzes.first.created_at

Image from Gyazo
2. 取得した診断結果をコンポーネントで 呼び出し、v-date-pickerのv-bindに単方向バインディングさせる。

@subaru-hello
Copy link
Owner Author

カレンダー機能をつける目的と実装工程に折り合いをつけることを検討する。
3日以上かかりそうだったら、診断結果を取得してページに表示する要件に変更する。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
技術相談 実装に躓いているポイント 機能追加 Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant