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

Try to fix multiple printer tickets #1903

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

alexsegura
Copy link
Member

No description provided.

@@ -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}>
Copy link
Contributor

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(
Copy link
Contributor

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,
Copy link
Contributor

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)

Copy link
Contributor

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?

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