-
Notifications
You must be signed in to change notification settings - Fork 59
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
Created the form to search for the courses #326
base: main
Are you sure you want to change the base?
Conversation
Looks good to me, code looks clean |
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.
Code looks good and clean. nice work!
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.
Looks really good - you have a lot going on but you implemented it well.
subject, | ||
description, | ||
course_name, | ||
course_description, |
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.
I think at some point we need to address that times could be different on different days. Example: Monday class could start at 9am, but Tuesday, class starts at 3pm.
{ title: 'instructor', text: instructor_name }, | ||
{ title: 'class size', text: size }, | ||
]; | ||
// const data = [ |
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.
Maybe ok to delete instead of commenting it out?
82685b7
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.
I agree the second set of data that is commented out in the ParentBookingCard.js can probably be removed. You may still want to have a key for each ParentBookCard (perhaps item.id?), that might not be necessary though. Everything else looks nice and organized, it would be awesome to have a Loom so we can see what it looks like!
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.
Code look great, well written and clean. There was a large object that was commented out, perhaps remove that, otherwise good job!
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.
Great job overall, looks like there was a lot implemented on this ticket! I left a few notes in the files changed for your consideration!
|
||
const BookingCalendar = () => { | ||
const onPanelChange = (value, mode) => { | ||
console.log(value.format('YYYY-MM-DD'), mode); |
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.
Wondering what this function is intended to do? Looks like currently, it is just console logging the date?
'/children/1/enrollments', // TODO: Hook this request up to pass the ID of the parent/child involved once we have this data in state. | ||
{ child_id: 1, class_id: course_id, completed: true } | ||
) | ||
.post() | ||
.then(res => console.log(res)) // TODO: Let's perform some action with this result. | ||
.catch(err => console.log(`message: ${err.message}`)); |
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.
great job adding a catch to handle errors
<Form className="il__top__form" size={'large'} layout="inline"> | ||
<Input.Group | ||
compact | ||
// style={{ display: 'flex', flexDirection: 'column' }} |
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.
You might want to remove this commented out code
> | ||
<div> | ||
<div | ||
style={{ |
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.
You might want to consider adding the styling in a separate CSS file to clean up the code a bit
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.
Yes absolutely we were just doing this to prevent switching between screens so much. This is still a draft PR at this point! Thank you!
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.
Nice job creating the form to search for courses. There is a chance to clean up the code but overall the code looks great!
<ParentBookingCard key={idx} booking={item} /> | ||
</div> | ||
<div> */} | ||
<ParentBookingCard booking={item} /> |
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.
Is there a reason this code is commented out?
src/styles/calendar.less
Outdated
@@ -161,3 +161,14 @@ div.ant-picker-calendar-date-value { | |||
margin: 0 4%; | |||
} | |||
} | |||
//Calendar Card for |
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.
I appreciate the label but what is the calendar card for?
import { dateConverter } from '../../common/dateHelpers'; | ||
import { timeConverter } from '../../common/timeHelpers'; | ||
import axiosWithAuth from '../../../utils/axiosWithAuth'; | ||
import { useOktaAuth } from '@okta/okta-react'; | ||
import { addToCart } from '../../../redux/actions/parentActions'; | ||
import { dummyData } from '../../../dummyData'; |
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.
Good job labeling your data as such to indicate it will need to change.
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.
I'd go one step further here and indicate. 'what kind of dummyData' it is. Example
dummyUserData etc.
}} | ||
> | ||
<button | ||
style={{ |
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.
Let's make these styles 'DRY' and not inline. :)
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.
Oh yes we plan to export the styles and make them DRY, we were just using everything inline to prevent switching between screens so much while implementing the figma design. We have actually switched to a dropdown on our current branch. We are implementing ant design styles as well! Thank you for your input Ryan!
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.
I noticed in ParentBookingChild that we're already customizing buttons using inline styles. Let's not do the styles inline, and I would heavily consider the use of AntD's buttons here. Always stick with the easiest path which in this case, is to use the built in library for styling. No need to reinvent button
right?
1110bd1
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.
Great code but I definitely see the areas of improvement.
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.
i see that testing has started and all checks passed. That is good
Description
Created a form where parents can search for available courses when exploring programs for their children.
Co-Authors:
Fixes # (issue)
Loom Video
https://www.loom.com/share/c77e0d6d9b674ccab07514954b8235a6
Type of change
Checklist: