null, 'title' => null, 'first_name' => null, 'last_name' => null, 'phone' => null, 'address' => null, 'country_code' => null, 'birthdate' => '', 'backlink_url' => null, 'show_stats' => false, 'validation_date' => '', 'contract_date' => '', 'tax_id_number' => null, 'tax_exempt' => false, 'tax_exempt_reason' => null, 'disable_footer_code' => false, ]; public bool $isActive = true; public bool $isSuperAdmin = false; /** @var array */ public array $selectedRoles = []; /** @var array */ public array $linkedCompanyIds = []; /** @var array */ public array $companyRoles = []; public string $notification = ''; public string $companyLookup = ''; public ?int $selectedLookupCompanyId = null; /** * @var array */ public array $contactForms = []; /** @var array */ public array $linkedContactIds = []; public string $contactLookup = ''; public ?int $selectedLookupContactId = null; /** * @var array{ * salutation_key:?string, * title:?string, * name:?string, * address1:?string, * address2:?string, * postal_code:?string, * city:?string, * country_code:?string * } */ public array $billing = [ 'salutation_key' => null, 'title' => null, 'name' => null, 'address1' => null, 'address2' => null, 'postal_code' => null, 'city' => null, 'country_code' => null, ]; public function mount(int $id): void { $this->id = $id; $user = User::query() ->with([ 'roles:id,name', 'companies:id,name,slug', 'contacts:id,company_id,first_name,last_name,email,phone,responsibility', 'profile', 'billingAddress', ]) ->findOrFail($id); $this->name = $user->name; $this->email = $user->email; $this->portal = $user->portal?->value ?? Portal::Both->value; $this->registrationType = $user->registration_type?->value ?? RegistrationType::ExistingLegacy->value; $this->language = $user->language ?: 'de'; $this->isActive = (bool) $user->is_active; $this->isSuperAdmin = (bool) $user->is_super_admin; $this->selectedRoles = $user->roles->pluck('name')->values()->all(); $this->linkedCompanyIds = $user->companies->pluck('id')->map(fn ($id) => (int) $id)->values()->all(); $profile = $user->profile; if ($profile) { $this->profile = [ 'salutation_key' => $profile->salutation_key, 'title' => $profile->title, 'first_name' => $profile->first_name, 'last_name' => $profile->last_name, 'phone' => $profile->phone, 'address' => $profile->address, 'country_code' => $profile->country_code, 'birthdate' => $profile->birthdate?->format('Y-m-d') ?? '', 'backlink_url' => $profile->backlink_url, 'show_stats' => (bool) $profile->show_stats, 'validation_date' => $profile->validation_date?->format('Y-m-d') ?? '', 'contract_date' => $profile->contract_date?->format('Y-m-d') ?? '', 'tax_id_number' => $profile->tax_id_number, 'tax_exempt' => (bool) $profile->tax_exempt, 'tax_exempt_reason' => $profile->tax_exempt_reason, 'disable_footer_code' => (bool) $profile->disable_footer_code, ]; } foreach ($user->companies as $company) { $this->companyRoles[(int) $company->id] = (string) ($company->pivot->role ?? 'member'); } $this->linkedContactIds = $user->contacts ->pluck('id') ->map(fn ($contactId) => (int) $contactId) ->values() ->all(); if ($this->linkedContactIds === []) { $this->linkedContactIds = Contact::query() ->whereIn('company_id', $this->linkedCompanyIds ?: [-1]) ->orderBy('id') ->limit(40) ->pluck('id') ->map(fn ($contactId) => (int) $contactId) ->values() ->all(); } $billingAddress = $user->billingAddress; if ($billingAddress) { $this->billing = [ 'salutation_key' => $billingAddress->salutation_key, 'title' => $billingAddress->title, 'name' => $billingAddress->name, 'address1' => $billingAddress->address1, 'address2' => $billingAddress->address2, 'postal_code' => $billingAddress->postal_code, 'city' => $billingAddress->city, 'country_code' => $billingAddress->country_code, ]; } $this->syncContactFormsToSelectedCompanies(); } public function updatedLinkedCompanyIds(): void { $this->syncContactFormsToSelectedCompanies(); } // Combobox-Auswahl löst sofort Zuordnung aus – kein separater Button nötig public function updatedSelectedLookupCompanyId(): void { if (! $this->selectedLookupCompanyId) { return; } $this->addLinkedCompany(); } public function updatedSelectedLookupContactId(): void { if (! $this->selectedLookupContactId) { return; } $this->addLinkedContact(); } public function clearCompanyLookup(): void { $this->companyLookup = ''; $this->selectedLookupCompanyId = null; } public function clearContactLookup(): void { $this->contactLookup = ''; $this->selectedLookupContactId = null; } public function addLinkedCompany(): void { if (! $this->selectedLookupCompanyId) { return; } if (! in_array($this->selectedLookupCompanyId, $this->linkedCompanyIds, true)) { $this->linkedCompanyIds[] = $this->selectedLookupCompanyId; $this->linkedCompanyIds = collect($this->linkedCompanyIds) ->map(fn ($id) => (int) $id) ->unique() ->values() ->all(); } $this->companyRoles[$this->selectedLookupCompanyId] ??= 'member'; $this->persistUserLinks(); $this->companyLookup = ''; $this->selectedLookupCompanyId = null; $this->syncContactFormsToSelectedCompanies(); $this->notification = __('Firma wurde direkt verknüpft.'); } public function removeLinkedCompany(int $companyId): void { $this->linkedCompanyIds = collect($this->linkedCompanyIds) ->reject(fn ($id): bool => (int) $id === $companyId) ->map(fn ($id) => (int) $id) ->values() ->all(); unset($this->companyRoles[$companyId]); $removedCompanyContactIds = Contact::query() ->where('company_id', $companyId) ->pluck('id') ->map(fn ($contactId) => (int) $contactId) ->all(); $this->linkedContactIds = collect($this->linkedContactIds) ->reject(fn ($contactId): bool => in_array((int) $contactId, $removedCompanyContactIds, true)) ->map(fn ($contactId) => (int) $contactId) ->values() ->all(); $this->persistUserLinks(); $this->syncContactFormsToSelectedCompanies(); $this->notification = __('Firma wurde direkt entfernt.'); } public function addLinkedContact(): void { if (! $this->selectedLookupContactId) { return; } $contact = Contact::withoutGlobalScopes() ->with('company:id,name') ->find($this->selectedLookupContactId); if (! $contact) { return; } $contactCompanyId = (int) $contact->company_id; if ($contactCompanyId > 0 && ! in_array($contactCompanyId, $this->linkedCompanyIds, true)) { $this->linkedCompanyIds[] = $contactCompanyId; $this->linkedCompanyIds = collect($this->linkedCompanyIds) ->map(fn ($id) => (int) $id) ->unique() ->values() ->all(); $this->companyRoles[$contactCompanyId] ??= 'member'; } $alreadyLinked = collect($this->contactForms) ->contains(fn ($form): bool => (int) $form['id'] === (int) $contact->id); if (! $alreadyLinked) { $this->linkedContactIds[] = (int) $contact->id; $this->linkedContactIds = collect($this->linkedContactIds) ->map(fn ($contactId) => (int) $contactId) ->unique() ->values() ->all(); $this->contactForms[] = [ 'id' => (int) $contact->id, 'company_id' => (int) $contact->company_id, 'company_name' => (string) ($contact->company?->name ?? __('Unbekannte Firma')), 'first_name' => $contact->first_name, 'last_name' => $contact->last_name, 'email' => $contact->email, 'phone' => $contact->phone, 'responsibility' => $contact->responsibility, ]; } $this->persistUserLinks(); $this->contactLookup = ''; $this->selectedLookupContactId = null; $this->notification = __('Kontakt wurde direkt zugeordnet.'); } public function removeLinkedContact(int $contactId): void { $this->linkedContactIds = collect($this->linkedContactIds) ->reject(fn ($linkedContactId): bool => (int) $linkedContactId === $contactId) ->map(fn ($linkedContactId) => (int) $linkedContactId) ->values() ->all(); $this->contactForms = collect($this->contactForms) ->reject(fn ($form): bool => (int) $form['id'] === $contactId) ->values() ->all(); $this->persistUserLinks(); $this->notification = __('Kontakt wurde direkt entfernt.'); } public function save(): void { $validated = $this->validate([ 'name' => ['required', 'string', 'max:255'], 'email' => ['required', 'email', Rule::unique('users', 'email')->ignore($this->id)], 'portal' => ['required', Rule::in(array_map(static fn (Portal $portal): string => $portal->value, Portal::cases()))], 'registrationType' => ['required', Rule::in(array_map(static fn (RegistrationType $type): string => $type->value, RegistrationType::cases()))], 'language' => ['required', 'string', Rule::in(['de', 'en'])], 'profile.salutation_key' => ['nullable', 'string', 'max:20'], 'profile.title' => ['nullable', 'string', 'max:80'], 'profile.first_name' => ['nullable', 'string', 'max:80'], 'profile.last_name' => ['nullable', 'string', 'max:80'], 'profile.phone' => ['nullable', 'string', 'max:40'], 'profile.address' => ['nullable', 'string', 'max:1000'], 'profile.country_code' => ['nullable', 'string', 'size:2'], 'profile.birthdate' => ['nullable', 'date'], 'profile.backlink_url' => ['nullable', 'string', 'max:255'], 'profile.show_stats' => ['boolean'], 'profile.validation_date' => ['nullable', 'date'], 'profile.contract_date' => ['nullable', 'date'], 'profile.tax_id_number' => ['nullable', 'string', 'max:255'], 'profile.tax_exempt' => ['boolean'], 'profile.tax_exempt_reason' => ['nullable', 'string', 'max:1000'], 'profile.disable_footer_code' => ['boolean'], 'selectedRoles' => ['required', 'array', 'min:1'], 'selectedRoles.*' => ['string', Rule::exists('roles', 'name')], 'linkedCompanyIds' => ['array'], 'linkedCompanyIds.*' => ['integer', Rule::exists('companies', 'id')], 'companyRoles' => ['array'], 'companyRoles.*' => ['string', Rule::in(['member', 'responsible', 'owner'])], 'contactForms' => ['array'], 'contactForms.*.id' => ['required', 'integer', Rule::exists('contacts', 'id')], 'contactForms.*.company_id' => ['required', 'integer', Rule::exists('companies', 'id')], 'contactForms.*.first_name' => ['nullable', 'string', 'max:80'], 'contactForms.*.last_name' => ['nullable', 'string', 'max:80'], 'contactForms.*.email' => ['nullable', 'email', 'max:255'], 'contactForms.*.phone' => ['nullable', 'string', 'max:40'], 'contactForms.*.responsibility' => ['nullable', 'string', 'max:255'], 'billing.salutation_key' => ['nullable', 'string', 'max:20'], 'billing.title' => ['nullable', 'string', 'max:80'], 'billing.name' => ['nullable', 'string', 'max:255'], 'billing.address1' => ['nullable', 'string', 'max:255'], 'billing.address2' => ['nullable', 'string', 'max:255'], 'billing.postal_code' => ['nullable', 'string', 'max:20'], 'billing.city' => ['nullable', 'string', 'max:120'], 'billing.country_code' => ['nullable', 'string', 'size:2'], ]); $user = User::query()->findOrFail($this->id); $user->update([ 'name' => $validated['name'], 'email' => $validated['email'], 'portal' => $validated['portal'], 'registration_type' => $validated['registrationType'], 'language' => $validated['language'], 'is_active' => $this->isActive, 'is_super_admin' => $this->isSuperAdmin, ]); $user->syncRoles($validated['selectedRoles']); $profilePayload = [ 'salutation_key' => $validated['profile']['salutation_key'] ?: null, 'title' => $validated['profile']['title'] ?: null, 'first_name' => $validated['profile']['first_name'] ?: null, 'last_name' => $validated['profile']['last_name'] ?: null, 'phone' => $validated['profile']['phone'] ?: null, 'address' => $validated['profile']['address'] ?: null, 'country_code' => filled($validated['profile']['country_code']) ? strtoupper((string) $validated['profile']['country_code']) : null, 'birthdate' => filled($validated['profile']['birthdate']) ? $validated['profile']['birthdate'] : null, 'backlink_url' => $validated['profile']['backlink_url'] ?: null, 'show_stats' => (bool) $validated['profile']['show_stats'], 'validation_date' => filled($validated['profile']['validation_date']) ? $validated['profile']['validation_date'] : null, 'contract_date' => filled($validated['profile']['contract_date']) ? $validated['profile']['contract_date'] : null, 'tax_id_number' => $validated['profile']['tax_id_number'] ?: null, 'tax_exempt' => (bool) $validated['profile']['tax_exempt'], 'tax_exempt_reason' => $validated['profile']['tax_exempt_reason'] ?: null, 'disable_footer_code' => (bool) $validated['profile']['disable_footer_code'], ]; if ($this->profileHasInput($profilePayload)) { $user->profile()->updateOrCreate([], $profilePayload); } else { $user->profile()->delete(); } $companySyncPayload = []; foreach ($validated['linkedCompanyIds'] as $companyId) { $companySyncPayload[$companyId] = [ 'role' => $validated['companyRoles'][$companyId] ?? 'member', ]; } $user->companies()->sync($companySyncPayload); $linkedCompanyIds = array_keys($companySyncPayload); $contactIds = collect($validated['contactForms']) ->pluck('id') ->map(fn ($id) => (int) $id) ->all(); $this->linkedContactIds = $contactIds; $contactsById = Contact::query() ->whereIn('id', $contactIds) ->whereIn('company_id', $linkedCompanyIds ?: [-1]) ->get() ->keyBy('id'); foreach ($validated['contactForms'] as $contactForm) { /** @var Contact|null $contact */ $contact = $contactsById->get((int) $contactForm['id']); if (! $contact) { continue; } $contact->update([ 'first_name' => $contactForm['first_name'] ?: null, 'last_name' => $contactForm['last_name'] ?: null, 'email' => $contactForm['email'] ?: null, 'phone' => $contactForm['phone'] ?: null, 'responsibility' => $contactForm['responsibility'] ?: null, ]); } $user->contacts()->sync($contactIds); $billingAddress = $user->billingAddress()->first(); $billingPayload = [ 'salutation_key' => $validated['billing']['salutation_key'] ?: null, 'title' => $validated['billing']['title'] ?: null, 'name' => $validated['billing']['name'] ?: null, 'address1' => $validated['billing']['address1'] ?: null, 'address2' => $validated['billing']['address2'] ?: null, 'postal_code' => $validated['billing']['postal_code'] ?: null, 'city' => $validated['billing']['city'] ?: null, 'country_code' => filled($validated['billing']['country_code']) ? strtoupper((string) $validated['billing']['country_code']) : null, ]; if (! $this->billingHasInput()) { if ($billingAddress) { $billingAddress->delete(); } } elseif ($billingAddress) { // Payload direkt übernehmen – null-Werte leeren das Feld bewusst. // Pflichtfelder (name, address1, postal_code, city, country_code) müssen befüllt bleiben. if ( filled($billingPayload['name']) && filled($billingPayload['address1']) && filled($billingPayload['postal_code']) && filled($billingPayload['city']) && filled($billingPayload['country_code']) ) { $billingAddress->update($billingPayload); } } elseif ($this->billingIsComplete()) { $user->billingAddress()->create([ 'salutation_key' => $billingPayload['salutation_key'], 'title' => $billingPayload['title'], 'name' => (string) $billingPayload['name'], 'address1' => (string) $billingPayload['address1'], 'address2' => $billingPayload['address2'], 'postal_code' => (string) $billingPayload['postal_code'], 'city' => (string) $billingPayload['city'], 'country_code' => (string) $billingPayload['country_code'], ]); } session()->flash('success', __('Benutzer, Profil, Rollen, Firmenzuordnung, Kontakte und Rechnungsadresse wurden gespeichert.')); $this->redirect(route('admin.users.index'), navigate: true); } public function with(): array { $linkedCompanyIds = $this->linkedCompanyIds ?: [-1]; $currentContactIds = collect($this->linkedContactIds) ->map(fn ($id) => (int) $id) ->all(); $companyLookupResults = collect(); $companyLookupTerm = trim($this->companyLookup); if (mb_strlen($companyLookupTerm) >= 1) { $companyLookupResults = Company::withoutGlobalScopes() ->whereNotIn('id', $this->linkedCompanyIds ?: [-1]) ->where(function ($query) use ($companyLookupTerm): void { if ($this->supportsFullTextSearch($companyLookupTerm)) { $query->whereFullText(['name', 'email', 'slug'], $companyLookupTerm); return; } $query ->where('name', 'like', '%'.$companyLookupTerm.'%') ->orWhere('slug', 'like', '%'.$companyLookupTerm.'%') ->orWhere('email', 'like', '%'.$companyLookupTerm.'%'); }) ->orderBy('name') ->limit(50) ->get(['id', 'name', 'slug', 'email']); } $contactLookupResults = collect(); $contactLookupTerm = trim($this->contactLookup); if (mb_strlen($contactLookupTerm) >= 1) { $contactLookupResults = Contact::withoutGlobalScopes() ->with('company:id,name') ->whereNotIn('id', $currentContactIds ?: [-1]) ->where(function ($query) use ($contactLookupTerm): void { if ($this->supportsFullTextSearch($contactLookupTerm)) { $query->whereFullText(['first_name', 'last_name', 'email', 'responsibility'], $contactLookupTerm); return; } $query ->where('first_name', 'like', '%'.$contactLookupTerm.'%') ->orWhere('last_name', 'like', '%'.$contactLookupTerm.'%') ->orWhere('email', 'like', '%'.$contactLookupTerm.'%'); }) ->orderBy('last_name') ->orderBy('first_name') ->limit(50) ->get(['id', 'company_id', 'first_name', 'last_name', 'email']); } return [ 'availableRoles' => $this->availableRoles(), 'linkedCompanies' => Company::withoutGlobalScopes() ->whereIn('id', $linkedCompanyIds) ->orderBy('name') ->get(['id', 'name', 'slug', 'email']), 'companyLookupResults' => $companyLookupResults, 'contactLookupResults' => $contactLookupResults, 'salutations' => config('salutations.items', []), 'countries' => config('countries.items', []), 'portalOptions' => Portal::cases(), 'registrationTypeOptions' => RegistrationType::cases(), ]; } private function availableRoles(): Collection { return app(AdminPerformanceCache::class)->remember(AdminPerformanceCache::RoleOptions, AdminPerformanceCache::OptionsTtl, fn () => Role::query() ->orderBy('name') ->get(['id', 'name'])); } private function supportsFullTextSearch(string $term): bool { return mb_strlen($term) >= 3 && in_array(DB::connection()->getDriverName(), ['mysql', 'pgsql'], true); } protected function syncContactFormsToSelectedCompanies(): void { $currentFormsById = collect($this->contactForms)->keyBy('id'); $allowedCompanyIds = $this->linkedCompanyIds ?: [-1]; $currentContactIds = $currentFormsById->keys()->map(fn ($id) => (int) $id)->all(); $contactsQuery = Contact::query() ->with('company:id,name') ->whereIn('company_id', $allowedCompanyIds) ->orderBy('company_id') ->orderBy('id'); if ($currentContactIds !== []) { $contactsQuery->whereIn('id', $currentContactIds); } else { $contactsQuery->limit(40); } $contacts = $contactsQuery->get(); $this->contactForms = $contacts->map(function (Contact $contact) use ($currentFormsById): array { $current = $currentFormsById->get($contact->id); return [ 'id' => (int) $contact->id, 'company_id' => (int) $contact->company_id, 'company_name' => (string) ($contact->company?->name ?? __('Unbekannte Firma')), 'first_name' => $current['first_name'] ?? $contact->first_name, 'last_name' => $current['last_name'] ?? $contact->last_name, 'email' => $current['email'] ?? $contact->email, 'phone' => $current['phone'] ?? $contact->phone, 'responsibility' => $current['responsibility'] ?? $contact->responsibility, ]; })->values()->all(); } protected function billingHasInput(): bool { return collect($this->billing) ->filter(fn ($value): bool => filled($value)) ->isNotEmpty(); } /** * @param array $profilePayload */ protected function profileHasInput(array $profilePayload): bool { return collect($profilePayload) ->except(['show_stats', 'tax_exempt', 'disable_footer_code']) ->filter(fn ($value): bool => filled($value)) ->isNotEmpty() || (bool) $profilePayload['show_stats'] || (bool) $profilePayload['tax_exempt'] || (bool) $profilePayload['disable_footer_code']; } protected function persistUserLinks(): void { $user = User::query()->find($this->id); if (! $user) { return; } $companySyncPayload = []; foreach ($this->linkedCompanyIds as $companyId) { $companySyncPayload[(int) $companyId] = [ 'role' => $this->companyRoles[(int) $companyId] ?? 'member', ]; } $user->companies()->sync($companySyncPayload); $user->contacts()->sync($this->linkedContactIds); } protected function billingIsComplete(): bool { return filled($this->billing['name']) && filled($this->billing['address1']) && filled($this->billing['postal_code']) && filled($this->billing['city']) && filled($this->billing['country_code']); } }; ?>
{{-- ============== PAGE HEADER ============== --}} @if ($notification)
{{ $notification }}
@endif @php $hasProfileInput = collect($profile) ->except(['show_stats', 'tax_exempt', 'disable_footer_code']) ->filter(fn ($value) => filled($value)) ->isNotEmpty() || (bool) $profile['show_stats'] || (bool) $profile['tax_exempt'] || (bool) $profile['disable_footer_code']; $billingComplete = filled($billing['name']) && filled($billing['address1']) && filled($billing['postal_code']) && filled($billing['city']) && filled($billing['country_code']); @endphp

{{ __('Die wichtigsten Pflegebereiche sind hier zusammengefasst. Springe direkt in den Abschnitt, der noch Arbeit braucht.') }}

{{ __('Account') }}
@if ($isActive) {{ __('Aktiv') }} @else {{ __('Inaktiv') }} @endif {{ strtoupper($portal) }}
{{ __('Legacy-Profil') }}
@if ($hasProfileInput) {{ __('Profil vorhanden') }} @else {{ __('Profil fehlt') }} @endif
{{ __('Verknüpfungen') }}
{{ trans_choice(':count Firma|:count Firmen', count($linkedCompanyIds), ['count' => count($linkedCompanyIds)]) }} {{ trans_choice(':count Kontakt|:count Kontakte', count($contactForms), ['count' => count($contactForms)]) }}
{{ __('Rechnungsadresse') }}
@if ($billingComplete) {{ __('Vollständig') }} @else {{ __('Unvollständig') }} @endif
{{ __('Basisdaten') }}
{{ __('Name') }} {{ __('E-Mail') }} {{ __('Portal') }} @foreach($portalOptions as $portalOption) @endforeach {{ __('Registrierungstyp') }} @foreach($registrationTypeOptions as $registrationTypeOption) @endforeach
{{ __('Legacy-Profil') }} {{ __('Diese Daten stammen aus sf_guard_user_profile und sind direkt mit dem Benutzer verknüpft.') }}
{{ __('Anrede') }} @foreach($salutations as $key => $labels) @endforeach {{ __('Titel') }} {{ __('Vorname') }} {{ __('Nachname') }} {{ __('Telefon') }} {{ __('Geburtsdatum') }} {{ __('Adresse') }} {{ __('Land') }} @foreach($countries as $countryCode => $countryName) @endforeach {{ __('Backlink-URL') }} {{ __('Validierungsdatum') }} {{ __('Vertragsdatum') }} {{ __('USt-IdNr.') }} {{ __('Steuerbefreiungsgrund') }}
{{ __('Rollenzuweisung') }}
@foreach($availableRoles as $role) @endforeach
{{ __('Firmenverknüpfung') }} {{ __('Hier verknüpfst du den Benutzer mit Firmen. Die verknüpften Firmenkontakte können darunter direkt gepflegt werden.') }}
@foreach($companyLookupResults as $company) {{ $company->name }}@if($company->email)· {{ $company->email }}@endif @endforeach @if(blank(trim($companyLookup))) {{ __('Mindestens 1 Zeichen eingeben…') }} @else {{ __('Keine Firma gefunden.') }} @endif
@forelse($linkedCompanies as $company)
{{ $company->name }} {{ $company->slug }}
{{ __('Entfernen') }}
@empty {{ __('Aktuell sind keine Firmen verknüpft.') }} @endforelse
{{ __('Kontakte der verknüpften Firmen') }}
@foreach($contactLookupResults as $contactResult) @php $contactResultName = trim(($contactResult->first_name ?? '').' '.($contactResult->last_name ?? '')) ?: __('Kontakt ohne Name'); @endphp {{ $contactResultName }} @if($contactResult->email)· {{ $contactResult->email }} @endif · {{ $contactResult->company?->name ?? __('Unbekannte Firma') }} @endforeach @if(blank(trim($contactLookup))) {{ __('Mindestens 1 Zeichen eingeben…') }} @else {{ __('Kein Kontakt gefunden.') }} @endif
@forelse($contactForms as $index => $contactForm)
{{ __('Firma') }}: {{ $contactForm['company_name'] }} {{ __('Entfernen') }}
{{ __('Vorname') }} {{ __('Nachname') }} {{ __('E-Mail') }} {{ __('Telefon') }} {{ __('Rolle / Verantwortlichkeit') }}
@empty {{ __('Zu den aktuell verknüpften Firmen sind keine Kontakte vorhanden.') }} @endforelse
{{ __('Rechnungsadresse') }}
{{ __('Anrede') }} @foreach($salutations as $key => $labels) @endforeach {{ __('Titel') }} {{ __('Rechnungsname') }} {{ __('Adresse Zeile 1') }} {{ __('Adresse Zeile 2') }} {{ __('PLZ') }} {{ __('Stadt') }} {{ __('Land') }} @foreach($countries as $countryCode => $countryName) @endforeach
{{ __('Abbrechen') }} {{ __('Speichern') }}