import { Form, Head, Link, usePage } from '@inertiajs/react'; import InputError from '@/components/input-error'; import { TenantAdminNav } from '@/components/tenant-admin-nav'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from '@/components/ui/card'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; type Tenant = { id: number; uuid: string; name: string; slug: string; is_active: boolean; }; type User = { uuid: string; name: string; email: string; is_active: boolean; created_at: string; }; type Installation = { deployment_type: 'managed_cloud' | 'self_hosted'; domain?: string; status: string; last_seen_at?: string; }; type License = { plan: string; status: string; max_devices: number; max_users: number; expires_at: string; }; export default function TenantEdit({ tenant, users, installation, license, plans, }: { tenant: Tenant; users: User[]; installation: Installation | null; license: License | null; plans: Record< string, { name: string; price: number; max_devices: number; max_users: number } >; }) { const { flash } = usePage().props as unknown as { flash: { success?: string }; }; return ( <>

{tenant.name}

UUID: {tenant.uuid}

{tenant.is_active ? 'Aktif' : 'Nonaktif'}
{flash.success && (
{flash.success}
)}
{({ processing, errors }) => ( Pengaturan Tenant Menonaktifkan tenant mempertahankan seluruh data.

Status: {license?.status ?? 'belum ada'} {license?.expires_at ? ` · sampai ${new Date(license.expires_at).toLocaleDateString('id-ID')}` : ''}

)}
User Tenant Daftar awal; manajemen user lengkap tersedia pada increment berikutnya. {users.map((user) => ( ))}
Nama Email Status Dibuat
{user.name} {user.email} {user.is_active ? 'Aktif' : 'Nonaktif'} {new Date( user.created_at, ).toLocaleDateString('id-ID')}
); } TenantEdit.layout = { breadcrumbs: [ { title: 'Tenants', href: '/administration/tenants' }, { title: 'Kelola', href: '#' }, ], };