badgateway / tt-app

Time tracker app using the Bad Gateway suite of opensource tools. Related: https://github.com/badgateway/tt-api
MIT License
1 stars 0 forks source link

Can't create a new Project #31

Open syedfkabir opened 2 years ago

syedfkabir commented 2 years ago

Task

Fix the issue where a user can't create a new project. Getting a 400 status error.

Background:

I tested the API by making a POST request on the project endpoint. It was successful, so I assume the bug is on the Front End.

Screen Shot 2022-09-26 at 5 09 04 PM

Screenshots

Project Creation Page

Screen Shot 2022-09-26 at 5 03 49 PM

After pressing Create, redirects to /project with status code 400

Screen Shot 2022-09-26 at 5 04 48 PM

ikbensiep commented 2 years ago

This is a frontend bug, yeah.

The initialData in a new project (ProjectNewPage) does not contain a client. It's set by a change handler on the client dropdown component, so you have to change it to something other than the default value (and back to the default value if you want to select one :P) to set a client href to the project data.