-
Notifications
You must be signed in to change notification settings - Fork 349
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
Sort wards by ward number in filters + adds utility method: compareBy
#6852
Conversation
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
compareByKey
, sort wards in filterscompareByKey
compareByKey
compareBy
Passing run #1719 ↗︎Details:
Review all test suite changes for PR #6852 ↗︎ |
LGTM |
@rithviknishad We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌. |
WHAT
🤖[deprecated] Generated by Copilot at b9637f3
The pull request refactors and improves the code for sorting and displaying data related to diagnoses, external results, facilities, and patients. It uses consistent and imported types, and a common utility function
compareByKey
for sorting arrays of objects by a given key. It affects the filesLegacyDiagnosesList.tsx
,ListFilter.tsx
,ResultUpdate.tsx
,FacilityCreate.tsx
,RangeAutocompleteFormField.tsx
,PatientRegister.tsx
,models.tsx
, andutils.ts
.Proposed Changes
compareBy
that returns a comparator function that operates on the value of an object specified by the key@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist
HOW
🤖[deprecated] Generated by Copilot at b9637f3
compareByKey
function for sorting arrays of objects by a given key in various components (link, link, link, link, link, link, link, link, link, link, link)wardList
,lsgList
,wards
, andselectedLsgs
state variables and props inListFilter.tsx
usingWardModel
andLocalBodyModel
types (link, link, link)MultiSelectFormField
components forlocal_bodies
andwards
inListFilter.tsx
by usingoptionDescription
prop and removing unnecessary wrappers and functions (link, link, link)WardModel
interface inmodels.tsx
to includepanchayath
andlocal_body_id
fields and useLocalBodyModel["id"]
type (link)states
,districts
,localBodies
, andward
state variables and props inFacilityCreate.tsx
usingStateModel
,DistrictModel
,LocalBodyModel
, andWardModel
types and remove unused interfaces (link, link, link)compareByKey
function toutils.ts
as a utility function for sorting arrays of objects by a given key (link)