Skip to content

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

Open
deepthi-kolipaka wants to merge 4 commits into
openMF:devfrom
deepthi-kolipaka:fix/display-missing-openapi-fields-in-ui
Open

fix(ui): display missing OpenAPI fields in ManageDataTables, RolesAndPermissions and Users pages#97
deepthi-kolipaka wants to merge 4 commits into
openMF:devfrom
deepthi-kolipaka:fix/display-missing-openapi-fields-in-ui

Conversation

@deepthi-kolipaka
Copy link
Copy Markdown

@deepthi-kolipaka deepthi-kolipaka 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 shows actual entity sub-type or a clear fallback.
    • Role "Status" column now shows Disabled/Enabled/Unknown appropriately.
    • User "Is Self Service" column now displays Yes/No or a clear fallback.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b1449bba-5743-4635-80cd-21856c296b67

📥 Commits

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

📒 Files selected for processing (2)
  • src/pages/system/roles-and-permissions/RolesAndPermissions.tsx
  • src/pages/users/Users.tsx
✅ Files skipped from review due to trivial changes (2)
  • src/pages/system/roles-and-permissions/RolesAndPermissions.tsx
  • src/pages/users/Users.tsx

📝 Walkthrough

Walkthrough

This PR replaces placeholder text in three table columns with actual data-driven values: the "Sub Type" column shows entitySubType or '—'; the "Status" column shows "Disabled", "Enabled", or "Unknown" based on disabled; the "Is Self Service" column shows 'Yes', 'No', or '—' from isSelfServiceUser.

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 ("Missing in OpenApi") with conditional rendering of actual properties: entitySubType (fallback '—'), disabled"Disabled"/"Enabled"/"Unknown", and isSelfServiceUser'Yes'/'No'/'—'.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • gkbishnoi07

Poem

🐰 Hopped into tables, ears all a-twitch,

Replaced the "Missing" with actual pitch.
Subtypes, statuses, self-service true,
Now each cell whispers what data knew. 🥕✨

🚥 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 clearly and accurately describes the main changes: 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.

@gkbishnoi07
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown

@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

Comment thread src/pages/system/roles-and-permissions/RolesAndPermissions.tsx Outdated
Comment thread src/pages/users/Users.tsx Outdated
Copy link
Copy Markdown
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

@deepthi-kolipaka
Copy link
Copy Markdown
Author

@gkbishnoi07 Thank you for the review! I have addressed all the feedback:

  1. Fixed disabled field to handle undefined/null values explicitly - now shows 'Disabled', 'Enabled', or 'Unknown'
  2. Fixed isSelfServiceUser field to handle undefined/null values - now shows 'Yes', 'No', or '—'
  3. Regarding the Jira ticket - I am a GSoC contributor applicant and don't have access to create Jira tickets yet. Could you please help me create one or grant access?

Please let me know if any further changes are needed!

@DavidH-1
Copy link
Copy Markdown
Contributor

CLA check = failed Please sign our CLA so this can be considered

@DavidH-1
Copy link
Copy Markdown
Contributor

You have not included a Jira ticket in title as @gkbishnoi07 highlighted

@gkbishnoi07
Copy link
Copy Markdown
Collaborator

@deepthikolipaka any updates? are you still working on 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.

3 participants