Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprint 14 Bugfixing #89

Merged
merged 2 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export default defineComponent({
field: responseFields[responseField].name,
measure: modelColumn.fieldType,
headerComponent: HeaderRenderer,
headerComponentParams: { propWidget: this.propWidget },
headerComponentParams: { colId: modelColumn.id, propWidget: this.propWidget },
suppressMovable: true,
resizable: true
} as any
Expand Down Expand Up @@ -468,7 +468,10 @@ export default defineComponent({
const formattedRow = formatRowDataForCrossNavigation(node, this.dataToShow)
openNewLinkTableWidget(formattedRow, this.dashboardId, this.propVariables, this.propWidget.settings.interactions.link[0])
},
sortingChanged() {
sortingChanged(updatedSorting) {
const widgetSettings = this.propWidget.settings
widgetSettings.sortingColumn = updatedSorting.colId
widgetSettings.sortingOrder = updatedSorting.order
this.$emit('sortingChanged')
},
getColumnWidth(colId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ const formatDiscoveryModelForGet = (dashboardId, propWidget: IWidget, dataset: a
} else {
const attributeToPush = { id: column.alias, alias: column.alias, columnName: column.columnName, orderType: '', funct: 'COUNT', functColumn: column.alias } as any
dataToSend.aggregations.categories.push(attributeToPush)

column.id === propWidget.settings.sortingColumn ? (attributeToPush.orderType = propWidget.settings.sortingOrder) : ''
}
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="custom-header-group-container" :style="getSummaryStyle()">
<span v-if="!params.hideSummary" class="custom-header-group-label">
<span v-if="!params.hideSummary && showPinnedOnly()" class="custom-header-group-label">
<b style="margin-right: 4px">{{ params.value ? params.summaryRows[params.rowIndex] : '' }} </b>
{{ params.value ?? '' }}
</span>
Expand All @@ -9,6 +9,7 @@

<script lang="ts">
import { defineComponent } from 'vue'
import { ITableWidgetSummaryRows } from '../../Dashboard'

export default defineComponent({
props: {
Expand All @@ -17,8 +18,17 @@ export default defineComponent({
type: Object
}
},
mounted() {},
mounted() {
this.showPinnedOnly()
},
methods: {
showPinnedOnly() {
const summaryRowSettings = this.params.propWidget.settings.configuration.summaryRows as ITableWidgetSummaryRows
if (summaryRowSettings.style.pinnedOnly) {
if (this.params.pinned) return true
else return false
} else return true
},
getSummaryStyle() {
const styleSettings = this.params.propWidget.settings.style.summary
const styleString = Object.entries(styleSettings.properties ?? styleSettings)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
:prop-variables="variables"
@page-changed="$emit('reloadData')"
@facets-changed="$emit('reloadData')"
@sorting-changed="$emit('reloadData')"
@search-word-changed="$emit('reloadData')"
@dataset-interaction-preview="$emit('datasetInteractionPreview', $event)"
/>
Expand Down
Loading