Fix ReportsView builder dimension type narrowing for vue-tsc.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-18 17:33:16 +03:30
co-authored by Cursor
parent 968252ec2f
commit cd51439353
+11 -11
View File
@@ -117,19 +117,19 @@ const teamsAvailable = ref(true);
const hasTahesabSetup = ref(false);
const builderMetricOptions = computed(() => REPORTS_BUILDER_METRICS);
const builderDimensionOptions = computed(() => {
const builderDimensionOptions = computed((): ReportsBuilderDimension[] => {
if (isReportsLeadBuilderMetric(builderMetric.value)) {
return REPORTS_BUILDER_DIMENSIONS.filter(
(d) =>
d === 'none' ||
d === 'owner' ||
d === 'team' ||
d === 'source' ||
d === 'lead_stage' ||
d === 'month',
);
const allow = new Set<ReportsBuilderDimension>([
'none',
'owner',
'team',
'source',
'lead_stage',
'month',
]);
return REPORTS_BUILDER_DIMENSIONS.filter((d) => allow.has(d));
}
return REPORTS_BUILDER_DIMENSIONS.filter((d) => d !== 'lead_stage');
return [...REPORTS_BUILDER_DIMENSIONS.filter((d) => d !== 'lead_stage')];
});
const showTahesabSalesReport = computed(