-
Notifications
You must be signed in to change notification settings - Fork 6
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
Allow individual & group locations to be updated #96
base: develop
Are you sure you want to change the base?
Conversation
weilu
commented
Dec 10, 2024
•
edited
Loading
edited
- Create group with location
- Update group location
- Update individual location
- Display location in individual update task
- Disable location edited for individuals who belong to a group (Location edit should be done on the group instead)
- Display location in individual change log
- Display location in group change log
Also display location id in individual task
]; | ||
|
||
const IndividualTaskItemFormatters = () => [ | ||
(individual) => individual?.first_name, | ||
(individual) => individual?.last_name, | ||
(individual) => individual?.dob, | ||
(individual) => individual?.location_id, |
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.
@sniedzielski @delcroip any thoughts on how to display the location information to be more user-friendly? I'm not sure it's worth adding one or two separate API calls to fetch the location (possibly two if the individual's location switched from one to another)
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.
Usually locations in openIMIS are displayed by their code for example if we have 4 level location and:
a) District A
b) Region B
c) Municipality C
d) Village D
The other approach in on the insurees page in result list:
Personally I would recommend first approach. In that case in 'formatter' we have to pass location as the 'code' not id. I think somewhere in backend it could be possible to do this in task creation. I have to double check this. Individual has the reference to location https://github.com/openimis/openimis-be-individual_py/blob/d05e42da207f18e10b2ca613988d6e554cedab68/individual/models.py#L21 and it should be possible to manage it thanks to your changes related to locations
in policyholder graphQL projection we have 'locations{id, uuid, code, name, type, parent{id,uuid,code,name,type,parent{id,uuid,code,name,type,parent{id,uuid,code,name,type}}}}' this kind of definition to fetch location informations. I saw in prev PRs that you used 'location Code' in managing locations. Maybe we should use the same approach, take this code from backend and display here in 'task definition'.
Reason for disabled edit explained in location picker title Requires: openimis/openimis-fe-location_js#91 openimis/openimis-fe-core_js#259