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 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(
|
||||||
|
|||||||
Reference in New Issue
Block a user