Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

fix show nubmer of customer #106

Merged
merged 1 commit into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
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 @@ -18,6 +18,8 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response)
response.setContentType("text/html; charset=UTF-8");

List<Customer> customers = Singleton.customerDAO.getAll();
Long customerCount = Singleton.customerDAO.count();
request.setAttribute("customerCount", customerCount);
request.setAttribute("customers", customers);
request.setAttribute("page", "customer");

Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/view/jsp/management/customer/customer.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</div>
<div class="row">
<div class="col-md-6 align-self-center">
<p id="dataTable_info" class="dataTables_info" role="status" aria-live="polite">Hiển thị 1 trên 1 khách hàng</p>
<p id="dataTable_info" class="dataTables_info" role="status" aria-live="polite">Hiển thị <%= request.getAttribute("customerCount") %> trên <%= request.getAttribute("customerCount") %> khách hàng</p>
</div>
<div class="col-md-6">
<nav class="d-lg-flex justify-content-lg-end dataTables_paginate paging_simple_numbers">
Expand Down
Loading