Skip to content
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

feat: Add cluster info section #135

Merged
merged 4 commits into from
Oct 23, 2024
Merged

feat: Add cluster info section #135

merged 4 commits into from
Oct 23, 2024

Conversation

hinxcode
Copy link
Member

@hinxcode hinxcode commented Oct 22, 2024

This pull request introduces significant changes to the support_sphere project, focusing on adding support for clusters and their captains, and integrating this information into various parts of the application. The most important changes include the creation of new models and services for clusters, updates to the Household model, and modifications to the ProfileCubit and ProfileState to handle cluster information.

Cluster Support:

  • New Cluster Model and Service:
    • src/support_sphere/lib/data/models/clusters.dart: Added Cluster and Captains models. ([src/support_sphere/lib/data/models/clusters.dartR1-R46](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-ae9161abbe55e2943c206f7a06c19ad8c7c3aedbfa4b1078600680a036b97417R1-R46))
    • src/support_sphere/lib/data/services/cluster_service.dart: Added ClusterService to fetch cluster and captain data from the database. ([src/support_sphere/lib/data/services/cluster_service.dartR1-R36](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-5a89b944181c0d1ff7b1feb092c6f59d052d72822165c1ba7cfc0e5d6ae627a7R1-R36))

Household Model Updates:

  • Added Cluster ID:
    • src/support_sphere/lib/data/models/households.dart: Updated Household model to include cluster_id and updated props and copyWith methods accordingly. ([[1]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-de165e1e8b1c9f4df4b28427f9c5de33e816034098d636d39a97e20b400d7613R8), [[2]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-de165e1e8b1c9f4df4b28427f9c5de33e816034098d636d39a97e20b400d7613R19), [[3]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-de165e1e8b1c9f4df4b28427f9c5de33e816034098d636d39a97e20b400d7613L26-R28), [[4]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-de165e1e8b1c9f4df4b28427f9c5de33e816034098d636d39a97e20b400d7613R38), [[5]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-de165e1e8b1c9f4df4b28427f9c5de33e816034098d636d39a97e20b400d7613R48))

User Repository Enhancements:

  • Cluster Data Integration:
    • src/support_sphere/lib/data/repositories/user.dart: Integrated cluster and captains data retrieval methods. ([[1]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-5abdbbb4cf14f250918444515ff2ae28c7ca9c1b52c5a43fd58181ea0d94b29cR5-R15), [[2]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-5abdbbb4cf14f250918444515ff2ae28c7ca9c1b52c5a43fd58181ea0d94b29cR66), [[3]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-5abdbbb4cf14f250918444515ff2ae28c7ca9c1b52c5a43fd58181ea0d94b29cR95-R134))

Profile Management:

  • Profile State and Cubit Updates:
    • src/support_sphere/lib/logic/cubit/profile_cubit.dart: Added methods to handle cluster changes and fetch cluster data. ([[1]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-e4cb3324581bb15d356b7d5827567e716ec0ef780c1e133f2dd3333f7f35811cR4), [[2]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-e4cb3324581bb15d356b7d5827567e716ec0ef780c1e133f2dd3333f7f35811cR32-R35), [[3]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-e4cb3324581bb15d356b7d5827567e716ec0ef780c1e133f2dd3333f7f35811cR62-R83))
    • src/support_sphere/lib/logic/cubit/profile_state.dart: Updated ProfileState to include Cluster. ([src/support_sphere/lib/logic/cubit/profile_state.dartR8-R29](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-341cb3e8f6fdfc9aed4fd128a464a077eacd2066c0134bf59033a85462d4b500R8-R29))

UI Enhancements:

  • Cluster Information Display:
    • src/support_sphere/lib/presentation/pages/main_app/profile/profile_body.dart: Updated UI to display cluster information and captains. ([[1]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-4f8fa883208165c32b6369633dd5323a173c40e56237aad060b3115491324856R6), [[2]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-4f8fa883208165c32b6369633dd5323a173c40e56237aad060b3115491324856L291-R320), [[3]](https://github.com/uw-ssec/post-disaster-comms/pull/135/files#diff-4f8fa883208165c32b6369633dd5323a173c40e56237aad060b3115491324856L318-R339))

These changes collectively enhance the application's capability to manage and display cluster-related information, improving the overall user experience.

Related issue

Resolves #124

Demo

image

Copy link

@lsetiawan lsetiawan changed the title Add cluster info section feat: Add cluster info section Oct 22, 2024
Copy link
Member

@lsetiawan lsetiawan left a comment

Choose a reason for hiding this comment

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

Nice work @hinxcode! This looks great, and seem to work well. Thank you!

@lsetiawan lsetiawan merged commit e59d84a into main Oct 23, 2024
4 checks passed
@lsetiawan lsetiawan deleted the feat/cluster-info-section branch October 23, 2024 03:48
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.

Add cluster info section
2 participants