Equipment Details
Equipment Details
@php $equipments = $equipmentListing ?? ($demoDetails['map_demo_equipment_detail'] ?? []); /** * Safe field decoder — handles: * - Already-decoded structured arrays: [['value'=>..., 'unit'=>...], ...] * - Already-decoded plain-string arrays: ['100 mW', '200 mW'] (legacy serialize decoded by cast) * - Legacy PHP serialize() strings (old DB rows not yet re-saved) * - Plain scalar string fallback */ $unserializeField = function ($value) { if (is_array($value)) { if (empty($value)) return []; // Structured arrays — already in the right shape if (isset($value[0]) && is_array($value[0])) return $value; // Plain string arrays from legacy serialize decoded by cast return $value; } if (is_string($value) && !empty($value)) { $unserialized = @unserialize($value); if ($unserialized !== false || $value === 'b:0;') { return is_array($unserialized) ? $unserialized : [$unserialized]; } return [$value]; } return []; }; @endphp @forelse($equipments as $index => $row) @php $rowArr = is_array($row) ? $row : (array) $row; // JSON Decoded Fields (TX / RX) $txRaw = $rowArr['tx_frequency'] ?? ($rowArr['tx_frequencies'] ?? null); $txFreqs = is_string($txRaw) ? json_decode($txRaw, true) : ($txRaw ?? []); $rxRaw = $rowArr['rx_frequency'] ?? ($rowArr['rx_frequencies'] ?? null); $rxFreqs = is_string($rxRaw) ? json_decode($rxRaw, true) : ($rxRaw ?? []); // Serialized Fields (Single or Plural Key Support) $emissions = $unserializeField($rowArr['emission'] ?? ($rowArr['emissions'] ?? null)); $emissionBws = $unserializeField($rowArr['emission_bw'] ?? ($rowArr['emission_bws'] ?? null)); $rfPowers = $unserializeField($rowArr['rf_power'] ?? ($rowArr['rf_powers'] ?? null)); $maxPowers = $unserializeField($rowArr['max_power'] ?? ($rowArr['max_powers'] ?? null)); // Import Flag $isImp = $rowArr['is_imported'] ?? ($rowArr['equipment_imported'] ?? null); $isImportedText = ($isImp === '1' || $isImp === 1 || $isImp === 'Yes') ? 'Yes' : 'No'; @endphp @empty @endforelse
# Model Equipment Name Make/Manufacturer Equipment Quantity Manufacturer's Address Country Imported? Country of Origin Port of Import TX Frequency RX Frequency Emission Emission BW RF Power Max RF Power Antenna Type Antenna Size (m) Antenna Gain (dBi) EIRP Technical Literature
{{ $loop->iteration }} {{ $rowArr['equip_model'] ?? ($rowArr['model'] ?? '-') }} {{ $rowArr['equip_name'] ?? ($rowArr['equipment_name'] ?? '-') }} {{ $rowArr['equip_make'] ?? ($rowArr['make'] ?? ($rowArr['manufacturer'] ?? '-')) }} {{ $rowArr['quantity'] ?? ($rowArr['equipment_quantity'] ?? 0) }} {{ $rowArr['manufacturer_address'] ?? '-' }} {{ $rowArr['map_manufacturer_country']['c_country_name'] ?? '-' }} {{ $isImportedText }} {{ $rowArr['map_origin_country']['c_country_name'] ?? '-' }} {{ $rowArr['port_of_import'] ?? '-' }}
    @if(!empty($txFreqs) && is_array($txFreqs)) @forelse($txFreqs as $freq)
  • • {{ is_array($freq) ? ($freq['value'] ?? '') : $freq }} {{ is_array($freq) && !empty($freq['unit']) ? $freq['unit'] : 'Hz' }}
  • @empty
  • -
  • @endforelse @else
  • -
  • @endif
    @if(!empty($rxFreqs) && is_array($rxFreqs)) @forelse($rxFreqs as $freq)
  • • {{ is_array($freq) ? ($freq['value'] ?? '') : $freq }} {{ is_array($freq) && !empty($freq['unit']) ? $freq['unit'] : 'Hz' }}
  • @empty
  • -
  • @endforelse @else
  • -
  • @endif
    @if(!empty($emissions) && is_array($emissions)) @forelse($emissions as $em)
  • • {{ is_array($em) ? ($em['value'] ?? '') : $em }} {{ is_array($em) && !empty($em['type']) ? $em['type'] : '' }}
  • @empty
  • -
  • @endforelse @else
  • -
  • @endif
    @if(!empty($emissionBws) && is_array($emissionBws)) @forelse($emissionBws as $eb)
  • • {{ is_array($eb) ? ($eb['value'] ?? '') : $eb }}
  • @empty
  • -
  • @endforelse @else
  • -
  • @endif
    @if(!empty($rfPowers) && is_array($rfPowers)) @forelse($rfPowers as $rfp)
  • • {{ is_array($rfp) ? ($rfp['value'] ?? '') : $rfp }} {{ is_array($rfp) && !empty($rfp['unit']) ? $rfp['unit'] : ($rowArr['rf_power_unit'] ?? 'mW') }}
  • @empty
  • -
  • @endforelse @else
  • -
  • @endif
    @if(!empty($maxPowers) && is_array($maxPowers)) @forelse($maxPowers as $mxp)
  • • {{ is_array($mxp) ? ($mxp['value'] ?? '') : $mxp }} {{ is_array($mxp) && !empty($mxp['unit']) ? $mxp['unit'] : ($rowArr['max_power_unit'] ?? 'mW') }}
  • @empty
  • -
  • @endforelse @else
  • -
  • @endif
{{ $rowArr['antenna_type'] ?? '-' }} {{ $rowArr['antenna_size'] ?? '-' }} {{ $rowArr['antenna_gain'] ?? '-' }} @php $eirpRaw = $rowArr['eirp'] ?? ($rowArr['eirps'] ?? null); // For new rows eirp is a plain scalar; for legacy rows it may be a // serialize() string — safeDecodeEquipmentField handles both. if (is_string($eirpRaw) && !empty($eirpRaw)) { $eirpDecoded = @unserialize($eirpRaw); if ($eirpDecoded !== false && is_array($eirpDecoded)) { $eirpDisplay = implode(', ', array_map(fn($v) => is_array($v) ? ($v['value'] ?? '') : $v, $eirpDecoded)); } else { $eirpDisplay = $eirpRaw; } } else { $eirpDisplay = $eirpRaw ?? '-'; } @endphp {{ $eirpDisplay }} {{ $rowArr['eirp_unit'] ?? ($rowArr['eirps_unit'] ?? '') }} @php $techLit = $rowArr['map_uploaded_files'] ?? null; $relativePath = is_object($techLit) ? ($techLit->c_file_path ?? null) : ($techLit['c_file_path'] ?? (is_string($techLit) ? $techLit : null)); $fileName = is_object($techLit) ? ($techLit->c_file_name ?? 'Download') : ($techLit['c_file_name'] ?? 'Download'); @endphp @if(!empty($relativePath)) @php $encryptedPath = Crypt::encryptString($relativePath); $secureFileParam = urlencode($encryptedPath); @endphp @else - @endif
No equipment details found.