feat(web): persist exclusive reviewer duty on project create

Keep project_role as member/viewer, send document_duty=reviewer for USER_B, and clear the seed 李主管 reviewer so the assigned reviewer is the one that syncs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
weichen
2026-09-13 21:57:53 +00:00
co-authored by Cursor
parent 6a68e04f1f
commit c1bdfe3920
10 changed files with 147 additions and 9 deletions
+3
View File
@@ -2,6 +2,7 @@ import { getBearerAuthHeaders } from './authHeaders';
export type ApiProjectMemberRole = 'owner' | 'member' | 'viewer';
export type ApiProjectMemberStatus = 'active' | 'exited';
export type ApiDocumentDuty = 'author' | 'reviewer' | 'approver' | '';
export interface ApiProjectMemberRecord {
id?: number;
@@ -10,6 +11,7 @@ export interface ApiProjectMemberRecord {
username?: string;
name?: string;
project_role: ApiProjectMemberRole;
document_duty?: ApiDocumentDuty;
status: ApiProjectMemberStatus;
joined_at?: string;
}
@@ -21,6 +23,7 @@ export interface ListProjectMembersResponse {
export interface UpsertProjectMemberPayload {
user_id: number;
project_role: ApiProjectMemberRole;
document_duty?: ApiDocumentDuty;
status?: ApiProjectMemberStatus;
}