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
@@ -11,7 +11,14 @@ import {
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
export default function TenantCreate() {
export default function TenantCreate({
plans,
}: {
plans: Record<
string,
{ name: string; price: number; max_devices: number; max_users: number }
>;
}) {
return (
<>
<Head title="Tambah Tenant" />
@@ -158,6 +165,34 @@ export default function TenantCreate() {
message={errors.deployment_domain}
/>
</div>
<div className="grid gap-2 md:col-span-2">
<Label>Paket Lisensi</Label>
<select
name="plan_code"
defaultValue="cloud_free"
className="h-10 rounded-md border bg-background px-3"
>
{Object.entries(plans).map(
([code, plan]) => (
<option
key={code}
value={code}
>
{plan.name} ·{' '}
{plan.price === 0
? 'Gratis'
: `Rp${plan.price.toLocaleString('id-ID')}/bulan`}{' '}
· {plan.max_devices}{' '}
perangkat ·{' '}
{plan.max_users} user
</option>
),
)}
</select>
<InputError
message={errors.plan_code}
/>
</div>
</CardContent>
</Card>
<div className="flex justify-end gap-3">