update lisensi prosess
tests / ci (push) Has been cancelled

This commit is contained in:
Wian Drs
2026-08-25 13:43:55 +07:00
parent 1e80be180e
commit 60946ddf37
58 changed files with 2903 additions and 165 deletions
+50 -43
View File
@@ -47,7 +47,16 @@ export default function DeviceShow({ device, credentials }: Props) {
['Tipe', device.type.name],
['Model', device.model?.name ?? '-'],
['Alamat Management', device.management_address],
['Koneksi', Object.entries(device.connection_ports ?? { [device.connection_type]: device.management_port }).map(([protocol, port]) => `${protocol}: ${port}`).join(' · ')],
[
'Koneksi',
Object.entries(
device.connection_ports ?? {
[device.connection_type]: device.management_port,
},
)
.map(([protocol, port]) => `${protocol}: ${port}`)
.join(' · '),
],
['Hostname', device.hostname ?? '-'],
['Serial Number', device.serial_number ?? '-'],
['Versi RouterOS', device.software_version ?? '-'],
@@ -89,50 +98,48 @@ export default function DeviceShow({ device, credentials }: Props) {
</Button>
)}
</div>
{['mikrotik', 'zte', 'hsgq', 'hisfocus'].includes(device.vendor.slug) && (
<Card>
<CardHeader>
<CardTitle>
Aktivasi {device.vendor.name}
</CardTitle>
</CardHeader>
<CardContent className="flex flex-col justify-between gap-4 md:flex-row md:items-center">
<div className="text-sm">
<p>
Status:{' '}
<strong className="uppercase">
{device.activation_status}
</strong>
{['mikrotik', 'zte', 'hsgq', 'hisfocus'].includes(
device.vendor.slug,
) && (
<Card>
<CardHeader>
<CardTitle>Aktivasi {device.vendor.name}</CardTitle>
</CardHeader>
<CardContent className="flex flex-col justify-between gap-4 md:flex-row md:items-center">
<div className="text-sm">
<p>
Status:{' '}
<strong className="uppercase">
{device.activation_status}
</strong>
</p>
<p className="text-muted-foreground">
{device.activation_message ??
'Aktivasi akan menguji koneksi dan membuat Base User management dengan aman.'}
</p>
{errors.activation && (
<p className="mt-2 text-destructive">
{errors.activation}
</p>
<p className="text-muted-foreground">
{device.activation_message ??
'Aktivasi akan menguji koneksi dan membuat Base User management dengan aman.'}
</p>
{errors.activation && (
<p className="mt-2 text-destructive">
{errors.activation}
</p>
)}
</div>
{auth.permissions.includes(
'device.connect',
) && (
<Form
action={`/devices/${device.id}/activate`}
method="post"
>
{({ processing }) => (
<Button disabled={processing}>
{processing
? 'Mengaktifkan...'
: 'Cek & Aktifkan Perangkat'}
</Button>
)}
</Form>
)}
</CardContent>
</Card>
)}
</div>
{auth.permissions.includes('device.connect') && (
<Form
action={`/devices/${device.id}/activate`}
method="post"
>
{({ processing }) => (
<Button disabled={processing}>
{processing
? 'Mengaktifkan...'
: 'Cek & Aktifkan Perangkat'}
</Button>
)}
</Form>
)}
</CardContent>
</Card>
)}
<Card>
<CardHeader>
<CardTitle>Informasi</CardTitle>