@php $config = $page->mailwizzConfig; $page->loadMissing('weeztixConfig'); $hasWeeztixForCouponMap = $page->weeztixConfig !== null && $page->weeztixConfig->is_connected; $mailwizzStatus = $page->mailwizzIntegrationStatus(); $existing = $config !== null ? [ 'list_uid' => $config->list_uid, 'list_name' => $config->list_name, 'field_email' => $config->field_email, 'field_first_name' => $config->field_first_name, 'field_last_name' => $config->field_last_name, 'field_phone' => $config->field_phone, 'field_coupon_code' => $config->field_coupon_code, 'tag_field' => $config->tag_field, 'tag_value' => $config->tag_value, ] : null; @endphp @extends('layouts.admin') @section('title', __('Mailwizz') . ' — ' . $page->title) @section('mobile_title', __('Mailwizz')) @section('content')
← {{ __('Back to page') }}

{{ __('Mailwizz') }}

{{ __('Page:') }} {{ $page->title }}

@include('admin.pages._save_flash') @if ($errors->any()) @endif @if (! $showWizard && $config !== null) @if ($mailwizzStatus !== 'ready')

{{ __('Setup incomplete') }}

{{ __('Run the wizard again to finish Mailwizz (API key, list, and field mapping).') }}

@endif
{{ __('Change settings (wizard)') }}
@csrf @method('DELETE')

{{ __('Current configuration') }}

{{ __('The API key is stored encrypted and is not shown here.') }}

{{ __('Connection') }}
@if ($mailwizzStatus === 'ready') {{ __('Ready to sync') }} @else {{ __('Incomplete') }} @endif
{{ __('Mailing list') }}
{{ $config->list_name ?: '—' }}
{{ __('List UID') }}
{{ $config->list_uid ?: '—' }}

{{ __('Field mapping') }}

{{ __('Mailwizz custom fields are matched by tag.') }}

{{ __('Email') }}
{{ $config->field_email ?: '—' }}
{{ __('First name') }}
{{ $config->field_first_name ?: '—' }}
{{ __('Last name') }}
{{ $config->field_last_name ?: '—' }}
@if ($page->isPhoneFieldEnabledForSubscribers())
{{ __('Phone') }}
{{ filled($config->field_phone) ? $config->field_phone : '—' }}
@endif @if ($hasWeeztixForCouponMap)
{{ __('Kortingscode (Weeztix)') }}
{{ filled($config->field_coupon_code) ? $config->field_coupon_code : '—' }}
@endif
{{ __('Tag / source (checkbox list)') }}
{{ filled($config->tag_field) ? $config->tag_field : '—' }}
{{ __('Source tag option') }}
{{ filled($config->tag_value) ? $config->tag_value : '—' }}
@else
@if ($config !== null) @endif
1 {{ __('API key') }} 2 {{ __('List') }} 3 {{ __('Field mapping') }} 4 {{ __('Tag / source') }}
{{-- Step 1 --}}

{{ __('Step 1: API key') }}

{{ __('First, create a mailing list in Mailwizz with the required custom fields. Add a custom field of type Checkbox List with an option value you will use to track this pre-registration source.') }}

@if ($config !== null)

{{ __('Enter your API key and connect to load Mailwizz data (the same key as before is fine). If you clear the key field before saving, the previously stored key is kept.') }}

@endif
{{-- Step 2 --}}

{{ __('Step 2: Mailing list') }}

{{-- Step 3 --}}

{{ __('Step 3: Field mapping') }}

{{ __('Map each local field to the matching Mailwizz custom field (by tag).') }}

{{ __('Koppel aan een tekstveld in Mailwizz om de persoonlijke code in e-mails te tonen.') }}

{{ __('No checkbox list fields were returned for this list. Add one in Mailwizz, then run “Load fields” again from step 2.') }}

{{-- Step 4 --}}

{{ __('Step 4: Tag / source') }}

{{ __('Choose the checkbox option that marks subscribers from this pre-registration page.') }}

{{ __('Tag value') }}

{{ __('This field has no options defined in Mailwizz. Add options to the checkbox list field, then reload fields.') }}

@csrf @method('PUT')
@endif
@endsection