Remove API pagination and fix contractor UI issues
- Remove pagination from all Django REST Framework endpoints - Update Kotlin API clients to return direct lists instead of paginated responses - Update iOS ViewModels to handle direct list responses - Remove ContractorListResponse, DocumentListResponse, and PaginatedResponse models - Fix contractor form specialty selector loading with improved DataCache access - Fix contractor sheet presentation to use full screen (.presentationDetents([.large])) - Improve UI test scrolling to handle lists of any size with smart end detection 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,7 @@ struct ContractorFormSheet: View {
|
||||
@State private var contractorSpecialties: [ContractorSpecialty] = []
|
||||
|
||||
private var specialties: [String] {
|
||||
contractorSpecialties.map { $0.name }
|
||||
return DataCache.shared.contractorSpecialties.value.map { $0.name }
|
||||
}
|
||||
|
||||
private var canSave: Bool {
|
||||
@@ -290,11 +290,10 @@ struct ContractorFormSheet: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.presentationDetents([.medium, .large])
|
||||
.presentationDetents([.large])
|
||||
}
|
||||
.onAppear {
|
||||
loadContractorData()
|
||||
loadContractorSpecialties()
|
||||
}
|
||||
.handleErrors(
|
||||
error: viewModel.errorMessage,
|
||||
@@ -324,16 +323,6 @@ struct ContractorFormSheet: View {
|
||||
isFavorite = contractor.isFavorite
|
||||
}
|
||||
|
||||
private func loadContractorSpecialties() {
|
||||
Task {
|
||||
await MainActor.run {
|
||||
if let specialties = DataCache.shared.contractorSpecialties.value as? [ContractorSpecialty] {
|
||||
self.contractorSpecialties = specialties
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Save Action
|
||||
|
||||
private func saveContractor() {
|
||||
|
||||
Reference in New Issue
Block a user