EnAccess / EnAccess/micropowermanager

[Feature Request]: Consolidate the `Address` and `GeographicalInformation` models

Open
#945 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
PHP
Stars
27
Forks
19
Avg merge
1d 18h
Merged PRs (30d)
27

Description

### Preflight Checklist

- [x] I have read the [Contributing Guidelines](https://github.com/EnAccess/micropowermanager/blob/main/CONTRIBUTING.md) for this project, if it exists.
- [x] I agree to follow the [Code of Conduct](https://github.com/EnAccess/micropowermanager/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [x] I have searched the [issue tracker](https://github.com/EnAccess/micropowermanager/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

Currently, there are a lot of confusions and redundancy w.r.t to geo informations

- `Person` has `Address`, but no `GeographicalInformation`
- `Device` has address, and as such, has `email` and `phone`
- Some `Addresses` have `GeographicalInformation`. For example, `Device`'s address have, `User`'s address may not
- `Cluster` does not have `GeographicalInformation` but `geo_data` stored directly at the model
- `Cluster`'s `geo_data` is using a non-standard format, with nested `GeoJson`.
- `MiniGrid` has `GeographicalInformation` but no `Address`
- `Village` has `GeographicalInformation` but no `Address`
- `Address` has `email` and `phone`, but `Person` doesn't
- On Device registration, via SoldAppliance, the devices Geo Information is copied from village

### Proposed Solution

Please, untangle all the above inconsistencies.

- `Person` should only relate to `Address`. `Person` does not need `GeographicalInformation`
- `Device` should relate to `GeographicalInformation` directly
- On Device registration via SoldAppliance provide a UI to select the device's coordinates

### Alternatives Considered

N/A

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.