fix: style

This commit is contained in:
2026-03-12 14:07:55 +01:00
parent bc7eb7122c
commit 1e6f3c46d1
5 changed files with 32 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
<script setup lang="ts">
import ProductsView from '@/views/customer/ProductsView.vue';
import LangSwitch from './inner/langSwitch.vue'
import ThemeSwitch from './inner/themeSwitch.vue'
import { useAuthStore } from '@/stores/auth'

View File

@@ -26,10 +26,10 @@ export interface PagingParams {
pageSize?: number
}
export async function getRepos(): Promise<any> {
const result = await useFetchJson<number[]>(`${API_PREFIX}/get-repos`)
return result
}
// export async function getRepos(): Promise<any> {
// const result = await useFetchJson<number[]>(`${API_PREFIX}/get-repos`)
// return result
// }
// export async function getYears(repoID: number): Promise<any> {
// return useFetchJson<number[]>(`${API_PREFIX}/get-years?repoID=${repoID}`)

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, computed, watch, onMounted, type Ref } from 'vue'
import { ref, computed, watch, type Ref } from 'vue'
import { Bar } from 'vue-chartjs'
import {
Chart as ChartJS,
@@ -10,7 +10,7 @@ import {
CategoryScale,
LinearScale,
} from 'chart.js'
import { getRepos, getYears, getQuarters, getIssues, type QuarterData, type IssueTimeSummary } from '@/composable/useRepoApi'
import { getYears, getQuarters, getIssues, type QuarterData, type IssueTimeSummary } from '@/composable/useRepoApi'
import { useAuthStore } from '@/stores/auth'
import { i18n } from '@/plugins/02_i18n'
import type { TableColumn } from '@nuxt/ui'
@@ -49,7 +49,7 @@ async function loadData<T>(fetchFn: () => Promise<any>, target: Ref<T[]>, errorM
}
}
onMounted(() => loadData(() => getRepos(), repos, t('repo_chart.failed_to_load_repositories')))
// onMounted(() => loadData(() => getRepos(), repos, t('repo_chart.failed_to_load_repositories')))
watch(selectedRepo, async (newRepo) => {
selectedYear.value = null

View File

@@ -83,6 +83,14 @@ const columns = computed<TableColumn<Product>[]>(() => [
accessorKey: 'code',
header: t('products.product_code'),
},
{
accessorKey: 'description',
header: t('products.description'),
cell: ({ row }) => {
const desc = row.getValue('description') as string
return h('span', { class: 'text-sm text-gray-500 dark:text-gray-400' }, desc?.substring(0, 50) + (desc && desc.length > 50 ? '...' : ''))
}
},
{
accessorKey: 'inStock',
header: t('products.in_stock'),
@@ -99,7 +107,7 @@ const columns = computed<TableColumn<Product>[]>(() => [
cell: ({ row }) => {
const priceFromVal = row.original.priceFrom
const priceToVal = row.original.priceTo
return `$${priceFromVal} - $${priceToVal}`
return `${priceFromVal} - ${priceToVal}`
}
},
{