Skip to content

fix: Update LandingPage.tsx#286

Merged
barrfalk merged 1 commit into
mainfrom
TICDI-139
Jun 22, 2026
Merged

fix: Update LandingPage.tsx#286
barrfalk merged 1 commit into
mainfrom
TICDI-139

Conversation

@barrfalk

@barrfalk barrfalk commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix document type dropdown for RIGHT-OF-WAY files with BCHMA LICENCE schedules

Problem
Document types containing the word "Licence" in their name were being excluded from the dropdown for all non-LICENCE file types. This was correct for most cases, but broke for RIGHT-OF-WAY files that legitimately use the following BCHMA schedule documents:

BCHMA SCHEDULE B - UTILITY LICENCE
BCHMA SCHEDULE D - ROADWAY LICENCE (note: two spaces before the hyphen, matching the DOG)
BCHMA SCHEDULE H - STANDARD LICENCE
BCHMA SCHEDULE H2 - STANDARD LICENCE SPECIAL TERMS
These documents were not appearing in the dropdown when a user loaded a RIGHT-OF-WAY file.

Root Cause
The existing filter in LandingPage.tsx uses a naming convention heuristic — any document type whose name contains "licence" is hidden for non-LICENCE files. There is no database relationship between document types and file tenure types. The four BCHMA schedules listed above contain "LICENCE" in their names but are valid for RIGHT-OF-WAY files, making them an edge case the heuristic didn't account for.

Solution
Added a whitelist of the four affected document type names. When the file TYPE is RIGHT-OF-WAY, the dropdown filter now:

Excludes all LEASE document types (unchanged)
Excludes LICENCE document types except the four whitelisted BCHMA schedules
Includes all other (non-lease, non-licence) document types (unchanged)
All existing LEASE and LICENCE file behaviour is unchanged.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist

  • I have read the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have already been accepted and merged

Further comments


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

@barrfalk
barrfalk merged commit c6cb3bd into main Jun 22, 2026
12 checks passed
@barrfalk
barrfalk deleted the TICDI-139 branch June 22, 2026 22:05
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.

1 participant