-
Notifications
You must be signed in to change notification settings - Fork 4
Add RVO field synchronization package and import workflows #374
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
118 commits
Select commit
Hold shift + click to select a range
b57842f
feat: Initial version of `fdm-rvo` that that provides the logic for f…
SvenVw c2bdafe
docs: add typedocs and readme for fdm-rvo
SvenVw 81dd1b6
docs: add the reference for fdm-rvo
SvenVw 8fa4cb0
refactor: rename to RVO Import Review
SvenVw fd0a675
feat: Add the option to import fields from RVO in farm create wizard …
SvenVw b901fc7
refactor: move processing the rvo import review results into fdm-rvo
SvenVw 734a751
Merge branch 'development' into FDM373
SvenVw 6a78f3b
refactor: lot of improvements to get rvo import working in fdm-app
SvenVw 7106e77
feat: add Acties to farm overview page
SvenVw 62dff30
fix: use selected calendar instead of current year for requesting fields
SvenVw d93d24a
feat: add importing of cultivation as well
SvenVw 0cb023c
refactor: be consistent with year
SvenVw c851ab1
refactor: more improvements
SvenVw 49d701e
feat: add action to close field if local field is not in rvo list
SvenVw ae7bf72
test: add unit tests for fdm-rvo and include it in the gh actions
SvenVw 8a9c7ef
Merge remote-tracking branch 'origin/development' into FDM373
SvenVw 85b4b9a
fix: improve texts at rvo import
SvenVw faab0b8
feat: add dialog to provide summary and confirm changes
SvenVw 7e43640
fix: ignore fields that have ended before requested
SvenVw c9027a0
fix: improve text for gebruikstitel
SvenVw d4b221b
fix: show continue button in case of no changes
SvenVw e7cd91b
fix
SvenVw dcee237
fix: improve text for not active fields
SvenVw 5c2feca
Merge branch 'development' into FDM373
SvenVw 3e9b915
refactor: improve displaying kvk number and show also when not known
SvenVw 6284eb2
Merge branch 'development' into FDM373
SvenVw 79bca9b
fix: do not set sampling date when using estimates
SvenVw 34f2452
Merge branch 'development' into FDM373
SvenVw a22167b
Merge branch 'development' into FDM373
SvenVw 4e68501
chore: rename the organization
SvenVw 5780878
chore: even more renaming
SvenVw 0e99021
refactor: implement change for breaking change
SvenVw 9409ab6
fix: config issue of fdm-rvo
SvenVw ae2c187
fix: type issues
SvenVw 49ab56e
Merge branch 'development' into FDM373
SvenVw 489f888
fix: lockfile
SvenVw 6d222c6
chore: update fdm-rvo packages
SvenVw 69f765f
feat: request regelingsPercelenMest as well
SvenVw c0a6776
fix: tsbuild
SvenVw eeec06f
feat: add column in rvo fields table if the field is designated as bu…
SvenVw 10d49eb
refactor: modernize and consolidate monorepo ts configuration
SvenVw 70c1c27
fix: fix various issues regarding the merge conflict
SvenVw 043c545
Merge branch 'development' into FDM373
SvenVw 50dcdf0
fix: path for compilier option
SvenVw 80ea3ed
fix: lockfile
SvenVw 97ee246
chore: update fdm-rvo packages
SvenVw 7629e04
fix: request both services
SvenVw 64cc7b7
feat: support collecting information about bufferstrips for a field
SvenVw 1c82ab5
feat: improve page names
SvenVw 327b51b
fix: show buffer strip status
SvenVw 89b67a6
fix: compare buffer strip state
SvenVw 09e6609
refactor: check filepath
SvenVw 654465e
refactor: improve accesibilty
SvenVw 06382bc
fix: typo
SvenVw d5ff3af
refactor: improve state handling
SvenVw f25facc
refactor: improve the button position
SvenVw 378cb89
fix: pnpm version
SvenVw 24ca2a0
fix: typo
SvenVw 903b9bd
chore: remove blank line
SvenVw 20c4623
refactor: move import to top of file
SvenVw 319cb08
refactor: rename and use client side environmental
SvenVw 8b48910
fix: Add path alias for @nmi-agro/fdm-rvo
SvenVw c8fb3c7
fix: pnpm version
SvenVw 5f08e2c
docs: fix
SvenVw 47d82ec
fix: retrieving the rvo-connector package
SvenVw a9a9652
fix: Avoid non-unique "unknown" IDs in review-item
SvenVw 46db84e
fix: set rvoCultivation to undefined for NEW_REMOTE when CropTypeCode…
SvenVw daae303
fix: provide error message in case file reading fails
SvenVw ca23e2b
fix: Handle the "no RVO parcels found" case explicitly
SvenVw 899e0e5
fix: throw readable error
SvenVw 99106a5
fix: Reject invalid calendar params before starting the import
SvenVw 1acd9f3
fix: disabled RVO card is still keyboard-activatable.
SvenVw f7963a6
fix: overly permissive CSP
SvenVw 713dfcd
fix: path checking
SvenVw 3596d6a
fix: error logging
SvenVw f0b567b
refactor: switch to deep check
SvenVw 8007dad
fix: sync version
SvenVw 9df9ddd
docs: explain matching
SvenVw f8c03ad
fix: improve checks
SvenVw 292592e
refactor: create shared function for rvoClient creation
SvenVw 093938a
refactor: use shared function to parseBufferstrips
SvenVw d46f986
refactor: improve types
SvenVw 13a9378
refactor: use fixed types
SvenVw 4e317d3
refactor: add null check
SvenVw 6e066cd
refacoctor: remove unused import
SvenVw 0cb6ca8
fix: parameter mismatch
SvenVw 07659a0
fix: Treat null/undefined as equal if both are missing
SvenVw 5557e77
refactor: add fallback in case no start date
SvenVw 2698c45
refactor: add year validation
SvenVw 51d7ad5
fix: initial value is unused
SvenVw 5bcbb14
tests: fix
SvenVw e5b74c2
refactor: improve tsconfig
SvenVw 7eb98c8
refactor: more improvements to tsconfig
SvenVw d53a9ac
refactor: implement review feedback
SvenVw b37e24f
fixes
SvenVw 2b41552
Merge branch 'development' into FDM373
SvenVw 98207cf
refactor: remove unused parameter
SvenVw 25eb409
refactor: use consistent response
SvenVw 485193b
fix: typo
SvenVw dbfce9a
refactor: use consistent imports
SvenVw d22dc68
refactor: use transactions to process RVO fields
SvenVw 82a13e5
fix: build with code split
SvenVw b9d39d8
Merge branch 'development' into FDM373
SvenVw 97af0a1
fix: add missing year validation
SvenVw 0f259fc
refactor: remove useless assignment
SvenVw 25e7402
refactor: Simplify conditional rendering.
SvenVw 3d3762f
feat: add warning if user tries to refresh rvo page and thus data nee…
SvenVw 89f208c
refactor: remove duplicate env
SvenVw 3b833e9
refactor: reorder envs
SvenVw 21d8953
refactor: guard against no kvk
SvenVw 44c96b5
docs: update readme
SvenVw eb0fa45
fix: update cultivation when missing
SvenVw a9d4045
refactor: add validation
SvenVw 1cf04e6
docs: fix
SvenVw 99c76d0
refactor: use consistent naming
SvenVw f237b59
test: fix
SvenVw 3e287bf
docs: improvements
SvenVw d6a9091
docs: another improvement
SvenVw 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
Some comments aren't visible on the classic Files Changed page.
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 @@ | ||
| --- | ||
| "@nmi-agro/fdm-app": minor | ||
| --- | ||
|
|
||
| Add the option to import fields from RVO in farm create wizard and also at the fields page of the farm |
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 @@ | ||
| --- | ||
| "@nmi-agro/fdm-docs": minor | ||
| --- | ||
|
|
||
| Add the reference for fdm-rvo |
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 @@ | ||
| --- | ||
| "@nmi-agro/fdm-rvo": minor | ||
| --- | ||
|
|
||
| Initial version of `fdm-rvo` that provides the logic for fdm-app to connect to RVO and sync fields with fdm-core |
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
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 |
|---|---|---|
| @@ -1,4 +1,2 @@ | ||
| sync-injected-deps-after-scripts[]=build | ||
| link-workspace-packages=true | ||
| @nmi-agro:registry=https://npm.pkg.github.com | ||
| //npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import { getFertilizerParametersDescription, type Fertilizer } from "@nmi-agro/fdm-core" | ||
|
|
||
| /** | ||
| * Retrieves RVO label and type mappings used across fertilizer forms and summaries. | ||
| * Centralizes the assembly of RVO metadata from the parameter descriptions and available fertilizers. | ||
| * | ||
| * @param fertilizers - Optional array of fertilizers to build the RVO-to-Type mapping for dynamic badge colors. | ||
| * @returns An object containing: | ||
| * - `rvoLabels`: A record mapping RVO codes to their descriptive labels (in Dutch). | ||
| * - `rvoToType`: A record mapping RVO codes to fertilizer types (manure, compost, etc.). | ||
| */ | ||
| export async function getRvoMappings(fertilizers: Partial<Fertilizer>[] = []) { | ||
| const fertilizerParameterDescription = | ||
| await getFertilizerParametersDescription("NL-nl") | ||
| const p_type_rvo_options = | ||
| fertilizerParameterDescription.find((x) => x.parameter === "p_type_rvo") | ||
| ?.options ?? [] | ||
|
|
||
| const rvoLabels = Object.fromEntries( | ||
| p_type_rvo_options.map((opt) => [String(opt.value), opt.label]), | ||
| ) | ||
|
|
||
| const rvoToType: Record<string, string> = {} | ||
| for (const f of fertilizers) { | ||
| if (f.p_type_rvo && f.p_type) { | ||
| rvoToType[f.p_type_rvo] = f.p_type | ||
| } | ||
| } | ||
|
|
||
| return { rvoLabels, rvoToType } | ||
| } |
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.
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.
Uh oh!
There was an error while loading. Please reload this page.