kintai_app's People
kintai_app's Issues
review17
usersテーブルに
user_idを持つ意味は?何が用途か?
railsは、idベースなので不要な気がする。
railsの設計**はサロゲートキーです。
https://qiita.com/tmasu/items/1b8702d8a121cc10aefb
review19
これがdefault standardなので使用するようにしましょう
https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/ja.yml
review15
form_helperを使っているのでformの復元を意識しないで良いはずです。違ったらごめんなさい。
railに乗りましょう。
https://railsguides.jp/action_view_overview.html#formhelper
@email = params[:email]
@password = params[:password]
review13
set_current_user
を
current_user
として
他処理ではインスタンス変数を直参照しないで、current_userを参照するようにしましょう
@current_user
はグローバル変数のようなものなので、スコープが限定されてgoodです。
全登録ユーザーの月別状況が確認できるような画面orCSVファイルが欲しい。
review10
無駄な空行は不要
出勤データがない場合はステータスを空白、もしくは、未出勤にする。
時間が入力された場合はステータスを出勤にする。
休日の場合も同様に行う。ただし休日出勤の場合は代休が取れるように
slackbotと連携できるようにする
チャンネル作ってテストする。
API controllerを作る
review11
url_helperを使いましょう(他も同様)
root_path
review7
:commentオプションをつけましょう
heroku側の時間入力がおかしい
出勤押下時に現在時刻+9時間で入力され、退勤時間が現在時刻-6時間で入力される。
退勤押下時に現在時刻+9時間で入力され、出勤時間が現在時刻-6時間で入力される。
休暇申請するときと 承認、却下するときにメモが書けるようにする。
申請者の申請理由と認証者の承認or却下理由の書けるカラムを追加
それぞれのroleは自分の申請の申請理由と承認理由が表示されるように申請関係の画面を変更。
ただし申請理由は申請者のみ編集できる。承認or却下理由はownerのみ編集できる。
それぞれの理由をどこで入力させるべきか?
1. 状態を休暇申請にしたときにモーダル表示
2.休暇確認画面で編集用カラムを追加
role以外のユーザーも他ユーザーの申請理由を閲覧できるようにするべき(出勤者リスト画面に表示できると良さそう)
review3
kintai_app/config/database.yml
Line 19 in a0f9164
rubyはutf-8です。
review9
railsだと set_ を付けない慣習があります。
current_user
https://railstutorial.jp/chapters/basic_login?version=5.1#sec-current_user
review23
kintai_app/app/views/tops/top.html.erb
Line 10 in a0f9164
form_helperを使い倒してください
https://railsguides.jp/action_view_overview.html#password-field
review2
https://github.com/takahashimasahiro/kintai_app/blob/master/README.md
内容を書きましょう
概要とか
rails s できるまでの手順
が記載してあるとありがたいです。
review26
Line 2 in a0f9164
日本語でエラーメッセージ出るようにしてください。
i18nを使用すること
review18
これをする意味は?
review22
railsのlayoutについて調べてください。htmlタグが二重になっています。
https://railstutorial.jp/chapters/filling_in_the_layout?version=4.2#cha-filling_in_the_layout
| <!DOCTYPE html>
-- | --
| <html>
| <head>
| <title>Kintai</title>
| <meta name="csrf-param" content="authenticity_token" />
| <meta name="csrf-token" content="6+CPOilyQ3oGyYsRG60fIk/8Twq60rueXyvXZyNyT1owbuA69W5aH/4MOlVIuuO6mH0PgtppE4QGRD94lAd1Yw==" />
|
| <link rel="stylesheet" media="screen" href="/packs/application-745a1ca3d5f8eb84a4396994591ab7fd.css" />
| <link rel="stylesheet" media="screen" href="/packs/tops-82cfc99e066de857bd4da8b9444179b3.css" />
| <script src="/packs/application-c0233acbd733caeafd45.js"></script>
| <script src="/packs/tops-c7e9550d0c08a0728bf8.js"></script>
| </head>
| <body>
| <div class="wrapper-logout">
| <html>
review20
kintai_app/config/application.rb
Line 21 in a0f9164
timezoneについて気にするようにしてください。defaultだとutcになった覚えがある
config.time_zone = 'Tokyo'
review6
Line 3 in a0f9164
セッション管理はSessionsControllerにするのが良いです。
コントローラー名とやっていることを同じにするのが良いです。
https://railstutorial.jp/chapters/basic_login?version=5.1#sec-sessions_controller
review1
Line 41 in a0f9164
これだとbundle配下が管理対象となってしまう
パスの書き方が大丈夫かを全体的に見直してください
review12
はじめなのでi18nを厳密に使ってみてください。(実務だと時間がなくてできないが、正道は使う)
review27
http://www.betterspecs.org/jp/
describeとcontextを使い分ける
などを覚えてください
review21
utc表示にならないかチェックする
https://qiita.com/jnchito/items/cae89ee43c30f5d6fa2c
review16
何もメッセージ出さずにログイン後のトップ画面にredirectするのではダメですか?
テスト
管理者アカウントの操作履歴があると良い
申請履歴(何日何時に承認したか)の画面は別途作成
その他管理者onlyのupdate,insert処理に履歴をつける
review25
Line 8 in a0f9164
rubyはreturnあまり使わない文化らしいです。
review24
kintai_app/app/helpers/top_helper.rb
Line 1 in a0f9164
いらないファイルは消す
review4
kintai_app/config/database.yml
Line 27 in a0f9164
共通事項はdefaultのみにしてください
adapter: postgresql
encoding: unicode
全ユーザーの有休数を一括で増やせるような処理が欲しい
年に一度一括で増やせるような処理があると楽
herokuでPaperTrailが機能していない
review14
logoutするのに敢えて認証のチェックする理由は?
review8
キャッシュしましょう
@current_user ||= User.find_by(user_id: session[:user_id])
https://railstutorial.jp/chapters/basic_login?version=5.1#cha-basic_login
review5
Line 2 in a0f9164
はじめなので基本に忠実にRESTfulにしましょう
railsはrailに乗るのが良いらしいです。
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.