[MDS-6741] - View Mine Report Definition Button Does Nothing#3786
[MDS-6741] - View Mine Report Definition Button Does Nothing#3786matbusby-fw merged 3 commits intodevelopfrom
Conversation
services/core-web/src/components/admin/complianceCodes/AddReportDefinitionForm.tsx
Outdated
Show resolved
Hide resolved
| const reportDefinition = reportDefinitions.find( | ||
| (r) => r.mine_report_definition_guid === record.mine_report_definition_guid | ||
| ); | ||
| if (!reportDefinition) { |
There was a problem hiding this comment.
I'm wondering if there is a scenario where reportDefinition isn't found. Like, the table data is the (transformed, but not filtered) reportDefinitions, and the record is part of that list.
There was a problem hiding this comment.
Yes, I ran into some problems there testing locally which is why I added this, but I forgot to add an early return with the notification. Added that now.
There was a problem hiding this comment.
Hmm, I'm just looking at the transformData where the record is defined. I don't think it should be necessary to do reportDefinitions.find at all because of how transformData does a spread to copy the whole object into the table record. I wonder if there's something else strange going on here
|


It seems we never implemented the view modal for viewing a mine report definition. Converted the existing create modal to have an optional view only mode
Objective
MDS-6741