ispt4.0_laravel/resources/views/userClient/pdfReportings/equipmentsForAmbitPdf.blade.php
ygbanzato d7e3a725ac Test to use snappy pdf, but only with Dompdf were we able to make the reports.
Create a reporting system, in which reporting by Ambit has already been completed.
2024-01-09 12:09:27 +00:00

200 lines
5.7 KiB
PHP

<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Invoice</title>
<style>
.navBar-box {
width: 100%;
height: 10%;
background-color: #09255C;
color: #fff
/* display: flex;
/* Usa Flexbox para alinhar as divs internas */
/* justify-content: space-between; */
/* Distribui o espaço uniformemente */
}
.box {
/* Como nao entende o flex-box, cada box vai pegar metade do conteudo pai */
width: 33.33%;
float: left;
height: 65px;
padding: 15px 0px 0px 25px;
/* top right bottom left */
margin-bottom: 50%;
}
.box-text {
padding: 25px 0px 0px 50px;
/* top right bottom left */
height: 65px;
}
.last-box {
text-align: center;
padding: 15px 0px 0px 40px;
/* top right bottom left */
}
.header-img {
width: 50px;
height: 50px;
}
.navBar {
width: 100%;
background-color: #EAF3F6;
/* Fundo azul para a tabela navBar */
border-spacing: 0;
/* Remove o espaçamento padrão entre as células */
border-collapse: collapse;
/* Assegura que as bordas das células colidam */
}
.navBar th,
.navBar td {
border: 1px solid #09255C;
/* Aplica bordas a cada célula */
text-align: center;
/* Alinha o texto ao centro para todas as células */
}
.titles {
background-color: #00B0EA;
/* Fundo verde para as células do título */
}
.items {
/* Mantém o texto centralizado para as linhas de item, já definido no .navBar th, .navBar td */
text-align: center;
}
/* .margin-top {
margin-top: 10px;
border: 1px solid red;
} */
.footer {
width: 97%;
height: 20px;
font-size: 0.875rem;
padding: 1rem;
background-color: #09255C;
color: #fff;
}
.last-footer {
color:#09255C;
}
</style>
</head>
<body>
{{-- <div class="margin-top">
<div class="navBar-box">
<div class="box">
<img class="header-img"
src="{{ public_path('/img/ispt/4.0/Ispt4.0_Símbolo_Fundo_Azul-Marinho@2x-100.jpg') }}"
alt="Logo Esquerdo">
</div>
<div class="box box-text">{{ $dataAmbit->ambits_description }}</div>
<div class="box last-box">
<img class="header-img" src="{{ $userLogoPath }}" alt="User Logo">
</div>
</div>
<table class="navBar">
@php $count = 0; @endphp
@foreach ($equipmentDetails as $equipmentDetail)
@if ($count % 23 == 0)
@if ($count != 0)
</table>
<div style="page-break-after: always;"></div>
@endif
<table class="navBar">
<tr class="titles">
<th> ISPT</th>
<th>Unidade</th>
<th>Tag </th>
</tr>
@endif
<tr class="items">
<td>{{ $equipmentDetail->equipment_id }}</td>
<td>{{ $equipmentDetail->unit_id }}</td>
<td>{{ $equipmentDetail->equipment_tag }}</td>
</tr>
@php $count++; @endphp
@endforeach
</table>
</div>
<div class="footer">
<div>ISPT 4.0</div>
<div>Paginacao</div>
</div> --}}
<body>
@php $page = 1; @endphp
@php $count = 0; @endphp
@foreach ($equipmentDetails as $equipmentDetail)
@if ($count % 25 == 0)
@if ($count != 0)
</table>
<div class="footer">ISPT 4.0 - - Página {{ $page++ }}</div>
@endif
<div class="navBar-box">
<div class="box">
<img class="header-img"
src="{{ public_path('/img/ispt/4.0/Ispt4.0_Símbolo_Fundo_Azul-Marinho@2x-100.jpg') }}"
alt="Logo Esquerdo">
</div>
<div class="box box-text">{{ $dataAmbit->ambits_description }}</div>
<div class="box last-box">
<img class="header-img" src="{{ $userLogoPath }}" alt="User Logo">
</div>
</div>
<table class="navBar">
<tr class="titles">
<th> ISPT</th>
<th>Unidade</th>
<th>Tag </th>
</tr>
@endif
<tr class="items">
<td>{{ $equipmentDetail->equipment_id }}</td>
<td>{{ $equipmentDetail->unit_id }}</td>
<td>{{ $equipmentDetail->equipment_tag }}</td>
</tr>
@php $count++; @endphp
@endforeach
</table>
{{-- <div class="footer last-footer">ISPT 4.0 - - Ultima Página</div> --}}
<div class="footer last-footer">ISPT 4.0 - - Página {{ $page++ }}</div>
</body>
</body>
</html>