Skip to content

[OSDEV-2372] Implement 'Operational Details Submitted by Management' section using claim info#910

Merged
VadimKovalenkoSNF merged 19 commits intomainfrom
OSDEV-2372-operational-details-claim
Mar 12, 2026
Merged

[OSDEV-2372] Implement 'Operational Details Submitted by Management' section using claim info#910
VadimKovalenkoSNF merged 19 commits intomainfrom
OSDEV-2372-operational-details-claim

Conversation

@VadimKovalenkoSNF
Copy link
Contributor

@VadimKovalenkoSNF VadimKovalenkoSNF commented Mar 10, 2026

Implements OSDEV-2372

Implemented the Operational Details section on the Production Location page.

@VadimKovalenkoSNF VadimKovalenkoSNF self-assigned this Mar 10, 2026
@barecheck
Copy link

barecheck bot commented Mar 10, 2026

React App | Jest test suite - Code coverage report

Total: 43.47%

Your code coverage diff: 0.17% ▴

✅ All code changes are covered

@barecheck
Copy link

barecheck bot commented Mar 10, 2026

Dedupe Hub App | Unittest test suite - Code coverage report

Total: 55.73%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@barecheck
Copy link

barecheck bot commented Mar 10, 2026

Countries App | Unittest test suite - Code coverage report

Total: 100%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@barecheck
Copy link

barecheck bot commented Mar 10, 2026

Contricleaner App | Unittest test suite - Code coverage report

Total: 98.75%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@barecheck
Copy link

barecheck bot commented Mar 10, 2026

Django App | Unittest test suite - Code coverage report

Total: 81.98%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between a2bb7a1 and 6beb1eb.

📒 Files selected for processing (4)
  • doc/release/RELEASE-NOTES.md
  • src/react/src/__tests__/components/ClaimDataContainer.test.js
  • src/react/src/components/ProductionLocation/ClaimSection/ClaimDataContainer/ClaimDataContainer.jsx
  • src/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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6beb1eb and f1c129d.

📒 Files selected for processing (4)
  • src/react/src/components/BadgeClaimed.jsx
  • src/react/src/components/ProductionLocation/ClaimSection/ClaimDataContainer/ClaimDataContainer.jsx
  • src/react/src/components/ProductionLocation/ClaimSection/ClaimDataContainer/styles.js
  • src/react/src/components/ProductionLocation/Heading/ClaimFlag/ClaimStatusRow.jsx

Copy link
Collaborator

@protsack-stephan protsack-stephan left a comment

Choose a reason for hiding this comment

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

Great work, one small comment from me!

@sonarqubecloud
Copy link

Copy link
Contributor

@vlad-shapik vlad-shapik left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants