Feature/horticulture issue#371
Open
KaviSJIT wants to merge 18 commits intocore-stack-org:experimental-featuresfrom
Open
Feature/horticulture issue#371KaviSJIT wants to merge 18 commits intocore-stack-org:experimental-featuresfrom
KaviSJIT wants to merge 18 commits intocore-stack-org:experimental-featuresfrom
Conversation
…orestation, legends of dryspell and rainfall and legneds of surface water trend)
…ent" loader get freeze in generating tehsil level data for west bengal
Ksheetiz-24
approved these changes
Apr 1, 2026
Member
|
@KaviSJIT can you pull the changes and update your PR so i can merge git checkout feature/horticulture-issue resolve conflictsgit push origin feature/horticulture-issue |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR fixes a runtime error triggered when navigating from the project selection screen without a valid project selected.
Previously, the navigation handlers in the AgroHorticulture and Waterbody Rejuvenation dashboards allowed execution to continue when only the organization was selected. In that state, the code attempted to access project.value, resulting in the error: Cannot read properties of null (reading 'value').
What was fixed
Added proper validation to ensure both organization and project are selected before navigation.
Prevented project loading logic from running when no organization is selected.
Disabled the action buttons until the required selections are available.
Applied the same safeguard consistently in both:
AgroHorticulture.jsx
RWBDashboard.jsx
Impact
Prevents null-reference crashes on /agrohorticulture and the corresponding waterbody dashboard flow.
Improves form-state handling and makes the UI behavior clearer for users.
Ensures navigation only happens when the selection state is complete and valid.
Testing
Verified that the action button remains disabled until both organization and project are selected.
Verified that clicking the button after valid selection proceeds without runtime errors.