From 06c6c874eb9365474b1dfa9922065089a5baf130 Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Tue, 6 May 2025 12:37:38 +0200 Subject: [PATCH] respect organization currency setting in shared report --- .../js/Components/Common/Reporting/ReportingRow.vue | 5 +++-- resources/js/Pages/Reporting.vue | 1 + resources/js/Pages/SharedReport.vue | 13 ++++++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/resources/js/Components/Common/Reporting/ReportingRow.vue b/resources/js/Components/Common/Reporting/ReportingRow.vue index 7759f752..4dee5827 100644 --- a/resources/js/Components/Common/Reporting/ReportingRow.vue +++ b/resources/js/Components/Common/Reporting/ReportingRow.vue @@ -4,7 +4,6 @@ import { formatCents } from '@/packages/ui/src/utils/money'; import GroupedItemsCountButton from '@/packages/ui/src/GroupedItemsCountButton.vue'; import { ref } from 'vue'; import { twMerge } from 'tailwind-merge'; -import { getOrganizationCurrencyString } from '@/utils/money'; type AggregatedGroupedData = GroupedData & { grouped_data?: GroupedData[] | null; @@ -19,6 +18,7 @@ type GroupedData = { const props = defineProps<{ entry: AggregatedGroupedData; indent?: boolean; + currency: string; }>(); const expanded = ref(false); @@ -48,7 +48,7 @@ const expanded = ref(false); {{ formatHumanReadableDuration(entry.seconds) }}
- {{entry.cost ? formatCents(entry.cost, getOrganizationCurrencyString()) : '--' }} + {{entry.cost ? formatCents(entry.cost, props.currency) : '--' }}
diff --git a/resources/js/Pages/Reporting.vue b/resources/js/Pages/Reporting.vue index e447346c..fa7796b2 100644 --- a/resources/js/Pages/Reporting.vue +++ b/resources/js/Pages/Reporting.vue @@ -446,6 +446,7 @@ const tableData = computed(() => { {{ formatHumanReadableDuration( - aggregatedTableTimeEntries.seconds + aggregatedTableTimeEntries.seconds, ) }} @@ -215,7 +222,7 @@ onMounted(async () => { {{ formatCents( aggregatedTableTimeEntries.cost, - getOrganizationCurrencyString() + reportCurrency, ) }}