Skip to content

doston9471/reacted-rails

Repository files navigation

Ruby on Rails with React app

Installation and run Ruby on Rails app

git clone [email protected]:doston9471/reacted-rails.git
cd reacted-rails
bundle install
rails db:create
rails db:migrate
rails db:seed
rails s

Installation and run React app

cd client
npm install
touch .env.development
# add VITE_API_URL="<your Ruby on Rails app server URL>"
npm run dev

TODO

Ruby on Rails

  • Create Rails api only project, choose db different than sqlite
  • Create Employee model. Fields: Name, Salary, Total
  • Create Project model. Fields: Name
  • Create Assignment model. Fields: Months, RnD Percentage, Total, belongs_to both employee, project
  • Assignment's total is a calculated field and should be updated everytime either months or RnD Percentage is updated ((months * rnd_percentage) / 12)
  • Total for employee should be the sum for all assignments belonging to the employee and should be updated everytime assignment belonging to the employee is updated
  • Add Contractor model. Fields: Name, Salary, Total
  • Make Assignment belong to either Contractor or Employee
  • Create endpoints for Assignment ( create, update, index, show )
  • Create endpoints for Employee ( show, index )

JavaScript

  • Create empty React project.
  • Add React Router to the project
  • List Employees to the homepage
  • Show Employee page
  • List all assignments inside Employee show page
  • Update assignments on change and show the updated Employee total value

About

Ruby on Rails with React app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published