From 4a9890496ab81287b35ee089a854b861dd3f269c Mon Sep 17 00:00:00 2001 From: Niko Reunanen Date: Sat, 1 Mar 2025 11:20:39 +0200 Subject: [PATCH] Show the selected month for the total hour view --- front-end/src/components/Controls.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/front-end/src/components/Controls.vue b/front-end/src/components/Controls.vue index 347cd6e..951734c 100644 --- a/front-end/src/components/Controls.vue +++ b/front-end/src/components/Controls.vue @@ -8,10 +8,12 @@ import { inject, ref } from "vue"; const modalTotalHours = ref<{ hours: { [project: string]: number }; + period: string; total: number; visible: boolean; }>({ hours: {}, + period: "", total: 0, visible: false, }); @@ -35,7 +37,7 @@ async function showModalTotalHours() { const response = await pb.send(`/hours/${organisation}/${year}/${monthDoubleDigit}`, {}); - console.log(response); + modalTotalHours.value.period = `${monthDoubleDigit}/${year}`; if (response.error === null) { let total = 0.0; @@ -57,7 +59,7 @@ async function showModalTotalHours() {