-
Notifications
You must be signed in to change notification settings - Fork 4
Add rotation feature, harvest forms, and fertilizer updates #334
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
Merged
Merged
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
d92a03c
feat: add shadcn/ui scroll area
SvenVw a50bb0f
feat: Show fertilizer icon in the fields table for fertilizers
SvenVw ada7a6a
feat: add a rotation page
SvenVw 5fc1657
feat: add harvest dates to table
SvenVw ca700b8
refactor: improve the code for rotation page
SvenVw 4c0f3c3
refactor: improve search bar
SvenVw 5f05efd
feat: add page for adding fertilizer to multiple fields based on cult…
SvenVw 1dc9d50
feat: add page to add harvest to mutliple fields based on cultivation
SvenVw f974da7
Merge branch 'development' into FDM283
SvenVw c0519a8
Implement fertilizer management route for the cultivation fertilizer …
BoraIneviNMI cef087f
Add fieldIds search param to cultivation plan add fertilizer application
BoraIneviNMI 9c224a3
Also to add harvest
BoraIneviNMI f91b378
Fix wrong path to fields
BoraIneviNMI 044411e
Key using cultivation ids since it is more semantically correct
BoraIneviNMI 64db20d
Catch unharvestable fields early and display a toast notification
BoraIneviNMI eed53b4
Change not harvestable message
BoraIneviNMI ed01393
Implement productive field filter client-side
BoraIneviNMI c978f33
Refactor search
BoraIneviNMI 6bce0bc
Fix filtered column names
BoraIneviNMI d4b9d74
Fix bug with all cultivations showing harvest dates of all cultivatio…
BoraIneviNMI a6b5c4d
Always show the harvest date for cultivations that can only be harves…
BoraIneviNMI d41c554
Implement the confirmation dialog for overwriting a harvest
BoraIneviNMI 7cde4e1
Reset submitted also if the confirmation dialog is rejected
BoraIneviNMI ebd9277
Resolve nitpicks
BoraIneviNMI 3c1d4f6
Use form isSubmitting state instead of manual tracking
BoraIneviNMI 4e9d752
Load existing harvest properly when the cultivation is only harvestab…
BoraIneviNMI 578a34e
Retrieve harvest form default values properly
BoraIneviNMI 99d0e36
Implement harvest delete functionality for cultivation plan
BoraIneviNMI 0e80b74
Merge branch 'development' into FDM283
BoraIneviNMI 2d6ee49
Get b_lu_harvestable, b_lu_start, and b_lu_end from the cultivation a…
BoraIneviNMI 06611ca
Add inline harvest form
BoraIneviNMI b0cb510
Change title and description based on if this is a harvest update on …
BoraIneviNMI 4f641ca
Merge branch 'development' into FDM283
BoraIneviNMI e817ab9
Search in all selected fields for a harvest application
BoraIneviNMI b0cc642
Replace quick action on the front page with cultivation plan
BoraIneviNMI a1efd1f
fix: safe sorting of empty array's
SvenVw d4d8b5b
Get default harvest parameters for all number of allowed harvests
BoraIneviNMI 3ea2fc2
refactor: improve error message for missing harvest parameters
SvenVw 7f74035
Merge remote-tracking branch 'origin/FDM283' into FDM283
SvenVw 477c419
fix: Check for empty object
BoraIneviNMI a1db2e4
refactor: improve Harvest form components name
SvenVw 9299366
Merge remote-tracking branch 'origin/FDM283' into FDM283
SvenVw 50e5e22
fix: Use action in inline harvest form delete
BoraIneviNMI a750a35
refactor: use appropiate sorting functions in rotation table
SvenVw 96f0896
refactot: disable addHarvest button when cultivation is not harvestable
SvenVw a25913c
refactor: improve text on farm dashboard
SvenVw 20875bb
fix: send 400 when cultivation is not known in catalogue
SvenVw cdb16f1
fix: import
SvenVw 877aad7
refactor: improve text
SvenVw a7d459d
fix: confirmation check if first field is not harvested yet
SvenVw d3c673c
fix: Make harvest writes atomic across fields
SvenVw 5504f48
Revert "fix: Make harvest writes atomic across fields"
SvenVw 37f9ec1
fix: Handle the case of no selected fields in loader
BoraIneviNMI 09c5abd
refactor: Improve typechecking in the add harvest to cultivation route
BoraIneviNMI bfff011
refactor: Parallelize add fertilizer api calls in the add fertilizer …
BoraIneviNMI 4e4a0ce
fix: Handle date input prop value of type Date
BoraIneviNMI 813e01b
refactor: Unify how changes in the open state of the selection dialog…
BoraIneviNMI 66d5e74
refactor: Improve the effect that sets the internal state according t…
BoraIneviNMI 0c2b47d
refactor: Do either internal or external state update per render
BoraIneviNMI File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@svenvw/fdm-app": minor | ||
| --- | ||
|
|
||
| Show fertilizer icon in the fields table for fertilizers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@svenvw/fdm-app": minor | ||
| --- | ||
|
|
||
| Add a rotation page that shows per cultivation the details in a table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix unsafe array access in sorting function.
The sorting function accesses
fertilizers[0].p_name_nlwithout checking if the array is empty, which will cause a runtime error when a field has no fertilizers.Apply this diff to safely handle empty arrays:
sortingFn: (rowA, rowB, _columnId) => { const fertilizerA = - rowA.original.fertilizers[0].p_name_nl || "" + rowA.original.fertilizers[0]?.p_name_nl || "" const fertilizerB = - rowB.original.fertilizers[0].p_name_nl || "" + rowB.original.fertilizers[0]?.p_name_nl || "" return fertilizerA.localeCompare(fertilizerB) },📝 Committable suggestion
🤖 Prompt for AI Agents