Skip to content
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

Create parent attendance display #130 #132

Merged
merged 3 commits into from
Feb 24, 2023

Conversation

willji0023
Copy link
Contributor

Administrative Info

Make sure your branch name conforms to: <feature/staging/hotfix/...>/[username]/[Github Issue]-[3-4 word description separated by dashes].

What issue(s) does this branch close?

#130

Changes

What changes did you make?

  • Create route to return all classes for one student
  • Added frontend for rhs module on parents profile page that updates when student is changed

Testing

How did you confirm your changes worked?

  • Tested route and frontend functionality locally by creating students enrolled in classes and adding them to a parent

Confirmation of Change

Upload a screenshot, if possible. Otherwise, please provide instructions on how to see the change.

Parent's Profile page
image

Copy link
Collaborator

@Anshul-Birla Anshul-Birla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey william, let some very minor comments on your PR. Everything else looks good to me. Also, unit tests are failing

Comment on lines 88 to 95
{RRule.fromString(Class.rrstring).toText().charAt(0).toUpperCase() +
RRule.fromString(Class.rrstring).toText().slice(1) +
", start " +
monthNames[RRule.fromString(Class.rrstring).options.dtstart.getMonth()] +
" " +
RRule.fromString(Class.rrstring).options.dtstart.getDate() +
", " +
RRule.fromString(Class.rrstring).options.dtstart.getFullYear()}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a comment about what this is doing - its kinda hard to understand

Comment on lines 21 to 29
const getFormattedTime: string = (time: string) => {
const hours24 = parseInt(time.substring(0, 2));
const hours = ((hours24 + 11) % 12) + 1;
const hoursText = hours < 10 ? "0" + hours.toString() : hours.toString();
const amPm = hours24 > 11 ? " pm" : " am";
const minutes = time.substring(3, 5);

return hoursText + ":" + minutes + amPm;
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just wondering, is there no better way to do this? this forces us to keep the exact same formatting through the entire app. Maybe luxon would help here? B/c now we have to make sure the formatting is correct

Copy link
Contributor Author

@willji0023 willji0023 Feb 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree I think something like luxon is a cleaner option, which should also address your other comment. Added in new iteration

Copy link
Collaborator

@Anshul-Birla Anshul-Birla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is great! Enjoy your new team :)

@Anshul-Birla Anshul-Birla merged commit 24982ef into master Feb 24, 2023
@Anshul-Birla Anshul-Birla deleted the feature/willji0023/parent-rhs branch February 24, 2023 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants