Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.
TypeScript ai-agentai-resume-analyzerapplication-trackerapplication-tracking-systematscareerjob-applicationjob-automationjob-huntingjob-searchjob-seeker-toolsjob-trackerjob-trackingjobsearchjobseekersmcpollamaresumeresume-reviewself-hosted
feat: add automation and question shortcut on dashboard
Khuram Niaz2d10de918455
diff --git a/src/components/automations/AutomationContainer.tsx b/src/components/automations/AutomationContainer.tsxindex 215e038..892ca3f 100644--- a/src/components/automations/AutomationContainer.tsx+++ b/src/components/automations/AutomationContainer.tsx@@ -1,6 +1,7 @@"use client";import { useCallback, useEffect, useState } from "react";+import { useRouter, useSearchParams } from "next/navigation";import { Card, CardContent, CardTitle } from "@/components/ui/card";import { ResponsiveCardHeader } from "@/components/ResponsiveCardHeader";import { Button } from "@/components/ui/button";@@ -22,6 +23,8 @@ interface AutomationContainerProps {}export function AutomationContainer({ resumes }: AutomationContainerProps) {+ const router = useRouter();+ const searchParams = useSearchParams();const [automations, setAutomations] = useState<AutomationWithResume[]>([]);const [loading, setLoading] = useState(true);const [wizardOpen, setWizardOpen] = useState(false);@@ -48,6 +51,18 @@ export function AutomationContainer({ resumes }: AutomationContainerProps) {loadAutomations();}, [loadAutomations]);+ useEffect(() => {+ if (!wizardOpen && searchParams.get("add-automation") === "true") {+ setWizardOpen(true);+ const params = new URLSearchParams(searchParams.toString());+ params.delete("add-automation");+ const newPath = params.toString()+ ? `?${params.toString()}`+ : window.location.pathname;+ router.replace(newPath);+ }+ }, [wizardOpen, router, searchParams]);+const handleEdit = (automation: AutomationWithResume) => {setEditAutomation(automation);setWizardOpen(true);diff --git a/src/components/dashboard/JobsAppliedCard.tsx b/src/components/dashboard/JobsAppliedCard.tsxindex dabb94f..61f50a0 100644--- a/src/components/dashboard/JobsAppliedCard.tsx+++ b/src/components/dashboard/JobsAppliedCard.tsx@@ -17,24 +17,54 @@ export default function JobsAppliedCard() {<CardHeader className="pb-3"><CardTitle className="text-green-600">Dashboard</CardTitle><CardDescription className="max-w-lg text-balance leading-relaxed">- Create new jobs and tasks.+ Create new jobs, tasks, automations, and questions.</CardDescription></CardHeader>- <CardFooter className="flex flex-col gap-2 items-start">- <Button- variant="outline"- onClick={() => router.push("/dashboard/myjobs?add-job=true")}- >- <PlusCircle className="h-3.5 w-3.5 mr-1" />- <span className="sm:not-sr-only sm:whitespace-nowrap">New Job</span>- </Button>- <Button- variant="outline"- onClick={() => router.push("/dashboard/tasks")}- >- <PlusCircle className="h-3.5 w-3.5 mr-1" />- <span className="sm:not-sr-only sm:whitespace-nowrap">New Task</span>- </Button>+ <CardFooter className="flex gap-2 items-start">+ <div className="flex flex-col gap-2 items-start">+ <Button+ variant="outline"+ onClick={() => router.push("/dashboard/myjobs?add-job=true")}+ >+ <PlusCircle className="h-3.5 w-3.5 mr-1" />+ <span className="sm:not-sr-only sm:whitespace-nowrap">+ New Job+ </span>+ </Button>+ <Button+ variant="outline"+ onClick={() => router.push("/dashboard/tasks?add-task=true")}+ >+ <PlusCircle className="h-3.5 w-3.5 mr-1" />+ <span className="sm:not-sr-only sm:whitespace-nowrap">+ New Task+ </span>+ </Button>+ </div>+ <div className="flex flex-col gap-2 items-start">+ <Button+ variant="outline"+ onClick={() =>+ router.push("/dashboard/automations?add-automation=true")+ }+ >+ <PlusCircle className="h-3.5 w-3.5 mr-1" />+ <span className="sm:not-sr-only sm:whitespace-nowrap">+ New Automation+ </span>+ </Button>+ <Button+ variant="outline"+ onClick={() =>+ router.push("/dashboard/questions?add-question=true")+ }+ >+ <PlusCircle className="h-3.5 w-3.5 mr-1" />+ <span className="sm:not-sr-only sm:whitespace-nowrap">+ New Question+ </span>+ </Button>+ </div></CardFooter></Card>);diff --git a/src/components/questions/QuestionsContainer.tsx b/src/components/questions/QuestionsContainer.tsxindex 20824a1..b35bedc 100644--- a/src/components/questions/QuestionsContainer.tsx+++ b/src/components/questions/QuestionsContainer.tsx@@ -1,5 +1,6 @@"use client";import { useCallback, useEffect, useRef, useState } from "react";+import { useRouter, useSearchParams } from "next/navigation";import {Card,CardContent,@@ -35,6 +36,8 @@ function QuestionsContainer({filterKey,onQuestionsChanged,}: QuestionsContainerProps) {+ const router = useRouter();+ const searchParams = useSearchParams();const [questions, setQuestions] = useState<Question[]>([]);const [page, setPage] = useState(1);const [totalQuestions, setTotalQuestions] = useState(0);@@ -95,6 +98,18 @@ function QuestionsContainer({setDialogOpen(true);};+ useEffect(() => {+ if (!dialogOpen && searchParams.get("add-question") === "true") {+ setDialogOpen(true);+ const params = new URLSearchParams(searchParams.toString());+ params.delete("add-question");+ const newPath = params.toString()+ ? `?${params.toString()}`+ : window.location.pathname;+ router.replace(newPath);+ }+ }, [dialogOpen, router, searchParams]);+useEffect(() => {loadQuestions(1, filterKey, searchTerm || undefined);// eslint-disable-next-line react-hooks/exhaustive-depsdiff --git a/src/components/tasks/TasksContainer.tsx b/src/components/tasks/TasksContainer.tsxindex 0d60d57..e270286 100644--- a/src/components/tasks/TasksContainer.tsx+++ b/src/components/tasks/TasksContainer.tsx@@ -1,5 +1,6 @@"use client";import { useCallback, useEffect, useRef, useState } from "react";+import { useRouter, useSearchParams } from "next/navigation";import {Card,CardContent,@@ -61,6 +62,8 @@ function TasksContainer({onFilterChange,onTasksChanged,}: TasksContainerProps) {+ const router = useRouter();+ const searchParams = useSearchParams();const { refreshCurrentActivity } = useActivity();const { requestStart, confirmDialog } = useActivitySwitchConfirm();const [tasks, setTasks] = useState<Task[]>([]);@@ -208,6 +211,18 @@ function TasksContainer({setEditTask(null);};+ useEffect(() => {+ if (!dialogOpen && searchParams.get("add-task") === "true") {+ setDialogOpen(true);+ const params = new URLSearchParams(searchParams.toString());+ params.delete("add-task");+ const newPath = params.toString()+ ? `?${params.toString()}`+ : window.location.pathname;+ router.replace(newPath);+ }+ }, [dialogOpen, router, searchParams]);+useEffect(() => {(async () =>await loadTasks(1, filterKey, statusFilter, searchTerm || undefined))();