import useSWR from "swr";
export function Textfield(props) {
const { name, label } = props;
return (
);
}
export function MultiLinefield(props) {
const { name, label } = props;
return (
Do not include personal or financial information, like your
National Insurance number or credit card details.
);
}
export function DateField(props) {
const { name, label } = props;
return (
);
}
export function YesNofield(props) {
const { name, label } = props;
return (
);
}
export function PickList(props) {
const { name, label, datafieldname } = props;
const fetcher = (url) => fetch(url).then((res) => res.json());
const { data, error } = useSWR("/api/lookups/" + datafieldname, fetcher);
if (error)
return (
);
if (!data)
return (
);
console.log(JSON.stringify(data.GlobalOptionSet.Options));
const dropdownObj = data.GlobalOptionSet.Options;
return (
);
}
export function NumericField(props) {
const { name, label } = props;
return (
);
}
export function DecimalField(props) {
const { name, label } = props;
return (
);
}
export function ReadOnlyfield(props) {
const { name, label } = props;
return (
);
}