Skip to content

fix(ui): display missing OpenAPI fields in ManageDataTables, RolesAndPermissions and Users pages#97

Open
deepthikolipaka wants to merge 2 commits intoopenMF:devfrom
deepthikolipaka:fix/display-missing-openapi-fields-in-ui
Open

fix(ui): display missing OpenAPI fields in ManageDataTables, RolesAndPermissions and Users pages#97
deepthikolipaka wants to merge 2 commits intoopenMF:devfrom
deepthikolipaka:fix/display-missing-openapi-fields-in-ui

Conversation

@deepthikolipaka
Copy link

@deepthikolipaka deepthikolipaka commented Mar 16, 2026

Summary

Fixed 3 pages that were showing hardcoded 'Missing in OpenApi'
text by replacing them with actual field values.

Problem

Several pages had placeholder text instead of real data because
fields were missing from the OpenAPI spec.

Changes

  • ManageDataTables.tsx → display entitySubType field
  • RolesAndPermissions.tsx → display disabled status as 'Enabled'/'Disabled'
  • Users.tsx → display isSelfServiceUser as 'Yes'/'No'

Related

Summary by CodeRabbit

  • Bug Fixes
    • Fixed placeholder text appearing in system management tables
    • "Sub Type" column now displays actual entity data
    • Role "Status" column now shows correct enabled/disabled state
    • User "Is Self Service" column now displays accurate service status

@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

📝 Walkthrough

Walkthrough

This PR updates three table columns across different pages to display actual data values instead of placeholder strings. The "Sub Type" column now shows entity subtype data, the "Status" column displays enabled/disabled state, and the "Is Self Service" column shows yes/no based on user properties.

Changes

Cohort / File(s) Summary
Table Column Data Display Updates
src/pages/system/manage-data-tables/ManageDataTables.tsx, src/pages/system/roles-and-permissions/RolesAndPermissions.tsx, src/pages/users/Users.tsx
Replaced static placeholder strings with actual data property rendering: "Sub Type" now displays entitySubType with fallback to '—', "Status" conditionally shows "Disabled"/"Enabled" based on disabled flag, and "Is Self Service" displays "Yes"/"No" based on isSelfServiceUser property.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 Hopping through tables with glee,
Swapping placeholders for what we see—
Data now real, no "Missing" fakes,
Every cell the right value makes! 🐇✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and clearly summarizes the main change: replacing hardcoded placeholders with actual OpenAPI field values across three UI pages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can approve the review once all CodeRabbit's comments are resolved.

Enable the reviews.request_changes_workflow setting to automatically approve the review once all CodeRabbit's comments are resolved.

@gkbishnoi07
Copy link
Collaborator

Please create a Jira ticket for this task, or link the existing one if it already exists.

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 `@src/pages/system/roles-and-permissions/RolesAndPermissions.tsx`:
- Line 178: The current status rendering in RolesAndPermissions.tsx uses (role
as any).disabled ? 'Disabled' : 'Enabled', which treats undefined as "Enabled";
change the logic to explicitly check for true/false on role.disabled (e.g.,
role.disabled === true ? 'Disabled' : role.disabled === false ? 'Enabled' :
'Unknown') so missing/undefined values render 'Unknown' instead of defaulting to
Enabled; update the component where the status is computed/rendered (the
expression referencing (role as any).disabled) to use this explicit three-way
check.

In `@src/pages/users/Users.tsx`:
- Line 196: The current JSX always shows "No" when isSelfServiceUser is missing;
update the render for (user as any).isSelfServiceUser so it displays 'Yes' only
if the value is === true, 'No' only if === false, and 'Unknown' when the field
is null/undefined or not a boolean. Locate the expression "(user as
any).isSelfServiceUser" in Users.tsx and replace the single ternary with a
boolean-type check (e.g. typeof === 'boolean') to decide between 'Yes'/'No' and
fall back to 'Unknown'; also consider using the typed user property instead of
casting to any if available.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d455f8c0-89a8-489e-b2a5-2acfa4395d2d

📥 Commits

Reviewing files that changed from the base of the PR and between f448968 and 6ae5017.

📒 Files selected for processing (3)
  • src/pages/system/manage-data-tables/ManageDataTables.tsx
  • src/pages/system/roles-and-permissions/RolesAndPermissions.tsx
  • src/pages/users/Users.tsx

</TableCell>
<TableCell className="px-6 py-4">
{'missing in OpenApi'}
{(role as any).disabled ? 'Disabled' : 'Enabled'}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Do not map unknown disabled values to “Enabled” (Line 178).

If disabled is absent/undefined, the current ternary renders “Enabled”, which is a misleading status. Handle explicit true/false and fall back to unknown.

Suggested change
- {(role as any).disabled ? 'Disabled' : 'Enabled'}
+ {(role as any).disabled === true
+   ? 'Disabled'
+   : (role as any).disabled === false
+     ? 'Enabled'
+     : '—'}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{(role as any).disabled ? 'Disabled' : 'Enabled'}
{(role as any).disabled === true
? 'Disabled'
: (role as any).disabled === false
? 'Enabled'
: '—'}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/system/roles-and-permissions/RolesAndPermissions.tsx` at line 178,
The current status rendering in RolesAndPermissions.tsx uses (role as
any).disabled ? 'Disabled' : 'Enabled', which treats undefined as "Enabled";
change the logic to explicitly check for true/false on role.disabled (e.g.,
role.disabled === true ? 'Disabled' : role.disabled === false ? 'Enabled' :
'Unknown') so missing/undefined values render 'Unknown' instead of defaulting to
Enabled; update the component where the status is computed/rendered (the
expression referencing (role as any).disabled) to use this explicit three-way
check.

</TableCell>
<TableCell className="px-6 py-4 text-zinc-700 dark:text-zinc-200">
{'Missing in OpenApi'}
{(user as any).isSelfServiceUser ? 'Yes' : 'No'}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Avoid defaulting unknown isSelfServiceUser to “No” (Line 196).

When the field is missing/null, this currently renders “No”, which is inaccurate. Render Yes/No only for explicit booleans, otherwise show unknown.

Suggested change
- {(user as any).isSelfServiceUser ? 'Yes' : 'No'}
+ {(user as any).isSelfServiceUser === true
+   ? 'Yes'
+   : (user as any).isSelfServiceUser === false
+     ? 'No'
+     : '—'}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{(user as any).isSelfServiceUser ? 'Yes' : 'No'}
{(user as any).isSelfServiceUser === true
? 'Yes'
: (user as any).isSelfServiceUser === false
? 'No'
: '—'}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/users/Users.tsx` at line 196, The current JSX always shows "No"
when isSelfServiceUser is missing; update the render for (user as
any).isSelfServiceUser so it displays 'Yes' only if the value is === true, 'No'
only if === false, and 'Unknown' when the field is null/undefined or not a
boolean. Locate the expression "(user as any).isSelfServiceUser" in Users.tsx
and replace the single ternary with a boolean-type check (e.g. typeof ===
'boolean') to decide between 'Yes'/'No' and fall back to 'Unknown'; also
consider using the typed user property instead of casting to any if available.

Copy link
Collaborator

@gkbishnoi07 gkbishnoi07 left a comment

Choose a reason for hiding this comment

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

your one workflow is failing please fix it

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