chore: add pricing plan lock for machine types

This commit is contained in:
bennykok
2024-01-28 14:36:36 +08:00
parent 42aaf1acb9
commit 9de266fbab
8 changed files with 177 additions and 14 deletions
@@ -1,3 +1,4 @@
import AutoFormGPUPicker from "@/components/custom-form/gpu-picker";
import AutoFormCheckbox from "./fields/checkbox";
import AutoFormDate from "./fields/date";
import AutoFormEnum from "./fields/enum";
@@ -22,6 +23,7 @@ export const INPUT_COMPONENTS = {
// Customs
snapshot: AutoFormSnapshotPicker,
models: AutoFormModelsPicker,
gpuPicker: AutoFormGPUPicker,
};
/**
+2
View File
@@ -1,3 +1,4 @@
import type { getCurrentPlanWithAuth } from "@/server/getCurrentPlan";
import type { INPUT_COMPONENTS } from "./config";
import type { ControllerRenderProps, FieldValues } from "react-hook-form";
import type * as z from "zod";
@@ -6,6 +7,7 @@ export type FieldConfigItem = {
description?: React.ReactNode;
inputProps?: React.InputHTMLAttributes<HTMLInputElement> & {
showLabel?: boolean;
sub?: Awaited<ReturnType<typeof getCurrentPlanWithAuth>>;
};
fieldType?:
| keyof typeof INPUT_COMPONENTS