feat(web): add workspace management UI (M2 #12)
- Create workspace listing page at /settings/workspaces - List all user workspaces with role badges - Create new workspace functionality - Display member count per workspace - Create workspace detail page at /settings/workspaces/[id] - Workspace settings (name, ID, created date) - Member management with role editing - Invite member functionality - Delete workspace (owner only) - Add workspace components: - WorkspaceCard: Display workspace info with role badge - WorkspaceSettings: Edit workspace settings and delete - MemberList: Display and manage workspace members - InviteMember: Send invitations with role selection - Add WorkspaceMemberWithUser type to shared package - Follow existing app patterns for styling and structure - Use mock data (ready for API integration)
This commit is contained in:
@@ -9,8 +9,11 @@ import type {
|
||||
TaskPriority,
|
||||
ProjectStatus,
|
||||
WorkspaceMemberRole,
|
||||
TeamMemberRole,
|
||||
ActivityAction,
|
||||
EntityType,
|
||||
EntryStatus,
|
||||
Visibility,
|
||||
} from "./enums";
|
||||
|
||||
/**
|
||||
@@ -44,6 +47,33 @@ export interface WorkspaceMember {
|
||||
joinedAt: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Workspace member with populated user data
|
||||
*/
|
||||
export interface WorkspaceMemberWithUser extends WorkspaceMember {
|
||||
user: User;
|
||||
}
|
||||
|
||||
/**
|
||||
* Team entity
|
||||
*/
|
||||
export interface Team extends BaseEntity {
|
||||
workspaceId: string;
|
||||
name: string;
|
||||
description: string | null;
|
||||
metadata: Record<string, unknown>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Team member entity (join table)
|
||||
*/
|
||||
export interface TeamMember {
|
||||
teamId: string;
|
||||
userId: string;
|
||||
role: TeamMemberRole;
|
||||
joinedAt: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Task entity
|
||||
*/
|
||||
@@ -120,3 +150,36 @@ export interface MemoryEmbedding extends BaseEntity {
|
||||
entityId: string | null;
|
||||
metadata: Record<string, unknown>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Knowledge tag entity
|
||||
*/
|
||||
export interface KnowledgeTag extends BaseEntity {
|
||||
workspaceId: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
color: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Knowledge entry entity
|
||||
*/
|
||||
export interface KnowledgeEntry extends BaseEntity {
|
||||
workspaceId: string;
|
||||
slug: string;
|
||||
title: string;
|
||||
content: string;
|
||||
contentHtml: string | null;
|
||||
summary: string | null;
|
||||
status: EntryStatus;
|
||||
visibility: Visibility;
|
||||
createdBy: string;
|
||||
updatedBy: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Knowledge entry with tags relation
|
||||
*/
|
||||
export interface KnowledgeEntryWithTags extends KnowledgeEntry {
|
||||
tags: KnowledgeTag[];
|
||||
}
|
||||
|
||||
@@ -48,3 +48,15 @@ export enum EntityType {
|
||||
WORKSPACE = "WORKSPACE",
|
||||
USER = "USER",
|
||||
}
|
||||
|
||||
export enum EntryStatus {
|
||||
DRAFT = "DRAFT",
|
||||
PUBLISHED = "PUBLISHED",
|
||||
ARCHIVED = "ARCHIVED",
|
||||
}
|
||||
|
||||
export enum Visibility {
|
||||
PRIVATE = "PRIVATE",
|
||||
WORKSPACE = "WORKSPACE",
|
||||
PUBLIC = "PUBLIC",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user