Show store dropdown
This commit is contained in:
@@ -180,7 +180,8 @@ public class PetDialogController {
|
||||
if ("Owned".equalsIgnoreCase(selectedStatus) && cbCustomer.getValue() == null) {
|
||||
errorMsg += "Customer is required for Owned status\n";
|
||||
}
|
||||
if (requiresStore(selectedStatus) && cbStore.getValue() == null) {
|
||||
boolean storeRequired = requiresStore(selectedStatus) && !"Adopted".equalsIgnoreCase(selectedStatus);
|
||||
if (storeRequired && cbStore.getValue() == null) {
|
||||
errorMsg += "Store is required for " + selectedStatus + " status\n";
|
||||
}
|
||||
|
||||
@@ -482,7 +483,8 @@ public class PetDialogController {
|
||||
private boolean requiresStore(String status) {
|
||||
return "Available".equalsIgnoreCase(status)
|
||||
|| "Pending".equalsIgnoreCase(status)
|
||||
|| "Unadopted".equalsIgnoreCase(status);
|
||||
|| "Unadopted".equalsIgnoreCase(status)
|
||||
|| "Adopted".equalsIgnoreCase(status);
|
||||
}
|
||||
|
||||
private void setFieldVisibility(VBox field, boolean visible) {
|
||||
|
||||
Reference in New Issue
Block a user