Staff router#33
Conversation
…k broken. Need to add handler to pull orders for session
…ing to page, and to make the js more readable
… found with mounting/unmounting components and dynamically loading information
… The reference to that class is now removed
Gabetn
left a comment
There was a problem hiding this comment.
General
What is the exact functionality meant to be accomplished by this PR & what is it expecting in terms of future development. Unsure on what is intentional vs unintentionally missing.
As is i cannot merge this into staff. It will have to be refactored. As for the merge plan I shall merge staff into dev without this and should refactoring be done in time I will included it, however due to the deadline for release I shall merge dev into master without this if we cannot fix it in time. Please comment if you feel otherwise
See review comments for further details.
Styling
Seems to be entirely broken. Is this just local to my computer or were you experiencing the same @adrian678

Code Formatting
- Remove commented out console logs & other lines of unused code
- Renaming of functions, (optional) see specific comments in review
| } | ||
| } | ||
|
|
||
| // FILL ORDER TABLE |
There was a problem hiding this comment.
Removal of testing functionality (order's should not be pre-populated)
marking as a reminder
| render() { | ||
| return ( | ||
| <div className={"page staff-page"}> | ||
| <StaffLanding orders={this.props.orders} |
There was a problem hiding this comment.
This should not have been deleted.
Perhaps it was temporary, but staff landing page is the entry point to the staff view, and should remain.
StaffDiningSessionPage should be redirected to upon click of the All Orders button in the StaffLanding page.
| import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"; | ||
|
|
||
| /** ----- COMPONENT IMPORTS -----**/ | ||
| import {CustomerDiningSessionSelect, StaffDiningSessionPage, StaffDiningSession} from "./subcomponents/DiningSession"; |
There was a problem hiding this comment.
What's the purpose of importing CustomerDiningSessionSelect as well as StaffDiningSession here?
| ) | ||
| } | ||
|
|
||
| handleClose(){ |
There was a problem hiding this comment.
This should redirect to the staff landing page
However there doesn't seem to be an exit button on this page to trigger handleClose()
| diningSession={session} | ||
| diningSessionAttributes={this.props.diningSessionAttributes} | ||
| history = {this.props.history} | ||
| onCreate={this.onCreate} |
There was a problem hiding this comment.
onCreate does not need to be passed.
onUpdate/onDelete are not implemented throughout
| } | ||
|
|
||
| componentWillUnmount(){ | ||
| console.log("UNMOUNTING UNMOUNTING UNMOUNTING UNMOUNTING UNMOUNTING") |
There was a problem hiding this comment.
Remove.
Is this function necessary?
| this.props.history.push | ||
| ( | ||
| { | ||
| pathname: ('/staff/'), |
| ( | ||
| { | ||
| pathname: ('/staff/'), | ||
| props: this.props |
There was a problem hiding this comment.
This seems, unnecessary. What was the rationale behind it?
| order={order} | ||
| orderAttributes={this.props.orderAttributes} | ||
| onUpdate={this.props.onUpdate} | ||
| //TODO does Staff have authority to delete order? |
There was a problem hiding this comment.
Not included in the stories we provided. As such it is not functionality we should implement
| status: this.props.order.status, | ||
| quantity: this.props.order.quantity, | ||
| menuItem: {} | ||
| }; |
There was a problem hiding this comment.
Confused with the state initializations. What was the reasoning behind price : 4.99 in line 174
No description provided.