b5ebc44fee
- Ability to display the details of a field - The field can be edited (relations edition will be supported later) - For now, the widget configuration stores the name of the field instead of its fieldMetadataId. A hook resolves the fieldMetadataId from the list of fields and the provided name. This will be replaced once we migrate the configuration to the backend. ## Demo https://github.com/user-attachments/assets/ab7efbda-66b2-46c1-b641-c350977c31dd ## Remaining to do - Edition of relations
18 lines
545 B
TypeScript
18 lines
545 B
TypeScript
import { type FieldConfiguration } from '@/page-layout/types/FieldConfiguration';
|
|
import { type FieldsConfiguration } from '@/page-layout/types/FieldsConfiguration';
|
|
import {
|
|
type LineChartConfiguration,
|
|
type WidgetConfiguration,
|
|
} from '~/generated/graphql';
|
|
|
|
export const isLineChartConfiguration = (
|
|
configuration:
|
|
| WidgetConfiguration
|
|
| FieldConfiguration
|
|
| FieldsConfiguration
|
|
| null
|
|
| undefined,
|
|
): configuration is LineChartConfiguration => {
|
|
return configuration?.__typename === 'LineChartConfiguration';
|
|
};
|