Skip to content

Feature/horticulture issue#371

Open
KaviSJIT wants to merge 18 commits intocore-stack-org:experimental-featuresfrom
KaviSJIT:feature/horticulture-issue
Open

Feature/horticulture issue#371
KaviSJIT wants to merge 18 commits intocore-stack-org:experimental-featuresfrom
KaviSJIT:feature/horticulture-issue

Conversation

@KaviSJIT
Copy link
Copy Markdown

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.

@Ksheetiz-24 Ksheetiz-24 changed the base branch from development to experimental-features April 1, 2026 11:38
@Ksheetiz-24
Copy link
Copy Markdown
Member

@KaviSJIT can you pull the changes and update your PR so i can merge
Pasting some Git command for reference

git checkout feature/horticulture-issue
git fetch upstream
git merge upstream/experimental-features

resolve conflicts

git push origin feature/horticulture-issue

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.

3 participants