feat: Update NEXT_SPRINT_TASKS with new tasks and modify ViewOrdersCubit to handle null selectedDate
This commit is contained in:
@@ -268,10 +268,16 @@ class ViewOrdersCubit extends Cubit<ViewOrdersState> {
|
||||
}
|
||||
|
||||
int _calculateUpNextCount() {
|
||||
if (state.selectedDate == null) return 0;
|
||||
|
||||
final String selectedDateStr = DateFormat(
|
||||
'yyyy-MM-dd',
|
||||
).format(state.selectedDate!);
|
||||
|
||||
return state.orders
|
||||
.where(
|
||||
(OrderItem s) =>
|
||||
// TODO(orders): move PENDING to its own tab once available.
|
||||
s.date == selectedDateStr &&
|
||||
<String>['OPEN', 'FILLED', 'CONFIRMED', 'PENDING', 'ASSIGNED']
|
||||
.contains(s.status),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user