## Context This PR introduces a first aggregation for a composite field ## Test <img width="1074" alt="Screenshot 2024-11-15 at 15 37 05" src="https://github.com/user-attachments/assets/db2563f9-26b7-421f-9431-48fc13bce49e">
14 lines
341 B
TypeScript
14 lines
341 B
TypeScript
import { capitalize } from 'src/utils/capitalize';
|
|
import { isDefined } from 'src/utils/is-defined';
|
|
|
|
export const formatColumnNameFromCompositeFieldAndSubfield = (
|
|
fieldName: string,
|
|
subFieldName?: string,
|
|
): string => {
|
|
if (isDefined(subFieldName)) {
|
|
return `${fieldName}${capitalize(subFieldName)}`;
|
|
}
|
|
|
|
return fieldName;
|
|
};
|