File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
o-fish-ios/Views/ReportFlow Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ struct ReportNavigationRootView: View {
3838 . background ( Color . backgroundGrey)
3939 . navigationBarBackButtonHidden ( true )
4040 . navigationBarItems (
41- leading: Button ( action: discardReport ) {
41+ leading: Button ( action: showCancelAlert ) {
4242 Text ( " Cancel " )
4343 } , trailing: Button ( action: submitNavBarClicked) {
4444 Text ( " Submit " )
@@ -65,6 +65,13 @@ struct ReportNavigationRootView: View {
6565 secondaryButton: . cancel( Text ( " Submit " ) , action: saveAlertClicked) )
6666 }
6767
68+ private func showCancelAlert( ) {
69+ showingAlertItem = AlertItem ( title: NSLocalizedString ( " Cancel boarding? " , comment: " " ) ,
70+ message: " This boarding will not be saved. " ,
71+ primaryButton: . default( Text ( " Keep Editing " ) ) ,
72+ secondaryButton: . cancel( Text ( " Cancel " ) , action: discardReport) )
73+ }
74+
6875 private func showFinalAlert( ) {
6976 if notFilledScreens. isEmpty {
7077 showSubmitAlert ( )
You can’t perform that action at this time.
0 commit comments