Skip to content

refactor: extract order query key constant to improve readability and…#585

Open
abhayDoes wants to merge 3 commits intoopenmrs:mainfrom
abhayDoes:patch-1
Open

refactor: extract order query key constant to improve readability and…#585
abhayDoes wants to merge 3 commits intoopenmrs:mainfrom
abhayDoes:patch-1

Conversation

@abhayDoes
Copy link

This PR improves the readability and maintainability of the ApproveLabResultsModal workflow by extracting the SWR mutation key into a dedicated constant.

🔧 Changes
Introduced orderQueryKey constant
Simplified the SWR mutate predicate from a string prefix check to a direct equality comparison Reduces string duplication and improves type safety

Why this change?
Makes the intent of the mutation clearer
Avoids recomputing a long URL string inline
Reduces risk of typos or mismatched strings
Easier to reuse in future features or tests
This PR does not change any behavior and is safe.

… maintainability

This PR improves the readability and maintainability of the ApproveLabResultsModal workflow by extracting the SWR mutation key into a dedicated constant.

🔧 Changes
Introduced orderQueryKey constant
Simplified the SWR mutate predicate from a string prefix check to a direct equality comparison
Reduces string duplication and improves type safety

Why this change?
Makes the intent of the mutation clearer
Avoids recomputing a long URL string inline
Reduces risk of typos or mismatched strings
Easier to reuse in future features or tests
This PR does not change any behavior and is safe.
Copy link
Collaborator

@jabahum jabahum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abhayDoes lets fix conflicts

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