#19012 create wireframe for investigation wise research#19623
#19012 create wireframe for investigation wise research#19623buddhika75 merged 3 commits intodevelopmentfrom
Conversation
Signed-off-by: Dhanesh Kaushan <dhaneshkaushan@gmail.com>
… 19012-create-wireframe-for-investigation-wise-research
WalkthroughRestructured the investigation-wise report XHTML: body and composition classes added, filter section rebuilt into panel-based form with new date/select/autocomplete inputs (many unbound), multiple action buttons added, and the results table replaced with a paginated dataTable with explicit columns and empty cell placeholders. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
src/main/webapp/reports/lab/investigation_wise_report.xhtml (1)
262-273: DataTable missingvalueattribute.The
p:dataTablelacks avalueattribute, which defines the data source. While this may render an empty table in some PrimeFaces versions, it could cause issues in others. For a cleaner wireframe, consider adding an empty value binding or removingvar="var"until data is wired.♻️ Suggested approach for wireframe
<p:dataTable id="invesWiseTable" - var="var" - rowIndexVar="n" + value="#{null}" paginator="true" paginatorPosition="bottom" rows="10"Or alternatively, add
emptyMessagefor better UX:<p:dataTable id="invesWiseTable" var="var" rowIndexVar="n" + value="#{reportController.investigationWiseData}" paginator="true" paginatorPosition="bottom" rows="10" - rendered="true" + emptyMessage="No records found"Please verify the page renders correctly with the current dataTable configuration.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/webapp/reports/lab/investigation_wise_report.xhtml` around lines 262 - 273, The p:dataTable with id "invesWiseTable" is missing a value binding (it currently has var="var" but no value), which can break rendering; fix by adding an appropriate value binding to the backing bean (e.g., bind to a List/Collection property on your view bean used for this report) or remove the var attribute until data is available, and optionally add an emptyMessage to improve UX; locate the p:dataTable element (id="invesWiseTable") and either set value to the bean property or remove var="var" and add emptyMessage to handle no-data cases.
🤖 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/main/webapp/reports/lab/investigation_wise_report.xhtml`:
- Around line 125-145: Fix the typo in the select item labels for the Age and
Result dropdowns: change the f:selectItem with itemValue="GT" inside the
p:selectOneMenu components identified by id="sAge" and id="sRst" so their
itemLabel reads "Greater than" instead of "Grater than"; update both occurrences
to ensure consistent user-facing text.
- Around line 95-99: Fix the typo in the select item label for the lab dropdown:
locate the p:selectOneMenu with id="sLab" and change the f:selectItem whose
itemValue="P" and itemLabel="Pathelogy" to use the correct spelling "Pathology"
so the displayed option reads "Pathology".
- Around line 163-167: The p:autoComplete component with id "acDiagnosisItem"
contains an invalid EL in the attribute completeMethod="#" — remove the
completeMethod="#" attribute from the <p:autoComplete id="acDiagnosisItem" ...>
tag (or replace it with the correct method reference if a completion method is
required) so the component no longer uses the invalid EL syntax; keep other
attributes (id, inputStyleClass, styleClass, value, var, itemLabel, itemValue)
unchanged.
---
Nitpick comments:
In `@src/main/webapp/reports/lab/investigation_wise_report.xhtml`:
- Around line 262-273: The p:dataTable with id "invesWiseTable" is missing a
value binding (it currently has var="var" but no value), which can break
rendering; fix by adding an appropriate value binding to the backing bean (e.g.,
bind to a List/Collection property on your view bean used for this report) or
remove the var attribute until data is available, and optionally add an
emptyMessage to improve UX; locate the p:dataTable element (id="invesWiseTable")
and either set value to the bean property or remove var="var" and add
emptyMessage to handle no-data cases.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8b4d9fe7-aa0c-428f-a585-3a829bfa4485
📒 Files selected for processing (1)
src/main/webapp/reports/lab/investigation_wise_report.xhtml
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
src/main/webapp/reports/lab/investigation_wise_report.xhtml (1)
105-109:⚠️ Potential issue | 🟠 MajorRemove the placeholder
completeMethod="#"from both autocompletes.PrimeFaces expects
completeMethodto resolve to a method expression;#is only a literal string, so these autocompletes are not validly configured. For a wireframe placeholder, omitcompleteMethoduntil the real backend method exists. (primefaces.github.io)Minimal placeholder fix
<p:autoComplete id="acInvestigationItem" inputStyleClass="w-100" styleClass="w-100" value="" - completeMethod="#" var="ix" + var="ix" itemLabel="" itemValue="" /> @@ <p:autoComplete id="acDiagnosisItem" inputStyleClass="w-100" styleClass="w-100" value="" - completeMethod="#" var="ix" + var="ix" itemLabel="" itemValue="" />Based on learnings, this is "wireframe/UI-only work" and "backend logic and proper method bindings will be implemented in a later phase."
Also applies to: 163-167
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/webapp/reports/lab/investigation_wise_report.xhtml` around lines 105 - 109, The p:autoComplete components (e.g., the one with id="acInvestigationItem") currently include a placeholder completeMethod="#" which is invalid; remove the completeMethod="#" attribute from these autocomplete tags (also apply the same removal to the other autocomplete at the same pattern around lines 163-167) so the components are wireframe-only until a real backend method is implemented; do not replace with a dummy string—simply omit the completeMethod attribute.
🤖 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/main/webapp/reports/lab/investigation_wise_report.xhtml`:
- Around line 9-13: Remove the redundant outer h:body wrapper's class attributes
because Facelets ignores markup outside <ui:composition>; keep the styling on
the <ui:composition> element instead. Locate the outer <h:body class="w-100
border"> and delete the class="w-100 border" (or remove the entire <h:body>
wrapper if it's unused), ensuring the <ui:composition
template="/reports/index.xhtml" class="w-100 border"> remains as the rendered
wrapper.
- Around line 184-206: The four p:commandButton elements (the ones with
value="Process", value="Print All", value="Download", and value="PDF") are
missing action attributes and will submit the form by default; add action="null"
to each of these p:commandButton tags to explicitly prevent submission and match
the wireframe pattern used elsewhere (e.g., the pattern used in
turn_around_time_details.xhtml), leaving backend method bindings to be added in
a later PR.
---
Duplicate comments:
In `@src/main/webapp/reports/lab/investigation_wise_report.xhtml`:
- Around line 105-109: The p:autoComplete components (e.g., the one with
id="acInvestigationItem") currently include a placeholder completeMethod="#"
which is invalid; remove the completeMethod="#" attribute from these
autocomplete tags (also apply the same removal to the other autocomplete at the
same pattern around lines 163-167) so the components are wireframe-only until a
real backend method is implemented; do not replace with a dummy string—simply
omit the completeMethod attribute.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 082cae6e-1433-42c8-949a-ebdd317d6e1e
📒 Files selected for processing (1)
src/main/webapp/reports/lab/investigation_wise_report.xhtml
Summary by CodeRabbit
New Features
UI/UX Improvements