fix staff account loading
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user