From d2bea9180aae9a8c01bfdc24f56defb4f22014f7 Mon Sep 17 00:00:00 2001 From: ewandor Date: Thu, 15 May 2025 01:52:58 +0200 Subject: [PATCH] Adding Signature link, need a destination --- .../components/widgets/crud-text-widget.tsx | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gui/rpk-gui/src/lib/crud/components/widgets/crud-text-widget.tsx b/gui/rpk-gui/src/lib/crud/components/widgets/crud-text-widget.tsx index 3510177..7ce6c90 100644 --- a/gui/rpk-gui/src/lib/crud/components/widgets/crud-text-widget.tsx +++ b/gui/rpk-gui/src/lib/crud/components/widgets/crud-text-widget.tsx @@ -1,7 +1,10 @@ import React from "react"; import { getDefaultRegistry } from "@rjsf/core"; import { FormContextType, RJSFSchema, WidgetProps } from "@rjsf/utils"; +import { Button, InputAdornment } from "@mui/material"; import Typography from "@mui/material/Typography"; +import TextField from "@mui/material/TextField"; +import CopyAllIcon from '@mui/icons-material/CopyAll'; import ForeignKeyWidget from "./foreign-key"; import RichtextWidget from "./richtext"; @@ -18,8 +21,37 @@ export default function CrudTextWidget{schema.const as string}; } else if (schema.props?.hasOwnProperty("richtext")) { return ; + } else if (schema.props?.hasOwnProperty("display") && schema.props.display == "signature-link") { + return } else { const { widgets: { TextWidget } } = getDefaultRegistry(); return ; } } + +const SignatureLink = (props: WidgetProps )=> { + const { label, value } = props; + const basePath = "/contracts/signature/"; + const url = location.origin + basePath + value + + return + + ), + }, + }} + /> +}