diff --git a/app/Http/Controllers/CreateProjectController.php b/app/Http/Controllers/CreateProjectController.php index 9ed594ee..82a9323d 100644 --- a/app/Http/Controllers/CreateProjectController.php +++ b/app/Http/Controllers/CreateProjectController.php @@ -23,9 +23,36 @@ use App\Models\FurtherTasks; use App\Models\WorkstationsAssociationTasks; +// use DataTables; + class CreateProjectController extends Controller { + + public function finishCreatingProject($numberProject){ + + $project = CompanyProject::find($numberProject); + $project->order_project = 2 ; + $project->save(); + + return redirect()->route('home'); + } + + // public function testDataTables(Request $request){ + // dd($request); + // if ($request->ajax()) { + // $data = User::select('id','name','email')->get(); + // return Datatables::of($data)->addIndexColumn() + // ->addColumn('action', function($data){ + // $button = ''; + // $button .= ' '; + // return $button; + // }) + // ->make(true); + // } + // return view('recebeIdiota'); + // } + public function deleteWorkstation($name) { @@ -128,32 +155,32 @@ public function EditEquipmentsProjects(Request $request) $executionOrder = 1; // Inicia a contagem da ordem de execução - foreach ($request->input('ordemTasks') as $key => $value) { - // Procura o registro relevante em OrderEquipmentTasks - $orderEquipmentTask = OrderEquipmentTasks::where('equipment_id', $request->equipmentId) - ->where('elemental_tasks_id', $key) - ->first(); + // foreach ($request->input('ordemTasks') as $key => $value) { + // // Procura o registro relevante em OrderEquipmentTasks + // $orderEquipmentTask = OrderEquipmentTasks::where('equipment_id', $request->equipmentId) + // ->where('elemental_tasks_id', $key) + // ->first(); - // Se o valor é 'on' - if ($value === "on") { - // Se o registro não existir, cria um novo - if (!$orderEquipmentTask) { - $orderEquipmentTask = new OrderEquipmentTasks(); - $orderEquipmentTask->equipment_id = $request->equipmentId; - $orderEquipmentTask->elemental_tasks_id = $key; - } - // Atualiza a ordem de execução independentemente do registro ser novo ou não - $orderEquipmentTask->execution_order = $executionOrder; - $orderEquipmentTask->save(); + // // Se o valor é 'on' + // if ($value === "on") { + // // Se o registro não existir, cria um novo + // if (!$orderEquipmentTask) { + // $orderEquipmentTask = new OrderEquipmentTasks(); + // $orderEquipmentTask->equipment_id = $request->equipmentId; + // $orderEquipmentTask->elemental_tasks_id = $key; + // } + // // Atualiza a ordem de execução independentemente do registro ser novo ou não + // $orderEquipmentTask->execution_order = $executionOrder; + // $orderEquipmentTask->save(); - // Incrementa a ordem de execução para o próximo 'on' - $executionOrder++; - } - // Se o valor é 'off' e o registro existir, o deleta - elseif ($value === "off" && $orderEquipmentTask) { - $orderEquipmentTask->delete(); - } - } + // // Incrementa a ordem de execução para o próximo 'on' + // $executionOrder++; + // } + // // Se o valor é 'off' e o registro existir, o deleta + // elseif ($value === "off" && $orderEquipmentTask) { + // $orderEquipmentTask->delete(); + // } + // } // Atualiza a ordem de execução dos restantes 'on' após as remoções $remainingOrderEquipmentTasks = OrderEquipmentTasks::where('equipment_id', $request->equipmentId) diff --git a/composer.json b/composer.json index 4033ba10..8b575a69 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,8 @@ "laravel/tinker": "^2.8", "phpoffice/phpspreadsheet": "^1.28", "symfony/http-client": "^6.2", - "symfony/mailgun-mailer": "^6.2" + "symfony/mailgun-mailer": "^6.2", + "yajra/laravel-datatables-oracle": "^10.3.1" }, "require-dev": { "fakerphp/faker": "^1.9.1", diff --git a/composer.lock b/composer.lock index 2ef698b2..0adf23ac 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0792c882ef95d119142ebe7244699653", + "content-hash": "51ebbc942093bdb678f8cecc025df588", "packages": [ { "name": "bacon/bacon-qr-code", @@ -6333,6 +6333,90 @@ "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, "time": "2022-06-03T18:03:27+00:00" + }, + { + "name": "yajra/laravel-datatables-oracle", + "version": "v10.6.0", + "source": { + "type": "git", + "url": "https://github.com/yajra/laravel-datatables.git", + "reference": "66299d930c1dd626e9d264cd8b0cfa0ddee13366" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/66299d930c1dd626e9d264cd8b0cfa0ddee13366", + "reference": "66299d930c1dd626e9d264cd8b0cfa0ddee13366", + "shasum": "" + }, + "require": { + "illuminate/database": "^9|^10", + "illuminate/filesystem": "^9|^10", + "illuminate/http": "^9|^10", + "illuminate/support": "^9|^10", + "illuminate/view": "^9|^10", + "php": "^8.0.2" + }, + "require-dev": { + "nunomaduro/larastan": "^2.4", + "orchestra/testbench": "^8", + "yajra/laravel-datatables-html": "^9.3.4|^10" + }, + "suggest": { + "yajra/laravel-datatables-buttons": "Plugin for server-side exporting of dataTables.", + "yajra/laravel-datatables-editor": "Plugin to use DataTables Editor (requires a license).", + "yajra/laravel-datatables-export": "Plugin for server-side exporting using livewire and queue worker.", + "yajra/laravel-datatables-fractal": "Plugin for server-side response using Fractal.", + "yajra/laravel-datatables-html": "Plugin for server-side HTML builder of dataTables." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "10.x-dev" + }, + "laravel": { + "providers": [ + "Yajra\\DataTables\\DataTablesServiceProvider" + ], + "aliases": { + "DataTables": "Yajra\\DataTables\\Facades\\DataTables" + } + } + }, + "autoload": { + "files": [ + "src/helper.php" + ], + "psr-4": { + "Yajra\\DataTables\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Arjay Angeles", + "email": "aqangeles@gmail.com" + } + ], + "description": "jQuery DataTables API for Laravel 4|5|6|7|8|9|10", + "keywords": [ + "datatables", + "jquery", + "laravel" + ], + "support": { + "issues": "https://github.com/yajra/laravel-datatables/issues", + "source": "https://github.com/yajra/laravel-datatables/tree/v10.6.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/yajra", + "type": "github" + } + ], + "time": "2023-06-29T10:05:01+00:00" } ], "packages-dev": [ diff --git a/public/StyleAdmin/css/adminlte.css b/public/StyleAdmin/css/adminlte.css index de80dc17..189d2571 100644 --- a/public/StyleAdmin/css/adminlte.css +++ b/public/StyleAdmin/css/adminlte.css @@ -10820,7 +10820,7 @@ .animation__wobble { .preloader { display: -ms-flexbox; display: flex; - background-color: #f4f6f9; + background-color: #ebf3f4; height: 100vh; width: 100%; transition: height 200ms linear; diff --git a/resources/views/Admin/index.blade.php b/resources/views/Admin/index.blade.php index 817d8b89..1850a096 100644 --- a/resources/views/Admin/index.blade.php +++ b/resources/views/Admin/index.blade.php @@ -25,6 +25,7 @@
+ {{-- Em Planeamento --}}
@@ -32,7 +33,7 @@
Em planeamento - {{count($CompanyProject)}} + {{ count($CompanyProject) }}
@@ -46,25 +47,26 @@
- @foreach ($CompanyProject as $project) -
-
-
{{ $project->company_project_description }}
-
- - - + @if ($project->order_project == 1) +
+
+
{{ $project->company_project_description }}
+
+ + + +
-
+ @endif @endforeach - -
+ + {{-- Preparadas --}}
@@ -87,49 +89,25 @@ class="btn btn-tool">
-
-
-
Paragem Cliente 2 OUT2022
-
- - - + @foreach ($CompanyProject as $project) + @if ($project->order_project == 2) +
+
+
Paragem Cliente 2 OUT2022
+
+ + + +
+
-
-
-
-
-
Paragem Cliente 3 NOV2022
-
- - - -
-
-
-
-
-
Paragem Cliente 1 OUT2022
-
- - - -
-
-
-
-
-
Paragem Cliente 1 SET2022
-
- - - -
-
-
+ @endif + @endforeach
+ + {{-- Execucao --}}
@@ -152,29 +130,25 @@ class="btn btn-tool">
-
-
-
Paragem Cliente 1 JUN2022
-
- - - + @foreach ($CompanyProject as $project) + @if ($project->order_project == 3) +
+
+
Paragem Cliente 1 JUN2022
+
+ + + +
+
-
-
-
-
-
Paragem Cliente 2 JUL2022
-
- - - -
-
-
+ @endif + @endforeach
+ + {{-- Concluidas --}}
@@ -197,40 +171,26 @@ class="btn btn-tool">
-
-
-
Paragem Cliente 2 JAN2022
-
- - - + @foreach ($CompanyProject as $project) + @if ($project->order_project == 3) +
+
+
Paragem Cliente 2 JAN2022
+
+ + + +
+
-
-
-
-
-
Paragem Cliente 1 FEV022
-
- - - -
-
-
-
-
-
Paragem Cliente 2 MAIO2022
-
- - - -
-
-
+ @endif + @endforeach
+
+ {{-- ./row --}}
{{-- /.container-fluid --}} diff --git a/resources/views/projectsClients/articulated_2.blade.php b/resources/views/projectsClients/articulated_2.blade.php index f6ea92e3..028520f2 100644 --- a/resources/views/projectsClients/articulated_2.blade.php +++ b/resources/views/projectsClients/articulated_2.blade.php @@ -1253,6 +1253,7 @@ class="fas fa-plus">

{{ $listEquipmentsProject->equipment_tag }}

+ {{-- ./row --}} +
-
-
+ + +
+ {{-- ./PSV-card --}} + + {{-- Ambito-PSV --}} +

Ambito : {{ $listEquipmentsProject->equipmentAssociationAmbit->first()->ambitsEquipment->ambits_description }} @@ -1804,9 +1811,9 @@ class="form-control card_inputs" {{-- ./card-body --}} -

- - {{-- ./psv_card --}} + {{-- ./Ambito-PSV --}} @endif @if ($listEquipmentsProject->equipment_type_id == 2) @@ -1875,6 +1878,7 @@ class="btn btn-outline-success ">Adicionar
+ {{-- 2 inputs per line :equipmentTag ,equipmentDescription --}}
@@ -1891,268 +1895,265 @@ class="form-control card_inputs" id="equipmentTag" placeholder="Tag..." aria-label="Tag Equipment" aria-describedby="form-tagEquipment"> - -
-
-
-
- - - -
- - -
+
- {{-- ./row --}} - - {{-- 3 inputs per line :serialNumberEquipment, equipmentBrand, equipmentModel --}} -
-
-
- - - -
- - -
-
-
-
-
- - - -
- - -
-
-
-
-
- - - -
- - -
+
+
+ + + +
+ +
- {{-- ./row --}} +
+ {{-- ./row --}} - {{-- 3 inputs per line :equipmentDimension, equipmentRating, equipmentDimcerta --}} -
-
-
- - - -
- - -
-
-
-
-
- - - -
- - -
-
-
-
-
- - - -
- - -
+ {{-- 3 inputs per line :serialNumberEquipment, equipmentBrand, equipmentModel --}} +
+
+
+ + + +
+ +
- {{-- ./row --}} - - {{-- 3 Inputs per line :main_equipment ,p&id ,sap_number --}} -
-
-
- - - -
- - -
-
-
-
-
- - - -
- - -
-
-
-
-
- - - -
- - -
+
+
+ + + +
+ +
- {{-- ./row --}} - - {{-- 3 Inputs per line :material ,manufacturerEquipment ,isolationEquipment --}} -
-
-
- - - -
- - -
-
-
-
-
- - - -
- - -
-
-
-
-
- - - -
- - -
+
+
+ + + +
+ +
- {{-- ./row --}} +
+ {{-- ./row --}} - {{-- 2 Selects per line :psv_scaffold, psv_crane --}} - {{--
+ {{-- 3 inputs per line :equipmentDimension, equipmentRating, equipmentDimcerta --}} +
+
+
+ + + +
+ + +
+
+
+
+
+ + + +
+ + +
+
+
+
+
+ + + +
+ + +
+
+
+
+ {{-- ./row --}} + + {{-- 3 Inputs per line :main_equipment ,p&id ,sap_number --}} +
+
+
+ + + +
+ + +
+
+
+
+
+ + + +
+ + +
+
+
+
+
+ + + +
+ + +
+
+
+
+ {{-- ./row --}} + + {{-- 3 Inputs per line :material ,manufacturerEquipment ,isolationEquipment --}} +
+
+
+ + + +
+ + +
+
+
+
+
+ + + +
+ + +
+
+
+
+
+ + + +
+ + +
+
+
+
+ {{-- ./row --}} + + {{-- 2 Selects per line :psv_scaffold, psv_crane --}} +
@@ -2185,22 +2186,270 @@ class="form-control card_inputs"
-
--}} - {{-- ./row --}}
- + {{-- ./row --}}
- + +
+ + + {{-- Ambito-ISV --}} +
+
+

Ambito : + {{ $listEquipmentsProject->equipmentAssociationAmbit->first()->ambitsEquipment->ambits_description }} +

+
+ +
+
+ {{-- ./card-header --}} +
+
+
+

Lista de Tarefas Elementares : + {{ $listEquipmentsProject->equipmentAssociationAmbit->first()->ambitsEquipment->ambits_description }} +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{-- Apenas para ver se recebe um on ou off, o hidden serve para devolver valor se o checkbox nao estiver a 'checked' --}} + + + + + + + + + + +
#Tarefas ElementaresSelecionar Tarefa + Inspecionar
TE1Desmontar da linha + + + + +
TE2Descontaminar + + + + +
TE3Pŕe-Teste + + + + +
TE4Abertura da válvula, análise e controle + dos + componentes + + + + +
TE5Limpeza e lavagem dos componentes + + + + +
TE6Retificação e lapidação + + + + +
TE7Fecho da válvula e substituição de + componentes + + + + +
TE8Calibrar e certificar + + + + +
TE9Pintura + + + + +
TE10Montagem na linha + + + + +
TE11Inspeção Final + + + + +
+
+ + + + +
+ +
+
+
+
+
+

Fluxo da Tarefa

+

+
+
+
+

Indique a tarefa :

+ +
+
+

Selecione Após qual tarefa :

+ +
+
+
+
+
+
+ Adicionar +
+
+
+
+
+
+ {{-- ./description --}} +
+ {{-- ./card-body --}} +
+ {{-- ./Ambito-ISV --}} @endif @if ($listEquipmentsProject->equipment_type_id == 1)
-

CV

-
{{-- 2 inputs per line :equipmentTag ,equipmentDescription --}}
@@ -2244,7 +2493,6 @@ class="form-control card_inputs"
{{-- ./row --}} - {{-- 3 inputs per line :serialNumberEquipment, equipmentBrand, equipmentModel --}}
@@ -2305,7 +2553,6 @@ class="form-control card_inputs"
{{-- ./row --}} - {{-- 3 inputs per line :equipmentDimension, equipmentRating, equipmentDimcerta --}}
@@ -2315,7 +2562,7 @@ class="form-control card_inputs" style="color: #00B0EA;">
-
-
-
{{-- ./row --}} - {{-- 3 Inputs per line :main_equipment ,P_idEquipment ,NumberSapEquipment --}}
@@ -2371,7 +2617,7 @@ class="form-control card_inputs" style="color: #00B0EA;">
-
-
-
{{-- ./row --}} - {{-- 3 Inputs per line :materialEquipment ,manufacturerEquipment ,isolationEquipment --}}
@@ -2428,7 +2673,7 @@ class="form-control card_inputs" style="color: #00B0EA;">
-
-
-
{{-- ./row --}} - {{-- 3 Inputs per line : actuatorManufacturer, --}}
@@ -2485,7 +2729,7 @@ class="form-control card_inputs" style="color: #00B0EA;">
-
-
-
{{-- ./Row --}} - {{-- 2 Inputs per line : actuatorManufacturer, --}}
@@ -2544,7 +2787,7 @@ class="form-control card_inputs" style="color: #00B0EA;">
-
-
{{-- ./row --}} - - {{-- 2 Selects per line :psv_scaffold, psv_crane --}} - {{--
-
-
- - - -
- - -
-
-
-
-
- - - -
- - -
-
-
-
--}} - {{-- ./row --}}
-
+ + {{-- Ambito-CV --}} +
+
+

Ambito : + {{ $listEquipmentsProject->equipmentAssociationAmbit->first()->ambitsEquipment->ambits_description }} +

+
+ +
+
+ {{-- ./card-header --}} +
+
+
+

Lista de Tarefas Elementares : + {{ $listEquipmentsProject->equipmentAssociationAmbit->first()->ambitsEquipment->ambits_description }} +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{-- Apenas para ver se recebe um on ou off, o hidden serve para devolver valor se o checkbox nao estiver a 'checked' --}} + + + + + + + + + + +
#Tarefas ElementaresSelecionar Tarefa + Inspecionar
TE1Desmontar da linha + + + + +
TE2Descontaminar + + + + +
TE3Pŕe-Teste + + + + +
TE4Abertura da válvula, análise e controle + dos + componentes + + + + +
TE5Limpeza e lavagem dos componentes + + + + +
TE6Retificação e lapidação + + + + +
TE7Fecho da válvula e substituição de + componentes + + + + +
TE8Calibrar e certificar + + + + +
TE9Pintura + + + + +
TE10Montagem na linha + + + + +
TE11Inspeção Final + + + + +
+
+ + + + +
+ +
+
+
+
+
+

Fluxo da Tarefa

+

+
+
+
+

Indique a tarefa :

+ +
+
+

Selecione Após qual tarefa :

+ +
+
+
+
+
+
+ Adicionar +
+
+
+
+
+
+ {{-- ./description --}} +
+ {{-- ./card-body --}} +
+ {{-- ./Ambito-CV --}} @endif
+ {{-- ./modal-body --}}
- @endforeach + {{-- ./modal-showEquipment --}} - {{-- @foreach ($listEquipmentsProjects as $listEquipmentsProject) - @foreach ($listEquipmentsProject->specificAttributes as $attribute) -