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

{{ __('Customer Management') }}

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

{{ __('Loading Data') }}...

{{ __('Total Customers') }}

{{ $companies->total() }}

{{ __('Active') }}

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

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

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

@forelse($companies as $company) @empty @endforelse
{{ __('Customer Info') }} {{ __('Business Type') }} {{ __('Status') }} {{ __('Accounts / Machines') }} {{ __('Service Terms') }} {{ __('Actions') }}
{{ $company->name }}
{{ $company->code }}
{{ __('Original:') }} {{ __($company->original_type === 'buyout' ? 'Buyout' : 'Lease') }}
{{ __('Current:') }} {{ __($company->current_type === 'buyout' ? 'Buyout' : 'Lease') }}
@if($company->status) {{ __('Active') }} @else {{ __('Disabled') }} @endif
{{ $company->users_count }} {{ __('Users') }}
{{ $company->machines_count }} {{ __('Machines') }}
@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

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

{{ $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 @if($settings['tax_invoice'] ?? false) {{ __('Electronic Invoice') }} @endif @if($settings['card_terminal'] ?? false) {{ __('Card System') }} @endif @if($settings['scan_pay_esun'] ?? false) {{ __('ESUN') }} @endif @if($settings['scan_pay_linepay'] ?? false) {{ __('LinePay') }} @endif @if($settings['shopping_cart'] ?? false) {{ __('Shopping Cart') }} @endif @if($settings['welcome_gift'] ?? false) {{ __('Welcome Gift') }} @endif @if($settings['cash_module'] ?? false) {{ __('Cash Module') }} @endif @endif

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

{{ $companies->appends(['tab' => 'settings', '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') }}