[update] Revamp MedicineDialog and ServiceDialog to enhance user experience with improved UI elements, including keyboard shortcuts for adding items, dynamic suggestion popups, and refined input handling. Update data structures to accommodate new fields and streamline the selection process for medicines and services, ensuring better data management and user interaction.

This commit is contained in:
Lê Thành Đạt committed 2025-07-09 14:01:16 +07:00
1 parent e7af0cbf9d
commit f816ce64b2
5 files changed
+609 -288

No files matched your search

@@ -347,7 +347,7 @@ public class ServerHandler extends SimpleChannelInboundHandler<TextWebSocketFram
log.debug("Received GetMedInfoRequest");
try {
ResultSet rs = statement.executeQuery(
"select med_id, med_name, med_company, med_description, quantity, med_unit, med_selling_price\n" +
"select med_id, med_name, med_company, med_description, quantity, med_unit, med_selling_price, preference_note\n" +
" from Medicine"
);
@@ -363,17 +363,18 @@ public class ServerHandler extends SimpleChannelInboundHandler<TextWebSocketFram
String quantity = rs.getString("quantity");
String medUnit = rs.getString("med_unit");
String medSellingPrice = rs.getString("med_selling_price");
String preferenceNote = rs.getString("preference_note");
String result = String.join("|",medId, medName, medCompany, medDescription, quantity, medUnit,
medSellingPrice);
medSellingPrice, preferenceNote != null ? preferenceNote : "");
resultList.add(result);
}
String[] resultString = resultList.toArray(new String[0]);
String[][] resultArray = new String[resultString.length][];
for (int i = 0; i < resultString.length; i++) {
resultArray[i] = resultString[i].split("\\|");
resultArray[i] = resultString[i].split("\\|", -1);
}
UserUtil.sendPacket(currentUser.getSessionId(), new GetMedInfoResponse(resultArray));