<table class="w-full" style="border-collapse: collapse; width: 100%;">
  <tbody>
    <!-- First row -->
    <tr>
      <td class="text-center font-small box px-0 h-2 border-left-0" style="width: 16.67%; padding: 8px; border: 1px solid #000; vertical-align: middle;">
        <p class="m-0">{{ t('labels.survey_date') }}</p>
        {% if inspection.header.survey.survey_date %}
        <p class="m-0 font-semibold">{{ inspection.header.survey.survey_date.strftime("%Y/%m/%d") }}</p>
        {% endif %}
      </td>
      <td class="text-center font-small box px-0 h-2 border-left-0" style="width: 16.67%; padding: 8px; border: 1px solid #000; vertical-align: middle;">
        <p class="m-0">{{ t('labels.pipe_use') }}</p>
        {% if inspection.header.pipe.pipe_use %}
        <p class="m-0 font-semibold">{{ inspection.header.pipe.pipe_use }}</p>
        {% endif %}
      </td>
      <td class="text-center font-small box px-0 h-2 border-left-0" style="width: 16.67%; padding: 8px; border: 1px solid #000; vertical-align: middle;">
        <p class="m-0">{{ t('labels.year_commissioned') }}</p>
        {% if inspection.header.pipe.year_constructed %}
        <p class="m-0 font-semibold">{{ inspection.header.pipe.year_constructed }}</p>
        {% endif %}
      </td>
      <td class="text-center font-small box px-0 h-2 border-left-0" style="width: 16.67%; padding: 8px; border: 1px solid #000; vertical-align: middle;">
        <p class="m-0">{{ t('labels.sewer_gis_id') }}</p>
        {% if inspection.header.location.pipe_segment_reference %}
        <p class="m-0 font-semibold">{{ inspection.header.location.pipe_segment_reference }}</p>
        {% endif %}
      </td>
      <td class="text-center font-small box px-0 h-2 border-left-0" style="width: 16.67%; padding: 8px; border: 1px solid #000; vertical-align: middle;">
        <p class="m-0">{{ t('labels.operator') }}</p>
        {% if inspection.header.survey.surveyed_by %}
        <p class="m-0 font-semibold">{{ inspection.header.survey.surveyed_by }}</p>
        {% endif %}
      </td>
      <td class="text-center font-small box px-0 h-2 border-left-0 border-right-0" style="width: 16.67%; padding: 8px; border: 1px solid #000; vertical-align: middle;">
        <p class="m-0">{{ t('labels.team_supervisor') }}</p>
        {% if inspection.header.survey.reviewed_by %}
        <p class="m-0 font-semibold">{{ inspection.header.survey.reviewed_by }}</p>
        {% endif %}
      </td>
    </tr>
    <!-- Second row -->
    <tr>
      <td class="text-center font-small box px-0 h-2 border-top-0 border-left-0" style="width: 16.67%; padding: 8px; border: 1px solid #000; vertical-align: middle;">
        <p class="m-0">{{ t('labels.start_time') }}</p>
        {% if inspection.header.survey.survey_time %}
        {% if inspection.header.survey.survey_time.strftime("%H:%M") != "00:00" %}
        <p class="m-0 font-semibold">{{ inspection.header.survey.survey_time.strftime("%H:%M") }}</p>
        {% endif %}
        {% endif %}
      </td>
      <td class="text-center font-small box px-0 h-2 border-left-0 border-top-0" style="width: 16.67%; padding: 8px; border: 1px solid #000; vertical-align: middle;">
        <p class="m-0">{{ t('labels.weather') }}</p>
        {% if inspection.header.survey.weather %}
        <p class="m-0 font-semibold">
          {{ inspection.header.survey.weather.label }}
        </p>
        {% endif %} 
      </td>
      <td class="text-center font-small box px-0 h-2 border-left-0 border-top-0" style="width: 16.67%; padding: 8px; border: 1px solid #000; vertical-align: middle;">
        <p class="m-0">{{ t('labels.camera') }}</p>
        {% if inspection.header.survey.inspection_technology %}
        <p class="m-0 font-semibold">{{ inspection.header.survey.inspection_technology }}</p>
        {% endif %}
      </td>
      <td class="text-center font-small box px-0 h-2 border-left-0 border-top-0" style="width: 16.67%; padding: 8px; border: 1px solid #000; vertical-align: middle;">
        <p class="m-0">{{ t('labels.segment') }}</p>
      </td>
      <td class="text-center font-small box px-0 h-2 border-left-0 border-top-0" style="width: 16.67%; padding: 8px; border: 1px solid #000; vertical-align: middle;">
        <p class="m-0">{{ t('labels.cleaned') }}</p>
        {% if inspection.header.survey.pre_cleaning %}
        <p class="m-0 font-semibold">{{ inspection.header.survey.pre_cleaning.label }}</p>
        {% endif %}
      </td>
      <td class="text-center font-small box px-0 h-2 border-left-0 border-top-0 border-right-0" style="width: 16.67%; padding: 8px; border: 1px solid #000; vertical-align: middle;">
        <p class="m-0">{{ t('labels.certificate_number') }}</p>
        {% if inspection.header.survey.certificate_number %}
        <p class="m-0 font-semibold">{{ inspection.header.survey.certificate_number }}</p>
        {% endif %}
      </td>
    </tr>
  </tbody>
</table>
