This README would normally document whatever steps are necessary to get the application up and running.
Things you may want to cover:
- Ruby version
Simple application to log work hours related to a project and type of activity
May be improved with validation process
May also include reports and statustics related to these logged hours
sudo docker run -it --rm --user "$(id -u):$(id -g)" -v "$PWD":/usr/src/app -w /usr/src/app ruby /bin/bash -c "gem install rails ; rails new testWindows --skip-bundle --database=postgresql"
docker run -it --rm -v ${pwd}:/usr/src/app -w /usr/src/app ruby /bin/bash -c "gem install rails ; rails new testWindows --skip-bundle --database=postgresql"
- Setup database.yml (user: postgres and host: postgres)
- create and migrate postgres database:
docker-compose run --rm app bundle exec rails db:create db:migrate
Reminder:
- Use @xxx.destroy to delete all the dependent: destroy associamtions.
- engineer
- ct
- pm
- team_leader
- ge_team_leader
- admin
- pmo
git log --graph --decorate --oneline
git fetch
`git checkout -b [branch name] origin/[branch name]
alias docker-rails="docker-compose run --rm app bundle exec rails"
alias docker-db-reset="docker-compose run --rm app bundle exec rails db:drop db:create db:migrate db:seed"
alias docker-bundle="docker-compose run --rm app bundle install"
onebitcode - vs code degug rails - vs code oficial microsoft
- HoursRecord.where(profile_id: 6, day: (Time.now.midnight - 6.day)..Time.now.midnight).sum("man_hour") -> Ultima semana
- HoursRecord.where(profile_id: 6, day: "2019-08-07").sum("man_hour")
- HoursRecord.where(status: ["rep_approved","rep_under_analysis"]).count
yarn init
yarn add @fortawesome/[email protected]
1 - docker-compose run --rm bundle install
2 - docker-compose run --rm bundle exec reails db:drop db:create db:migrate db:seed
3 - npm install or yarn install
yarn add @fortawesome/[email protected]
docker-rails generate migration AddMainSkillProfile main_skill:references
docker-compose run --rm app bundle exec rake assets:precompile
docker-compose run --rm -e EDITOR=nano app bundle exec rails credentials:edit
u2.hours_records.select(:id, :project_id, :activity_id).distinct
rails g migration CreateJoinTableAuthorsBooks authors books
docker-rails generate scaffold Company name:string address:string profile:referencesdocker-rails generate scaffold ImprovementAction title:string description:text status:integerdocker-rails generate scaffold MainEquipment name:stringdocker-rails generate migration addMainEquipmentToHoursRecord main_equipment:referencesdocker-rails generate scaffold DocTemplate title:string description:textdocker-rails generate scaffold AccessTemplate name:string description:text mandatory:booleandocker-rails generate scaffold SuggestionBox name:string description:text status:integerdocker-rails generate scaffold Vote choice:integer votable:references{polymorphic}docker-rails generate scaffold ProfileSubSkill profile:references sub_skill:references level:integer status:integer expiration_date:date- ``
- ``
- ``
- ``
- ``
Evaluation.joins(:hours_records).where(:hours_records => {profile_id: 3})
- Todo
- Add next_action_deadline and review_count fields on hours_record model \
- implement creation and update hooks for hours_record model \
- Create application config itens \
- Time_for CT review \
- Time for 2nd review on \
- Max_number_of_reviews
- Max Days for providing report
- Max weekly working hours
- Max daily working hours
- Max daily working extra hours
- [] Create Validators
- Date Validator
- Hours Validator
- Work Week Validator (need fix +- 6 days)
- Download theme
- Install theme (Udemy Jackson Pires)
- Test HTML helpers
- invitable devise
- Complement Hour Log Model
- Create approval view based on show (partial)
- Test some validations
- Growl Notifications
- [] Implement Extra Hours Creation
- [] Models
- [] Views
- [] Link with record creation
- Add some models Evernote
- Companies
- Improvement Action
- Evaluation
- Documents
- AccessTemplate
- [] Enum otimizations
- [] Eager load otimizations
- [] Eager load
- [] Seed with more real data
- [] Implement roles access using pundit
- [] Create Navigation
- [] Will paginate
- [] friendly_id
- [] background_jobs
- [] mailer
- [] Helpers in html
- Bootsrap styling * Buy Theme
- [] Trabalhar mensagens de erros as notificações
- [] Deployment