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

Seeding Report: Filtering Area Name Arrays Depending on Seeding Log #585

Open
FutzMonitor opened this issue Dec 8, 2022 · 4 comments · May be fixed by #628
Open

Seeding Report: Filtering Area Name Arrays Depending on Seeding Log #585

FutzMonitor opened this issue Dec 8, 2022 · 4 comments · May be fixed by #628
Assignees
Labels
enhancement Improvement to the project UI/UX User Interface / User Experience Improvement

Comments

@FutzMonitor
Copy link
Collaborator

FutzMonitor commented Dec 8, 2022

This issue should be addressed after issue #588 has been closed.

Current Functionality

When you edit a row in the Seeding Report page all crops and areas are listed in the dropdowns. This doesn't make sense because it allows users to place a tray seeding in a field area while also allowing a direct seeding change the area to designated tray seeding spaces. Additionally, some crops are exclusively tray/direct seeded, so users shouldn't be allowed to change a tray seeding to a crop that's exclusively direct seeded and vice-versa for direct seeding.

Desire Functionality

Some filterable functionality needs to be added into the computed methods of the Seeding Report page that changes the dropdown options according to the log's seeding type. If it's a direct seeding only display the possible, relevant options for direct seedings and vice-versa for tray seeding. This will require changes to the CustomTableComponent.js which will necessitate updates to the CustomTableComponent.spec.comp.js to test this new functionality. The changes would be adding a payload to the edit-clicked emit so that it emits the id of the log being edited. Then the parent page can determine the options of the dropdown based on some information located in that log's data (in this case, the seeding type).

Greater Issue

This issue deals with some of the questions asked in issue #466.

What should be editable?
This applies to many things in the project: columns in the report pages, the flow of editing (i.e when a planting log is changed does its associated logs update? Should you even be able to update planting logs?). There are many questions surrounding editing that need to be addressed as a whole moving forward so that we follow good practices in pages and avoid larger problems of creating inconsistent logs.

Author's Note

This issue has been changed to only address filtering areas. Although there are crops that are directly seeded into the ground and directly seeded into the greenhouse, we haven't had that conversation yet and implementing that feature would require some additional conversations about potentially modifying crops to contain some additional data to that details whether they're strictly tray/direct seeds. Additionally, maybe we allow admins to have a list they can modify that's available to all pages that details which seeds are tray/direct only. Hence, this is a much larger topic that needs to be discussed as team and with input from Matt to gain some insights on crop seeding.

@braughtg braughtg changed the title Seeding Report: Filtering Area/Crop Name Arrays Depending on Seeind Log Seeding Report: Filtering Area/Crop Name Arrays Depending on Seeing Log Dec 10, 2022
@braughtg
Copy link
Member

Potentially split this issue into two. One for adding the payload to the edit-clicked event and testing that. This can be done independent of any other changes as the payload will just be ignored by current code. Then a second issue, for using that payload in the seeding report page to make the dropdown menus for area and crops context sensitive.

@braughtg braughtg added enhancement Improvement to the project UI/UX User Interface / User Experience Improvement labels Dec 12, 2022
@FutzMonitor
Copy link
Collaborator Author

The edited-click changes mentioned in the issue are no longer necessary to fulfill this issue but are necessary to complete it. That is, this issue should follow after the closing of #588.

@FutzMonitor FutzMonitor changed the title Seeding Report: Filtering Area/Crop Name Arrays Depending on Seeing Log Seeding Report: Filtering Area/Crop Name Arrays Depending on Seeding Log Dec 20, 2022
braughtg pushed a commit that referenced this issue Jan 18, 2023
__Pull Request Description__

Closes #562. This issue makes some changes to the `updateRow` function
located in the Transplanting Report HTML file
[[here](https://github.com/FarmData-2-Dev-Team-2022/FarmData2/blob/fixTransplantingBackend/farmdata2/farmdata2_modules/fd2_barn_kit/transplantingReport/transplantingReport.html)].
These changes are not accompanied by any Cypress e2e testing as that is
a separate issue to be addressed in issue #578. As a result, these
changes have been tested by sight using Hoppscotch.

Additionally, this PR makes a quick fix of the filters for both the
Seeding Report and Transplanting Report where editing once would
permanently disable the filters until the page was refreshed because the
name of the edit cancellation event was changed and the pages were not
updated accordingly to reflect this change.

This PR also brings up the topic of #585 (and #466) of what should be
edit-able. I disabled the ability to edit `bed feet` in the
Transplanting Report because transplanting logs don't have quantity data
for `bed feet` but also enabled the ability to edit `row/bed` because
that does exist in the logs' quantity data. However, should users be
allowed to edit that data? This is beyond the scope of this PR but
wanted to quickly mention this quick thought that occurred to me whilst
making this fix.

---
__Licensing Certification__

FarmData2 is a [Free Cultural
Work](https://freedomdefined.org/Definition) and all accepted
contributions are licensed as described in the LICENSE.md file. This
requires that the contributor holds the rights to do so. By submitting
this pull request __I certify that I satisfy the terms of the [Developer
Certificate of Origin](https://developercertificate.org/)__ for its
contents.
@FutzMonitor
Copy link
Collaborator Author

The edited-click changes mentioned in the issue are no longer necessary to fulfill this issue but are necessary to complete it. That is, this issue should follow after the closing of #588.

This condition has been met via the merging of #604.
I'll take a look at this issue.

@FutzMonitor
Copy link
Collaborator Author

FutzMonitor commented Mar 4, 2023

Would it be worthwhile to create a separate issue for filtering areas in the Transplanting report so only field areas are displayed? Since the seeds have been transplanted there shouldn't be an option for users to change the area back to a greenhouse area.

@FutzMonitor FutzMonitor changed the title Seeding Report: Filtering Area/Crop Name Arrays Depending on Seeding Log Seeding Report: Filtering Area Name Arrays Depending on Seeding Log Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to the project UI/UX User Interface / User Experience Improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants