ispt4.0_laravel/resources/views/userClient/showReportingAllEquipmentsForAmbitProject.blade.php
2025-03-12 12:02:15 +00:00

136 lines
5.0 KiB
PHP
Executable File

@extends('Templates/AdminLayout/AdminLayout')
@section('Main-content')
<input type="hidden" id="ambitId" value="{{ $ambitId }}">
<input type="hidden" id="projectId" value="{{ $projectId }}">
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Relatório geral Ambito</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item active"><a href="{{ route('reportingDataClient') }}">Obras Concluidas</a>
</li>
<li class="breadcrumb-item active">
<a href="{{ route('showDataDetailsProjectClient', ['projectID' => $projectId]) }}">Relatorios Gerais</a>
</li>
<li class="breadcrumb-item active">Relatório geral Ambito</li>
</ol>
</div>
</div>
</div>
</section>
<fieldset class="content">
<div class="container-fluid">
<div class="card card-primary">
<div class="card-header">
<div class="row">
<div class="col-sm d-flex align-items-center">
<h3 class="card-title ">{{ $dataAmbit->ambits_description }}</h3>
</div>
<div class="col-sm text-right">
<a href="{{ route('showReportingForAmbitsProjectPdf', ['ambitId' => $ambitId, 'projectId' => $projectId]) }}">
<i class="fa-solid fa-file-pdf fa-2x"></i>
</a>
</div>
</div>
</div>
<!--./card-header-->
<div class="card-body">
<table id="equipments" class="table table-bordered table-striped">
<thead>
<tr>
<th> ISPT</th>
<th>Unidade</th>
<th>Tag </th>
<th>Dim</th>
{{-- <th>#(Classe)</th> --}}
<th>DN</th>
<th>P&ID </th>
{{-- <th>Observacoes</th> --}}
<th>Andaime</th>
<th>Isolamento</th>
<th>Grua</th>
{{-- <th>Concluido</th> --}}
</tr>
</thead>
</table>
</div>
<!--./card-body-->
</div>
<!--./card card-primary-->
</div>
</fieldset>
@endsection
@section('scriptsTemplateAdmin')
<script>
var projectIdValue = document.getElementById('projectId').value;
console.log(projectIdValue);
</script>
<script type="text/javascript">
var dataTables;
$(document).ready(function() {
dataTables = $('#equipments').DataTable({
responsive: true,
processing: true,
serverSide: true,
ajax: {
url: '{{ route('getEquipmentsOfAmbit') }}', // Certifique-se de que esta rota esteja correta.
type: 'GET',
data: function(d) {
// Busca diretamente o valor de um input tipo Hidden para buscar e enviar o valor do id do project atual
d.ambitId = $('#ambitId').val();
d.projectId = $('#projectId').val();
}
},
columns: [{
data: 'ispt_number',
name: 'ispt_number'
},
{
data: 'unit_id',
name: 'unit_id'
},
{
data: 'equipment_tag',
name: 'equipment_tag'
},
{
data: 'dim',
name: 'dim'
}, {
data: 'dn',
name: 'dn'
},
{
data: 'pid',
name: 'pid'
},
{
data: 'scaffold',
name: 'scaffold'
},
{
data: 'isolation',
name: 'isolation'
},
{
data: 'crane',
name: 'crane'
},
],
});
});
</script>
@endsection