@extends('layouts.app') @section('title', __('Connect :name', ['name' => $name])) @section('page-title', __('Connect :name', ['name' => $name])) @section('content') @php $providerStyles = [ 'odoo' => [ 'logo' => '#714b67', 'mark' => 'Od', 'tagline' => __('Connect via API key — works with Odoo Online and self-hosted instances.'), 'docs_url' => 'https://www.odoo.com/documentation/master/developer/reference/external_api.html', 'help_steps' => [ __('Open Odoo → Settings → Users & Companies → Users.'), __('Pick the integration user → Account Security → New API Key.'), __('Copy the URL (no trailing slash), database name, and the API key here.'), ], ], 'billit' => [ 'logo' => '#ff8a3c', 'mark' => 'Bi', 'tagline' => __('Cash-basis P&L from your sales and purchase orders. No GL required.'), 'docs_url' => 'https://www.billit.eu/api', 'help_steps' => [ __('In Billit → Settings → API → generate an API key.'), __('Open your party — the numeric ID is in the URL.'), __('Paste both here.'), ], ], ]; $style = $providerStyles[$provider] ?? ['logo' => '#64748b', 'mark' => strtoupper(substr($name, 0, 2)), 'tagline' => '', 'docs_url' => null, 'help_steps' => []]; @endphp
{{ __('Back to accounting') }}
{{-- ─── Form ─────────────────────────────────────────── --}}
@csrf
{{ $style['mark'] }}

{{ __('Connect to :name', ['name' => $name]) }}

{{ $style['tagline'] }}

{{ __('Credentials are stored encrypted and only used to read your financial data — we never write to your accounting software.') }}
@if($provider === 'odoo')
@error('url')
{{ $message }}
@enderror
@error('db')
{{ $message }}
@enderror
@error('login')
{{ $message }}
@enderror
@error('api_key')
{{ $message }}
@enderror
@elseif($provider === 'billit')
@error('api_key')
{{ $message }}
@enderror
@error('party_id')
{{ $message }}
@enderror

{{ __('Use Sandbox if your API key was generated in the Billit test environment.') }}

@endif
{{ __('Cancel') }}
{{-- ─── Help sidebar ────────────────────────────────── --}}
@endsection