Fix build errors

This commit is contained in:
Darren Clarke 2023-03-14 17:40:24 +00:00
parent 785d0965e3
commit d0f1c1337c
28 changed files with 268 additions and 112 deletions

View file

@ -14,7 +14,7 @@ const httpChoices = [
{ id: "post", name: "POST" },
{ id: "put", name: "PUT" },
];
export const HttpMethodInput = (props) => (
export const HttpMethodInput = (props: any) => (
<SelectInput
source="httpMethod"
choices={httpChoices}
@ -42,7 +42,7 @@ const backendFieldComponents = {
voice: VoiceLineField("backendId"),
};
export const BackendTypeInput = (props) => (
export const BackendTypeInput = (props: any) => (
<SelectInput
source="backendType"
choices={backendChoices}
@ -51,18 +51,20 @@ export const BackendTypeInput = (props) => (
/>
);
export const BackendIdInput = (form, ...rest) => {
export const BackendIdInput = (form: any, ...rest: any[]) => {
const Component = form.formData.backendType
? backendInputComponents[form.formData.backendType]
? // @ts-expect-error
backendInputComponents[form.formData.backendType]
: false;
return <>{Component && <Component form={form} {...rest} />}</>;
};
export const BackendIdField = (form, ...rest) => {
export const BackendIdField = (form: any, ...rest: any[]) => {
console.log(form);
const Component = form.record.backendType
? backendFieldComponents[form.record.backendType]
? // @ts-expect-error
backendFieldComponents[form.record.backendType]
: false;
return <>{Component && <Component form={form} {...rest} />}</>;
};