-
Notifications
You must be signed in to change notification settings - Fork 33
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
Try to fix multiple printer tickets #1903
Conversation
@@ -25,7 +25,8 @@ const Comp = ({ order, isPrinterConnected, onPrinterClick, printOrder }) => { | |||
{isPrinterConnected && ( | |||
<Button | |||
endIcon={<Icon as={FontAwesome} name="print" size="sm" />} | |||
onPress={printOrder}> | |||
onPress={printOrder} | |||
isDisabled={disablePrintButton}> |
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.
To be honest, I don't see much value in passing these props through three components (Order.js > OrderHeading.js > OrderButtons.js). I would put them in OrderButtons
directly
@@ -244,3 +244,8 @@ export const selectIsActionable = createSelector( | |||
); | |||
}, | |||
); | |||
|
|||
export const selectIsPrinting = createSelector( |
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.
There is a selector called selectPrintingOrderId
. It can be used either here or directly from a React component
return state; | ||
return { | ||
...state, | ||
printingOrderId: 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.
My idea was that only printFulfilled
/printRejected
actions with the same order ID as in printPending
should reset the state (assuming that printing is sequential)
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.
Did you see a situation when it was not working?
No description provided.