mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 08:12:17 +01:00
Compare commits
1 Commits
feature/fi
...
feature/ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
692f7a725d |
@@ -4,6 +4,7 @@ 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;
|
||||
@@ -18,7 +19,6 @@ 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) }}
|
||||
</div>
|
||||
<div class="justify-end pr-6 flex items-center">
|
||||
{{entry.cost ? formatCents(entry.cost, props.currency) : '--' }}
|
||||
{{entry.cost ? formatCents(entry.cost, getOrganizationCurrencyString()) : '--' }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -58,7 +58,6 @@ const expanded = ref(false);
|
||||
<ReportingRow
|
||||
v-for="subEntry in entry.grouped_data"
|
||||
:key="subEntry.description ?? 'none'"
|
||||
:currency="props.currency"
|
||||
indent
|
||||
:entry="subEntry"></ReportingRow>
|
||||
</div>
|
||||
|
||||
@@ -446,7 +446,6 @@ const tableData = computed(() => {
|
||||
<ReportingRow
|
||||
v-for="entry in tableData"
|
||||
:key="entry.description ?? 'none'"
|
||||
:currency="getOrganizationCurrencyString()"
|
||||
:entry="entry"
|
||||
:type="
|
||||
aggregatedTableTimeEntries.grouped_type
|
||||
|
||||
@@ -5,6 +5,7 @@ import { ChartBarIcon } from '@heroicons/vue/20/solid';
|
||||
import ReportingChart from '@/Components/Common/Reporting/ReportingChart.vue';
|
||||
import { formatHumanReadableDuration } from '@/packages/ui/src/utils/time';
|
||||
import ReportingRow from '@/Components/Common/Reporting/ReportingRow.vue';
|
||||
import { getOrganizationCurrencyString } from '@/utils/money';
|
||||
import ReportingPieChart from '@/Components/Common/Reporting/ReportingPieChart.vue';
|
||||
import { formatCents } from '@/packages/ui/src/utils/money';
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
@@ -40,13 +41,6 @@ onMounted(() => {
|
||||
}
|
||||
});
|
||||
|
||||
const reportCurrency = computed(() => {
|
||||
if (sharedReportResponseData.value) {
|
||||
return sharedReportResponseData.value?.currency;
|
||||
}
|
||||
return 'EUR';
|
||||
});
|
||||
|
||||
const aggregatedTableTimeEntries = computed(() => {
|
||||
if (sharedReportResponseData.value) {
|
||||
return sharedReportResponseData.value?.data;
|
||||
@@ -199,7 +193,6 @@ onMounted(async () => {
|
||||
<ReportingRow
|
||||
v-for="entry in tableData"
|
||||
:key="entry.description ?? 'none'"
|
||||
:currency="reportCurrency"
|
||||
:entry="entry"
|
||||
:type="
|
||||
aggregatedTableTimeEntries.grouped_type
|
||||
@@ -213,7 +206,7 @@ onMounted(async () => {
|
||||
class="justify-end flex items-center font-medium">
|
||||
{{
|
||||
formatHumanReadableDuration(
|
||||
aggregatedTableTimeEntries.seconds,
|
||||
aggregatedTableTimeEntries.seconds
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
@@ -222,7 +215,7 @@ onMounted(async () => {
|
||||
{{
|
||||
formatCents(
|
||||
aggregatedTableTimeEntries.cost,
|
||||
reportCurrency,
|
||||
getOrganizationCurrencyString()
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user