fix: revert number formatting in DataDisplay and restore original value in ChartReceipt
This commit is contained in:
parent
2b35db5683
commit
eba12e451a
2 changed files with 4 additions and 5 deletions
|
|
@ -1,6 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { Icon } from '@iconify/vue/dist/iconify.js';
|
||||
import { formatNumberDecimal } from 'src/stores/utils';
|
||||
|
||||
defineEmits<{ (e: 'labelClick', value: string, index: number | null): void }>();
|
||||
|
||||
|
|
@ -39,7 +38,7 @@ withDefaults(
|
|||
v-if="typeof value === 'string'"
|
||||
@click="$emit('labelClick', value, null)"
|
||||
>
|
||||
{{ formatNumberDecimal(+value, 2) }}
|
||||
{{ value }}
|
||||
<q-tooltip v-if="tooltip" :delay="500">{{ value }}</q-tooltip>
|
||||
</span>
|
||||
<span v-else :class="{ 'link cursor-pointer': clickable }">
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ import { Icon } from '@iconify/vue/dist/iconify.js';
|
|||
import VueApexCharts from 'vue3-apexcharts';
|
||||
import DataDisplay from 'src/components/08_request-list/DataDisplay.vue';
|
||||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
const { locale } = useI18n({ useScope: 'global' });
|
||||
import { formatNumberDecimal } from 'src/stores/utils';
|
||||
|
||||
const prop = withDefaults(
|
||||
defineProps<{
|
||||
|
|
@ -22,6 +21,7 @@ const prop = withDefaults(
|
|||
categories: () => ['Jan', 'Feb', 'Mar'],
|
||||
},
|
||||
);
|
||||
|
||||
const chartOptions = computed(() => {
|
||||
return {
|
||||
colors: ['#035aa1', '#ae3ec9', '#ffa94d', '#e64980'],
|
||||
|
|
@ -91,7 +91,7 @@ const detail = [
|
|||
</q-avatar>
|
||||
<DataDisplay
|
||||
:label="$t(`dashboard.receipt.${v.label}`)"
|
||||
:value="summary[i].toString()"
|
||||
:value="formatNumberDecimal(summary[i], 2)"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue