Fix ReportsView builder dimension type narrowing for vue-tsc.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user