@php $type = $cardType; $custom = $customData; $prefix = $type === 'id' ? 'id' : 'visiting'; $sigs = $custom['content']['signatures'] ?? []; $directorSig = $sigs['director'] ?? []; $hrSig = $sigs['hr'] ?? []; $frontOrder = $custom['layout']['order']['front'] ?? \App\Support\CardCustomization::defaultFrontOrder($type); $backOrder = $custom['layout']['order']['back'] ?? \App\Support\CardCustomization::defaultBackOrder($type); $sectionLabels = $type === 'id' ? [ 'show_logo' => __('Organization logo'), 'show_org_motto' => __('Organization motto'), 'show_org_name' => __('Organization name'), 'show_photo' => __('Employee photo'), 'show_name' => __('Employee name'), 'show_designation' => __('Designation'), 'show_signature' => __('Signature block'), 'show_signature_director' => __('Director signature'), 'show_signature_hr' => __('HR signature'), 'show_signature_image' => __('Uploaded signature images'), 'show_phone' => __('Phone (front/meta)'), 'show_email' => __('Email (front/meta)'), 'show_branch' => __('Branch'), 'show_barcode' => __('Barcode strip'), 'show_back_certification' => __('Back: certification text'), 'show_sid' => __('Back: SID'), 'show_nid' => __('Back: NID'), 'show_blood_group' => __('Back: blood group'), 'show_property_note' => __('Back: property note'), 'show_return_address' => __('Back: return address'), 'show_org_contact' => __('Back: org contact'), 'show_issue_date' => __('Back: issue date'), 'show_footer_notice' => __('Back: non-transferable notice'), 'show_back_qr' => __('Back: QR code'), 'show_instructions' => __('Back: custom instructions'), ] : [ 'show_logo' => __('Organization logo'), 'show_org_name' => __('Organization name'), 'show_org_motto' => __('Organization motto'), 'show_branch' => __('Branch tag (front)'), 'show_name' => __('Employee name'), 'show_designation' => __('Designation'), 'show_department' => __('Department'), 'show_phone' => __('Phone'), 'show_email' => __('Email'), 'show_address' => __('Address'), 'show_website' => __('Website'), 'show_qr' => __('QR code'), 'show_sid' => __('Employee SID'), 'show_instructions' => __('Custom instructions'), ]; $directorImg = \App\Support\CardCustomization::signatureImageUrl($custom, 'director'); $hrImg = \App\Support\CardCustomization::signatureImageUrl($custom, 'hr'); $previewRoute = route('admin.card_templates.preview', ['type' => $type, 'template' => $activeTemplateId]); @endphp
@csrf
{{ __('Colors & Typography') }}
@foreach(['primary' => __('Primary'), 'secondary' => __('Secondary'), 'surface' => __('Surface'), 'text' => __('Text'), 'accent' => __('Accent')] as $colorKey => $colorLabel)
{{ __('Leave blank for template default') }}
@endforeach
{{ __('Photo & Logo') }}
{{ __('Show / Hide sections') }}
@foreach($sectionLabels as $key => $label)
@endforeach
{{ __('Drag & drop — Front layout order') }}

{{ __('Drag blocks to reorder sections on the card front.') }}

    @foreach($frontOrder as $block)
  • {{ $frontBlockLabels[$block] ?? $block }}
  • @endforeach
{{ __('Drag & drop — Back layout order') }}

{{ __('Drag blocks to reorder sections on the card back.') }}

    @foreach($backOrder as $block)
  • {{ $backBlockLabels[$block] ?? $block }}
  • @endforeach
{{ __('Organization & address') }}

{{ __('Legacy single signatory (optional — Director fields below take priority)') }}

@if($type === 'id')
{{ __('Authorized signatures — Director & HR') }}
{{ __('Director / Executive') }}
@if($directorImg)
director signature
@endif
{{ __('HR Manager') }}
@if($hrImg)
hr signature
@endif {{ __('PNG transparent background recommended. Max 2MB each.') }}
{{ __('Back of card — text & instructions') }}
@else
{{ __('Additional instructions') }}
@endif
@can('Settings-edit') @endcan {{ __('Preview this template') }}