Enable data type only for snapshots

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-08-27 13:51:39 +02:00
parent 05b9672a03
commit 6003806ccd
2 changed files with 2 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ const snapshotCreateMutation = graphql`
const snapshotSchema = z.object({
name: z.string().min(2, { message: "Name is required" }),
description: z.string().optional(),
type: z.enum(["RISKS", "VENDORS", "ASSETS", "DATA", "NON_CONFORMITY_REGISTRIES", "COMPLIANCE_REGISTRIES"]),
type: z.enum(["DATA"]),
});
type Props = {
@@ -64,7 +64,7 @@ export default function SnapshotFormDialog(props: Props) {
defaultValues: {
name: "",
description: "",
type: "RISKS",
type: "DATA",
},
});

View File

@@ -1,12 +1,7 @@
type Translator = (s: string) => string;
export const snapshotTypes = [
"RISKS",
"VENDORS",
"ASSETS",
"DATA",
"NON_CONFORMITY_REGISTRIES",
"COMPLIANCE_REGISTRIES"
] as const;
export function getSnapshotTypeLabel(__: Translator, type: string | null | undefined) {