forked from s421507/eOSP2
Dodanie 3 szkoleń wspólnych dla wszystkich jednostek, wymaganych by brać udział w wyjazdach w roli strażaka/kierowcy/dowódcy
This commit is contained in:
parent
1b0c7bc916
commit
7a9272b865
@ -15,7 +15,7 @@ class trainingsController extends Controller
|
||||
public function create(){
|
||||
|
||||
if(auth()->user() != null && auth()->user()->accessLevel() == 50 ){ //prezes,naczelnik
|
||||
$trainings = DB::table('trainings')->where("fireStationID", '=', auth()->user()->fireStationID)
|
||||
$trainings = DB::table('trainings')->where("fireStationID", '=', auth()->user()->fireStationID)->orWhere("fireStationID", '=', 0)
|
||||
->whereNull('deleted_at')
|
||||
->paginate(10);
|
||||
|
||||
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddTrainingsNecessaryForOperations extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('trainings', function (Blueprint $table) {
|
||||
});
|
||||
//szkolenia niezbędne w każdej jednostce, określają kto może uczestniczyć w wyjazdach w jakie roli
|
||||
DB::table('trainings')->insert([ 'id' => '1', 'fireStationID' => '0', 'trainingName' => 'szkolenie podstawowe' ]);
|
||||
DB::table('trainings')->insert([ 'id' => '2', 'fireStationID' => '0', 'trainingName' => 'dowódca' ]);
|
||||
DB::table('trainings')->insert([ 'id' => '3', 'fireStationID' => '0', 'trainingName' => 'kierowca-mechanik' ]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('trainings', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
@ -60,9 +60,13 @@
|
||||
<td id="name{{ $training->id }}">{{ $training->trainingName }}</td>
|
||||
<td id="amount{{ $training->id }}">{{$howMuch[$training->id]}}</td>
|
||||
<td>
|
||||
@if($training->fireStationID != 0)
|
||||
<button class="btn btn-success " type="submit" onclick="renameTraining('{{$training->id}}')" id="{{$training->id}}">Zmień nazwę</button>
|
||||
@endif
|
||||
<a href="{{ URL::asset('szkolenia/addTrainingsFireFighters/'.$training->id) }}" class="btn btn-secondary" role="button">Zarządzaj</a>
|
||||
@if($training->fireStationID != 0)
|
||||
<button class="btn btn-danger" type="submit" id="{{$training->id}}" onclick="deleteButton('{{$training->id}}')">Usuń</button>
|
||||
@endif
|
||||
<form action="{{ route('trainings.pdfSingle') }}" method="post" style="display:inline;">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" class="form-control" name="trainingID" value="{{$training->id}}">
|
||||
|
Loading…
Reference in New Issue
Block a user