fix staff account loading

This commit is contained in:
2026-03-15 12:22:23 -06:00
parent c1d78a69fd
commit bc9a54b29a
2 changed files with 5 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ module org.example.petshopdesktop {
opens org.example.petshopdesktop.api.dto.chat to com.fasterxml.jackson.databind;
opens org.example.petshopdesktop.api.dto.sale to com.fasterxml.jackson.databind, javafx.base;
opens org.example.petshopdesktop.api.dto.user to com.fasterxml.jackson.databind;
opens org.example.petshopdesktop.api.dto.employee to com.fasterxml.jackson.databind;
opens org.example.petshopdesktop.api.dto.analytics to com.fasterxml.jackson.databind;
opens org.example.petshopdesktop.api.dto.purchaseorder to com.fasterxml.jackson.databind;

View File

@@ -170,7 +170,10 @@ public class StaffAccountsController {
} catch (Exception e) {
ActivityLogger.getInstance().logException("StaffAccountsController.refresh", e, "Loading staff accounts");
Platform.runLater(() -> {
lblError.setText("Could not load staff accounts.");
String message = e.getMessage();
lblError.setText(message == null || message.isBlank()
? "Could not load staff accounts."
: "Could not load staff accounts: " + message);
tvStaff.setDisable(false);
});
}