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

LF-4554 Adjust frontend task view to handle tasks with no locations #3560

Conversation

kathyavini
Copy link
Collaborator

@kathyavini kathyavini commented Dec 3, 2024

Description

Minor frontend view changes needed to work with tasks with no locations:

  1. Task card selector logic should specify "No location" instead of the fallback "Multiple locations"
  2. Readonly view should only show the map if pins or locations are associated with the task
  3. [TBD, code not yet pushed] Filter by location logic should exclude tasks that have no location instead of matching them to every location - Will create a fresh ticket to address the nice-to-have filter updates; not included here

Jira link: https://lite-farm.atlassian.net/browse/LF-4554

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Passes test case
  • UI components visually reviewed on desktop view
  • UI components visually reviewed on mobile view
  • Other (please explain)

You can view tasks without locations on the branch without GET, or by adding this line to the taskEntitiesSelector to remove locations from custom tasks once they have already been fetched:

if (farm_id) {
  taskEntities[task_id].locations = [];
}

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • 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
  • The precommit and linting ran successfully
  • I have added or updated language tags for text that's part of the UI
  • I have added "MISSING" for all new language tags to languages I don't speak
  • I have added the GNU General Public License to all new files

@kathyavini kathyavini requested review from a team as code owners December 3, 2024 06:55
@kathyavini kathyavini requested review from antsgar and Duncan-Brain and removed request for a team December 3, 2024 06:55
@kathyavini kathyavini self-assigned this Dec 3, 2024
@kathyavini kathyavini marked this pull request as draft December 3, 2024 06:55
@kathyavini kathyavini added the enhancement New feature or request label Dec 3, 2024
@kathyavini kathyavini marked this pull request as ready for review December 3, 2024 17:00
@kathyavini kathyavini added the new translations New translations to be sent to CrowdIn are present label Dec 3, 2024
SayakaOno
SayakaOno previously approved these changes Dec 3, 2024
Copy link
Collaborator

@antsgar antsgar left a comment

Choose a reason for hiding this comment

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

Awesome!! 🙌

@antsgar antsgar added this pull request to the merge queue Dec 3, 2024
Merged via the queue into integration with commit 4ccd6ba Dec 3, 2024
5 checks passed
@antsgar antsgar deleted the LF-4554-adjust-frontend-task-view-to-handle-tasks-with-no-locations branch December 3, 2024 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new translations New translations to be sent to CrowdIn are present
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants