git clone [email protected]:doston9471/reacted-rails.git
cd reacted-rails
bundle install
rails db:create
rails db:migrate
rails db:seed
rails s
cd client
npm install
touch .env.development
# add VITE_API_URL="<your Ruby on Rails app server URL>"
npm run dev
- 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 )
- 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