diff --git a/.phase24-state.json b/.phase24-state.json index 575b158..a3e3782 100644 --- a/.phase24-state.json +++ b/.phase24-state.json @@ -1,9 +1,10 @@ { "completed_features": [], - "current_feature": "billing-history-table", + "current_feature": "project-archive-icon", "started_at": "2026-05-23T08:33:42.059540", "attempted_features": [ "notification-bell", - "workspace-switcher-stub" + "workspace-switcher-stub", + "billing-history-table" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index dbbaf05..68889af 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -2838,3 +2838,20 @@ src/index.ts(27,25): error TS2769: No overload matches this call. Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. Type 'Promise' provides no match for the signature '(instance: FastifyInstance, FastifyBaseLogger, FastifyTy +- `08:36:50` **INFO** Committed feature billing-history-table +- `08:36:50` **INFO** Pushed: rc=0 + +## Phase-3 Feature: project-archive-icon (2026-05-23 08:36:50) + +- `08:36:50` **INFO** Description: Archive-Icon-Button pro Project (Soft-Archive via active=false) +- `08:36:50` **INFO** Generating apps/web/src/pages/Projects.tsx (ERWEITERT — füge Archive-Button (Archive-Icon lucide-react) pro Projec…) +- `08:38:16` **INFO** wrote 10703 chars in 86.1s (attempt 1) +- `08:38:16` **INFO** Running tsc --noEmit on api… +- `08:38:18` **WARN** tsc errors: +src/index.ts(27,25): error TS2769: No overload matches this call. + Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. + Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. + Type 'Promise' provides no match for the signature '(instance: FastifyInstance, FastifyBaseLogger, FastifyTypeProvider>, opts: { ...; }, done: (err?: Error | undefined) => void): void'. + Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. + Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. + Type 'Promise' provides no match for the signature '(instance: FastifyInstance, FastifyBaseLogger, FastifyTy diff --git a/apps/web/src/pages/Projects.tsx b/apps/web/src/pages/Projects.tsx index 5f30f6b..ebdad72 100644 --- a/apps/web/src/pages/Projects.tsx +++ b/apps/web/src/pages/Projects.tsx @@ -1,6 +1,6 @@ import { useState, useEffect } from "react" import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query" -import { Copy, Trash2, Edit3, X, Plus } from "lucide-react" +import { Copy, Trash2, Edit3, X, Plus, Archive, ArchiveRestore } from "lucide-react" import { api } from "../lib/api" import { useToast } from "../hooks/use-toast" @@ -13,6 +13,7 @@ export default function Projects() { const [selectedIds, setSelectedIds] = useState([]) const [bulkPrefix, setBulkPrefix] = useState("") const [editingProject, setEditingProject] = useState<{ id: string; name: string; budget: number } | null>(null) + const [showArchived, setShowArchived] = useState(false) const { data: projects, isLoading: projectsLoading, isError: projectsError } = useQuery({ queryKey: ["projects"], @@ -53,8 +54,8 @@ export default function Projects() { }) const updateMutation = useMutation({ - mutationFn: ({ id, name, budget }: { id: string; name: string; budget: number }) => - api.updateProject(id, { name, budget }), + mutationFn: ({ id, data }: { id: string; data: any }) => + api.updateProject(id, data), onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["projects"] }) setEditingProject(null) @@ -119,136 +120,149 @@ export default function Projects() { ) } + const filteredProjects = projects?.filter((p: any) => + showArchived ? true : p.active !== false + ) || [] + if (projectsLoading) return
Loading projects...
if (projectsError) return
Error loading projects.
return ( -
-
+
+

Projects

- {selectedIds.length > 0 && ( -
-
- setBulkPrefix(e.target.value)} - /> - -
- -
- )} +
+ +
-
-
- setIcon(e.target.value)} - /> - setName(e.target.value)} - /> -
+ + setName(e.target.value)} + className="p-2 border rounded" + /> + setIcon(e.target.value)} + className="p-2 border rounded" + /> -
+ {selectedIds.length > 0 && ( +
+ {selectedIds.length} selected +
+ setBulkPrefix(e.target.value)} + className="p-1 text-sm border rounded" + /> + +
+ + +
+ )} +
- - - - - + + + - {projects?.map((project: any) => ( - - + - - - - ))}
- + + 0} /> ProjectCustomerBudgetActionsProjectBudgetActions
+ {filteredProjects.map((project: any) => ( +
toggleSelect(project.id)} /> - {project.icon || "📁"} - {project.name} + +
+ {project.icon || "📁"} + {project.name} + {project.active === false && Archived} +
{project.customer?.name} + {editingProject?.id === project.id ? ( setEditingProject({...editingProject, budget: parseFloat(e.target.value) || 0})} + onChange={e => setEditingProject({...editingProject, budget: parseFloat(e.target.value)})} + className="p-1 border rounded w-24" /> ) : ( - {project.budget || 0}h + `${project.budget || 0}h` )} - - {editingProject?.id === project.id && ( + +
- )} - - + + + +