remove staff role from UI

This commit is contained in:
2026-04-20 20:20:46 -06:00
parent f90cc4eb9b
commit bbedb8af8c
3 changed files with 2 additions and 20 deletions

View File

@@ -71,8 +71,7 @@ public class StaffAccountsController {
colPhone.setCellValueFactory(data -> new javafx.beans.property.SimpleStringProperty(data.getValue().getPhone()));
colRole.setCellValueFactory(data -> {
String role = data.getValue().getRole() != null ? data.getValue().getRole() : "";
String staffRole = data.getValue().getStaffRole() != null ? " (" + data.getValue().getStaffRole() + ")" : "";
return new javafx.beans.property.SimpleStringProperty(role + staffRole);
return new javafx.beans.property.SimpleStringProperty(role);
});
colStatus.setCellValueFactory(data -> new javafx.beans.property.SimpleStringProperty(
Boolean.TRUE.equals(data.getValue().getActive()) ? "Active" : "Inactive"));
@@ -225,8 +224,7 @@ public class StaffAccountsController {
|| safe(a.getFullName()).contains(q)
|| safe(a.getEmail()).contains(q)
|| safe(a.getPhone()).contains(q)
|| safe(a.getRole()).contains(q)
|| safe(a.getStaffRole()).contains(q);
|| safe(a.getRole()).contains(q);
boolean active = Boolean.TRUE.equals(a.getActive());
boolean statusMatch = selectedStatus == null || selectedStatus.equals("All Statuses")
|| (selectedStatus.equals("Active") && active)

View File

@@ -44,7 +44,6 @@ public class StaffRegisterDialogController {
@FXML private PasswordField txtPassword;
@FXML private PasswordField txtPasswordConfirm;
@FXML private ComboBox<String> cbRole;
@FXML private ComboBox<String> cbStaffRole;
@FXML private ComboBox<String> cbActive;
@FXML private ComboBox<DropdownOption> cbStore;
@FXML private Label lblError;
@@ -64,9 +63,6 @@ public class StaffRegisterDialogController {
cbRole.setItems(FXCollections.observableArrayList("STAFF", "ADMIN"));
cbRole.getSelectionModel().select("STAFF");
cbStaffRole.setItems(FXCollections.observableArrayList(
"STORE_MANAGER", "SALES_ASSOCIATE", "GROOMER", "VETERINARIAN"));
cbStaffRole.getSelectionModel().selectFirst();
cbActive.setItems(FXCollections.observableArrayList("Active", "Inactive"));
cbActive.getSelectionModel().select("Active");
@@ -171,10 +167,6 @@ public class StaffRegisterDialogController {
lblError.setText("Role is required.");
return;
}
if (cbStaffRole.getValue() == null) {
lblError.setText("Staff role is required.");
return;
}
if (cbStore.getValue() == null) {
lblError.setText("Primary store is required.");
return;
@@ -183,7 +175,6 @@ public class StaffRegisterDialogController {
btnCreate.setDisable(true);
String role = cbRole.getValue();
String staffRole = cbStaffRole.getValue();
boolean active = "Active".equals(cbActive.getValue());
Long storeId = cbStore.getValue().getId();
File avatarFile = selectedAvatarFile;
@@ -199,7 +190,6 @@ public class StaffRegisterDialogController {
request.setEmail(email);
request.setPhone(phone);
request.setRole(role);
request.setStaffRole(staffRole);
request.setActive(active);
request.setPrimaryStoreId(storeId);

View File

@@ -113,12 +113,6 @@
<ComboBox fx:id="cbRole" maxWidth="1.7976931348623157E308" promptText="Select Role" />
</children>
</VBox>
<VBox spacing="6.0" HBox.hgrow="ALWAYS">
<children>
<Label text="Staff Role" />
<ComboBox fx:id="cbStaffRole" maxWidth="1.7976931348623157E308" promptText="Select Staff Role" />
</children>
</VBox>
</children>
</HBox>