@extends('layouts.sadmin') @section('title', 'Edit Company') @section('content')

Edit Company

{{ $company->company_code }} — {{ $company->name }}

{{ ucfirst($company->status) }}
@csrf @method('PUT')
{{-- Company Info --}}
Company Information
@error('name')
{{ $message }}
@enderror
Cannot be changed after creation
@error('status')
{{ $message }}
@enderror
{{-- Company Users --}}
Company Users {{ $company->users_count }} users
@forelse($users as $user) @empty @endforelse
Username Name Role Status Last Login
{{ $user->username }} {{ $user->name }} @if($user->is_admin) Admin @else User @endif @if($user->deleted_at) Deleted @elseif($user->is_active) Active @else Inactive @endif {{ $user->last_login_at ? $user->last_login_at->diffForHumans() : 'Never' }}
No users
{{-- Subscription --}}
Subscription Settings
@if($company->group)
Current: {{ $company->group->group_code }} — {{ $company->group->name }}
@elseif($groups->isEmpty())
Create a group on the Subscription page first.
@else
Assign a Group ID and name for shared login / company selection.
@endif @error('company_group_id')
{{ $message }}
@enderror
$
{{-- Info Panel --}}
Company Info
@if($company->subscription) @endif
Created At {{ $company->created_at->format('d M Y, H:i') }}
Updated At {{ $company->updated_at->format('d M Y, H:i') }}
Total Users {{ $company->users_count }}
Trial Ends {{ $company->subscription->trial_ends_at?->format('d M Y') ?? '—' }}
{{-- Action Bar --}}
Cancel
@endsection @push('scripts') @endpush