Add Record Create action in the frontend (#8514)

In this PR:

- Updated the front-end types for workflows to include CRUD actions and
global naming changes
- Allow users to create a Record Create action
- Scaffold the edit for Record Create action; for now, I render a
`<VariableTagInput />` component for every editable field; it's likely
we'll change it soon

Closes https://github.com/twentyhq/private-issues/issues/142

Demo:


https://github.com/user-attachments/assets/6f0b207a-b7d2-46d9-b5ab-9e32bde55d76
This commit is contained in:
Baptiste Devessier
2024-11-18 18:23:46 +01:00
committed by GitHub
parent 316537a68a
commit c17e18b1e9
15 changed files with 503 additions and 132 deletions

View File

@ -0,0 +1,26 @@
import VariableTagInput from '@/workflow/search-variables/components/VariableTagInput';
type FormFieldInputProps = {
recordFieldInputdId: string;
label: string;
value: string;
onChange: (value: string) => void;
isReadOnly?: boolean;
};
export const FormFieldInput = ({
recordFieldInputdId,
label,
onChange,
value,
}: FormFieldInputProps) => {
return (
<VariableTagInput
inputId={recordFieldInputdId}
label={label}
placeholder="Enter value (use {{variable}} for dynamic content)"
value={value}
onChange={onChange}
/>
);
};