import { Form, Head, Link, usePage } from '@inertiajs/react'; import InputError from '@/components/input-error'; import { TenantAdminNav } from '@/components/tenant-admin-nav'; 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 Role = { id: number; name: string }; type Props = { tenant: { id: number; name: string }; managedUser: { id: number; name: string; email: string; roles: Role[] }; canManageRoles: boolean; }; export default function UserEdit({ tenant, managedUser, canManageRoles, }: Props) { const base = `/administration/tenants/${tenant.id}/users`; const { flash } = usePage().props as unknown as { flash: { success?: string }; }; return ( <>

Edit User

{tenant.name}

{flash.success && (
{flash.success}
)}
{({ processing, errors }) => ( Profil dan Role
{canManageRoles ? (
) : (
Role sistem:{' '} {managedUser.roles[0]?.name ?? 'Tenant User'} . Role bersifat baku dan tidak dapat diubah.
)}
)}
{({ processing, errors }) => ( Reset Password Semua token API user akan dicabut.
)}
); } UserEdit.layout = { breadcrumbs: [ { title: 'Users', href: '#' }, { title: 'Edit', href: '#' }, ], };