@extends('layouts.app') @section('title', __('Workspace settings')) @section('page-title', __('Workspace settings')) @section('content')

{{ __('Workspace settings') }}

{{ __('Manage your workspace identity and notifications.') }}

@csrf @method('PATCH') {{-- Identity --}}

{{ __('Workspace identity') }}

{{ __('How your workspace is named across the app.') }}

@error('name')
{{ $message }}
@enderror

{{ __('Contact support to change your slug.') }}

{{-- Notifications --}}

{{ __('Submission notifications') }}

{{ __('Where to send email notifications when clients upload files or evaluate analyses.') }}

@error('notify_email')
{{ $message }}
@enderror
{{-- Integrations visibility --}}

{{ __('Accounting integrations') }}

{{ __('Choose which accounting providers your clients can connect at /space/integrations. You can only narrow within what your plan grants.') }}

@if(empty($planGrantedIntegrations))
{{ __('Your current plan does not include any accounting integration. Upgrade to unlock automatic data import.') }}
@else @php $providerLogos = [ 'exact_online' => ['mark' => 'EO', 'color' => '#dc1e35', 'name' => 'Exact Online'], 'odoo' => ['mark' => 'Od', 'color' => '#714b67', 'name' => 'Odoo'], 'billit' => ['mark' => 'Bi', 'color' => '#ff8a3c', 'name' => 'Billit'], ]; @endphp {{-- Always submit the array (empty if everything is enabled). --}}
@foreach($planGrantedIntegrations as $p) @php $logo = $providerLogos[$p['key']] ?? ['mark' => strtoupper(substr($p['name'], 0, 2)), 'color' => '#64748b', 'name' => $p['name']]; $enabled = ! in_array($p['key'], $tenantDisabledProviders, true); @endphp {{-- A box the admin checks to ENABLE; we invert into disabled_integrations[] on submit. --}} @endforeach
@endif
{{-- Branding (white-label PDF reports) --}} @php $branding = (array) (data_get($tenant, 'settings.branding') ?? []); $logoPath = $branding['logo_path'] ?? null; $logoUrl = $logoPath ? \Illuminate\Support\Facades\Storage::disk($branding['logo_disk'] ?? 'public')->url($logoPath) : null; $primary = old('primary_color', $branding['primary_color'] ?? '#6366f1'); $accent = old('accent_color', $branding['accent_color'] ?? '#0f172a'); $footer = old('footer_text', $branding['footer_text'] ?? ''); @endphp

{{ __('Branding') }}

{{ __('Logo and colors applied to PDF, DOCX and XLSX reports your firm sends to clients.') }}

{{-- Logo --}}

{{ __('PNG, JPG or SVG · up to 2 MB · ideally a square or wide transparent PNG.') }}

{{ __('Preview only — click "Save changes" to apply.') }}

@error('logo')
{{ $message }}
@enderror @if($logoUrl) @endif
{{-- Colors --}}

{{ __('Used for table headers and accent bar.') }}

@error('primary_color')
{{ $message }}
@enderror

{{ __('Used for headings and emphasised values.') }}

@error('accent_color')
{{ $message }}
@enderror
{{-- Live preview --}}
{{ __('Preview') }}
{{ $tenant->name }}
{{ __('Quarterly diagnostic — sample') }}
{{ __('Diagnostic analysis · 2026-Q1') }}
{{ __('Indicator') }} {{ __('Value') }}
{{ __('Revenue') }}€ 124,320
{{ __('Gross margin') }}38.2 %
{{-- Footer line --}}

{{ __('Appears below the report on every page.') }}

@error('footer_text')
{{ $message }}
@enderror
{{ __('Cancel') }}
@endsection