Enable data type only for snapshots
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -42,7 +42,7 @@ const snapshotCreateMutation = graphql`
|
|||||||
const snapshotSchema = z.object({
|
const snapshotSchema = z.object({
|
||||||
name: z.string().min(2, { message: "Name is required" }),
|
name: z.string().min(2, { message: "Name is required" }),
|
||||||
description: z.string().optional(),
|
description: z.string().optional(),
|
||||||
type: z.enum(["RISKS", "VENDORS", "ASSETS", "DATA", "NON_CONFORMITY_REGISTRIES", "COMPLIANCE_REGISTRIES"]),
|
type: z.enum(["DATA"]),
|
||||||
});
|
});
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -64,7 +64,7 @@ export default function SnapshotFormDialog(props: Props) {
|
|||||||
defaultValues: {
|
defaultValues: {
|
||||||
name: "",
|
name: "",
|
||||||
description: "",
|
description: "",
|
||||||
type: "RISKS",
|
type: "DATA",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
type Translator = (s: string) => string;
|
type Translator = (s: string) => string;
|
||||||
|
|
||||||
export const snapshotTypes = [
|
export const snapshotTypes = [
|
||||||
"RISKS",
|
|
||||||
"VENDORS",
|
|
||||||
"ASSETS",
|
|
||||||
"DATA",
|
"DATA",
|
||||||
"NON_CONFORMITY_REGISTRIES",
|
|
||||||
"COMPLIANCE_REGISTRIES"
|
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
export function getSnapshotTypeLabel(__: Translator, type: string | null | undefined) {
|
export function getSnapshotTypeLabel(__: Translator, type: string | null | undefined) {
|
||||||
|
|||||||
Reference in New Issue
Block a user