fix(oa): 同意/拒绝/打回前自动发送评论草稿

审批动作前冲刷评论区未发送内容,减少先点发送再审批的一步操作。
关联 #118。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-11-19 11:55:53 +08:00
1 parent 0929164bf5
commit a69dcc5bca
8 files changed
+137 -13

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
/** 评论区是否有未发送草稿(文字 / @ / 附件) */
export function hasOaCommentDraft(input: {
content?: string | null
mentionCount?: number
attachmentCount?: number
}): boolean {
return !!(
String(input.content || '').trim() ||
(input.mentionCount || 0) > 0 ||
(input.attachmentCount || 0) > 0
)
}