fixes: loosen up front validation, add resolveEntityRelationUniversalIdentifiers to update and restore (#18015)
closes https://github.com/twentyhq/private-issues/issues/419
This commit is contained in:
+1
@@ -4,6 +4,7 @@ import {
|
||||
} from '~/generated-metadata/graphql';
|
||||
|
||||
export type BarLineChartConvertibleFields = {
|
||||
aggregateFieldMetadataId?: string;
|
||||
primaryAxisGroupByFieldMetadataId?: string;
|
||||
primaryAxisGroupBySubFieldName?: string | null;
|
||||
primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null;
|
||||
|
||||
+1
@@ -4,6 +4,7 @@ import {
|
||||
} from '~/generated-metadata/graphql';
|
||||
|
||||
export type PieChartConvertibleFields = {
|
||||
aggregateFieldMetadataId?: string;
|
||||
groupByFieldMetadataId?: string;
|
||||
groupBySubFieldName?: string | null;
|
||||
dateGranularity?: ObjectRecordGroupByDateGranularity | null;
|
||||
|
||||
+7
@@ -19,6 +19,9 @@ describe('convertBarOrLineChartConfigToPieChart', () => {
|
||||
TEST_BAR_CHART_CONFIGURATION.primaryAxisGroupBySubFieldName,
|
||||
dateGranularity: TEST_BAR_CHART_CONFIGURATION.primaryAxisDateGranularity,
|
||||
orderBy: TEST_BAR_CHART_CONFIGURATION.primaryAxisOrderBy,
|
||||
splitMultiValueFields: TEST_BAR_CHART_CONFIGURATION.splitMultiValueFields,
|
||||
aggregateFieldMetadataId:
|
||||
TEST_BAR_CHART_CONFIGURATION.aggregateFieldMetadataId,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -34,6 +37,10 @@ describe('convertBarOrLineChartConfigToPieChart', () => {
|
||||
TEST_LINE_CHART_CONFIGURATION.primaryAxisGroupBySubFieldName,
|
||||
dateGranularity: TEST_LINE_CHART_CONFIGURATION.primaryAxisDateGranularity,
|
||||
orderBy: TEST_LINE_CHART_CONFIGURATION.primaryAxisOrderBy,
|
||||
splitMultiValueFields:
|
||||
TEST_LINE_CHART_CONFIGURATION.splitMultiValueFields,
|
||||
aggregateFieldMetadataId:
|
||||
TEST_LINE_CHART_CONFIGURATION.aggregateFieldMetadataId,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
+6
@@ -12,12 +12,15 @@ describe('convertPieChartConfigToBarOrLineChart', () => {
|
||||
);
|
||||
|
||||
expect(result).toEqual({
|
||||
aggregateFieldMetadataId:
|
||||
TEST_PIE_CHART_CONFIGURATION.aggregateFieldMetadataId,
|
||||
primaryAxisGroupByFieldMetadataId:
|
||||
TEST_PIE_CHART_CONFIGURATION.groupByFieldMetadataId,
|
||||
primaryAxisGroupBySubFieldName:
|
||||
TEST_PIE_CHART_CONFIGURATION.groupBySubFieldName,
|
||||
primaryAxisDateGranularity: TEST_PIE_CHART_CONFIGURATION.dateGranularity,
|
||||
primaryAxisOrderBy: TEST_PIE_CHART_CONFIGURATION.orderBy,
|
||||
splitMultiValueFields: TEST_PIE_CHART_CONFIGURATION.splitMultiValueFields,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -33,10 +36,13 @@ describe('convertPieChartConfigToBarOrLineChart', () => {
|
||||
const result = convertPieChartConfigToBarOrLineChart(minimalPieConfig);
|
||||
|
||||
expect(result).toEqual({
|
||||
aggregateFieldMetadataId:
|
||||
TEST_PIE_CHART_CONFIGURATION.aggregateFieldMetadataId,
|
||||
primaryAxisGroupByFieldMetadataId: undefined,
|
||||
primaryAxisGroupBySubFieldName: null,
|
||||
primaryAxisDateGranularity: null,
|
||||
primaryAxisOrderBy: null,
|
||||
splitMultiValueFields: TEST_PIE_CHART_CONFIGURATION.splitMultiValueFields,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
+1
@@ -15,6 +15,7 @@ export const convertBarOrLineChartConfigToPieChart = (
|
||||
}
|
||||
|
||||
return {
|
||||
aggregateFieldMetadataId: configuration.aggregateFieldMetadataId,
|
||||
groupByFieldMetadataId: configuration.primaryAxisGroupByFieldMetadataId,
|
||||
groupBySubFieldName: configuration.primaryAxisGroupBySubFieldName,
|
||||
dateGranularity: configuration.primaryAxisDateGranularity,
|
||||
|
||||
+1
@@ -10,6 +10,7 @@ export const convertPieChartConfigToBarOrLineChart = (
|
||||
}
|
||||
|
||||
return {
|
||||
aggregateFieldMetadataId: configuration.aggregateFieldMetadataId,
|
||||
primaryAxisGroupByFieldMetadataId: configuration.groupByFieldMetadataId,
|
||||
primaryAxisGroupBySubFieldName: configuration.groupBySubFieldName,
|
||||
primaryAxisDateGranularity: configuration.dateGranularity,
|
||||
|
||||
Reference in New Issue
Block a user