@extends('layouts.admin') @section('content')

{{ __('Customer Management') }}

{{ __('Manage all tenant accounts and validity') }}

{{ __('Total Customers') }}

{{ $companies->total() }}

{{ __('Active') }}

{{ $companies->where('status', 1)->count() }}

{{ __('Expired / Disabled') }}

{{ $companies->where('status', 0)->count() }}

@forelse($companies as $company)

{{ $company->name }}

{{ $company->code }}

@if($company->status) {{ __('Active') }} @else {{ __('Disabled') }} @endif

{{ __('Business') }}

{{ __($company->current_type === 'buyout' ? 'Buyout' : 'Lease') }}

{{ __('Scale') }}

{{ $company->users_count }}U / {{ $company->machines_count }}M

@if($company->current_type === 'lease')
{{ __('Contract') }} {{ $company->start_date ? $company->start_date->format('Y-m-d') : '--' }} ~ {{ $company->end_date ? $company->end_date->format('Y-m-d') : __('Permanent') }}
@endif @if($company->current_type === 'buyout')
{{ __('Warranty') }} {{ $company->warranty_start_date ? $company->warranty_start_date->format('Y-m-d') : '--' }} ~ {{ $company->warranty_end_date ? $company->warranty_end_date->format('Y-m-d') : '--' }}
{{ __('Software') }} {{ $company->software_start_date ? $company->software_start_date->format('Y-m-d') : '--' }} ~ {{ $company->software_end_date ? $company->software_end_date->format('Y-m-d') : '--' }}
@endif
@if($company->status) @else @endif
@empty

{{ __('No Customers Found') }}

@endforelse
{{ $companies->links('vendor.pagination.luxury') }}
@forelse($companies as $company) @empty @endforelse
{{ __('Customer Info') }} {{ __('Enabled Features') }} {{ __('Actions') }}
{{ $company->name }}
{{ $company->code }}
@php $settings = $company->settings ?? []; @endphp @if(empty($settings) || !in_array(true, array_map(fn($v) => (bool)$v, is_array($settings) ? $settings : ($settings->toArray() ?? [])), true)) {{ __('None') }} @else @if($settings['enable_material_code'] ?? false) {{ __('Material Code') }} @endif @if($settings['enable_points'] ?? false) {{ __('Points') }} @endif @endif

{{ __('No customers found') }}

{{ $companies->appends(['tab' => 'settings', 'search' => request('search')])->links('vendor.pagination.luxury') }}
@forelse($companies as $company) @php $settings = $company->settings ?? []; @endphp @empty @endforelse
{{ __('Customer Info') }} {{ __('Authorized Status') }} {{ __('Current Brand Visual') }} {{ __('Actions') }}
{{ $company->name }} {{ $company->code }}
@if(filter_var($settings['enable_custom_branding'] ?? false, FILTER_VALIDATE_BOOLEAN)) {{ __('Authorized') }} @else {{ __('Unauthorized') }} @endif
@if(isset($settings['logo_path'])) @else {{ __('No Logo') }} @endif
{{ __('Welcome Title') }} {{ $settings['login_title'] ?? __('System Default') }}
@if(filter_var($settings['enable_custom_branding'] ?? false, FILTER_VALIDATE_BOOLEAN)) @else @endif

{{ __('No customers found') }}

{{ $companies->appends(['tab' => 'branding', 'search' => request('search')])->links('vendor.pagination.luxury') }}

@csrf

{{ __('Company Information') }}

{{ __('Original Type') }}: *
{{ __('Current Type') }}: *

{{ __('Initial Admin Account') }} ({{ __('Optional') }})

@foreach($template_roles as $role) @endforeach

{{ __('Contact & Details') }}

{{ __('Edit System Settings') }}

@csrf @method('PUT')

{{ __('Goods & System Settings') }}

{{ __('Customize Brand & Style') }}

@csrf

{{ __('Supports JPEG, PNG, SVG (Max 2MB). Ideal proportion: Horizontal or Square.') }}

{{ __('Displayed below "Welcome Back" on the login portal.') }}

{{ __('Enterprise Premium Features') }}

{{ __('Locked') }}
{{ __('Locked') }}