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 hasTahesabSetup = ref(false);
const builderMetricOptions = computed(() => REPORTS_BUILDER_METRICS); const builderMetricOptions = computed(() => REPORTS_BUILDER_METRICS);
const builderDimensionOptions = computed(() => { const builderDimensionOptions = computed((): ReportsBuilderDimension[] => {
if (isReportsLeadBuilderMetric(builderMetric.value)) { if (isReportsLeadBuilderMetric(builderMetric.value)) {
return REPORTS_BUILDER_DIMENSIONS.filter( const allow = new Set<ReportsBuilderDimension>([
(d) => 'none',
d === 'none' || 'owner',
d === 'owner' || 'team',
d === 'team' || 'source',
d === 'source' || 'lead_stage',
d === 'lead_stage' || 'month',
d === '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( const showTahesabSalesReport = computed(