diff --git a/apps/web/src/common/modules/widgets/_widgets/color-coded-table-heatmap/ColorCodedTableHeatmap.vue b/apps/web/src/common/modules/widgets/_widgets/color-coded-table-heatmap/ColorCodedTableHeatmap.vue index 6105480043..31446077ca 100644 --- a/apps/web/src/common/modules/widgets/_widgets/color-coded-table-heatmap/ColorCodedTableHeatmap.vue +++ b/apps/web/src/common/modules/widgets/_widgets/color-coded-table-heatmap/ColorCodedTableHeatmap.vue @@ -30,14 +30,12 @@ import { import { isDateField } from '@/common/modules/widgets/_helpers/widget-field-helper'; import { getFormattedNumber } from '@/common/modules/widgets/_helpers/widget-helper'; import { - getWidgetLoadApiQuery, getWidgetLoadApiQueryDateRange, } from '@/common/modules/widgets/_helpers/widget-load-helper'; import type { AdvancedFormatRulesValue } from '@/common/modules/widgets/_widget-fields/advanced-format-rules/type'; import type { DateRangeValue } from '@/common/modules/widgets/_widget-fields/date-range/type'; import type { GranularityValue } from '@/common/modules/widgets/_widget-fields/granularity/type'; import type { NumberFormatValue } from '@/common/modules/widgets/_widget-fields/number-format/type'; -import type { TableDataFieldValue } from '@/common/modules/widgets/_widget-fields/table-data-field/type'; import type { XAxisValue } from '@/common/modules/widgets/_widget-fields/x-axis/type'; import type { DateRange } from '@/common/modules/widgets/types/widget-data-type'; import type { WidgetEmit, WidgetExpose, WidgetProps } from '@/common/modules/widgets/types/widget-display-type'; @@ -104,11 +102,11 @@ const state = reactive({ legendList: [] as WidgetLegend[], // required fields granularity: computed(() => props.widgetOptions?.granularity as string), - xAxisField: computed(() => (props.widgetOptions?.xAxis as XAxisValue)?.value), - xAxisCount: computed(() => (props.widgetOptions?.xAxis as XAxisValue)?.count), - dataFieldInfo: computed(() => props.widgetOptions?.tableDataField as TableDataFieldValue), - dynamicFieldInfo: computed(() => state.dataFieldInfo?.dynamicFieldInfo), - staticFieldInfo: computed(() => state.dataFieldInfo?.staticFieldInfo), + xAxisField: computed(() => (props.widgetOptions?.xAxis as XAxisValue)?.data), + xAxisCount: computed(() => (props.widgetOptions?.xAxis as XAxisValue)?.count), + dataFieldInfo: computed(() => props.widgetOptions?.tableDataField), + dynamicFieldInfo: computed(() => state.dataFieldInfo?.dynamicFieldInfo), + staticFieldInfo: computed(() => state.dataFieldInfo?.staticFieldInfo), dataField: computed(() => { if (state.dataFieldInfo?.fieldType === 'staticField') return state.staticFieldInfo?.fieldValue; return state.dynamicFieldInfo?.fieldValue; @@ -156,7 +154,7 @@ const fetchWidget = async (): Promise => { granularity: state.granularity, ...(!isDateField(state.xAxisField) && { page: { start: 1, limit: state.xAxisCount } }), ...getWidgetLoadApiQueryDateRange(state.granularity, dateRange.value), - ...getWidgetLoadApiQuery(state.dataFieldInfo, state.xAxisField), + // ...getWidgetLoadApiQuery(state.dataFieldInfo, state.xAxisField), }, vars: props.dashboardVars, }); diff --git a/apps/web/src/common/modules/widgets/_widgets/pie-chart/PieChart.vue b/apps/web/src/common/modules/widgets/_widgets/pie-chart/PieChart.vue index 4f7b37e646..8be6a889c1 100644 --- a/apps/web/src/common/modules/widgets/_widgets/pie-chart/PieChart.vue +++ b/apps/web/src/common/modules/widgets/_widgets/pie-chart/PieChart.vue @@ -42,7 +42,7 @@ import type { DateFormatValue } from '@/common/modules/widgets/_widget-fields/da import type { DateRangeValue } from '@/common/modules/widgets/_widget-fields/date-range/type'; import type { DisplaySeriesLabelValue } from '@/common/modules/widgets/_widget-fields/display-series-label/type'; import type { GranularityValue } from '@/common/modules/widgets/_widget-fields/granularity/type'; -import type { _GroupByValue } from '@/common/modules/widgets/_widget-fields/group-by/type'; +import type { GroupByValue } from '@/common/modules/widgets/_widget-fields/group-by/type'; import type { LegendValue } from '@/common/modules/widgets/_widget-fields/legend/type'; import type { NumberFormatValue } from '@/common/modules/widgets/_widget-fields/number-format/type'; import type { PieChartTypeValue } from '@/common/modules/widgets/_widget-fields/pie-chart-type/type'; @@ -170,14 +170,14 @@ const state = reactive({ // required fields granularity: computed(() => (props.widgetOptions?.granularity?.value as GranularityValue)?.granularity), dataField: computed(() => (props.widgetOptions?.dataField?.value as DataFieldValue)?.data as string), - groupByField: computed(() => (props.widgetOptions?.groupBy?.value as _GroupByValue)?.data as string), - groupByCount: computed(() => (props.widgetOptions?.groupBy?.value as _GroupByValue)?.count), + groupByField: computed(() => (props.widgetOptions?.groupBy?.value as GroupByValue)?.data as string), + groupByCount: computed(() => (props.widgetOptions?.groupBy?.value as GroupByValue)?.count), chartType: computed(() => (props.widgetOptions?.pieChartType?.value as PieChartTypeValue)?.type), // optional fields showLegends: computed(() => (props.widgetOptions?.legend?.value as LegendValue)?.toggleValue), legendPosition: computed(() => (props.widgetOptions?.legend?.value as LegendValue)?.position), dateFormat: computed(() => { - const _dateFormat = (props.widgetOptions?.dateFormat?.value as DateFormatValue)?.value || 'MMM DD, YYYY'; + const _dateFormat = (props.widgetOptions?.dateFormat?.value as DateFormatValue)?.format || 'MMM DD, YYYY'; return DATE_FORMAT?.[_dateFormat]?.[state.granularity]; }), numberFormat: computed(() => props.widgetOptions?.numberFormat?.value as NumberFormatValue), diff --git a/apps/web/src/common/modules/widgets/_widgets/table/_component/WidgetDataTable.vue b/apps/web/src/common/modules/widgets/_widgets/table/_component/WidgetDataTable.vue index 8acbc7ca12..4c8baf7a3c 100644 --- a/apps/web/src/common/modules/widgets/_widgets/table/_component/WidgetDataTable.vue +++ b/apps/web/src/common/modules/widgets/_widgets/table/_component/WidgetDataTable.vue @@ -27,8 +27,8 @@ import { getFormattedNumber } from '@/common/modules/widgets/_helpers/widget-hel import type { ComparisonValue } from '@/common/modules/widgets/_widget-fields/comparison/type'; import type { CustomTableColumnWidthValue } from '@/common/modules/widgets/_widget-fields/custom-table-column-width/type'; import type { DataFieldHeatmapColorValue } from '@/common/modules/widgets/_widget-fields/data-field-heatmap-color/type'; -import type { _DateFormatValue as DateFormatValue } from '@/common/modules/widgets/_widget-fields/date-format/type'; -import type { _MissingValueValue as MissingValueValue } from '@/common/modules/widgets/_widget-fields/missing-value/type'; +import type { DateFormatValue } from '@/common/modules/widgets/_widget-fields/date-format/type'; +import type { MissingValueValue } from '@/common/modules/widgets/_widget-fields/missing-value/type'; import type { NumberFormatValue } from '@/common/modules/widgets/_widget-fields/number-format/type'; import type { TableColumnWidthValue } from '@/common/modules/widgets/_widget-fields/table-column-width/type'; import type { TextWrapValue } from '@/common/modules/widgets/_widget-fields/text-wrap/type';