forked from s421507/eOSP2
Ostatnie poprawki
This commit is contained in:
parent
4788f3f62d
commit
efddb88336
@ -104,4 +104,12 @@ class EquipmentController extends Controller
|
||||
'success' => 'Record deleted successfully!'
|
||||
]);
|
||||
}
|
||||
|
||||
public function createAllEquipmentPDF(){
|
||||
if (auth()->user() != null && auth()->user()->fireStationID != null) {
|
||||
$request = request();
|
||||
$test = new documentCreators();
|
||||
$test->createAllEquipmentPDF($request->fireStationID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -197,4 +197,20 @@ class VehiclesController extends Controller
|
||||
$vehicle->save();
|
||||
return redirect()->to('/pojazdy');
|
||||
}
|
||||
|
||||
public function createAllVehiclesPDF(){
|
||||
if (auth()->user() != null && auth()->user()->fireStationID != null) {
|
||||
$request = request();
|
||||
$test = new documentCreators();
|
||||
$test->createAllVehiclesPDF($request->fireStationID);
|
||||
}
|
||||
}
|
||||
|
||||
public function createSingleVehiclePDF(){
|
||||
if (auth()->user() != null && auth()->user()->fireStationID != null) {
|
||||
$request = request();
|
||||
$test = new documentCreators();
|
||||
$test->createSingleVehiclePDF($request->vehicleID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -168,25 +168,26 @@ class documentCreators extends Fpdf
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('arialpl','B',14);
|
||||
$pdf->SetFillColor(152,152,152);
|
||||
$pdf->Cell(10,10, $this->textConvert("#"), 1, 0, 'C', true);
|
||||
$pdf->Cell(50,10, $this->textConvert("Data"), 1, 0, 'C', true);
|
||||
$pdf->Cell(50,10, $this->textConvert("Miejsce"), 1, 0, 'C', true);
|
||||
$pdf->Cell(60,10, $this->textConvert("Cel"), 1, 0, 'C', true);
|
||||
$pdf->Cell(40,10, $this->textConvert("Rodzaj zagrożenia"), 1, 0, 'C', true);
|
||||
$pdf->Cell(60,10, $this->textConvert("Dowódca"), 1, 0, 'C', true);
|
||||
|
||||
|
||||
$pdf->SetFont('arialpl','',14);
|
||||
$fill = false;
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$i=1;
|
||||
foreach( $operations as $operation){
|
||||
$pdf->Cell(10,10, $i, 1, 0, 'C', $fill);
|
||||
$pdf->Cell(50,10,$this->textConvert($operation->operationDate), 1, 0, '', $fill);
|
||||
$pdf->Cell(50,10,$this->textConvert($operation->location), 1, 0, '', $fill);
|
||||
$pdf->Cell(50,10,$this->textConvert($operation->target), 1, 0, '', $fill);
|
||||
$pdf->Cell(50,10, $this->textConvert("Dowódca: "), 1, 0, '', true);
|
||||
$pdf->Cell(70,10, $this->textConvert($operation->name." ".$operation->surname), 1, 0, 'C' );
|
||||
$pdf->Cell(20,10, $this->textConvert("Data: "), 1, 0, 'C', true);
|
||||
$pdf->Cell(50,10, $this->textConvert($operation->operationDate), 1, 0, '');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50,10,$this->textConvert("Miejsce: "), 1, 0, '', true);
|
||||
$pdf->Cell(140,10,$this->textConvert($operation->location), 1, 0, '');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50,10,$this->textConvert("Cel: "), 1, 0, '', true);
|
||||
$pdf->Cell(140,10,$this->textConvert($operation->target), 1, 0, '');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50,10, $this->textConvert("Rodzaj zagrożenia: "), 1, 0, '', true);
|
||||
$pdf->Cell(140,10, $this->textConvert($operation->dangerType), 1, 0, '');
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
$fill = !$fill;
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
@ -388,6 +389,13 @@ class documentCreators extends Fpdf
|
||||
}
|
||||
|
||||
public function CreateAllFireFightersPDF($fireStationID){
|
||||
|
||||
$users = DB::table('users')->where("fireStationID", '=', $fireStationID)
|
||||
->leftJoin('ranks', 'users.degreeID', '=', 'ranks.id')
|
||||
->leftJoin('unitFunctions', 'users.functionID', '=', 'unitFunctions.id')
|
||||
->select('users.id','users.name', 'users.surname', 'users.phoneNumber', 'users.PESEL', 'users.email', 'users.statusID', 'ranks.rank', 'unitFunctions.unitFunction')
|
||||
->get();
|
||||
|
||||
$pdf = new AlphaPDF();
|
||||
$fill = false;
|
||||
$pdf->AddPage();
|
||||
@ -398,12 +406,290 @@ class documentCreators extends Fpdf
|
||||
$pdf->SetFont('arialpl','B',20);
|
||||
$pdf->Cell(190,10, $this->textConvert("Lista strażaków"),0,0,'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
|
||||
foreach( $users as $user) {
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('arialpl', '', 14);
|
||||
$pdf->SetFillColor(152, 152, 152);
|
||||
$pdf->Cell(190, 10, $this->textConvert($user->name . ' ' . $user->surname), 1, 0, 'C', 'fill');
|
||||
$pdf->SetFillColor(224, 224, 224);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(130, 10, $this->textConvert($user->email), 1, 0, 'C', 'fill');
|
||||
$pdf->Cell(60, 10, $this->textConvert('tel: '.$user->phoneNumber), 1, 0, 'C', 'fill');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(90, 10, $this->textConvert('Stopień: ' . $user->rank), 1, 0, 'C', 'fill');
|
||||
$pdf->Cell(100, 10, $this->textConvert('Funkcja:' . $user->unitFunction), 1, 0, 'C', 'fill');
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
||||
$pdf->Ln();
|
||||
$pdf->Output();
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
public function createAllEquipmentPDF($fireStationID){
|
||||
|
||||
$equipment = DB::table('equipment')->where("fireStationID", '=', $fireStationID)
|
||||
->whereNull('deleted_at')->get();
|
||||
|
||||
$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("Stan sprzętu"),0,0,'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('arialpl','B',14);
|
||||
$pdf->SetFillColor(152,152,152);
|
||||
$pdf->Cell(10,10, $this->textConvert("# "), 1, 0, 'C', true);
|
||||
$pdf->Cell(85,10, $this->textConvert("Nazwa "), 1, 0, 'C', true);
|
||||
$pdf->Cell(80,10, $this->textConvert("Param. char. "), 1, 0, 'C', true);
|
||||
$pdf->Cell(15,10, $this->textConvert("Ilość"), 1, 0, 'C', true);
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->SetFont('arialpl','',14);
|
||||
$fill = false;
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$i=1;
|
||||
foreach( $equipment as $item){
|
||||
$pdf->Cell(10,10, $i, 1, 0, 'C', $fill);
|
||||
$pdf->Cell(85,10,$this->textConvert($item->name), 1, 0, '', $fill);
|
||||
$pdf->Cell(80,10,$this->textConvert($item->parameter), 1, 0, '', $fill);
|
||||
$pdf->Cell(15,10,$this->textConvert($item->amount), 1, 0, 'C', $fill);
|
||||
$pdf->Ln();
|
||||
$fill = !$fill;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$pdf->Ln();
|
||||
$pdf->Output();
|
||||
exit;
|
||||
}
|
||||
|
||||
public function createAllTrainingsPDF($fireStationID){
|
||||
|
||||
$trainings = DB::table('trainings')->where("fireStationID", '=', $fireStationID)
|
||||
->whereNull('deleted_at')
|
||||
->paginate(10);
|
||||
|
||||
$howMuch = array();
|
||||
foreach($trainings as $training) {
|
||||
$id = $training->id;
|
||||
$howMuch[$id] = DB::table('trainingsFirefighters')->where('trainingID', '=', $id)->count();
|
||||
|
||||
}
|
||||
|
||||
$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 badań/szkoleń"),0,0,'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('arialpl','B',14);
|
||||
$pdf->SetFillColor(152,152,152);
|
||||
$pdf->Cell(10,10, $this->textConvert("# "), 1, 0, 'C', true);
|
||||
$pdf->Cell(130,10, $this->textConvert("Nazwa "), 1, 0, 'C', true);
|
||||
$pdf->Cell(50,10, $this->textConvert("Ilość z ukończonym"), 1, 0, 'C', true);
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->SetFont('arialpl','',14);
|
||||
$fill = false;
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$i=1;
|
||||
foreach( $trainings as $training){
|
||||
$pdf->Cell(10,10, $i, 1, 0, 'C', $fill);
|
||||
$pdf->Cell(130 ,10,$this->textConvert($training->trainingName), 1, 0, '', $fill);
|
||||
$pdf->Cell(50,10,$this->textConvert($howMuch[$training->id]), 1, 0, 'C', $fill);
|
||||
$pdf->Ln();
|
||||
$fill = !$fill;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$pdf->Ln();
|
||||
$pdf->Output();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
public function createSingleTrainingPDF($trainingID){
|
||||
$training = DB::table('trainings')->where("id", '=', $trainingID)
|
||||
->first();
|
||||
$fireFighters = DB::table('users')->where("fireStationID", "=", auth()->user()->fireStationID)
|
||||
->Join('trainingsFirefighters', function ($join) use ($trainingID) {
|
||||
$join->on('users.id', '=', 'trainingsFirefighters.firefighterID');
|
||||
$join->where('trainingsFirefighters.trainingID', '=', $trainingID);
|
||||
})
|
||||
->select('trainingsFirefighters.*', 'users.name', 'users.surname', 'users.id as userID')
|
||||
->get();
|
||||
|
||||
$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 z ukończonym: ".$training->trainingName),0,0,'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('arialpl','B',14);
|
||||
$pdf->SetFillColor(152,152,152);
|
||||
$pdf->Cell(10,10, $this->textConvert("# "), 1, 0, 'C', true);
|
||||
$pdf->Cell(100,10, $this->textConvert("Imię i Nazwisko "), 1, 0, 'C', true);
|
||||
$pdf->Cell(45,10, $this->textConvert("Data ukończenia"), 1, 0, 'C', true);
|
||||
$pdf->Cell(35,10, $this->textConvert("Ważne do"), 1, 0, 'C', true);
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->SetFont('arialpl','',14);
|
||||
$fill = false;
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$i=1;
|
||||
foreach( $fireFighters as $fireFighter){
|
||||
$pdf->Cell(10,10, $i, 1, 0, 'C', $fill);
|
||||
$pdf->Cell(100 ,10,$this->textConvert($fireFighter->name.' '.$fireFighter->surname), 1, 0, '', $fill);
|
||||
$pdf->Cell(45 ,10,$this->textConvert($fireFighter->dateOfComplete), 1, 0, 'C', $fill);
|
||||
$pdf->Cell(35 , 10,$this->textConvert($fireFighter->dateOfExpiry), 1, 0, 'C', $fill);
|
||||
$pdf->Ln();
|
||||
$fill = !$fill;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$pdf->Ln();
|
||||
$pdf->Output();
|
||||
exit;
|
||||
}
|
||||
|
||||
public function createAllVehiclesPDF($fireStationID){
|
||||
$vehicles = DB::table('vehicles')->where("fireStationID", '=', auth()->user()->fireStationID)
|
||||
->whereNull('deleted_at')->paginate(10);
|
||||
|
||||
$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 pojazdów:"),0,0,'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('arialpl','B',14);
|
||||
$pdf->SetFillColor(152,152,152);
|
||||
$pdf->Cell(70,10, $this->textConvert("Nazwa"), 1, 0, 'C', true);
|
||||
$pdf->Cell(50,10, $this->textConvert("Marka"), 1, 0, 'C', true);
|
||||
$pdf->Cell(35,10, $this->textConvert("Numer rej."), 1, 0, 'C', true);
|
||||
$pdf->Cell(35,10, $this->textConvert("Rok prod."), 1, 0, 'C', true);
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->SetFont('arialpl','',14);
|
||||
$fill = false;
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
foreach( $vehicles as $vehicle){
|
||||
$pdf->Cell(70 ,10,$this->textConvert($vehicle->name), 1, 0, '', $fill);
|
||||
$pdf->Cell(50 ,10,$this->textConvert($vehicle->brand), 1, 0, 'C', $fill);
|
||||
$pdf->Cell(35 , 10,$this->textConvert($vehicle->registrationNumber), 1, 0, 'C', $fill);
|
||||
$pdf->Cell(35 , 10,$this->textConvert($vehicle->productionYear), 1, 0, 'C', $fill);
|
||||
$pdf->Ln();
|
||||
$fill = !$fill;
|
||||
}
|
||||
|
||||
|
||||
$pdf->Ln();
|
||||
$pdf->Output();
|
||||
exit;
|
||||
}
|
||||
|
||||
public function createSingleVehiclePDF($vehicleID){
|
||||
$vehicle = DB::table('vehicles')->where("id", '=', $vehicleID)
|
||||
->first();
|
||||
|
||||
$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($vehicle->name),0,0,'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('arialpl','',14);
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Kryptonim: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->codename), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Marka: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->brand), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Numer rej: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->registrationNumber), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Rok Produkcji: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->productionYear), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Ważność przeglądu: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->examExpirationDate), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Termin ważności OC: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->insuranceExpirationDate), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Układ napędowy: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->driveType), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Typ podwozia: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->chassisType), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Producent nadwozia: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->bodyProducer), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Ilość osób w załodze: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->crewNumber), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Ilość piany w L: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->foamAgent), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Moc silnika w kW: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->enginePower), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Masa pojazdu: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->mass), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Numer podwozia: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->chassisNumber), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Numer Silnika: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->engineNumber), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Rodzaj paliwa: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->fuelType), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Rok prod. podwozia: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->chassisPoductionYear), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Data wprowadzenia: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->entryIntoServiceDate), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50 ,10,$this->textConvert("Opis Autopompy: "), 1, 0, '', true);
|
||||
$pdf->Cell(140 , 10,$this->textConvert($vehicle->fireEnginePumpDescription), 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
|
||||
|
||||
$pdf->Ln();
|
||||
$pdf->Output();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
@ -19,9 +19,13 @@ class trainingsController extends Controller
|
||||
->whereNull('deleted_at')
|
||||
->paginate(10);
|
||||
|
||||
|
||||
|
||||
$fireFighters = array();
|
||||
$howMuch = array();
|
||||
foreach($trainings as $training) {
|
||||
$id = $training->id;
|
||||
$howMuch[$id] = DB::table('trainingsFirefighters')->where('trainingID', '=', $id)->count();
|
||||
$fireFighters[$id] = DB::table('users')->where("fireStationID", "=", auth()->user()->fireStationID)
|
||||
->leftJoin('trainingsFirefighters', function ($join) use ($id) {
|
||||
$join->on('users.id', '=', 'trainingsFirefighters.firefighterID');
|
||||
@ -30,7 +34,7 @@ class trainingsController extends Controller
|
||||
->select('trainingsFirefighters.*', 'users.name', 'users.surname', 'users.id as userID')
|
||||
->get();
|
||||
}
|
||||
return View::make("trainings")->with(compact( "trainings", "fireFighters"));
|
||||
return View::make("trainings")->with(compact( "trainings", "fireFighters", "howMuch"));
|
||||
} else{
|
||||
return redirect()->to('/strazacy');
|
||||
}
|
||||
@ -176,4 +180,20 @@ class trainingsController extends Controller
|
||||
trainings::where('id', '=', $request->trainingID)
|
||||
->update(['trainingName' => $request->trainingName]);
|
||||
}
|
||||
|
||||
public function createAllTrainingsPDF(){
|
||||
if (auth()->user() != null && auth()->user()->fireStationID != null) {
|
||||
$request = request();
|
||||
$test = new documentCreators();
|
||||
$test->createAllTrainingsPDF($request->fireStationID);
|
||||
}
|
||||
}
|
||||
|
||||
public function createSingleTrainingPDF(){
|
||||
if (auth()->user() != null && auth()->user()->fireStationID != null) {
|
||||
$request = request();
|
||||
$test = new documentCreators();
|
||||
$test->createSingleTrainingPDF($request->trainingID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
public/css/theme.css
vendored
2
public/css/theme.css
vendored
@ -106,7 +106,7 @@ body {
|
||||
}
|
||||
|
||||
#left-menu ul li {
|
||||
width: 170px;
|
||||
width: 198px;
|
||||
height: 50px;
|
||||
border-radius: 5px;
|
||||
background: linear-gradient(white, #d6d6dd, white);
|
||||
|
@ -9,6 +9,13 @@
|
||||
@if(auth()->user()->accessLevel() == 50)
|
||||
<ul>
|
||||
<a href="sprzet/add"><li>Dodaj<img src="/img/left_menu_icon/add.png"></li></a>
|
||||
@if(auth()->user()->accessLevel() == 50)
|
||||
<form id="myForm" action="{{ route('equipment.pdfALL') }}" method="post" style="display:inline;">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" class="form-control" name="fireStationID" value="{{auth()->user()->fireStationID}}">
|
||||
<li onclick="myForm.submit();">Drukuj sprzęt</li>
|
||||
</form>
|
||||
@endif
|
||||
</ul>
|
||||
@endif
|
||||
@endif
|
||||
|
@ -8,6 +8,13 @@
|
||||
<ul>
|
||||
<a href="/strazacy/add"><li>Dodaj<img src="img/left_menu_icon/add.png"></li></a>
|
||||
<a href="/szkolenia"><li><font size="-2">Badania/Szkolenia</font><img src="/img/left_menu_icon/more.png"></li></a>
|
||||
@if(auth()->user()->accessLevel() == 50)
|
||||
<form id="myForm" action="{{ route('fireFighters.pdfAll') }}" method="post" style="display:inline;">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" class="form-control" name="fireStationID" value="{{auth()->user()->fireStationID}}">
|
||||
<li onclick="myForm.submit();">Drukuj wszystkich</li>
|
||||
</form>
|
||||
@endif
|
||||
</ul>
|
||||
@endif
|
||||
@endif
|
||||
@ -70,14 +77,6 @@
|
||||
Jednostka nie istnieje
|
||||
@else
|
||||
|
||||
@if(auth()->user()->accessLevel() == 50)
|
||||
<form action="{{ route('fireFighters.pdfAll') }}" method="post" style="display:inline;">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" class="form-control" name="fireStationID" value="{{auth()->user()->fireStationID}}">
|
||||
<button class="btn btn-dark" type="submit">Drukuj wszystkich</button>
|
||||
</form>
|
||||
@endif
|
||||
|
||||
|
||||
<table class='table'>
|
||||
<thead>
|
||||
|
@ -4,8 +4,8 @@
|
||||
<a href="/jednostka"><li name="jednostka"><img src="/img/jednostka.png">Jednostka</li></a>
|
||||
<a href="/strazacy"><li name="strazacy"><img src="/img/strazacy2.png">Strażacy</li></a>
|
||||
<a href="/pojazdy"> <li name="pojazdy"><img src="/img/car.png">Pojazdy</li></a>
|
||||
<a href="/straznica"><li name="straznica"><img src="/img/straznica.png">Strażnica</li></a>
|
||||
<a href="/sprzet"><li name="straznica"><img src="/img/straznica.png">Strażnica</li></a>
|
||||
<a href="/wyjazdy"><li name="wyjazdy"><img src="/img/wyjazdy.png">Wyjazdy</li></a>
|
||||
<a href="/dokumentacja"><li name="dokumentacja"><img src="/img/documents.png">Dokumentacja</li></a>
|
||||
{{-- <a href="/dokumentacja"><li name="dokumentacja"><img src="/img/documents.png">Dokumentacja</li></a>--}}
|
||||
</ol>
|
||||
</div>
|
||||
|
@ -9,6 +9,13 @@
|
||||
@if(auth()->user()->accessLevel() == 50)
|
||||
<ul>
|
||||
<a href="/wyjazdy/add"><li>Dodaj<img src="/img/left_menu_icon/add.png"></li></a>
|
||||
@if(auth()->user()->accessLevel() == 50)
|
||||
<form id="myForm" action="{{ route('operations.allPDF') }}" method="post" style="display:inline;">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" class="form-control" name="fireStationID" value="{{auth()->user()->fireStationID}}">
|
||||
<li onclick="myForm.submit();">Drukuj wyjazdy</li>
|
||||
</form>
|
||||
@endif
|
||||
</ul>
|
||||
@endif
|
||||
@endif
|
||||
@ -23,14 +30,6 @@
|
||||
Jednostka nie istnieje
|
||||
@else
|
||||
|
||||
<form action="{{ route('operations.allPDF') }}" method="post" style="display:inline;">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" class="form-control" name="fireStationID" value="{{auth()->user()->fireStationID}}">
|
||||
<button class="btn btn-dark" type="submit">Drukuj wszystkie</button>
|
||||
</form>
|
||||
|
||||
<br>
|
||||
|
||||
<table class='table'>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -44,9 +43,6 @@
|
||||
<th>Operacja</th>
|
||||
<th>Szczegóły</th>
|
||||
@endif
|
||||
<th>Szczegóły</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
@ -9,6 +9,13 @@
|
||||
@parent
|
||||
<ul>
|
||||
<a href="/strazacy"><li>Strażacy<img src="/img/left_menu_icon/more.png"></li></a>
|
||||
@if(auth()->user()->accessLevel() == 50)
|
||||
<form id="myForm" action="{{ route('trainings.pdfALL') }}" method="post" style="display:inline;">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" class="form-control" name="fireStationID" value="{{auth()->user()->fireStationID}}">
|
||||
<li onclick="myForm.submit();">Drukuj badania</li>
|
||||
</form>
|
||||
@endif
|
||||
</ul>
|
||||
@stop
|
||||
|
||||
@ -51,11 +58,16 @@
|
||||
|
||||
<th>{{$i}}</th>
|
||||
<td id="name{{ $training->id }}">{{ $training->trainingName }}</td>
|
||||
<td id="amount{{ $training->id }}">5</td>
|
||||
<td id="amount{{ $training->id }}">{{$howMuch[$training->id]}}</td>
|
||||
<td>
|
||||
<button class="btn btn-success " type="submit" onclick="renameTraining('{{$training->id}}')" id="{{$training->id}}">Zmień nazwę</button>
|
||||
<a href="{{ URL::asset('szkolenia/addTrainingsFireFighters/'.$training->id) }}" class="btn btn-secondary" role="button">Zarządzaj</a>
|
||||
<button class="btn btn-danger" type="submit" id="{{$training->id}}" onclick="deleteButton('{{$training->id}}')">Usuń</button>
|
||||
<form action="{{ route('trainings.pdfSingle') }}" method="post" style="display:inline;">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" class="form-control" name="trainingID" value="{{$training->id}}">
|
||||
<button class="btn btn-dark" type="submit">Drukuj badania</button>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<button class="btn btn-info" onclick="showMoreInformation('{{$training->id}}')" id="more{{$training->id}}">Więcej</button>
|
||||
|
@ -7,6 +7,12 @@
|
||||
@if(auth()->user()->accessLevel() == 50)
|
||||
<ul>
|
||||
<a href="/jednostka/edit"><li>Edytuj<img src="img/left_menu_icon/edit.png"></li></a>
|
||||
|
||||
<form id="myForm" action="{{ route('fireStation.singlePDF') }}" method="post" style="display:inline;">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" class="form-control" name="fireStationID" value="{{auth()->user()->fireStationID}}">
|
||||
<li onclick="myForm.submit();">Drukuj informacje</li>
|
||||
</form>
|
||||
</ul>
|
||||
@endif
|
||||
@endif
|
||||
@ -22,11 +28,6 @@
|
||||
@else
|
||||
<div>
|
||||
|
||||
<form action="{{ route('fireStation.singlePDF') }}" method="post" style="display:inline;">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" class="form-control" name="fireStationID" value="{{auth()->user()->fireStationID}}">
|
||||
<button class="btn btn-dark" type="submit">Drukuj informacje</button>
|
||||
</form>
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
|
@ -9,6 +9,14 @@
|
||||
@if(auth()->user()->accessLevel() == 50)
|
||||
<ul>
|
||||
<a href="/pojazdy/add"><li>Dodaj<img src="img/left_menu_icon/add.png"></li></a>
|
||||
@if(auth()->user()->accessLevel() == 50)
|
||||
<form id="myForm" action="{{ route('vehicles.pdfALL') }}" method="post" style="display:inline;">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" class="form-control" name="fireStationID" value="{{auth()->user()->fireStationID}}">
|
||||
<li onclick="myForm.submit();">Drukuj pojazdy</li>
|
||||
</form>
|
||||
@endif
|
||||
|
||||
</ul>
|
||||
@endif
|
||||
@endif
|
||||
@ -77,6 +85,11 @@
|
||||
</form>
|
||||
|
||||
@endif
|
||||
<form action="{{ route('vehicles.pdfSingle') }}" method="post" style="display:inline;">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" class="form-control" name="vehicleID" value="{{$vehicle->id}}">
|
||||
<button class="btn btn-dark" type="submit">Drukuj pojazd</button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
|
@ -85,6 +85,8 @@ Route::resource('vehicles', 'VehiclesController');
|
||||
Route::post('pojazdy/activate', 'VehiclesController@activate');
|
||||
Route::post('pojazdy/deactivate', 'VehiclesController@deactivate');
|
||||
Route::delete('pojazdy/{id}', 'VehiclesController@destroy')->name('VehiclesController.destroy');
|
||||
Route::post('/pojazdy/pdf/all', 'VehiclesController@createAllVehiclesPDF')->name('vehicles.pdfALL');
|
||||
Route::post('/pojazdy/pdf/single', 'VehiclesController@createSingleVehiclePDF')->name('vehicles.pdfSingle');
|
||||
|
||||
Route::get('/sprzet', 'EquipmentController@create');
|
||||
Route::get('/sprzet/add', 'EquipmentController@addForm');
|
||||
@ -93,6 +95,7 @@ Route::get('/sprzet/edit/{id}', 'EquipmentController@editForm');
|
||||
Route::post('/sprzet/edit', 'EquipmentController@update');
|
||||
Route::resource('equipment', 'EquipmentController');
|
||||
Route::delete('sprzet/{id}', 'EquipmentController@destroy')->name('EquipmentController.destroy');
|
||||
Route::post('/sprzet/pdf/all', 'EquipmentController@createAllEquipmentPDF')->name('equipment.pdfALL');
|
||||
|
||||
Route::get('/szkolenia', 'trainingsController@create');
|
||||
Route::post('/szkolenia', 'trainingsController@store');
|
||||
@ -101,6 +104,8 @@ Route::get('/szkolenia/addTrainingsFireFighters/{id}', 'trainingsController@addT
|
||||
Route::post('/szkolenia/addTrainingsFireFighters/', 'trainingsController@ajaxRequest');
|
||||
Route::post('/szkolenia/addTrainingsFireFighters/delete', 'trainingsController@deleteFireFighterTrainings');
|
||||
Route::delete('szkolenia/{id}', 'trainingsController@destroy')->name('trainingsController.destroy');
|
||||
Route::post('/szkolenia/pdf/all', 'trainingsController@createAllTrainingsPDF')->name('trainings.pdfALL');
|
||||
Route::post('/szkolenia/pdf/single', 'trainingsController@createSingleTrainingPDF')->name('trainings.pdfSingle');
|
||||
Route::resource('trainings', 'trainingsController');
|
||||
|
||||
Route::get('/userprofile', 'userProfileController@create');
|
||||
|
Loading…
Reference in New Issue
Block a user