feat(jobs): integrate table and board workspace

This commit is contained in:
cesnimda
2026-09-29 23:01:05 +02:00
parent 6fc8937701
commit 384dfa8a4b
35 changed files with 1191 additions and 60 deletions
+8 -4
View File
@@ -6,7 +6,6 @@ import { isCancel } from "axios";
import DashboardIcon from "@mui/icons-material/Dashboard";
import WorkOutlineIcon from "@mui/icons-material/WorkOutline";
import ViewKanbanIcon from "@mui/icons-material/ViewKanban";
import BusinessIcon from "@mui/icons-material/Business";
import DeleteOutlineIcon from "@mui/icons-material/DeleteOutline";
import SettingsIcon from "@mui/icons-material/Settings";
@@ -46,7 +45,6 @@ import JobTrackerThemeProvider from "./ThemeProvider";
import { isSessionInvalidated, SESSION_INVALIDATED_EVENT } from "./sessionBoundary";
const AddJobModal = lazy(() => import("./components/AddJobModal"));
const KanbanBoard = lazy(() => import("./components/KanbanBoard"));
const DashboardView = lazy(() => import("./components/DashboardView"));
const JobDiscoveryPage = lazy(() => import("./views/JobDiscoveryPage"));
const CompaniesTable = lazy(() => import("./components/CompaniesTable"));
@@ -69,6 +67,13 @@ const OfferComparisonPage = lazy(() => import("./views/OfferComparisonPage"));
const NotFoundPage = lazy(() => import("./views/NotFoundPage"));
type AuthConfig = { requireAuth: boolean };
function LegacyBoardRedirect() {
const location = useLocation();
const query = new URLSearchParams(location.search);
query.set("view", "board");
return <Navigate replace to={{ pathname: "/jobs", search: `?${query}`, hash: location.hash }} state={location.state} />;
}
type ThemeControls = { themeMode: ThemeModePref; onThemeModeChange: (value: ThemeModePref) => void };
const ThemeControlsContext = createContext<ThemeControls | null>(null);
type MeResponse = {
@@ -294,7 +299,6 @@ function Shell({ jobPageSize, setJobPageSize, jobColumns, setJobColumns, themeMo
{ to: "/jobs", activeFor: ["/applications"], label: t("jobApplications"), icon: <WorkOutlineIcon fontSize="small" />, section: t("jobSearch"), children: [
{ to: "/discover", label: t("discoverJobs"), icon: <SearchIcon fontSize="small" /> },
{ to: "/reminders", label: t("reminders"), icon: <AlarmIcon fontSize="small" />, badgeCount: reminderCount },
{ to: "/kanban", label: t("kanbanBoard"), icon: <ViewKanbanIcon fontSize="small" /> },
{ to: "/companies", label: t("companies"), icon: <BusinessIcon fontSize="small" /> },
{ to: "/offers", label: t("offerComparisonNav"), icon: <CompareArrowsIcon fontSize="small" /> },
{ to: "/trash", label: t("trash"), icon: <DeleteOutlineIcon fontSize="small" /> },
@@ -388,7 +392,7 @@ function Shell({ jobPageSize, setJobPageSize, jobColumns, setJobColumns, themeMo
<Route path="/jobs/:id" element={<ApplicationWorkspacePage />} />
<Route path="/reminders" element={<RemindersView />} />
<Route path="/operations" element={<OperationsPage />} />
<Route path="/kanban" element={<KanbanBoard />} />
<Route path="/kanban" element={<LegacyBoardRedirect />} />
<Route path="/companies" element={<CompaniesTable />} />
<Route path="/offers" element={<OfferComparisonPage />} />
<Route path="/correspondence" element={<CorrespondenceInboxPage />} />