@extends('layouts.dashboard') @section('title', trans('dashboard.nav_settings')) @section('header_title', trans('dashboard.nav_settings')) @section('content') @php $isAr = app()->getLocale() === 'ar'; $isSandbox = (bool) ($tenant->is_sandbox ?? true); $invoicePref = $tenant->settings['invoice_type_preference'] ?? 'both'; $taxTreatment = $tenant->settings['tax_treatment'] ?? 'standard_15'; $brandColor = $tenant->settings['brand_color'] ?? '#1D4ED8'; $currentTemplate = $tenant->settings['template'] ?? 'classic'; $savedDesigns = $tenant->settings['saved_designs'] ?? []; $logoPath = $tenant->settings['logo_path'] ?? null; $footerText = $tenant->settings['footer_text'] ?? ''; $showFooterContact = $tenant->settings['show_footer_contact'] ?? false; $showFooterTerms = $tenant->settings['show_footer_terms'] ?? false; $tabs = [ 'profile' => ['ar' => 'ملف المنشأة', 'en' => 'Company Profile', 'icon' => 'fa-building'], 'certificate' => ['ar' => 'الربط والشهادة', 'en' => 'Connection & Certificate', 'icon' => 'fa-certificate'], 'stores' => ['ar' => 'ربط المتاجر', 'en' => 'Store Integration', 'icon' => 'fa-store'], 'template' => ['ar' => 'قالب الفاتورة', 'en' => 'Invoice Template', 'icon' => 'fa-file-invoice'], 'users' => ['ar' => 'المستخدمون', 'en' => 'Users', 'icon' => 'fa-users'], 'api' => ['ar' => 'واجهة API', 'en' => 'API Interface', 'icon' => 'fa-code'], ]; @endphp
{{ $isAr ? 'حقول مطلوبة لتفعيل الربط:' : 'Required fields for connection:' }}
{{ $isAr ? 'أضف فروع منشأتك إذا كانت لديك أكثر من موقع. كل فرع يظهر كخيار عند إنشاء الفاتورة.' : 'Add branches for multiple locations. Each branch appears as an option when creating invoices.' }}
{{ $branch['name'] }}
@if(!empty($branch['cr_number'])){{ $branch['cr_number'] }}
@endif @if(!empty($branch['short_address'])){{ $branch['short_address'] }}
@endif{{ $isAr ? 'أنت في وضع التجربة' : 'You are in Sandbox Mode' }}
{{ $isAr ? 'بيئة الاختبار تتيح لك إنشاء فواتير وإرسالها دون أثر قانوني. عند الجاهزية، حوّل إلى التشغيل الفعلي.' : 'The sandbox lets you create and submit invoices with no legal effect. When ready, switch to production.' }}
{{ $isAr ? 'حالة الاتصال' : 'Connection Status' }}
{{ $isAr ? 'شهادة الإنتاج (PCSID)' : 'Production Certificate (PCSID)' }}
@php $hasCert = filled($device->certificate_pem); $certExpiry = $device->certificate_expires_at ?? null; $isExpired = $certExpiry && now()->greaterThan($certExpiry); @endphp{{ $isAr ? 'ربط المتاجر' : 'Store Integration' }}
{{ $isAr ? 'قريباً — سيتمكن كل متجر إلكتروني من إرسال طلباته مباشرةً لإنشاء الفاتورة تلقائياً.' : 'Coming soon — your online stores will be able to send orders directly to auto-generate invoices.' }}
{{ $isAr ? 'قريباً' : 'Coming Soon' }}{{ $isAr ? 'المعاينة تُبيّن بالضبط الشكل الذي يصدر الفاتورة الحقيقية — اختر قالباً ولوناً واضغط حفظ لتطبيقه على الفواتير الجديدة.' : 'Preview shows exactly how real invoices look. Pick a template and color, then save.' }}
{{ $isAr ? 'الأشكال الخمسة الجاهزة' : '5 Ready Styles' }}
{{ $isAr ? '5 قوالب' : '5 Styles' }}{{ $isAr ? 'اضغط «معاينة وتطبيق» على أي شكل لتجربته حياً في المعاينة الفورية، ثم احفظ اختيارك:' : 'Click preview on any style to see it live, then save your choice:' }}
{{ $isAr ? $preset['name_ar'] : $preset['name_en'] }}
{{ $preset['desc'] }}
{{ $isAr ? 'تصاميمي المخصصة المحفوظة' : 'My Custom Saved Designs' }}
{{ $isAr ? 'يمكنك حفظ تشكيلتك الحالية كقالب مخصص باسم لتطبيقه في أي وقت.' : 'Save your current look by custom name to apply anytime.' }}
{{ $isAr ? 'المستخدمون' : 'Team Members' }}
{{-- Invite form --}} @if($user->role === 'owner') @endif {{-- Members list --}}{{ $member->email }}
@if($member->name){{ $member->name }}
@endif{{ $isAr ? 'المستخدم المدعو يدخل بنفس بريده عبر رمز التحقق — بدون كلمات مرور.' : 'Invited users sign in with their email OTP — no passwords.' }}
{{ $isAr ? '⚠ انسخ المفتاح الآن — لن يظهر مجدداً' : '⚠ Copy the key now — it will never be shown again' }}
{{ session('new_raw_key') }}
{{ $isAr ? 'المفاتيح الحالية' : 'Current Keys' }}
@foreach($apiKeys as $key){{ $key->name }}
{{ $key->key_prefix }}