Skip to content

[CHORE] - fix core web ts errors#3885

Merged
matbusby-fw merged 2 commits intodevelopfrom
chore-fix-core-web-ts-errors
Apr 10, 2026
Merged

[CHORE] - fix core web ts errors#3885
matbusby-fw merged 2 commits intodevelopfrom
chore-fix-core-web-ts-errors

Conversation

@matbusby-fw
Copy link
Copy Markdown
Collaborator

@matbusby-fw matbusby-fw commented Apr 9, 2026

Summary of Changes

This PR focuses on resolving recurring TypeScript errors and stabilizing snapshot tests that were inconsistently updating in different environments.

1. MineSpace Snapshot Stabilization

Snapshots in the MineSpace-web service were frequently updating locally due to environment-specific locale and timezone differences (specifically regarding date formatting).

  • Core Environment Fix: Standardized the test environment in minespace-web/src/setupTests.js by forcing UTC as the default timezone for both the Node process and moment.
  • Deterministic Formatting: Replaced non-deterministic Date.prototype.toLocaleString() calls with explicit moment().format() in MinespaceAccessRequest.tsx. This ensures that date strings are rendered consistently regardless of the local developer locale.

2. Core-web & Common TypeScript/Logic Cleanup

Resolved several TypeScript errors and React best-practice violations in core-web and @mds/common services.

  • Async Handling: Refactored EditTsfAppointmentForm.tsx to use .unwrap() on dispatched actions for more robust asynchronous result handling.
  • Type Safety:
    • Extended the IPartyAppt interface with missing status and mine_party_acknowledgement_status fields.
    • Resolved selector type mismatches in EngineerOfRecord.tsx and EditPartyModal.tsx by adding appropriate type mapping for getParties and getPartyRelationships.
    • Updated PartySelectField.tsx to use React.ReactNode for labels to improve component compatibility.
  • React Logic Fix: Corrected a logic error in InactiveContact.tsx by moving a <Redirect /> component out of a useEffect hook and into the main render block.

@matbusby-fw matbusby-fw changed the title Chore fix core web ts errors [CHORE] - fix core web ts errors Apr 9, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

Quality Gate Passed Quality Gate passed for 'bcgov-sonarcloud_mds_minespace-web'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
33.3% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

@matbusby-fw matbusby-fw merged commit c9be25b into develop Apr 10, 2026
18 of 19 checks passed
@matbusby-fw matbusby-fw deleted the chore-fix-core-web-ts-errors branch April 10, 2026 16:19
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.

2 participants