月报补上团队统计视图,镜像已有的日报团队视图(第9章遗留缺口)
MonthlyReportList 原来只有"我的月报"一种形态,没有 team/managed 入口——日报有的 "团队统计"(应提交/已提交/未提交计数)月报完全没有,路由/组件都不支持。核对 im_be 源码确认后端本身是对称的:TenantMonthlyReportList 的 scope=managed 分支 跟日报字面上是同一段 canUseManagedReports(visibility) 权限校验(真实请求验证: 无权限账号收到 403 PERMISSION_DENIED,不是之前日报那种曾经误报全公司数据的 旧版本行为——那个越权问题后端已经修过了),GET /reports/monthly/statistics 的响应字段(expected_count/submitted_count/missing_count)也和日报完全一致。 唯一确认过的不对称点:月报没有对应的"提醒未提交成员"接口(daily有 POST /reports/daily/reminders,翻遍 im_http.go 月报没有任何同类路由)——团队视图 因此没有画这个按钮,画一个点了必然404的按钮不算镜像,是给用户挖坑。 路由从单一的 monthly-report-list 拆成 monthly-report-mine/monthly-report-team (对齐 daily-report-mine/daily-report-team 的命名),两处 tinode-web.jsx 的硬编码 白名单、APP_ROUTES、详情/编辑页的返回目标都已同步更新。 联调中发现并顺手修正一个刚写的真bug:team 分支的空列表判断沿用了旧的无条件 "暂无月报"文案,没有区分"真的没数据"和"403加载失败"——用真实账号触发403验证时 第一次跑出来就是这个问题,同一轮改完立刻测出来并修正(跟本次会话更早修的 DailyReportList 同款问题是同一个模式,这次是抄自己代码时漏抄了一半)。 真实验证:我的月报视图不受影响;团队统计视图真实触发403(该账号只是普通员工), 正确显示"月报列表加载失败"而不是误导性的"暂无月报";点击"我的月报"correctly 跳回单人视图。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
d01547d3de
commit
abef778c7f
@@ -136,7 +136,7 @@ const SIDE_PANEL_VIEWS = ['acc_general','archive','blocked','contacts','cred','c
|
||||
'workbench','organization-directory','meeting-organizer','meeting-attendee',
|
||||
'meeting-create','meeting-detail',
|
||||
'daily-report-editor','daily-report-mine','daily-report-team','daily-report-detail',
|
||||
'monthly-report-editor','monthly-report-list','monthly-report-detail',
|
||||
'monthly-report-editor','monthly-report-mine','monthly-report-team','monthly-report-detail',
|
||||
'executive-mailbox','executive-mailbox-notice',
|
||||
'personal-center','personal-profile','profile-nickname','profile-birth-date',
|
||||
'profile-signature','profile-gender','profile-region','personal-qrcode','android-settings',
|
||||
@@ -2543,7 +2543,7 @@ class TinodeWeb extends React.Component {
|
||||
'call-minimized'].includes(activeProductView);
|
||||
const workplaceCollaborationActive = ['workbench', 'organization-directory', 'meeting-organizer',
|
||||
'meeting-attendee', 'meeting-create', 'meeting-detail', 'daily-report-editor', 'daily-report-mine', 'daily-report-team',
|
||||
'daily-report-detail', 'monthly-report-editor', 'monthly-report-list',
|
||||
'daily-report-detail', 'monthly-report-editor', 'monthly-report-mine', 'monthly-report-team',
|
||||
'monthly-report-detail', 'executive-mailbox', 'executive-mailbox-notice'].includes(activeProductView);
|
||||
const personalSettingsActive = ['personal-center', 'personal-profile', 'profile-nickname',
|
||||
'profile-birth-date', 'profile-signature', 'profile-gender', 'profile-region', 'personal-qrcode', 'android-settings',
|
||||
|
||||
Reference in New Issue
Block a user