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/AB#80877_add_logic_to_create_edit_load_page_with_geographic_context #860

Open
wants to merge 8 commits into
base: feat/AB#80876-add-geographic-context-in-page
Choose a base branch
from

Conversation

RenzoPrats
Copy link
Contributor

@RenzoPrats RenzoPrats commented Dec 7, 2023

Description

Feat: Added logic to create/edit and load page with a specific geographic context.

Useful links

ticket
frontend

Type of change

  • Improvement (refactor or addition to existing functionality)

How Has This Been Tested?

It has been tested setting up a geographic context and verifying if it's created a dashboard when we don't have one for this context and if it's loaded when we have one for this context, also tested with resource/referenceData context at the same time that geographic is enabled.

Screenshots

Peek 11-12-2023 16-21

Checklist:

( * == Mandatory )

  • * I have set myself as assignee of the pull request
  • * My code follows the style guidelines of this project
  • * Linting does not generate new warnings
  • * I have performed a self-review of my own code
  • * I have put the ticket for review, adding the oort-frontend team to the list of reviewers
  • * I have commented my code, particularly in hard-to-understand areas
  • * I have put JSDoc comment in all required places
  • * My changes generate no new warnings
  • * I have included screenshots describing my changes if relevant
  • * I have selected labels in the Pull Request, according to the changes with code brings
  • I have made corresponding changes to the documentation ( if required )
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@RenzoPrats RenzoPrats changed the title feat: started to add geographic context feat/AB#80877_add_logic_to_create_edit_load_page_with_geographic_context Dec 7, 2023
….com-relief:ReliefApplications/ems-backend into feat/AB#80877_add_logic_to_create_edit_load_page_with_geographic_context
fix: avoid the possibility of saving both region and country properties as they are mutually exclusive
refactor: context property build for the dashboard object in order to delete all unecessary lines of code
if (get(item, 'record')) {
uniqueEntries.add((item as any).record.toString());

if ('geographic' in entry && 'geography') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @RenzoPrats , this is the only thing that I don't get, why set && 'geography' in the condition, that is always true right? Is it necessary?

Besides that looks good to me 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @unai-reliefapp, indeed it was useless I think I misspelled it, it's already fixed, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants