-
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
(feat): Sort inventory items by expiration date #139
Conversation
…furthest expiring ind sipensing module
You should have pushed this change to the branch containing the PR. |
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.
Thanks @FelixKiprotich350
@@ -16,6 +16,14 @@ const StockDispense: React.FC<StockDispenseProps> = ({ medicationDispense, updat | |||
const drugUuid = medicationDispense?.medicationReference?.reference?.split('/')[1]; | |||
const { inventoryItems, error, isLoading } = useDispenseStock(drugUuid); | |||
const validInventoryItems = inventoryItems.filter((item) => isValidBatch(medicationDispense, item)); | |||
const validInventoryItemss = inventoryItems |
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.
Why the need for a new variable variableInventoryItemss
instead of tacking on the new logic to line 18?
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.
Indeed. This kind of thing is the type of thing that causes us to need to revert PRs.
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.
Am working on it
Requirements
Summary
sorted the batches expiry date from the most nearing expiring to the furthest expiring ind dipensing module
Screenshots
Related Issue
Other