diff --git a/src/api/task.js b/src/api/task.js index 285ff57..b4190a6 100644 --- a/src/api/task.js +++ b/src/api/task.js @@ -142,6 +142,8 @@ function projectSummary(p, memberCount, taskCount) { updatedAt: p.updatedAt, taskKinds: normTaskKinds(parseJson(p.taskKinds, null)) || DEFAULT_TASK_KINDS, icon: p.icon || null, + // 自动归档档位 (T-ARC-02): 必须回传给前端, 否则该设置在界面上永远显示默认的「永不」 + autoArchive: p.autoArchive || 'never', memberCount, taskCount, } @@ -275,6 +277,11 @@ export const projectApi = { content: String(n?.content ?? '').slice(0, 20000), }))) } + if (body?.autoArchive !== undefined) { + // 自动归档档位 (T-ARC-02): 与服务端 AUTO_ARCHIVE_OPTIONS 同口径 + if (!['3d', '1w', '1m', 'never'].includes(body.autoArchive)) throw new Error('自动归档档位非法') + data.autoArchive = body.autoArchive + } const sets = Object.keys(data).map((k) => `"${k}" = ?`) if (sets.length) { await db().execute(