<!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="9"
            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="9"
            style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
        </th>
    </tr>
    <tr>
        <th colspan="9"
            style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
                گزارش فعالیت های نگهداری حریم راه
        </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['edare_shahri_name'] ?? '-' }}</td>
            <td style="border: 1px solid black;text-align: center;">{{ $item['info_fa'] ?? '-' }}</td>
            <td style="border: 1px solid black;text-align: center;">{{ $item['activity_date_time'] ? verta($item['activity_date_time'])->format('Y/n/j H:i:s') : '-' }}</td>

            <td style="border: 1px solid black;text-align: center;">
                {{ $item['judiciary_document_upload_date'] && $item['judiciary_document_upload_date'] != '0000-00-00 00:00:00' ?  verta($item['judiciary_document_upload_date'])->format('Y/n/j H:i:s')  : '-' }}
            </td>

            <td style="border: 1px solid black;text-align: center;">
                {{ $item['action_picture_document_upload_date'] ? verta($item['action_picture_document_upload_date'])->format('Y/n/j H:i:s') : '-' }}
            </td>

            <td style="border: 1px solid black;text-align: center;">{{ $item['step_fa'] ?? '-' }}</td>
            <td style="border: 1px solid black;text-align: center;">{{ $item['created_at'] ? verta($item['created_at'])->format('Y/n/j H:i:s') : '-' }}</td>
        </tr>
    @endforeach
    </tbody>
</table>
</body>
</html>
