Faded text for disabled spinners in staff

This commit is contained in:
Alex
2026-04-12 00:51:49 -06:00
parent 0df8212a65
commit a6d1c089ac
2 changed files with 4 additions and 6 deletions

View File

@@ -217,7 +217,7 @@ public class AdoptionDetailFragment extends Fragment {
if (employees != null) SpinnerUtils.populateSpinner(requireContext(), binding.spinnerAdoptionEmployee,
employees, DropdownDTO::getLabel, "-- Select Staff --", state.selectedEmployeeId, DropdownDTO::getId);
if (isStaff()) binding.spinnerAdoptionStore.setEnabled(false);
if (isStaff()) UIUtils.setViewsEnabled(false, binding.spinnerAdoptionStore);
isUpdatingUI = false;
}

View File

@@ -92,7 +92,7 @@ public class PetDetailFragment extends Fragment {
boolean storeEnabled = state == null || state.isStoreEnabled;
Long selectedStoreId = (staffCreating && storeEnabled) ? tokenManager.getPrimaryStoreId() : (state != null ? state.selectedStoreId : null);
updateStoreSpinnerSelection(selectedStoreId);
if (staffCreating && storeEnabled) binding.spinnerStore.setEnabled(false);
if (staffCreating && storeEnabled) UIUtils.setViewsEnabled(false, binding.spinnerStore);
});
viewModel.getSpeciesList().observe(getViewLifecycleOwner(), list -> {
@@ -356,13 +356,11 @@ public class PetDetailFragment extends Fragment {
if (isStaff() && !state.isEditing && state.isStoreEnabled) {
updateStoreSpinnerSelection(tokenManager.getPrimaryStoreId());
binding.spinnerStore.setEnabled(false);
UIUtils.setViewsEnabled(false, binding.spinnerStore);
}
if (isStaff() && state.isEditing && viewModel.isOriginallyOwnedOrAdopted()) {
binding.spinnerCustomer.setEnabled(false);
binding.spinnerPetStatus.setEnabled(false);
binding.spinnerStore.setEnabled(false);
UIUtils.setViewsEnabled(false, binding.spinnerCustomer, binding.spinnerPetStatus, binding.spinnerStore);
}
isUpdatingUI = false;