feat: select default Unit for Currency field (#2996)

Closes #2347

Co-authored-by: Thais GUIGON <thaisguigon@macbook-pro.home>
This commit is contained in:
Thaïs
2023-12-15 11:01:06 +01:00
committed by GitHub
parent 5f7442cf23
commit 1eb5bebaf7
15 changed files with 190 additions and 18 deletions

View File

@ -19,6 +19,7 @@ export const useFieldMetadataItem = () => {
const createMetadataField = (
input: Pick<Field, 'label' | 'icon' | 'description'> & {
defaultValue?: unknown;
objectMetadataId: string;
options?: Omit<FieldMetadataOption, 'id'>[];
type: FieldMetadataType;
@ -26,6 +27,7 @@ export const useFieldMetadataItem = () => {
) =>
createOneFieldMetadataItem({
...formatFieldMetadataItemInput(input),
defaultValue: input.defaultValue,
objectMetadataId: input.objectMetadataId,
type: input.type as FieldType,
});

View File

@ -21,7 +21,7 @@ export type FieldMetadataItem = Omit<
>;
})
| null;
defaultValue?: string;
defaultValue?: unknown;
options?: {
color: ThemeColor;
id: string;