Skip to content

Conversation

@ishira-web
Copy link
Collaborator

@ishira-web ishira-web commented Oct 3, 2025

Put a Space between buttons
Remove Date and Time and Set it into One Line

Summary by CodeRabbit

  • Style
    • Updated “Date” label to “Date / Time” and now display time alongside the date for both regular and cancelled bills, using Asia/Colombo timezone with a short time format.
    • Consolidated the previous separate time row into the Date/Time row for a cleaner layout.
    • Improved spacing by adding right margin to “New Bill” buttons, enhancing visual alignment within their panels.

@ishira-web ishira-web requested a review from PasinduW99 October 3, 2025 10:28
@ishira-web ishira-web self-assigned this Oct 3, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

Walkthrough

Presentation tweaks only: margins added to two New Bill buttons; bill date row now shows date and time together, with the separate time row removed. No business logic or control flow changes.

Changes

Cohort / File(s) Summary
UI button styling adjustments
src/main/webapp/credit/credit_compnay_bill_pharmacy_all.xhtml
Added style margin-right: 20px; to two p:commandButton elements labeled "New Bill". No behavioral changes.
Bill date/time display consolidation
src/main/webapp/resources/bill/insRecieve.xhtml
Replaced "Date" with "Date / Time"; inlined time outputs (including cancelled variant) with timezone Asia/Colombo and shortTimeFormat; added spacing; commented out old separate Time row.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ 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 references the UI improvements for pharmacy payments by a credit company and aligns with the general scope of the changeset, since the modifications are purely presentational and relate to that feature area.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch #15716-need-ui-improvement-for-pharmacy-payment-by-credit-company

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 259d686 and bf0ea70.

📒 Files selected for processing (2)
  • src/main/webapp/credit/credit_compnay_bill_pharmacy_all.xhtml (1 hunks)
  • src/main/webapp/resources/bill/insRecieve.xhtml (2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.xhtml

📄 CodeRabbit inference engine (AGENTS.md)

**/*.xhtml: Ensure accessibility with proper tooltips and labeling in UI
Use PrimeFaces button classes (e.g., ui-button-success, ui-button-warning) instead of Bootstrap button classes
Escape & as & in attributes; keep standard HTML DOCTYPE with ui:composition templating
Use h:outputText for headings/labels instead of raw HTML heading tags
Do not rename composite components without auditing all usages

**/*.xhtml: JSF AJAX: do not use plain HTML elements with id for AJAX updates; use JSF components (h:panelGroup, p:outputPanel, etc.)
ERP UI: use h:outputText instead of HTML heading tags (h1–h6)
XHTML structure: include HTML DOCTYPE and use ui:composition with a template inside h:body on all pages
Use PrimeFaces button classes (ui-button-success, ui-button-warning, etc.) instead of Bootstrap button classes
Always escape ampersands as & in XHTML attribute values to prevent XML parsing errors

Files:

  • src/main/webapp/credit/credit_compnay_bill_pharmacy_all.xhtml
  • src/main/webapp/resources/bill/insRecieve.xhtml
**/*.{xhtml,java}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{xhtml,java}: Check privileges in UI using webUserController.hasPrivilege()
Implement feature toggles as boolean flags controlling UI elements
Reuse existing controller properties/methods; avoid adding new filtered values/global filters or backend logic for UI tasks

Files:

  • src/main/webapp/credit/credit_compnay_bill_pharmacy_all.xhtml
  • src/main/webapp/resources/bill/insRecieve.xhtml
**/*.{java,xhtml}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{java,xhtml}: Use configOptionApplicationController for dynamic configuration values
Maintain backward compatibility: do not change intentionally misspelled model/controller property names used for DB compatibility

Files:

  • src/main/webapp/credit/credit_compnay_bill_pharmacy_all.xhtml
  • src/main/webapp/resources/bill/insRecieve.xhtml
src/main/webapp/resources/**/*.xhtml

📄 CodeRabbit inference engine (CLAUDE.md)

Do not rename JSF composite components (e.g., transfeRecieve_detailed) without verifying all usages across the codebase

Files:

  • src/main/webapp/resources/bill/insRecieve.xhtml
🧠 Learnings (3)
📚 Learning: 2025-07-26T13:29:32.079Z
Learnt from: DARKDRAGON-LK
PR: hmislk/hmis#14180
File: src/main/webapp/inward/inward_bill_final.xhtml:144-158
Timestamp: 2025-07-26T13:29:32.079Z
Learning: In src/main/webapp/inward/inward_bill_final.xhtml, the Credit Company Details panel with commented-out ui:repeat block for displaying credit company information is intentionally reserved for future development, as confirmed by DARKDRAGON-LK. The empty panel structure should be kept as is for future implementation.

Applied to files:

  • src/main/webapp/credit/credit_compnay_bill_pharmacy_all.xhtml
📚 Learning: 2025-07-26T13:31:04.605Z
Learnt from: DARKDRAGON-LK
PR: hmislk/hmis#14180
File: src/main/webapp/inward/inward_bill_final.xhtml:167-169
Timestamp: 2025-07-26T13:31:04.605Z
Learning: In src/main/webapp/inward/inward_bill_final.xhtml, the <credit:outputCredit> component within the Credit Company Details panel is intentionally commented out for future development, as confirmed by DARKDRAGON-LK. The component structure is kept in place for future implementation rather than being completely removed.

Applied to files:

  • src/main/webapp/credit/credit_compnay_bill_pharmacy_all.xhtml
📚 Learning: 2025-08-20T07:42:05.640Z
Learnt from: damithdeshan98
PR: hmislk/hmis#15049
File: src/main/java/com/divudi/bean/common/CollectingCentrePaymentController.java:500-509
Timestamp: 2025-08-20T07:42:05.640Z
Learning: In CollectingCentrePaymentController.java, damithdeshan98 confirmed that BillLight objects in the selectedCCpaymentBills list are created from JPQL queries using bill.createdAt which is guaranteed to be non-null due to database constraints, so null checking is not needed when formatting dates from these specific BillLight objects in the Excel export functionality. This is different from other parts of the codebase that may deal with different data sources where null checks are necessary.

Applied to files:

  • src/main/webapp/resources/bill/insRecieve.xhtml
🔇 Additional comments (4)
src/main/webapp/credit/credit_compnay_bill_pharmacy_all.xhtml (2)

217-218: LGTM! Margin added to "New Bill" button.

The margin-right: 20px; style provides visual spacing for the button in the print preview panel.


30-36: Verify spacing consistency for the main panel "New Bill" button.

The print preview panel "New Bill" button now has margin-right: 20px; (lines 217-218), but the main panel "New Bill" button (lines 30-36) does not. The main panel uses a flex container with gap-2 (line 19), which provides spacing. Confirm this is intentional and that the spacing is visually consistent across both panels.

src/main/webapp/resources/bill/insRecieve.xhtml (2)

173-189: LGTM! Date and time consolidated into a single row.

The label now reads "Date / Time" and the time outputs are displayed inline with the date, separated by a non-breaking space. The conditional rendering logic for cancelled vs. non-cancelled bills is correctly preserved.


190-200: LGTM! Separate time row commented out.

The separate "Time" row is now commented out, as the time display has been moved inline with the date. Keeping the commented-out code is reasonable for reference.


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.

icon="fa fa-plus"
class="ui-button-warning">
class="ui-button-warning"
style="margin-right: 20px;">
Copy link
Member

Choose a reason for hiding this comment

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

Do not use inline styles. Please use Bootstrap classes like me-1

Copy link
Member

Choose a reason for hiding this comment

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

Please use a new bill for Cancel Bill. Keep the original one for printing at the time of billing. For cancellation, create a new print with these details.

@ishira-web ishira-web requested review from buddhika75 and removed request for buddhika75 November 12, 2025 19:50
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