Skip to content

[MDS-6648] Add report search to minespace#3742

Merged
asinn134 merged 9 commits intodevelopfrom
mds-6648-improve-core-minespace-report-search
Nov 21, 2025
Merged

[MDS-6648] Add report search to minespace#3742
asinn134 merged 9 commits intodevelopfrom
mds-6648-improve-core-minespace-report-search

Conversation

@asinn134
Copy link
Collaborator

@asinn134 asinn134 commented Nov 19, 2025

Objective

MDS-6648

  • Added report search to Minespace

  • In the Report Name search filter dropdown, added mine_report_permit_requirements report names that are associated with a mine report .

image

@@ -0,0 +1,335 @@
import React, { FC, useEffect, useState, useMemo } from "react";
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was moved from core to the common directory, most of it is the same. I'll do my best to list out all the new additions.

const isCore = useAppSelector(getIsCore);
const shouldShowReportNameFilter = (isCore && mineReportType === Strings.MINE_REPORTS_TYPE.codeRequiredReports) || !isCore;
const shouldShowPermitFilter = (isCore && mineReportType === Strings.MINE_REPORTS_TYPE.permitRequiredReports) || !isCore;
const reportTypeOptions = isCore
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this reportTypeOptions variable here so that in minespace the report category options and permit condition category options will show up in the same mine report type drop down.

...(dropdownPermitConditionCategoryOptions ?? []),
];

const getReportRequirementsAssociatedWithAMineReport = (permits, mineReports) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this getReportRequirementsAssociatedWithAMineReport function to help figure out which report requirement is associated with a mine report

mineReportDefinitionOptionsFiltered = [...mineReportDefinitionOptionsFiltered, ...reportRequirementsAssociatedWithAMineReport];
}

const normalizedItems = mineReportDefinitionOptionsFiltered.map(item => ({
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this normalizedItems to help deal with the user added report requirements not having a mine_report_definition_guid.

return "info";
}
};

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This handleFiltering function was moved from the core MineReportInfo.tsx file to the common directory. It is pretty much the same but with some changes to the parameters the function accepts to make it work in the common directory.

Copy link
Collaborator

@matbusby-fw matbusby-fw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good. Just left a couple comments that could use addressing.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_minespace-web'

Failed conditions
73.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_common'

Failed conditions
46.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@asinn134 asinn134 requested a review from matbusby-fw November 20, 2025 23:54
@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_core-api'

Failed conditions
58.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copy link
Collaborator

@matbusby-fw matbusby-fw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Looks good!

@asinn134 asinn134 merged commit d2ab277 into develop Nov 21, 2025
17 of 20 checks passed
@asinn134 asinn134 deleted the mds-6648-improve-core-minespace-report-search branch November 21, 2025 19:42
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