fix(ui): display missing OpenAPI fields in ManageDataTables, RolesAndPermissions and Users pages#97
Conversation
…Permissions and Users pages
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughThis PR replaces placeholder text in three table columns with actual data-driven values: the "Sub Type" column shows Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Please create a Jira ticket for this task, or link the existing one if it already exists. |
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 `@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
📒 Files selected for processing (3)
src/pages/system/manage-data-tables/ManageDataTables.tsxsrc/pages/system/roles-and-permissions/RolesAndPermissions.tsxsrc/pages/users/Users.tsx
gkbishnoi07
left a comment
There was a problem hiding this comment.
your one workflow is failing please fix it
…thub.com/deepthikolipaka/mifos-x-web-app-react into fix/display-missing-openapi-fields-in-ui
|
@gkbishnoi07 Thank you for the review! I have addressed all the feedback:
Please let me know if any further changes are needed! |
|
CLA check = failed Please sign our CLA so this can be considered |
|
You have not included a Jira ticket in title as @gkbishnoi07 highlighted |
|
@deepthikolipaka any updates? are you still working on it? |
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→ displayentitySubTypefieldRolesAndPermissions.tsx→ displaydisabledstatus as 'Enabled'/'Disabled'Users.tsx→ displayisSelfServiceUseras 'Yes'/'No'Related
Summary by CodeRabbit