aboutsummaryrefslogtreecommitdiff
path: root/src/components/nav-main.tsx
diff options
context:
space:
mode:
authorMax Nanis2025-06-10 05:21:19 +0700
committerMax Nanis2025-06-10 05:21:19 +0700
commitd7bb480ab6bd2172a04ecb304d012206e0c03e8f (patch)
tree783c57ea92e9bf50aec460e2e9b4a9e0ef7a512b /src/components/nav-main.tsx
parentabec6d734cde8a2bb0924989b1c5801e924137c3 (diff)
downloadpanel-ui-d7bb480ab6bd2172a04ecb304d012206e0c03e8f.tar.gz
panel-ui-d7bb480ab6bd2172a04ecb304d012206e0c03e8f.zip
Adding taskStatus fetch. Showing list of Task Attempts & starting heatmap calendar.
Diffstat (limited to 'src/components/nav-main.tsx')
-rw-r--r--src/components/nav-main.tsx17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/components/nav-main.tsx b/src/components/nav-main.tsx
index 949ced3..9ed1b24 100644
--- a/src/components/nav-main.tsx
+++ b/src/components/nav-main.tsx
@@ -1,6 +1,6 @@
"use client"
-import {ListIcon, NotebookText, Users, User} from "lucide-react"
+import {ListIcon, NotebookText, Users, User, Activity} from "lucide-react"
import {
SidebarGroup,
SidebarGroupContent,
@@ -21,6 +21,7 @@ export function NavMain() {
const app = useAppSelector(state => state.app)
const questions = useSelector(selectQuestions)
const upkAnswers = useSelector(selectUserUpkAnswers)
+ const taskAttempts = useAppSelector(state => state.taskStatus)
return (
<SidebarGroup>
@@ -72,6 +73,20 @@ export function NavMain() {
</SidebarMenuButton>
</SidebarMenuItem>
+ <SidebarMenuItem key="task_attempts"
+ onClick={() => dispatch(setPage("task_attempts"))}
+ >
+ <SidebarMenuButton tooltip="Survey History">
+ <Activity/>
+ <span>
+ Survey History <Badge
+ className="absolute top-2 right-2 h-5 min-w-5 rounded-full px-1 font-mono tabular-nums cursor-pointer"
+ variant="outline"
+ >{taskAttempts.length.toLocaleString()}</Badge>
+ </span>
+ </SidebarMenuButton>
+ </SidebarMenuItem>
+
</SidebarMenu>
</SidebarGroupContent>
</SidebarGroup>