Files
honeyDueKMP/iosApp/iosApp/MainTabView.swift
Trey t d3caffa792 Add contractor management and integrate with task completions
Features:
- Add full contractor CRUD functionality (Android & iOS)
- Add contractor selection to task completion dialog
- Display contractor info in completion cards
- Add ContractorSpecialty model and API integration
- Add contractors tab to bottom navigation
- Replace hardcoded specialty lists with API data
- Update lookup endpoints to return arrays instead of paginated responses

Changes:
- Add Contractor models (ContractorSummary, ContractorDetail, ContractorCreate/UpdateRequest)
- Add ContractorApi with endpoints for list, detail, create, update, delete, toggle favorite
- Add ContractorViewModel for state management
- Add ContractorsScreen and ContractorDetailScreen for Android
- Add AddContractorDialog with form validation
- Add Contractor views for iOS (list, detail, form)
- Update CompleteTaskDialog to include contractor selection
- Update CompletionCardView to show contractor name and phone
- Add contractor field to TaskCompletion model
- Update LookupsApi to return List<T> instead of paginated responses
- Update LookupsRepository and LookupsViewModel to handle array responses
- Update LookupsManager (iOS) to handle array responses for contractor specialties

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 19:39:41 -06:00

47 lines
1.1 KiB
Swift

import SwiftUI
struct MainTabView: View {
@EnvironmentObject var loginViewModel: LoginViewModel
@State private var selectedTab = 0
var body: some View {
TabView(selection: $selectedTab) {
NavigationView {
ResidencesListView()
}
.tabItem {
Label("Residences", systemImage: "house.fill")
}
.tag(0)
NavigationView {
AllTasksView()
}
.tabItem {
Label("Tasks", systemImage: "checkmark.circle.fill")
}
.tag(1)
NavigationView {
ContractorsListView()
}
.tabItem {
Label("Contractors", systemImage: "wrench.and.screwdriver.fill")
}
.tag(2)
NavigationView {
ProfileTabView()
}
.tabItem {
Label("Profile", systemImage: "person.fill")
}
.tag(3)
}
}
}
#Preview {
MainTabView()
}