diff --git a/.idea/php.xml b/.idea/php.xml
index ffcd053..8afe83c 100644
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -97,12 +97,16 @@
+
+
+
+
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 3248633..2538e00 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -1,32 +1,29 @@
-
-
+
+
+
+
+
+
+
+
+
-
+
$PROJECT_DIR$/composer.json
-
-
-
-
-
-
@@ -124,53 +121,41 @@
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
@@ -187,40 +172,38 @@
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Http/Controllers/operationsController.php b/app/Http/Controllers/operationsController.php
index 7994efc..478a0e6 100644
--- a/app/Http/Controllers/operationsController.php
+++ b/app/Http/Controllers/operationsController.php
@@ -87,12 +87,18 @@ class operationsController extends Controller
->get();
- $operationsTrucks = DB::table('vehicles')->where("vehicles.fireStationID", "=", auth()->user()->fireStationID )
- ->leftJoin('operationsTrucks', function ($join) use($id){
- $join->on('vehicles.id', '=', 'operationsTrucks.truckID');
- $join->where('operationsTrucks.operationID', '=', $id);
- })
- ->leftJoin('users', 'operationsTrucks.driverID', '=', 'users.id')
+// $operationsTrucks = DB::table('vehicles')->where("vehicles.fireStationID", "=", auth()->user()->fireStationID )
+// ->leftJoin('operationsTrucks', function ($join) use($id){
+// $join->on('vehicles.id', '=', 'operationsTrucks.truckID');
+// $join->where('operationsTrucks.operationID', '=', $id);
+// })
+// ->leftJoin('users', 'operationsTrucks.driverID', '=', 'users.id')
+// ->select('vehicles.*', 'operationsTrucks.truckID', 'operationsTrucks.driverID', 'users.name as driverName', 'users.surname as driverSurname')
+// ->get();
+
+ $operationsTrucks = DB::table('operationsTrucks')->where("operationsTrucks.operationID", "=", $id)
+ ->join('users', 'operationsTrucks.driverID', '=', 'users.ID')
+ ->join('vehicles', 'operationsTrucks.truckID', '=', 'vehicles.ID')
->select('vehicles.*', 'operationsTrucks.truckID', 'operationsTrucks.driverID', 'users.name as driverName', 'users.surname as driverSurname')
->get();
@@ -191,7 +197,8 @@ class operationsController extends Controller
'transport.*' => 'required',
],
[
- 'required' => ':attribute jest wymagany(e)'
+ 'required' => ':attribute jest wymagany(e)',
+ 'operationTarget.required' => 'Cel jest wyma gany'
]);
diff --git a/resources/views/layout/app.blade.php b/resources/views/layout/app.blade.php
index 58b4381..6ef26fe 100644
--- a/resources/views/layout/app.blade.php
+++ b/resources/views/layout/app.blade.php
@@ -8,10 +8,10 @@
{{-- --}}
- .
+
{{-- --}}
{{-- --}}
-
+
diff --git a/resources/views/operation.blade.php b/resources/views/operation.blade.php
index 869a659..63911c3 100644
--- a/resources/views/operation.blade.php
+++ b/resources/views/operation.blade.php
@@ -3,10 +3,7 @@
@section('left-menu')
@parent
@stop
@@ -16,72 +13,102 @@
@if( auth()->user()->fireStationID == NULL)
Jednostka nie istnieje
@else
-
-
-
- @foreach($operations as $operation)
+
@endif
@@ -103,3 +130,5 @@
}
+
+
diff --git a/resources/views/operationAdd.blade.php b/resources/views/operationAdd.blade.php
index eb2d8ad..d1e1a5b 100644
--- a/resources/views/operationAdd.blade.php
+++ b/resources/views/operationAdd.blade.php
@@ -3,10 +3,7 @@
@section('left-menu')
@parent
@stop
@@ -14,9 +11,11 @@
@parent