diff --git a/src/pages/index.vue b/src/pages/index.vue index e5848a4..e121ff7 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -65,10 +65,12 @@ - + -
{{ changesThisWeek }}
-
Changes This Week
+
{{ changesCount }}
+
+ {{ changesLabel }} +
@@ -113,8 +115,14 @@ // Statistics const totalSets = computed(() => items.reduce((acc, item) => acc + item.value, 0)) const totalThemes = computed(() => items.length) - const changesThisWeek = ref(12) // This could be computed from recentChanges if needed - const itemsWaitingForReview = ref(7) // Number of items waiting for review + + // Dynamic changes metric + const changesThisWeek = ref(0) // Set to 0 to test auto-switching, or get from your API + const changesThisMonth = ref(45) + + // Automatically show monthly if no weekly activity + const changesLabel = computed(() => changesThisWeek.value > 0 ? 'Changes This Week' : 'Changes This Month') + const changesCount = computed(() => changesThisWeek.value > 0 ? changesThisWeek.value : changesThisMonth.value) // Sample recent changes data const recentChanges = [ @@ -177,4 +185,6 @@ { key: 29, title: "Art", value: 1 }, { key: 30, title: "Botanicals", value: 1 } ] + + const itemsWaitingForReview = ref(7) \ No newline at end of file