Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
<ui:composition template="/reports/index.xhtml">
<ui:define name="subcontent">

<h:form >
<h:form class="w-100">
<p:panel header="Surgery Status Report" >
<h:panelGrid columns="3" class="w-100" >

<p:outputLabel value="OT Room" >
</p:outputLabel>
<p:selectOneMenu value="#{reportController.currentSpeciality}">
<p:selectOneMenu value="#{reportController.currentSpeciality}" class=" w-50">
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix semantic mismatch: "OT Room" label bound to currentSpeciality property.

The p:outputLabel indicates "OT Room" but the selectOneMenu binds to #{reportController.currentSpeciality}. Speciality and OT Room are typically different domain concepts. This mismatch could lead to incorrect data handling or user confusion.

Consider updating the value binding to use a more semantically appropriate property:

-<p:selectOneMenu value="#{reportController.currentSpeciality}" class=" w-50">
+<p:selectOneMenu value="#{reportController.currentOtRoom}" class=" w-50">

Or verify with the backend team if currentSpeciality is intentionally being reused for OT Room selection.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/main/webapp/reports/managementReports/surgery_status.xhtml around line
19, the selectOneMenu for the "OT Room" label is bound to
#{reportController.currentSpeciality}, causing a semantic mismatch; change the
value binding to a semantically correct backing property (e.g.
#{reportController.currentOtRoom} or another OT room-specific property) and
ensure the ReportController exposes and uses that property (getter/setter and
any backend logic), or confirm with the backend team that reusing
currentSpeciality for OT Room is intentional and update documentation/tests
accordingly.

<f:selectItem itemLabel="Select OT Room"/>
</p:selectOneMenu>

<p:spacer width="20"/>
<p:outputLabel value="Proposed Surgery" >
</p:outputLabel>
<p:selectOneMenu >
<p:selectOneMenu class=" w-50" >
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add missing value binding for "Proposed Surgery" selection.

The p:selectOneMenu for "Proposed Surgery" has no value attribute, meaning the user's selection won't be captured or accessible to the backend. The "Process" button and other operations won't be able to retrieve the selected surgery.

Apply this diff to add a value binding:

-<p:selectOneMenu  class=" w-50" >
+<p:selectOneMenu value="#{reportController.currentSurgery}" class=" w-50" >

(Adjust the property name to match your controller's actual property for surgery selection.)

📝 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
<p:selectOneMenu class=" w-50" >
<p:selectOneMenu value="#{reportController.currentSurgery}" class=" w-50" >
🤖 Prompt for AI Agents
In src/main/webapp/reports/managementReports/surgery_status.xhtml around line
26, the <p:selectOneMenu> for "Proposed Surgery" is missing a value binding so
the user's selection isn't captured; add a value attribute bound to your backing
bean property (e.g. value="#{yourController.selectedProposedSurgery}"), ensure
that property exists with public getter/setter in the controller, and, if the
menu items are complex objects, wire an appropriate converter or bind to a
simple id type so the selection is populated and available to the Process button
and backend actions.

<f:selectItem itemLabel="Select Surgery"/>
</p:selectOneMenu>
</h:panelGrid>
Expand Down
Loading