stampa ddt
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user