diff --git a/front/src/App.vue b/front/src/App.vue index ca4cacb..22f0cdc 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -17,13 +17,16 @@ const item = computed(() => { return null } }) -const getData = async ()=>{ +const getData = async () => { const res = await fetch(`${baseUrl}/api/sheet`) const result = await res.json() if (result.status == "success") { data.value = result.data } } +const formatNumber = (n: string) => { + return Math.ceil(parseFloat(n.replace(',', '.'))) +} onMounted(async () => { await getData() setInterval(async () => { @@ -42,11 +45,11 @@ onMounted(async () => {
{{ item.name.slice(0, 2).join(' ') }}
- {{ item.hours }} / {{ Math.ceil(parseFloat(item.calendar)) }} + {{ formatNumber(item.hours) }} / {{ formatNumber(item.calendar) }} ({{ item.percent }}%) + 'high': parseInt(item.percent) >= 70, + 'medium': parseInt(item.percent) >= 35 && parseInt(item.percent) < 70, + }">({{ formatNumber(item.percent) }}%)
\ No newline at end of file