diff --git a/package.json b/package.json index 7981a25..b9f58aa 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "chronus", "type": "module", - "version": "2.2.0", + "version": "2.2.1", "scripts": { "dev": "astro dev", "build": "astro build", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9b9664a..9e97124 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1711,8 +1711,8 @@ packages: supports-color: optional: true - decode-named-character-reference@1.2.0: - resolution: {integrity: sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q==} + decode-named-character-reference@1.3.0: + resolution: {integrity: sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==} decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} @@ -2366,6 +2366,7 @@ packages: libsql@0.5.22: resolution: {integrity: sha512-NscWthMQt7fpU8lqd7LXMvT9pi+KhhmTHAJWUB/Lj6MWa0MKFv0F2V4C6WKKpjCVZl0VwcDz4nOI3CyaT1DDiA==} + cpu: [x64, arm64, wasm32, arm] os: [darwin, linux, win32] lightningcss-android-arm64@1.30.2: @@ -2672,8 +2673,8 @@ packages: nlcst-to-string@4.0.0: resolution: {integrity: sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA==} - node-abi@3.86.0: - resolution: {integrity: sha512-sn9Et4N3ynsetj3spsZR729DVlGH6iBG4RiDMV7HEp3guyOW6W3S0unGpLDxT50mXortGUMax/ykUNQXdqc/Xg==} + node-abi@3.87.0: + resolution: {integrity: sha512-+CGM1L1CgmtheLcBuleyYOn7NWPVu0s0EJH2C4puxgEZb9h8QpR9G2dBfZJOAUhi7VQxuBPMd0hiISWcTyiYyQ==} engines: {node: '>=10'} node-domexception@1.0.0: @@ -3157,8 +3158,8 @@ packages: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} - tar@7.5.3: - resolution: {integrity: sha512-ENg5JUHUm2rDD7IvKNFGzyElLXNjachNLp6RaGf4+JOgxXHkqA+gq81ZAMCUmtMtqBsoU62lcp6S27g1LCYGGQ==} + tar@7.5.4: + resolution: {integrity: sha512-AN04xbWGrSTDmVwlI4/GTlIIwMFk/XEv7uL8aa57zuvRy6s4hdBed+lVq2fAZ89XDa7Us3ANXcE3Tvqvja1kTA==} engines: {node: '>=18'} tiny-inflate@1.0.3: @@ -4246,7 +4247,7 @@ snapshots: local-pkg: 1.1.2 pathe: 2.0.3 svgo: 3.3.2 - tar: 7.5.3 + tar: 7.5.4 transitivePeerDependencies: - supports-color @@ -5522,7 +5523,7 @@ snapshots: dependencies: ms: 2.1.3 - decode-named-character-reference@1.2.0: + decode-named-character-reference@1.3.0: dependencies: character-entities: 2.0.2 @@ -6268,7 +6269,7 @@ snapshots: dependencies: '@types/mdast': 4.0.4 '@types/unist': 3.0.3 - decode-named-character-reference: 1.2.0 + decode-named-character-reference: 1.3.0 devlop: 1.1.0 mdast-util-to-string: 4.0.0 micromark: 4.0.2 @@ -6381,7 +6382,7 @@ snapshots: micromark-core-commonmark@2.0.3: dependencies: - decode-named-character-reference: 1.2.0 + decode-named-character-reference: 1.3.0 devlop: 1.1.0 micromark-factory-destination: 2.0.1 micromark-factory-label: 2.0.1 @@ -6514,7 +6515,7 @@ snapshots: micromark-util-decode-string@2.0.1: dependencies: - decode-named-character-reference: 1.2.0 + decode-named-character-reference: 1.3.0 micromark-util-character: 2.1.1 micromark-util-decode-numeric-character-reference: 2.0.2 micromark-util-symbol: 2.0.1 @@ -6552,7 +6553,7 @@ snapshots: dependencies: '@types/debug': 4.1.12 debug: 4.4.3 - decode-named-character-reference: 1.2.0 + decode-named-character-reference: 1.3.0 devlop: 1.1.0 micromark-core-commonmark: 2.0.3 micromark-factory-space: 2.0.1 @@ -6623,7 +6624,7 @@ snapshots: dependencies: '@types/nlcst': 2.0.3 - node-abi@3.86.0: + node-abi@3.87.0: dependencies: semver: 7.7.3 optional: true @@ -6809,7 +6810,7 @@ snapshots: minimist: 1.2.8 mkdirp-classic: 0.5.3 napi-build-utils: 2.0.0 - node-abi: 3.86.0 + node-abi: 3.87.0 pump: 3.0.3 rc: 1.2.8 simple-get: 4.0.1 @@ -7240,7 +7241,7 @@ snapshots: readable-stream: 3.6.2 optional: true - tar@7.5.3: + tar@7.5.4: dependencies: '@isaacs/fs-minipass': 4.0.1 chownr: 3.0.0 diff --git a/src/components/ClientChart.vue b/src/components/ClientChart.vue index e70895a..24fb234 100644 --- a/src/components/ClientChart.vue +++ b/src/components/ClientChart.vue @@ -1,12 +1,12 @@ diff --git a/src/components/ManualEntry.vue b/src/components/ManualEntry.vue index 219db6c..47ed424 100644 --- a/src/components/ManualEntry.vue +++ b/src/components/ManualEntry.vue @@ -23,7 +23,6 @@ const isSubmitting = ref(false); const error = ref(""); const success = ref(false); -// Set default dates to today const today = new Date().toISOString().split("T")[0]; startDate.value = today; endDate.value = today; @@ -114,12 +113,10 @@ async function submitManualEntry() { if (res.ok) { success.value = true; - // Calculate duration for success message const start = new Date(startDateTime); const end = new Date(endDateTime); const duration = formatDuration(start, end); - // Reset form description.value = ""; selectedClientId.value = ""; selectedCategoryId.value = ""; @@ -129,7 +126,6 @@ async function submitManualEntry() { startTime.value = ""; endTime.value = ""; - // Emit event and reload after a short delay setTimeout(() => { emit("entryCreated"); window.location.reload(); diff --git a/src/components/MemberChart.vue b/src/components/MemberChart.vue index 84e56ce..da834fd 100644 --- a/src/components/MemberChart.vue +++ b/src/components/MemberChart.vue @@ -58,9 +58,11 @@ const chartOptions: ChartOptions<"bar"> = { beginAtZero: true, ticks: { color: "#e2e8f0", - callback: function (value: any) { - const hours = Math.floor(value / 60); - const mins = value % 60; + callback: function (value: string | number) { + const numValue = + typeof value === "string" ? parseFloat(value) : value; + const hours = Math.floor(numValue / 60); + const mins = Math.round(numValue % 60); return hours > 0 ? `${hours}h ${mins}m` : `${mins}m`; }, }, @@ -83,8 +85,8 @@ const chartOptions: ChartOptions<"bar"> = { }, tooltip: { callbacks: { - label: function (context: any) { - const minutes = Math.round(context.raw); + label: function (context) { + const minutes = Math.round(context.raw as number); const hours = Math.floor(minutes / 60); const mins = minutes % 60; return ` ${hours}h ${mins}m`; diff --git a/src/components/Timer.vue b/src/components/Timer.vue index 9f74ecd..ef9add4 100644 --- a/src/components/Timer.vue +++ b/src/components/Timer.vue @@ -31,7 +31,6 @@ function formatTime(ms: number) { const timeStr = `${hours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`; - // Calculate rounded version const totalMinutes = Math.round(ms / 1000 / 60); const roundedHours = Math.floor(totalMinutes / 60); const roundedMinutes = totalMinutes % 60; diff --git a/src/components/auth/PasskeyLogin.vue b/src/components/auth/PasskeyLogin.vue index 148957d..ac83298 100644 --- a/src/components/auth/PasskeyLogin.vue +++ b/src/components/auth/PasskeyLogin.vue @@ -1,7 +1,7 @@