194 lines
8.7 KiB
PHP
Executable File
194 lines
8.7 KiB
PHP
Executable File
@extends('Templates/AdminLayout/AdminLayout')
|
|
|
|
@section('Main-content')
|
|
<!-- Content Header (Page header) -->
|
|
<section class="content-header">
|
|
<div class="container-fluid">
|
|
<div class="row mb-2">
|
|
<div class="col-sm-6">
|
|
<h1>{{ $numberProject->company_project_description }} - Qrcodes</h1>
|
|
<input type="hidden" value="{{ $numberProject->company_projects_id }}" id="receiveNumberProject">
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<ol class="breadcrumb float-sm-right">
|
|
<li class="breadcrumb-item"><a href="{{ route('home') }}">Dashboard</a></li>
|
|
{{-- <li class="breadcrumb-item"><a href="{{ route('')}}./preparadas.html">Preparadas</a></li> --}}
|
|
<li class="breadcrumb-item"> <a href=" {{ route('ExecutionProject',['projectID' => $numberProject->company_projects_id])}}">{{ $numberProject->company_project_description }}</a></li>
|
|
|
|
<li class="breadcrumb-item active">{{ $numberProject->company_project_description }} - Qrcodes</li>
|
|
</ol>
|
|
</div><!-- /.col -->
|
|
</div>
|
|
</div><!-- /.container-fluid -->
|
|
</section>
|
|
<!-- /.content-header -->
|
|
|
|
|
|
<!-- Main content -->
|
|
<section class="content">
|
|
|
|
<div class="container-fluid">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-12">
|
|
|
|
<!-- Articulado -->
|
|
<div class="card card-primary" id="CardArticuladoObra">
|
|
<div class="card-header">
|
|
<h3 class="card-title">Articulado</h3>
|
|
<!-- /.card-tools -->
|
|
</div>
|
|
<!-- /.card-header -->
|
|
|
|
<div class="card-body">
|
|
|
|
<!-- Table articulado de obra -->
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3 class="card-title">Equipamentos da obra</h3>
|
|
</div>
|
|
<!-- /.card-header -->
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="table-responsive">
|
|
<div class="row text-center">
|
|
|
|
{{-- Para colocar os filtros a Funcionar, deve primeiro alterar a tabela para Yajra --}}
|
|
|
|
<div class="form-group col-sm">
|
|
<label>Tipo de Equipamento </label>
|
|
<select id="tipo_valvulasList" name="tipo_valvulasList"
|
|
class="form-control">
|
|
<option value='#' selected>Mostrar Todos</option>
|
|
@foreach ($equipmentsTypes as $equipmentsType)
|
|
<option value="{{ $equipmentsType->equipment_type_id }}">
|
|
{{ $equipmentsType->equipment_type_name }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
|
|
<div class="col-sm">
|
|
<div class="form-group">
|
|
<label> Fabricas </label>
|
|
<select id="unitsList" name="unitsList" class="form-control">
|
|
<option value='#' selected>Mostrar Todos</option>
|
|
@foreach ($unitsProject as $unit)
|
|
<option value="{{ $unit->unit_id }}">
|
|
{{ $unit->unit_name }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<table id="tableEquipmentWithQrcode" class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Tag</th>
|
|
<th>Descrição</th>
|
|
<th>Tipo Equipamento</th>
|
|
<th>Fabrica</th>
|
|
<th>Âmbito</th>
|
|
<th>Ação</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
|
|
</div>
|
|
<!-- ./table-responsive-->
|
|
</div>
|
|
<!--./card-body-->
|
|
</div>
|
|
<!-- ./card -->
|
|
|
|
<div class="card-footer">
|
|
<!-- Botao para criar os Multiplos Qrcodes nas Folhas -->
|
|
<div class="float-left">
|
|
<a href="{{ route('showAllEquipmentsInProjectForQrCode', ['projectId' => $numberProject->company_projects_id]) }}"
|
|
class="btn btn-outline-primary"> Imprimir Códigos QR</a>
|
|
</div>
|
|
</div>
|
|
<!-- ./card-footer -->
|
|
|
|
|
|
</div>
|
|
<!-- ./card-body -->
|
|
|
|
</div>
|
|
<!-- ./card card-primary -->
|
|
|
|
</div>
|
|
<!--/.col-md-12 -->
|
|
</div>
|
|
<!-- ./row justify-content-center -->
|
|
</div>
|
|
<!-- ./container-fluid -->
|
|
|
|
</section>
|
|
<!-- ./content -->
|
|
@endsection
|
|
|
|
|
|
@section('scriptsTemplateAdmin')
|
|
|
|
<script type="text/javascript">
|
|
var dataTables;
|
|
$(document).ready(function() {
|
|
|
|
dataTables = $('#tableEquipmentWithQrcode').DataTable({
|
|
responsive: true,
|
|
processing: true,
|
|
serverSide: true,
|
|
ajax: {
|
|
url: '{{ route('getDetailsEquipmentQrcode') }}',
|
|
type: 'GET',
|
|
data: function(d) {
|
|
|
|
d.receiveNumberProject = $('#receiveNumberProject').val();
|
|
// Envia as variaveis de acordo com as opcoes selecionadas para o DataTables
|
|
d.equipmentTypeSelected = $('#tipo_valvulasList').val();
|
|
d.unitSelected = $('#unitsList').val();
|
|
d.receiveAllUnits = $('#receiveUnitsClientRelated').val();
|
|
}
|
|
},
|
|
columns: [{
|
|
data: 'equipment_tag',
|
|
name: 'equipment_tag'
|
|
},
|
|
{
|
|
data: 'equipment_description',
|
|
name: 'equipment_description'
|
|
},
|
|
{
|
|
data: 'equipment_type_name',
|
|
name: 'equipment_type_name'
|
|
},
|
|
{
|
|
data: 'unit_name',
|
|
name: 'unit_name'
|
|
},
|
|
{
|
|
data: 'ambit_name',
|
|
name: 'ambit_name'
|
|
},
|
|
|
|
{
|
|
data: 'action',
|
|
name: 'action',
|
|
orderable: false,
|
|
searchable: false
|
|
},
|
|
],
|
|
});
|
|
});
|
|
|
|
//De acordo com os valores deste campos, como anteriormente ja sao enviados para a DataTables para fazer as filtragens, agora atualizamos a Tabela com base no filtros feitos
|
|
$('#tipo_valvulasList,#unitsList,#receiveUnitsClientRelated').on('change',
|
|
function() {
|
|
dataTables.ajax.reload();
|
|
});
|
|
</script>
|
|
|
|
@endsection
|