-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create scheduling crud endpoints #17
Conversation
fae2668
to
e587856
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First Pass. I havent tested it through postman yet, but will do once the changes are implemented. Good job on it though! Also the tests are failing in CI. Can you take a look at that?
backend/typescript/middlewares/validators/schedulingValidators.ts
Outdated
Show resolved
Hide resolved
@Column({ type: DataType.DATE }) | ||
end_time!: Date; | ||
|
||
@AllowNull(false) | ||
@Column({ type: DataType.ENUM("Rejected", "Approved", "Pending") }) | ||
status!: Status; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default value should be Approved
. Can we add that in? We would not need @AllowNull(false)
then? This would require some changes in the functions as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't the default value be Pending
since when a schedule is created, it then has to be approved by an admin?
@Column({ type: DataType.INTEGER }) | ||
donor_id!: string; | ||
id!: number; | ||
|
||
@Column({ type: DataType.TEXT }) | ||
description!: string | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change this to category instead? Please look at the following product spec: https://www.notion.so/uwblueprintexecs/Creating-Info-for-Food-Donor-Dropoff-60826a71e0114f81a837e6933922a4dd#e85ab7e5abbc42e09ac8327001f9c65d for different categories. I guess we could still keep it as a string instead of Enum, and the Frontend would only provide those listed options in the dropdown. In that case, only need to change the name.
Think we've addressed all comments! @Shehryar21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haven't tested locally yet but looks good!
Notion ticket link
Ticket Name
Implementation description
Steps to test
Sample JSON for creating a scheduling entry (POST):
What should reviewers focus on?
Checklist