-
Notifications
You must be signed in to change notification settings - Fork 138
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
Comments
Potentially split this issue into two. One for adding the payload to the |
The |
__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.
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. |
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 theedit-clicked
emit so that it emits theid
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.
The text was updated successfully, but these errors were encountered: