@extends('layouts.app') @section('title', 'Detail Tenant: ' . $tenant->name) @section('content')
Kembali ke Daftar Tenant {{-- Header --}}

{{ $tenant->name }}

@php $planColor = [ 'start_plus' => 'bg-violet-100 text-violet-700', 'start' => 'bg-blue-100 text-blue-700', 'umkm' => 'bg-green-100 text-green-700', 'pemula' => 'bg-slate-100 text-slate-600', ][$tenant->plan] ?? 'bg-slate-100 text-slate-600'; @endphp {{ strtoupper($tenant->plan) }} {{ $tenant->is_active ? 'Aktif' : 'Nonaktif' }} Dibuat {{ $tenant->created_at->format('d/m/Y') }}
@csrf
{{-- Plan status --}} @if($tenant->plan !== 'pemula')
@if($tenant->isPlanExpired()) Paket kedaluwarsa sejak {{ $tenant->plan_expires_at->format('d/m/Y') }} @elseif($tenant->plan_expires_at) Aktif hingga {{ $tenant->plan_expires_at->format('d M Y') }} ({{ $tenant->daysUntilExpiry() }} hari lagi) @else Belum ada tanggal kedaluwarsa @endif
@if($tenant->isPlanExpired()) Expired — fitur dibatasi ke Pemula @endif
@endif {{-- Change plan --}}

Ubah Paket / Change Plan

@csrf
hari / days

Pemula = gratis selamanya (durasi diabaikan). Paket lain aktif sesuai jumlah hari yang ditentukan. / Pemula = free forever. Paid plans activate for the specified number of days.

{{-- Users table --}}

Pengguna / Users {{ $tenant->users->count() }}

@forelse($tenant->users as $user) @empty @endforelse
Nama Role Status
{{ strtoupper(substr($user->name, 0, 2)) }}
{{ $user->name }}
{{ ucfirst($user->role) }} {{ $user->is_active ? 'Aktif' : 'Nonaktif' }}
Belum ada pengguna / No users yet
@endsection