Issues #83: done.

This commit is contained in:
chiayin
2023-09-12 11:48:32 +08:00
parent 35a494b99e
commit 11eb320c55
3 changed files with 29 additions and 13 deletions

View File

@@ -5,6 +5,7 @@ import {useToast} from 'vue-toast-notification';
import 'vue-toast-notification/dist/theme-sugar.css';
import moment from "moment";
import { Decimal } from 'decimal.js';
import abbreviateNumber from '@/module/abbreviateNumber.js';
const loading = loadingStore(pinia);
const $toast = useToast();
@@ -122,10 +123,10 @@ export default defineStore('conformanceStore', {
c.facets.map(fac => {
switch(fac.type) {
case 'duration-list':
fac.value = fac.value.map(v => v !== null ? new Decimal(v.toFixed(2)) : null);
fac.value = fac.value.map(v => v !== null ? abbreviateNumber(new Decimal(v.toFixed(2))) : null);
fac.value = fac.value.join(', ');
break;
default:
default:
break;
};
return fac;