create road patrol blades

This commit is contained in:
2025-02-09 10:34:47 +03:30
parent c8ff302d09
commit 66ddeca81a
3 changed files with 178 additions and 3 deletions

View File

@@ -2,11 +2,8 @@
namespace App\Http\Controllers\V3\Dashboard;
use App\Exports\V2\RoadPatrol\OperatorCartableExport;
use App\Exports\V2\RoadPatrol\SupervisorCartableExport;
use App\Exports\V3\RoadPatrols\OperatorCartableReport;
use App\Exports\V3\RoadPatrols\SupervisorCartableReport;
use App\Facades\DataTable\DataTableFacade;
use App\Facades\Sms\Sms;
use App\Http\Controllers\Controller;
use App\Http\Requests\V3\RoadPatrolProject\DeleteRequest;

View File

@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>گزارش گشت راهداری</title>
<style>
table,
th,
td {
border: 1px solid black;
}
</style>
</head>
<body dir="rtl" style="text-align: center;">
<table>
<thead>
<tr>
<th colspan="14"
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
</th>
</tr>
<tr>
<th colspan="14"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
</th>
</tr>
<tr>
<th colspan="14"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13;">
گزارش کارتابل عملیات گشت راهداری
</th>
</tr>
<tr>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">کد
یکتا</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
استان</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
اداره</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
کد خودرو(ها)</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
کد راهدار(ها)</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
تاریخ شروع</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
تاریخ پایان</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
تاریخ ثبت</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
توضیحات مامور</th>
</tr>
</thead>
<tbody>
@foreach ($data as $item)
<tr>
<td style="border: 1px solid black;text-align: center;">{{ $item['id'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['province_fa'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['edarat_name'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['cmmsMachines'] != null ? $item['cmmsMachines']->pluck('machine_code')->implode(', ') : '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['rahdaran'] != null ? $item['rahdaran']->pluck('code')->implode(', ') : '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['start_time'] ? verta($item['start_time'])->format('Y/n/j H:i:s') : '-' }}
<td style="border: 1px solid black;text-align: center;">{{ $item['end_time'] ? verta($item['end_time'])->format('Y/n/j H:i:s') : '-' }}
<td style="border: 1px solid black;text-align: center;">{{ $item['created_at'] ? verta($item['created_at'])->format('Y/n/j H:i:s') : '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['supervisor_description'] ?? '-' }}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>

View File

@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>گزارش گشت راهداری</title>
<style>
table,
th,
td {
border: 1px solid black;
}
</style>
</head>
<body dir="rtl" style="text-align: center;">
<table>
<thead>
<tr>
<th colspan="14"
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
</th>
</tr>
<tr>
<th colspan="14"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
</th>
</tr>
<tr>
<th colspan="14"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13;">
گزارش کارتابل ارزیابی گشت راهداری
</th>
</tr>
<tr>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">کد
یکتا</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
استان</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
اداره</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
کد خودرو(ها)</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
کد راهدار(ها)</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
تاریخ شروع</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
تاریخ پایان</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
تاریخ ثبت</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
توضیحات مامور</th>
</tr>
</thead>
<tbody>
@foreach ($data as $item)
<tr>
<td style="border: 1px solid black;text-align: center;">{{ $item['id'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['province_fa'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['edarat_name'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['cmmsMachines'] != null ? $item['cmmsMachines']->pluck('machine_code')->implode(', ') : '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['rahdaran'] != null ? $item['rahdaran']->pluck('code')->implode(', ') : '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['start_time'] ? verta($item['start_time'])->format('Y/n/j H:i:s') : '-' }}
<td style="border: 1px solid black;text-align: center;">{{ $item['end_time'] ? verta($item['end_time'])->format('Y/n/j H:i:s') : '-' }}
<td style="border: 1px solid black;text-align: center;">{{ $item['created_at'] ? verta($item['created_at'])->format('Y/n/j H:i:s') : '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['supervisor_description'] ?? '-' }}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>