05/02 Phase C 4

This commit is contained in:
Nguyen Ngo
2026-05-04 13:15:28 -04:00
parent 2baa67766b
commit 09715e9c11
3 changed files with 549 additions and 71 deletions
@@ -101,13 +101,17 @@ struct DashboardView: View {
.safeAreaInset(edge: .bottom) { syncStatusFooter }
} detail: {
// CHANGED: each tab is wrapped in its own NavigationStack.
// Without this, NavigationLink pushes from MyInspectionsView accumulate
// on a shared implicit stack switching sidebar tabs does not clear
// the pushed ExecuteInspectionView, leaving the form stuck on screen.
switch selectedTab {
case 0: MyInspectionsView()
case 1: InspectionHistoryView()
case 2: FacilitiesListView()
case 3: TemplatesListView()
case 4: SyncStatusView()
default: SettingsView()
case 0: NavigationStack { MyInspectionsView() }
case 1: NavigationStack { InspectionHistoryView() }
case 2: NavigationStack { FacilitiesListView() }
case 3: NavigationStack { TemplatesListView() }
case 4: NavigationStack { SyncStatusView() }
default: NavigationStack { SettingsView() }
}
}
.sheet(isPresented: $showNewInspection) {