-
Notifications
You must be signed in to change notification settings - Fork 248
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
(fix) O3-2813 disable test type edit when modifying lab orders #1782
Conversation
"@openmrs/esm-api@npm:5.5.1-pre.1659": | ||
version: 5.5.1-pre.1659 | ||
resolution: "@openmrs/esm-api@npm:5.5.1-pre.1659" | ||
"@openmrs/esm-api@npm:5.5.1-pre.1685": |
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.
Updated framework because the previous version had an issue with overriding importmaps using the dev tools
fcb3a06
to
d3e11e1
Compare
Size Change: +75.1 kB (+1%) Total Size: 11.1 MB
ℹ️ View Unchanged
|
@@ -50,6 +46,7 @@ export function LabOrderForm({ | |||
const { t } = useTranslation(); | |||
const isTablet = useLayoutType() === 'tablet'; | |||
const session = useSession(); | |||
const [isEditing, setIsEditing] = useState(initialOrder && initialOrder.action === 'REVISE'); |
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.
Minor observation: The setter seems redundant maybe we just memoize the value?
const isEditing = useMemo(() => initialOrder && initialOrder.action === 'REVISE', [initialOrder]);
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.
+1
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.
LGTM
d3e11e1
to
901dcb2
Compare
Thanks @samuelmale @ojwanganto i've pushed the changes |
@@ -30,7 +30,7 @@ export default function AddLabOrderWorkspace({ | |||
}: AddLabOrderWorkspace) { | |||
const { t } = useTranslation(); | |||
|
|||
const { patient, isLoading: isLoadingPatient } = usePatient(); | |||
const { patient, isLoading: isLoadingPatient, patientUuid } = usePatient(); |
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.
All workspaces should receive the patientUuid
prop implicitly. You shouldn't need to drill the prop down to LabOrderForm
.
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.
Found a weird behaviour testing this that's why i added this change. Maybe it was a unique case.
Requirements
Summary
Disable changing test type when modifying an already existing order.
Other changes
Screenshots
Screen.Recording.2024-04-09.at.13.48.23.mov
Related Issue
https://openmrs.atlassian.net/browse/O3-2813
Other