i can submit a correct availability without running into issues
Discussion
The current create page for DriverAvailabilities has a number of aspects that should be improved.
First:
When create an availability we do not need to take the driver id as input, rather it should be automatically assigned to the creator.
Second:
The form labels are very unprofessional and jarring. We need to change this to be consistent with the rest of the application. Please capitalize and separate words.
Third:
Input validation error messages on bad input also must be improved with capitalization and spaces.
Fourth:
There is no 'bad-input' error messages. We should have error messages on bad input for Drive Id, Day, Start Time, End Time. For day it would be ideal to convert this field to a dropdown, similar to the one on the RideRequestForm.
Fifth
Like the RideRequestForm we want to have example messages on each of the form fields to help making it easier for the driver to know how to fill it out
Example:
Acceptance Criteria
[x] The form labels are improved
[x] The bad input and missing input error messages are added and improved
[ ] Example inputs on each form field
Implementation Todos
Issue 1 : Backend:
[x] Modify DriverAvailabilityController.javaPOST so that when creating a new DriverAvailability we automatically use the creator's id and no longer take in id as an input.
[x] Modify DriverAvailabilityController.javaPUT so that when editing DriverAvailability we make sure that the DriverAvailability we intend to edit is really owned by the current user, and we no longer want to set the driver id to the incoming.
[ ] Add the proper validations to GET single and DELETE so that a user can only delete or get their own availabilities and not anyone elses
Issue 2 : Frontend:
[x] Modify DriverAvailabilityForm.js to meet acceptance criterea.
You may further split this into more issues if deemed necessary
_### As a...
driver
I can...
Undestand what each of the form fields mean
So that...
i can submit a correct availability without running into issues
Discussion
The current create page for DriverAvailabilities has a number of aspects that should be improved.
First: When create an availability we do not need to take the driver id as input, rather it should be automatically assigned to the creator.
Second: The form labels are very unprofessional and jarring. We need to change this to be consistent with the rest of the application. Please capitalize and separate words.
Third: Input validation error messages on bad input also must be improved with capitalization and spaces.
Fourth: There is no 'bad-input' error messages. We should have error messages on bad input for
Drive Id
,Day
,Start Time
,End Time
. For day it would be ideal to convert this field to a dropdown, similar to the one on theRideRequestForm
.Fifth Like the
RideRequestForm
we want to have example messages on each of the form fields to help making it easier for the driver to know how to fill it out Example:Acceptance Criteria
Implementation Todos
Issue 1 : Backend:
DriverAvailabilityController.java
POST
so that when creating a newDriverAvailability
we automatically use the creator's id and no longer take in id as an input.DriverAvailabilityController.java
PUT
so that when editingDriverAvailability
we make sure that theDriverAvailability
we intend to edit is really owned by the current user, and we no longer want to set the driver id to the incoming.GET
single andDELETE
so that a user can only delete or get their own availabilities and not anyone elsesIssue 2 : Frontend:
DriverAvailabilityForm.js
to meet acceptance criterea.You may further split this into more issues if deemed necessary