-
Notifications
You must be signed in to change notification settings - Fork 15
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
#6083 #6090 #6061 #6059 Prescription hotfixes x4 #6104
base: V2.5.0-RC
Are you sure you want to change the base?
Conversation
Bundle size differenceComparing this PR to
|
accessor: ({ rowData }) => | ||
NumUtils.round( | ||
(rowData.numberOfPacks ?? 0) * (rowData.packSize ?? 1), | ||
3 | ||
), |
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.
#6059 Fix for expando columns -- just missed one place where this calculation was needed again (didn't look at the Expando columns originally)
@@ -138,6 +138,7 @@ export const PrescriptionLineEditView = () => { | |||
); | |||
} | |||
setIsDirty(false); | |||
setAllDraftLines({}); |
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.
Fix for #6061. Problem was the item ended up in the allDraftLines
array twice -- once indexed by "new"
and once indexed by its ID. Best to just start with a fresh object after a save (same as when you first load the page).
@@ -54,8 +57,9 @@ export const usePrescriptionLineEditRows = (rows: DraftStockOutLine[]) => { | |||
}, [allocatableRows, wrongPackSizeRows, onHoldRows, noStockRows]); | |||
|
|||
const disabledRows = useMemo(() => { | |||
if (isDisabled) return orderedRows; |
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.
Fix for #6083
If the prescription is verified, it is disabled
, so we make sure all rows are disabled.
Unfortunately adds another prop that must be passed down through about 3 levels π
decimalLimit={2} | ||
min={0} | ||
// We're not allowing non-integer values (decimalLimit=0), as you can only | ||
// issue whole units |
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.
Fix for #6090. Remove decimalLimit
prop which forces an integer.
Fixes #6083 #6090 #6061 #6059
(There's one more dispensing hotfix (#6078), but that'll require a bit more thinking about, so will do separately.)
π©π»βπ» What does this PR do?
Four small fixes for the above issues.
I've done each in a different commit, so you can review them individually if you like:
#6083 e249b56
#6090 d6767fb
#6061 9b825cd
#6059 3953898
I've also mentioned the issue # in my review comments below.
π Any notes for the reviewer?
See review comments for more details
π§ͺ Testing
These are all really tiny, so please just refer to the original issues and confirm behaviour is fixed when doing the "How to reproduce" steps.