[MDS-6648] Add report search to minespace#3742
Conversation
This includes rendering the form with default parameters and verifying it matches the expected output.
…rement created by user disappearing in report name dropdown
| @@ -0,0 +1,335 @@ | |||
| import React, { FC, useEffect, useState, useMemo } from "react"; | |||
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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 => ({ |
There was a problem hiding this comment.
I added this normalizedItems to help deal with the user added report requirements not having a mine_report_definition_guid.
| return "info"; | ||
| } | ||
| }; | ||
|
|
There was a problem hiding this comment.
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.
services/minespace-web/src/components/dashboard/mine/reports/ReportManagement.tsx
Show resolved
Hide resolved
services/minespace-web/src/components/dashboard/mine/reports/ReportsTable.tsx
Outdated
Show resolved
Hide resolved
matbusby-fw
left a comment
There was a problem hiding this comment.
Looking really good. Just left a couple comments that could use addressing.
|
|
|
|
matbusby-fw
left a comment
There was a problem hiding this comment.
Awesome! Looks good!





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 .