[OSDEV-2372] Implement 'Operational Details Submitted by Management' section using claim info#910
Conversation
React App | Jest test suite - Code coverage reportTotal: 43.47%Your code coverage diff: 0.17% ▴ ✅ All code changes are covered |
Dedupe Hub App | Unittest test suite - Code coverage reportTotal: 55.73%Your code coverage diff: 0.00% ▴ ✅ All code changes are covered |
Countries App | Unittest test suite - Code coverage reportTotal: 100%Your code coverage diff: 0.00% ▴ ✅ All code changes are covered |
Contricleaner App | Unittest test suite - Code coverage reportTotal: 98.75%Your code coverage diff: 0.00% ▴ ✅ All code changes are covered |
Django App | Unittest test suite - Code coverage reportTotal: 81.98%Your code coverage diff: 0.00% ▴ ✅ All code changes are covered |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@doc/release/RELEASE-NOTES.md`:
- Around line 55-59: Update the release note to reflect the actual UI behavior:
change the statement that the Operational Details section "only appears when the
production location has an approved claim" to state it appears for any
production location with non-empty claim_info (i.e., any non-pending claim),
matching the logic in ProductionLocationDetailsContent.jsx and
FacilityDetailsContent.jsx where the isClaimed boolean is set true when
claim_info exists regardless of status (APPROVED, DENIED, REVOKED) and only
pending is treated differently.
In
`@src/react/src/components/ProductionLocation/ClaimSection/ClaimDataContainer/ClaimDataContainer.jsx`:
- Around line 34-42: The current filter uses
hasDisplayableValue(field.getValue()), which treats falsy values like 0 as
non-displayable and strips legitimate zero-valued claim fields; update the check
so numeric zeros are allowed (e.g., treat only null/undefined/empty-string as
non-displayable). Locate the display filter around displayableFields and any
other similar filters (the callsite using hasDisplayableValue and
field.getValue()), and replace the predicate with one that returns true for 0
but false for null/undefined/'' (or adjust hasDisplayableValue implementation
accordingly) so fields like female_workers_percentage: 0 render; apply the same
fix to the other identical blocks noted in the file.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 260fa4fa-afdc-4cbd-b44a-6e1fd8c27fbb
📒 Files selected for processing (4)
doc/release/RELEASE-NOTES.mdsrc/react/src/__tests__/components/ClaimDataContainer.test.jssrc/react/src/components/ProductionLocation/ClaimSection/ClaimDataContainer/ClaimDataContainer.jsxsrc/react/src/components/ProductionLocation/ProductionLocationDetailsContent/ProductionLocationDetailsContent.jsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/react/src/components/ProductionLocation/ProductionLocationDetailsContent/ProductionLocationDetailsContent.jsx
...act/src/components/ProductionLocation/ClaimSection/ClaimDataContainer/ClaimDataContainer.jsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/react/src/components/ProductionLocation/ClaimSection/ClaimDataContainer/styles.js (1)
5-7: Consider naming the exported function.SonarCloud flags that the arrow function should be named for better stack traces and debugging. This is a minor improvement.
♻️ Proposed fix
-export default theme => { +const claimDataContainerStyles = theme => { const typography = getTypographyStyles(theme); const spacing = theme.spacing.unit ?? 8; return Object.freeze({-}; +}; + +export default claimDataContainerStyles;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/react/src/components/ProductionLocation/ClaimSection/ClaimDataContainer/styles.js` around lines 5 - 7, The exported anonymous arrow function should be given a name to improve stack traces; rename the default export to a named function (e.g., createClaimDataStyles or getClaimDataStyles) and update the export to "export default createClaimDataStyles" while keeping the internal logic (references to getTypographyStyles, spacing calculation) unchanged so functions like the default export and getTypographyStyles remain easy to locate in stack traces and debugging.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/react/src/components/BadgeClaimed.jsx`:
- Around line 5-11: BadgeClaimed is ignoring incoming fontSize and overflow
props causing callers (e.g., ClaimFacilityIntroStep.jsx) to not be able to
control sizing/overflow; update the BadgeClaimed component signature to accept
fontSize and overflow (in addition to color, viewBox, className) and pass them
through to the SvgIcon element (ensure SvgIcon receives fontSize={fontSize} and
overflow={overflow} or equivalent), keeping the default values (e.g., fontSize
defaulting to 'inherit') so existing uses remain unchanged while allowing
callers to override.
---
Nitpick comments:
In
`@src/react/src/components/ProductionLocation/ClaimSection/ClaimDataContainer/styles.js`:
- Around line 5-7: The exported anonymous arrow function should be given a name
to improve stack traces; rename the default export to a named function (e.g.,
createClaimDataStyles or getClaimDataStyles) and update the export to "export
default createClaimDataStyles" while keeping the internal logic (references to
getTypographyStyles, spacing calculation) unchanged so functions like the
default export and getTypographyStyles remain easy to locate in stack traces and
debugging.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: be857e02-fe65-4124-b9e1-5f6c9f2dcc5f
📒 Files selected for processing (4)
src/react/src/components/BadgeClaimed.jsxsrc/react/src/components/ProductionLocation/ClaimSection/ClaimDataContainer/ClaimDataContainer.jsxsrc/react/src/components/ProductionLocation/ClaimSection/ClaimDataContainer/styles.jssrc/react/src/components/ProductionLocation/Heading/ClaimFlag/ClaimStatusRow.jsx
protsack-stephan
left a comment
There was a problem hiding this comment.
Great work, one small comment from me!
...act/src/components/ProductionLocation/ClaimSection/ClaimDataContainer/ClaimDataContainer.jsx
Show resolved
Hide resolved
|



Implements OSDEV-2372
Implemented the Operational Details section on the Production Location page.