stampa ddt

This commit is contained in:
2026-05-16 11:51:26 +02:00
parent a166992b04
commit 9a5d0e33bd
16 changed files with 746 additions and 60 deletions

View File

@@ -77,21 +77,21 @@ class TicketListCubit extends Cubit<TicketListState> {
loadTickets(refresh: true); // Applica i filtri e ricarica
}
void toggleTicketSelection(String ticketId) {
final currentSelection = Set<String>.from(state.selectedTicketIds);
if (currentSelection.contains(ticketId)) {
currentSelection.remove(ticketId);
void toggleTicketSelection(TicketModel ticket) {
final currentSelection = Set<TicketModel>.from(state.selectedTickets);
if (currentSelection.contains(ticket)) {
currentSelection.remove(ticket);
} else {
currentSelection.add(ticketId);
currentSelection.add(ticket);
}
emit(state.copyWith(selectedTicketIds: currentSelection));
emit(state.copyWith(selectedTickets: currentSelection));
}
void clearSelection() {
emit(state.copyWith(selectedTicketIds: {}));
emit(state.copyWith(selectedTickets: {}));
}
void selectAll(List<String> ticketIds) {
emit(state.copyWith(selectedTicketIds: ticketIds.toSet()));
void selectAll(List<TicketModel> tickets) {
emit(state.copyWith(selectedTickets: tickets.toSet()));
}
}