93 lines
3.4 KiB
PHP
93 lines
3.4 KiB
PHP
@extends('Templates/templateAdmin')
|
|
|
|
@section('Main-content')
|
|
<section class="content-header">
|
|
<div class="container-fluid">
|
|
<div class="row mb-2">
|
|
<div class="col-sm-6">
|
|
<h1>Obras dos Clientes</h1>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<ol class="breadcrumb float-sm-right">
|
|
</li>
|
|
<li class="breadcrumb-item active"> Obras dos Clientes</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Main content -->
|
|
<section class="content">
|
|
<div class="container-fluid">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-12">
|
|
{{-- <input type="hidden" id="projectId" value="{{ $receiveDataProject->company_projects_id }}"> --}}
|
|
{{-- <input type="hidden" id="AmbitsIdString" value="{{ $AmbitsIdString }}"> --}}
|
|
<div class="card card-primary">
|
|
<div class="card-header">
|
|
<h3 class="card-title">Clientes</h3>
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<table id="showAllClientsForProjectReportsTable" class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Empresa</th>
|
|
<th>Qtd.Obras Concluidas</th>
|
|
<th>Visualizar</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
|
|
</div>
|
|
<!--card-body-->
|
|
</div>
|
|
<!-- card card-primary -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|
|
@section('scriptsTemplateAdmin')
|
|
|
|
<script type="text/javascript">
|
|
var dataTables;
|
|
$(document).ready(function() {
|
|
|
|
dataTables = $('#showAllClientsForProjectReportsTable').DataTable({
|
|
responsive: true,
|
|
processing: true,
|
|
serverSide: true,
|
|
ajax: {
|
|
// Rota para obter os valores para o Yajra
|
|
url: '{{ route('showAllClientsForProjectReportsTable') }}',
|
|
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.AmbitsIdString = $('#AmbitsIdString').val();
|
|
d.projectId = $('#projectId').val();
|
|
}
|
|
},
|
|
columns: [{
|
|
data: 'company',
|
|
name: 'company'
|
|
},
|
|
{
|
|
data: 'amount_of_projects_completed',
|
|
name: 'amount_of_projects_completed'
|
|
},
|
|
{
|
|
data: 'action',
|
|
name: 'action',
|
|
orderable: false,
|
|
searchable: false
|
|
},
|
|
],
|
|
});
|
|
});
|
|
</script>
|
|
|
|
@endsection
|