diff --git a/app/Http/Controllers/documentCreators.php b/app/Http/Controllers/documentCreators.php index 5944fe6..fc5f3e4 100644 --- a/app/Http/Controllers/documentCreators.php +++ b/app/Http/Controllers/documentCreators.php @@ -386,4 +386,24 @@ class documentCreators extends Fpdf $pdf->Output(); exit; } + + public function CreateAllFireFightersPDF($fireStationID){ + $pdf = new AlphaPDF(); + $fill = false; + $pdf->AddPage(); + + $pdf->AddFont('arialpl', '', 'arialpl.php'); + $pdf->AddFont('arialpl', 'B', 'arialplb.php'); + + $pdf->SetFont('arialpl','B',20); + $pdf->Cell(190,10, $this->textConvert("Lista strażaków"),0,0,'C'); + $pdf->Ln(); + $pdf->Ln(); + + + $pdf->Ln(); + $pdf->Output(); + exit; + + } } diff --git a/app/Http/Controllers/fireFightersController.php b/app/Http/Controllers/fireFightersController.php index 5395ac7..2b9eeb9 100644 --- a/app/Http/Controllers/fireFightersController.php +++ b/app/Http/Controllers/fireFightersController.php @@ -151,7 +151,7 @@ class fireFightersController extends Controller if (auth()->user() != null && auth()->user()->fireStationID != null) { $request = request(); $test = new documentCreators(); - $test->createSingleFireFighterPDF($request->userID); + $test->CreateAllFireFightersPDF($request->fireStationID); } } diff --git a/resources/views/fireFighters.blade.php b/resources/views/fireFighters.blade.php index a91409d..5364f78 100644 --- a/resources/views/fireFighters.blade.php +++ b/resources/views/fireFighters.blade.php @@ -70,6 +70,15 @@ Jednostka nie istnieje @else + @if(auth()->user()->accessLevel() == 50) +
+ @endif + +