refactor(vps): update vCPU, RAM, and disk fields to allow decimal values
Docker / build (push) Failing after 21s

Changed the step attribute for NumberField components in the VpsEditSheet to "any" for vCPU, RAM, and disk inputs. Updated the vpsSchema to accept real numbers for vCPU, diskGb, and bandwidthTb. Adjusted database schema to store vCPU, diskGb, and bandwidthTb as REAL instead of INTEGER for better precision.
This commit is contained in:
Denozordec committed 2026-07-31 16:46:26 +07:00
1 parent 72f9597ede
commit 53d5ed5d33
9 files changed
+572 -14

No files matched your search

@@ -205,7 +205,7 @@ export function VpsEditSheet({
<NumberField
id="vps-vcpu"
min={0}
step={1}
step="any"
value={Number(field.value ?? 0)}
onValueChange={(val) => field.onChange(val ?? 0)}
>
@@ -226,7 +226,7 @@ export function VpsEditSheet({
<NumberField
id="vps-ram"
min={0}
step={1}
step="any"
value={Number(field.value ?? 0)}
onValueChange={(val) => field.onChange(val ?? 0)}
>
@@ -247,7 +247,7 @@ export function VpsEditSheet({
<NumberField
id="vps-disk"
min={0}
step={1}
step="any"
value={Number(field.value ?? 0)}
onValueChange={(val) => field.onChange(val ?? 0)}
>
+1 -1
View File
@@ -50,7 +50,7 @@ export const vpsSchema = z.object({
country: z.string().optional().default(''),
city: z.string().optional().default(''),
datacenter: z.string().optional().default(''),
vcpu: z.coerce.number().int().min(0).default(1),
vcpu: z.coerce.number().min(0).default(1),
ramGb: z.coerce.number().min(0).default(1),
diskGb: z.coerce.number().min(0).default(10),
status: vpsStatusSchema.default('active'),