@extends('layouts.setup') @section('title', '会社情報・法務') @section('page-title', '会社情報・法務') @push('styles') @endpush @section('setup_body')
販売ページや配信メールに載せる、あなたの会社情報(会社名・住所・連絡先)です。複数登録でき、ファネルやシナリオごとに使う会社を選べます。
@if(($settings ?? collect())->isEmpty())
会社情報がありません
@else @php $groups = $groups ?? collect(); $groupedSettings = $settings->groupBy(fn ($business) => $business->group_id ? ('g_'.$business->group_id) : 'none'); @endphp @foreach($groupedSettings as $groupKey => $items) @php $groupName = '未分類'; if ($groupKey !== 'none') { $groupId = (int) str_replace('g_', '', $groupKey); $group = $groups->firstWhere('id', $groupId); $groupName = $group ? $group->name : 'グループ'; } @endphp
{{ $groupName }}
@foreach($items as $business)
{{ $business->displayName() }}
{{ $business->business_type === 'corporation' ? '法人' : '個人事業主' }} @if($business->representative) / 代表: {{ $business->representative }} @endif @if($business->email) / {{ $business->email }} @endif
@if($business->is_default) 既定 @endif @if($settings->count() > 1)
@csrf @method('DELETE')
@endif
@endforeach
@endforeach @endif @foreach(($settings ?? collect()) as $business) @endforeach @push('scripts') @endpush @endsection