@php
use App\Livewire\Wpc\Enums\ApplicantTypeEnum;
use App\Livewire\Wpc\WpcConstants;
// ── helpers ──────────────────────────────────────────────────────────────────
// Resolve Type of Applicant label from enum
$applicantTypeLabel = '-';
if (!empty($technicalDetails['applicant_type'])) {
try {
$applicantTypeLabel = ApplicantTypeEnum::from($technicalDetails['applicant_type'])->label();
} catch (\ValueError $e) {
$applicantTypeLabel = $technicalDetails['applicant_type'];
}
}
// Resolve Type of Technology label
$techTypeMap = [
'5G' => '5G',
'1005GLas' => '100 5G Las',
'Non-5G' => 'Non-5G',
'Other' => 'Other',
];
$typeOfTech = $technicalDetails['type_of_technology'] ?? '';
$typeOfTechLabel = $techTypeMap[$typeOfTech] ?? $typeOfTech;
if ($typeOfTech === 'Other' && !empty($technicalDetails['custom_type_of_technology'])) {
$typeOfTechLabel = $technicalDetails['custom_type_of_technology'];
}
// Resolve Purpose of Applying label from WpcConstants dropdown
$purposeId = $technicalDetails['purpose_for_applying'] ?? null;
$purposeLabel = '-';
if (!is_null($purposeId) && $purposeId !== '') {
$purposeLabel = WpcConstants::DEMO_PURPOSE_DROPDOWN[(int) $purposeId] ?? $purposeId;
if ((int) $purposeId === 9 && !empty($technicalDetails['custom_purpose_for_applying'])) {
$purposeLabel = $technicalDetails['custom_purpose_for_applying'];
}
}
// Proposed Authorisation Start Date — stored directly on technicalDetails
$freqAuthStartDate = $technicalDetails['freq_auth_start_date'] ?? null;
// Location fields — buildDemoPdfData maps c_district → 'district', c_state → 'state', c_address → 'address'
$district = $technicalDetails['district'] ?? $technicalDetails['c_district'] ?? '-';
$state = $technicalDetails['state'] ?? $technicalDetails['c_state'] ?? '-';
$address = $technicalDetails['address'] ?? $technicalDetails['c_address'] ?? '-';
// Coordinates – direction stored as 'north'/'south'/'east'/'west', display as uppercase
$formatDMS = function ($deg, $min, $sec, $dir) {
if ($deg === null && $min === null && $sec === null) {
return '-';
}
return ($deg ?? '00') . '° ' . ($min ?? '00') . '\' ' . ($sec ?? '00') . '" ' . strtoupper($dir ?? '');
};
// Testing / operation details — directly on technicalDetails from buildDemoPdfData
$operationArea = $technicalDetails['operationArea'] ?? '-';
$testingStart = $technicalDetails['testingStartDate'] ?? null;
$testingEnd = $technicalDetails['testingEndDate'] ?? null;
$foreignNationals = !empty($technicalDetails['particularsForeignNationals'])
|| !empty($technicalDetails['particulars_foreign_national']);
$frequencyMode = $technicalDetails['frequencyMode'] ?? '-';
$numFrequencies = $technicalDetails['num_frequencies'] ?? '-';
$freqJustification = $technicalDetails['frequency_justification'] ?? '-';
@endphp
{{-- ============================================================ --}}
{{-- A. Required Technical Details --}}
{{-- ============================================================ --}}
| Equipment Name |
{{ $eq['equipment_name'] ?? '-' }} |
Model |
{{ $eq['model'] ?? '-' }} |
| Make / Manufacturer |
{{ $eq['make_manufacturer'] ?? '-' }} |
Quantity |
{{ $eq['equipment_quantity'] ?? '-' }} |
| Country (Manufacturer) |
{{ $eq['country'] ?? '-' }} |
Imported? |
@php $imp = $eq['is_imported'] ?? '0'; @endphp
{{ ($imp === '1' || $imp === 1 || $imp === true) ? 'Yes' : 'No' }}
|
| Country of Origin |
{{ $eq['country_of_origin'] ?? '-' }} |
Manufacturer Address |
{{ $eq['manufacturer_address'] ?? '-' }} |
| Port of Import |
{{ $eq['port_of_import'] ?? '-' }} |
Antenna Type |
{{ $eq['antenna_type'] ?? '-' }} |
| Antenna Size |
{{ $eq['antenna_size'] ?? '-' }} |
Antenna Gain |
{{ $eq['antenna_gain'] ?? '-' }} |
| EIRP |
{{ $eq['eirps'] ?? '-' }} {{ $eq['eirps_unit'] ?? '' }} |
|
|
{{-- TX Frequencies --}}
| TX Frequency Range |
@forelse($eq['tx_frequencies'] ?? [] as $tx)
@php $tx = is_array($tx) ? $tx : (array) $tx; @endphp
- • {{ $tx['value'] ?? '' }} {{ $tx['unit'] ?? 'Hz' }}
@empty
- -
@endforelse
|
RX Frequency Range |
@forelse($eq['rx_frequencies'] ?? [] as $rx)
@php $rx = is_array($rx) ? $rx : (array) $rx; @endphp
- • {{ $rx['value'] ?? '' }} {{ $rx['unit'] ?? 'Hz' }}
@empty
- -
@endforelse
|
{{-- Emissions --}}
| Emission |
@forelse($eq['emissions'] ?? [] as $em)
@php $em = is_array($em) ? $em : (array) $em; @endphp
- • {{ $em['value'] ?? '-' }} {{ !empty($em['type']) ? $em['type'] : '' }}
@empty
- -
@endforelse
|
Emission BW |
@forelse($eq['emission_bws'] ?? [] as $ebw)
@php $ebw = is_array($ebw) ? $ebw : (array) $ebw; @endphp
- • {{ $ebw['value'] ?? '' }} {{ $ebw['unit'] ?? '' }}
@empty
- -
@endforelse
|
{{-- RF Powers --}}
| RF Power |
@forelse($eq['rf_powers'] ?? [] as $rp)
@php $rp = is_array($rp) ? $rp : (array) $rp; @endphp
- • {{ $rp['value'] ?? '' }} {{ !empty($rp['unit']) ? $rp['unit'] : 'mW' }}
@empty
- -
@endforelse
|
Max RF Power |
@forelse($eq['max_powers'] ?? [] as $mp)
@php $mp = is_array($mp) ? $mp : (array) $mp; @endphp
- • {{ $mp['value'] ?? '' }} {{ !empty($mp['unit']) ? $mp['unit'] : 'mW' }}
@empty
- -
@endforelse
|
{{-- Technical Literature — scoped to this equipment via uploaded_file_id --}}
| Technical Literature Document |
@if(!empty($eq['technical_literature']['c_file_name']))
(Y)
{{ $eq['technical_literature']['c_file_name'] }}
@else
X
@endif
|
@empty