made it so staff cannot change the status of pets for desktop for adopted or owned

This commit is contained in:
Alex
2026-04-13 20:49:22 -06:00
parent 572895efa9
commit 044e9ba7b2
7 changed files with 292 additions and 123 deletions

View File

@@ -164,6 +164,10 @@ public class PetDetailFragment extends Fragment {
if (!InputValidator.isSpinnerSelected(binding.spinnerCustomer, "Owner")) return;
if (!InputValidator.isSpinnerSelected(binding.spinnerStore, "Store")) return;
}
if ("Pending".equalsIgnoreCase(status)) {
if (!InputValidator.isSpinnerSelected(binding.spinnerCustomer, "Owner")) return;
if (!InputValidator.isSpinnerSelected(binding.spinnerStore, "Store")) return;
}
PetDTO petDTO = new PetDTO();
petDTO.setPetName(name);

View File

@@ -126,7 +126,7 @@ public class PetProfileFragment extends Fragment {
String status = pet.getPetStatus();
if ("Adopted".equalsIgnoreCase(status) || "Owned".equalsIgnoreCase(status)) {
if ("Adopted".equalsIgnoreCase(status) || "Owned".equalsIgnoreCase(status) || "Pending".equalsIgnoreCase(status)) {
binding.layoutPetOwner.setVisibility(View.VISIBLE);
if (pet.getCustomerName() != null && !pet.getCustomerName().isEmpty()) {
binding.tvPetOwner.setText(pet.getCustomerName());
@@ -137,7 +137,7 @@ public class PetProfileFragment extends Fragment {
binding.layoutPetOwner.setVisibility(View.GONE);
}
if ("Available".equalsIgnoreCase(status) || "Adopted".equalsIgnoreCase(status)) {
if ("Available".equalsIgnoreCase(status) || "Adopted".equalsIgnoreCase(status) || "Pending".equalsIgnoreCase(status)) {
binding.layoutPetStore.setVisibility(View.VISIBLE);
if (pet.getStoreName() != null && !pet.getStoreName().isEmpty()) {
binding.tvPetStore.setText(pet.getStoreName());