@extends('layouts.dashboard') @section('title', trans('dashboard.activate_production_title') . ' | ' . config('app.name', 'EMZatca')) @section('header_title', trans('dashboard.activate_production_title')) @section('content') @php $profileReady = $tenant->isReadyForProductionCsr(); $readyDevices = $devices->filter(fn ($d) => $d->onboarding_status === 'production_ready'); @endphp
{{-- Back Link & Header --}}

{{ trans('dashboard.activate_production_header') }}

{{ trans('dashboard.activate_production_subtitle') }}

{{ trans('dashboard.back_to_wizard') }}
{{-- Error messages --}} @if($errors->any())
{{ trans('dashboard.action_failed') }}
@endif {{-- Organization Profile Summary Card --}}
{{ trans('dashboard.verified_org_profile') }}

{{ $tenant->name }}

{{ trans('dashboard.ready_for_zatca') }} {{ trans('dashboard.edit_profile') }}
{{ trans('dashboard.vat_number') }} {{ $tenant->vat_number }}
{{ trans('dashboard.cr_or_org_id') }} {{ $tenant->org_identifier_value ?: $tenant->cr_number ?: '---' }}
{{ trans('dashboard.address_city_label') }} {{ $tenant->address_city ?: '---' }}
{{ trans('dashboard.address_street_label') }} {{ $tenant->address_street ?: '---' }}
{{-- Main OTP Link Form (Single Step - No Manual Device Form) --}}

{{ trans('dashboard.enter_fatoora_otp_title') }}

{{ trans('dashboard.enter_fatoora_otp_subtitle') }}

{{ trans('dashboard.fatoora_portal') }}
{{-- The Direct OTP Submission Form --}}
@csrf
@for($i = 0; $i < 6; $i++) @endfor
{{ trans('dashboard.otp_input_hint') }}
{{-- Optional / Secondary Section: Branches & Devices Management --}}

{{ trans('dashboard.branches_devices_title') }}

{{ trans('dashboard.branches_devices_desc') }}

{{-- Collapsible Add Extra Branch Form --}}
{{ trans('dashboard.add_branch_pos_title') }}
@csrf
{{-- Registered Devices Table --}} @forelse($devices as $d) @empty @endforelse
{{ trans('dashboard.device_th') }} {{ trans('dashboard.serial_th') }} {{ trans('dashboard.status_th') }} {{ trans('dashboard.cert_th') }}
{{ $d->name }} {{ $d->serial_number }} @if($d->onboarding_status === 'production_ready') {{ trans('dashboard.csid_ready') }} @else {{ $d->onboarding_status }} @endif {{ $d->certificate_pem ? trans('dashboard.cert_active') : trans('dashboard.cert_waiting_otp') }}
{{ trans('dashboard.main_branch_auto_notice') }}
{{-- Interactive Guide Modal --}} {{-- Live Connecting / Progress Overlay --}}
@endsection