chore: update codegen config for enum naming convention (#9751)

Co-authored-by: etiennejouan <jouan.etienne@gmail.com>
This commit is contained in:
Etienne
2025-01-21 11:34:33 +01:00
committed by GitHub
parent d4b038f24a
commit e1731bb31e
222 changed files with 1245 additions and 1235 deletions

View File

@ -74,7 +74,7 @@ export const ObjectOptionsDropdownRecordGroupFieldsContent = () => {
objectNamePlural,
},
{
fieldType: FieldMetadataType.Select,
fieldType: FieldMetadataType.SELECT,
},
);

View File

@ -7,8 +7,8 @@ jest.mock('@/object-metadata/hooks/useObjectMetadataItem', () => ({
useObjectMetadataItem: jest.fn(() => ({
objectMetadataItem: {
fields: [
{ type: FieldMetadataType.Currency, name: 'price' },
{ type: FieldMetadataType.Text, name: 'name' },
{ type: FieldMetadataType.CURRENCY, name: 'price' },
{ type: FieldMetadataType.TEXT, name: 'name' },
],
},
})),

View File

@ -26,9 +26,9 @@ describe('useSearchRecordGroupField', () => {
const mockContextValue = {
objectMetadataItem: {
fields: [
{ type: FieldMetadataType.Select, label: 'First' },
{ type: FieldMetadataType.Select, label: 'Second' },
{ type: FieldMetadataType.Text, label: 'Third' },
{ type: FieldMetadataType.SELECT, label: 'First' },
{ type: FieldMetadataType.SELECT, label: 'Second' },
{ type: FieldMetadataType.TEXT, label: 'Third' },
],
},
};
@ -40,7 +40,7 @@ describe('useSearchRecordGroupField', () => {
});
expect(result.current.filteredRecordGroupFieldMetadataItems).toEqual([
{ type: FieldMetadataType.Select, label: 'First' },
{ type: FieldMetadataType.SELECT, label: 'First' },
]);
});
@ -48,9 +48,9 @@ describe('useSearchRecordGroupField', () => {
const mockContextValue = {
objectMetadataItem: {
fields: [
{ type: FieldMetadataType.Select, label: 'First' },
{ type: FieldMetadataType.Select, label: 'Second' },
{ type: FieldMetadataType.Text, label: 'Third' },
{ type: FieldMetadataType.SELECT, label: 'First' },
{ type: FieldMetadataType.SELECT, label: 'Second' },
{ type: FieldMetadataType.TEXT, label: 'Third' },
],
},
};
@ -58,8 +58,8 @@ describe('useSearchRecordGroupField', () => {
const { result } = renderWithContext(mockContextValue);
expect(result.current.filteredRecordGroupFieldMetadataItems).toEqual([
{ type: FieldMetadataType.Select, label: 'First' },
{ type: FieldMetadataType.Select, label: 'Second' },
{ type: FieldMetadataType.SELECT, label: 'First' },
{ type: FieldMetadataType.SELECT, label: 'Second' },
]);
});
});

View File

@ -19,7 +19,7 @@ export const useExportProcessRecordsForCSV = (objectNameSingular: string) => {
}
switch (field.type) {
case FieldMetadataType.Currency:
case FieldMetadataType.CURRENCY:
return {
...processedRecord,
[field.name]: {
@ -29,7 +29,7 @@ export const useExportProcessRecordsForCSV = (objectNameSingular: string) => {
currencyCode: record[field.name].currencyCode,
} satisfies FieldCurrencyValue,
};
case FieldMetadataType.RawJson:
case FieldMetadataType.RAW_JSON:
return {
...processedRecord,
[field.name]: JSON.stringify(record[field.name]),

View File

@ -16,7 +16,7 @@ export const useSearchRecordGroupField = () => {
return objectMetadataItem.fields.filter(
(field) =>
field.type === FieldMetadataType.Select &&
field.type === FieldMetadataType.SELECT &&
field.label.toLocaleLowerCase().includes(searchInputLowerCase),
);
}, [objectMetadataItem.fields, recordGroupFieldSearchInput]);