Allow printing of blank sheet of cards

This commit is contained in:
Matt Young 2025-11-16 15:29:33 -06:00
parent 5bbcccdc22
commit a5b203af2e
1 changed files with 9 additions and 5 deletions

View File

@ -27,11 +27,15 @@ class PrintCards extends Controller
public function print(\App\Actions\Print\PrintCards $printer)
{
//dump(request()->all());
if (request()->audition == null) {
return redirect()->back()->with('error', 'You must specify at least one audition');
}
// dump(request()->all());
// if (request()->audition == null) {
// return redirect()->back()->with('error', 'You must specify at least one audition');
// }
if (request()->audition) {
$selectedAuditionIds = array_keys(request()->audition);
} else {
$selectedAuditionIds = [];
}
$cardQuery = Entry::whereIn('audition_id', $selectedAuditionIds);
// Process Filters
@ -62,6 +66,6 @@ class PrintCards extends Controller
}
$cards = $cards->sortBy($sorts);
$printer->print($cards);
//return view('admin.print_cards.print', compact('cards'));
// return view('admin.print_cards.print', compact('cards'));
}
}