feat: implement core admin dashboard infrastructure including service layers, UI components, and submission management pages
This commit is contained in:
+11
-4
@@ -1,8 +1,15 @@
|
||||
export interface CommonResponse<T = any> {
|
||||
export interface ErrorResponse {
|
||||
failed_field: string;
|
||||
tag: string;
|
||||
value: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface CommonResponse<T = unknown> {
|
||||
status: boolean;
|
||||
message: string;
|
||||
data: T;
|
||||
errors?: any; // Or a more specific error type
|
||||
errors?: ErrorResponse[]; // Or a more specific error type
|
||||
}
|
||||
|
||||
export interface PaginatedResponse<T> {
|
||||
@@ -15,7 +22,7 @@ export interface PaginatedResponse<T> {
|
||||
total_records: number;
|
||||
total_pages: number;
|
||||
};
|
||||
errors?: any;
|
||||
errors?: ErrorResponse[];
|
||||
}
|
||||
|
||||
export interface CursorPaginatedResponse<T> {
|
||||
@@ -25,5 +32,5 @@ export interface CursorPaginatedResponse<T> {
|
||||
items: T[];
|
||||
next_cursor_id?: string;
|
||||
};
|
||||
errors?: any;
|
||||
errors?: ErrorResponse[];
|
||||
}
|
||||
@@ -19,7 +19,7 @@ export interface ApplicationDto {
|
||||
reviewed_at: string | null;
|
||||
created_at: string;
|
||||
updated_at?: string;
|
||||
media: any[];
|
||||
media: MediaDto[];
|
||||
user: {
|
||||
display_name?: string;
|
||||
avatar_url?: string;
|
||||
|
||||
+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