@@ -23,11 +23,11 @@ def inspection_result_badge(inspection)
2323 end
2424 end
2525
26- sig {
26+ sig do
2727 params ( inspection : Inspection ) . returns (
2828 T ::Array [ T ::Hash [ Symbol , T . any ( String , Symbol , T ::Boolean ) ] ]
2929 )
30- }
30+ end
3131 def inspection_actions ( inspection )
3232 actions = T . let ( [ ] , T ::Array [ T ::Hash [ Symbol , T . any ( String , Symbol , T ::Boolean ) ] ] )
3333
@@ -115,18 +115,16 @@ def next_tab_navigation_info(inspection, current_tab)
115115 current_tab_incomplete = !assessment_complete? ( inspection , current_tab )
116116
117117 # Find first incomplete tab after current (excluding results for now)
118- next_incomplete = tabs_after . find { |tab |
118+ next_incomplete = tabs_after . find do |tab |
119119 tab != "results" && !assessment_complete? ( inspection , tab )
120- }
120+ end
121121
122122 # If current tab is incomplete and there's a next tab available
123123 if current_tab_incomplete && tabs_after . any?
124124 incomplete_count = incomplete_fields_count ( inspection , current_tab )
125125
126126 # If there's an incomplete tab after, user should skip current incomplete
127- if next_incomplete
128- return { tab : next_incomplete , skip_incomplete : true , incomplete_count : incomplete_count }
129- end
127+ return { tab : next_incomplete , skip_incomplete : true , incomplete_count : incomplete_count } if next_incomplete
130128
131129 # If results tab is incomplete, user should skip to results
132130 if tabs_after . include? ( "results" ) && inspection . passed . nil?
@@ -138,14 +136,10 @@ def next_tab_navigation_info(inspection, current_tab)
138136 end
139137
140138 # Current tab is complete, just suggest next incomplete tab
141- if next_incomplete
142- return { tab : next_incomplete , skip_incomplete : false }
143- end
139+ return { tab : next_incomplete , skip_incomplete : false } if next_incomplete
144140
145141 # Check if results tab is incomplete
146- if tabs_after . include? ( "results" ) && inspection . passed . nil?
147- return { tab : "results" , skip_incomplete : false }
148- end
142+ return { tab : "results" , skip_incomplete : false } if tabs_after . include? ( "results" ) && inspection . passed . nil?
149143
150144 nil
151145 end
0 commit comments