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

Backend and Frontend Fixes for Transplanting Report #615

Conversation

FutzMonitor
Copy link
Collaborator

@FutzMonitor FutzMonitor commented Jan 16, 2023

Pull Request Description

Closes #562. This issue makes some changes to the updateRow function located in the Transplanting Report HTML file [here]. 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 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 for its contents.

1. Simplified some existing code
2. Removed the ability to edit bed feet because the data structure doesn't have that quantity in its data
3. Added the ability to edit row/bed because the data structure does have this in its qunatity data
4. Backend now supports quantity changes but fails to update correctly when a quantity and area change is made at the same time.
Database Rebuilt
1. Rebuilt for testing purposes (this is inefficient, and I'll have to think of another way of fixing these logs (maybe make dummy logs? I can't though because no transplanting form exists...)
1. Removed a space between a function header and the body of the function.
2. Was closely looking at the CustomTableComponent because at some point I must've changed the emit event name for the cancellation of an edit without realizing it and updating it for the report pages.
Seeding Report Page Changes
1. Changes the receiver for the cancellation of a cancel button event. This fixed a bug where editing once permanently disabled the filters.
Transplatning Report Page Changes
1. Changes the receiver for the cancellation of a cancel button event. This fixed a bug where editing once permanently disabled the filters.
2. Updated the updateRow function to properly update the backend and frontend.
@FutzMonitor FutzMonitor changed the title Fix transplanting backend Backend and Frontend Fixes for Transplanting Report Jan 16, 2023
@braughtg
Copy link
Member

I don't think we want the zipped database (docker/db.sample.tar.bz2) committed here. Is there a reason that it needs to be?

@FutzMonitor
Copy link
Collaborator Author

Those changes should be gone from this PR now.

@braughtg braughtg merged commit 363ec3e into DickinsonCollege:main Jan 18, 2023
@FutzMonitor FutzMonitor deleted the fixTransplantingBackend branch January 18, 2023 18:54
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.

Transplanting Report: Editing Transplanting Logs Does not Update them in the Backend
2 participants