feat(web): workspace selector on issue/requirement detail

This commit is contained in:
2026-05-02 23:39:44 +08:00
parent 0423f0566c
commit 7939960011
3 changed files with 65 additions and 3 deletions
+11 -1
View File
@@ -25,6 +25,7 @@ export interface Requirement {
phase: Phase
status: Status
owner_id: string
workspace_id: string | null
closed_at?: string | null
created_at: string
updated_at: string
@@ -34,6 +35,7 @@ export interface Issue {
id: string
project_id: string
requirement_id: string | null
workspace_id: string | null
number: number
title: string
description: string
@@ -92,7 +94,13 @@ export const projectsApi = {
updateRequirement: (
slug: string,
number: number,
body: Partial<{ title: string; description: string; owner_id: string }>,
body: Partial<{
title: string
description: string
owner_id: string
// 三态:未传字段 / 显式 null(detach) / "<uuid>"(attach)
workspace_id: string | null
}>,
) =>
request<Requirement>(`/api/v1/projects/${enc(slug)}/requirements/${number}`, {
method: 'PATCH',
@@ -141,6 +149,8 @@ export const projectsApi = {
description: string
// 三态:未传字段 / 显式 null(detach) / number(attach/move)
requirement_number: number | null
// 三态:未传字段 / 显式 null(detach) / "<uuid>"(attach)
workspace_id: string | null
}>,
) =>
request<Issue>(`/api/v1/projects/${enc(slug)}/issues/${number}`, {