修复会议详情页"参会确认"统计遗漏"待定"响应,三项数字之和对不上参会人数

MeetingDetail 的 counts 对象本就统计了 tentative({accepted,pending,declined,tentative}),
但渲染只画了已接受/待响应/已拒绝三项,待定响应被计算出来后从未显示。真实复现:
组织者建会议、参会人回应"待定"后查看会议详情,"参会确认"区域三个数字之和小于
participant_count,且没有任何说明缺的那一份去了哪。

补充第4个统计项(待定),保持原有三项顺序不变;base.css 的
.meeting-status > div 网格列数从3改4(.report-statistics 复用同一条规则,
拆开单独设置避免影响日报/月报团队统计的应提交/已提交/未提交三列布局)。

已用 asn494180(组织者)/kcg051307(参会人) 两个真实账号在浏览器实测:kcg回应"待定"后
version从1变为2,asn的会议详情页刷新后正确显示"1 已接受/0 待响应/0 已拒绝/1 待定",
截图确认4列布局无溢出/挤压。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Your Name
2026-09-06 13:14:10 +08:00
co-authored by Claude Sonnet 5
parent 693265658f
commit db75aaa25b
2 changed files with 15 additions and 1 deletions
+7
View File
@@ -879,6 +879,13 @@
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
} }
/* 参会确认 now shows 4 stats (已接受/待响应/已拒绝/待定, see workplace-collaboration-view.jsx's
MeetingDetail) -- .report-statistics (日报/月报团队统计的应提交/已提交/未提交) stays at 3, only
this selector needs the extra column. */
.meeting-status > div {
grid-template-columns: repeat(4, 1fr);
}
.meeting-status span, .meeting-status span,
.report-statistics > div span { .report-statistics > div span {
display: flex; display: flex;
+8 -1
View File
@@ -431,7 +431,14 @@ function MeetingDetail({hashParams, onToast}) {
</article> </article>
{isOrganizer ? <section className="meeting-status"> {isOrganizer ? <section className="meeting-status">
<h2>参会确认</h2> <h2>参会确认</h2>
<div><span><b>{counts.accepted}</b><small>已接受</small></span><span><b>{counts.pending}</b><small>待响应</small></span><span><b>{counts.declined}</b><small>已拒绝</small></span></div> {/* counts.tentative was already computed above but never rendered here -- live-repro'd
(round 14): after a participant responds "待定" via MeetingDetail's own respond('tentative')
button (or the equivalent list-card flow), this summary's three numbers (已接受/待响应/
已拒绝) silently stopped summing to participant_count with no visible explanation, because
the fourth bucket their response actually landed in was computed but dropped on the floor.
Appended as a 4th stat (order of the original three left untouched) so every response state
has a visible home; grid-template-columns bumped from 3 to 4 to match (see base.css). */}
<div><span><b>{counts.accepted}</b><small>已接受</small></span><span><b>{counts.pending}</b><small>待响应</small></span><span><b>{counts.declined}</b><small>已拒绝</small></span><span><b>{counts.tentative}</b><small>待定</small></span></div>
<footer> <footer>
{meeting.permissions && meeting.permissions.can_remind ? <button type="button" disabled={busy} onClick={remind}><Icon>notifications</Icon>提醒未响应</button> : null} {meeting.permissions && meeting.permissions.can_remind ? <button type="button" disabled={busy} onClick={remind}><Icon>notifications</Icon>提醒未响应</button> : null}
{/* 后端常量是 "canceled" 单 l(store/types/meetings.go:7),原来写成 "cancelled" 永远不相等, {/* 后端常量是 "canceled" 单 l(store/types/meetings.go:7),原来写成 "cancelled" 永远不相等,