feat: implement core admin dashboard infrastructure including service layers, UI components, and submission management pages
This commit is contained in:
+42
-20
@@ -1,22 +1,46 @@
|
||||
export interface CommitSimpleResponse {
|
||||
id: string;
|
||||
edit_summary: string;
|
||||
}
|
||||
|
||||
export interface MemberSimpleResponse {
|
||||
user_id: string;
|
||||
role: string;
|
||||
display_name: string;
|
||||
avatar_url: string;
|
||||
}
|
||||
|
||||
export interface SubmissionSimpleResponse {
|
||||
id: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface UserSimpleResponse {
|
||||
id: string;
|
||||
email: string;
|
||||
display_name: string;
|
||||
avatar_url: string;
|
||||
}
|
||||
|
||||
export interface Project {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
project_status: "PRIVATE" | "PUBLIC" | "ARCHIVE";
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
is_deleted?: boolean;
|
||||
user_id?: string;
|
||||
user?: {
|
||||
id: string;
|
||||
email: string;
|
||||
display_name: string;
|
||||
avatar_url: string;
|
||||
};
|
||||
commits?: any[];
|
||||
submission_ids?: any[];
|
||||
members?: ProjectMember[];
|
||||
latest_commit_id?: string | null;
|
||||
project_status: "PRIVATE" | "PUBLIC" | "ARCHIVE" | string;
|
||||
locked_by?: string | null;
|
||||
is_deleted: boolean;
|
||||
user_id: string;
|
||||
created_at?: string | null;
|
||||
updated_at?: string | null;
|
||||
|
||||
user?: UserSimpleResponse | null;
|
||||
|
||||
commits: CommitSimpleResponse[];
|
||||
submissions: SubmissionSimpleResponse[];
|
||||
members: MemberSimpleResponse[];
|
||||
}
|
||||
|
||||
export interface ProjectsResponse<T = Project> {
|
||||
status: boolean;
|
||||
message: string;
|
||||
@@ -28,24 +52,22 @@ export interface ProjectsResponse<T = Project> {
|
||||
total_pages: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface UpdateProjectPayload {
|
||||
title: string;
|
||||
description: string;
|
||||
status: "PRIVATE" | "PUBLIC" | "ARCHIVE";
|
||||
}
|
||||
|
||||
export interface ChangeOwnerPayload {
|
||||
new_owner_id: string;
|
||||
}
|
||||
|
||||
export interface ProjectMemberPayload {
|
||||
user_id?: string;
|
||||
role: "EDITOR" | "VIEWER" | "ADMIN";
|
||||
}
|
||||
export interface ProjectMember {
|
||||
user_id: string;
|
||||
role: string;
|
||||
display_name: string;
|
||||
avatar_url: string;
|
||||
}
|
||||
|
||||
export interface GetProjectsParams {
|
||||
page?: number;
|
||||
limit?: number;
|
||||
|
||||
Reference in New Issue
Block a user