fix(knowledge): resolve TypeScript errors in tags service

- Fix updateData typing for partial updates
- Add slug field to CreateTagDto
- Build now passes

Note: tasks.controller.spec.ts needs test config update for WorkspaceGuard
This commit is contained in:
Jason Woltje
2026-01-29 17:09:27 -06:00
parent 25947cee52
commit a5b984c7fd
10 changed files with 998 additions and 14 deletions

View File

@@ -6,12 +6,11 @@ import { Card, CardHeader, CardContent, CardFooter, Button, Input, Textarea } fr
interface TeamSettingsProps {
team: Team;
workspaceId: string;
onUpdate: (data: { name?: string; description?: string }) => Promise<void>;
onDelete: () => Promise<void>;
}
export function TeamSettings({ team, workspaceId, onUpdate, onDelete }: TeamSettingsProps) {
export function TeamSettings({ team, onUpdate, onDelete }: TeamSettingsProps) {
const [name, setName] = useState(team.name);
const [description, setDescription] = useState(team.description || "");
const [isEditing, setIsEditing] = useState(false);
@@ -26,10 +25,14 @@ export function TeamSettings({ team, workspaceId, onUpdate, onDelete }: TeamSett
setIsSaving(true);
try {
await onUpdate({
name: name !== team.name ? name : undefined,
description: description !== (team.description || "") ? description : undefined,
});
const updates: { name?: string; description?: string } = {};
if (name !== team.name) {
updates.name = name;
}
if (description !== (team.description || "")) {
updates.description = description;
}
await onUpdate(updates);
setIsEditing(false);
} catch (error) {
console.error("Failed to update team:", error);