fix: order workbench modules

This commit is contained in:
richjohnrambo
2026-09-10 15:19:29 +08:00
parent 085a48c3d9
commit 14ee3d937f
7 changed files with 54 additions and 22 deletions
+7 -7
View File
@@ -993,13 +993,13 @@ ON DUPLICATE KEY UPDATE updated_at = CURRENT_TIMESTAMP(3);
INSERT INTO tinode.im_workbench_apps(code, name, route, sort_order, unread_key, enabled, permission)
VALUES
('organization', '组织架构', '/organization', 10, 'organization', 1, 'enabled'),
('attendance', '打卡', '/attendance', 20, 'attendance', 1, 'enabled'),
('meetings', '会议通知', '/meetings', 30, 'meetings', 1, 'enabled'),
('meeting_notes', '会议笔记', '/meeting-notes', 35, '', 1, 'enabled'),
('daily_reports', '日报', '/reports/daily', 40, 'daily_reports', 1, 'enabled'),
('monthly_reports', '月报', '/reports/monthly', 50, 'monthly_reports', 1, 'enabled'),
('executive_mailbox', '总经理信箱', '/executive-mailbox', 60, 'executive_mailbox', 1, 'enabled')
('attendance', '打卡', '/attendance', 10, 'attendance', 1, 'enabled'),
('monthly_reports', '月报', '/reports/monthly', 20, 'monthly_reports', 1, 'enabled'),
('daily_reports', '日报', '/reports/daily', 30, 'daily_reports', 1, 'enabled'),
('organization', '部门框架', '/organization', 40, 'organization', 1, 'enabled'),
('executive_mailbox', '举报信箱', '/executive-mailbox', 50, 'executive_mailbox', 1, 'enabled'),
('meetings', '会议通知', '/meetings', 60, 'meetings', 1, 'enabled'),
('meeting_notes', '会议笔记', '/meeting-notes', 70, '', 1, 'enabled')
ON DUPLICATE KEY UPDATE
name = VALUES(name),
route = VALUES(route),
+29
View File
@@ -0,0 +1,29 @@
-- Update workbench module order to match the mobile workbench layout.
-- Order: 打卡、月报、日报、部门框架、举报信箱、会议通知、会议笔记.
UPDATE tinode.im_workbench_apps
SET sort_order = CASE code
WHEN 'attendance' THEN 10
WHEN 'monthly_reports' THEN 20
WHEN 'daily_reports' THEN 30
WHEN 'organization' THEN 40
WHEN 'executive_mailbox' THEN 50
WHEN 'meetings' THEN 60
WHEN 'meeting_notes' THEN 70
ELSE sort_order
END,
name = CASE code
WHEN 'organization' THEN '部门框架'
WHEN 'executive_mailbox' THEN '举报信箱'
ELSE name
END,
updated_at = CURRENT_TIMESTAMP(3)
WHERE code IN (
'attendance',
'monthly_reports',
'daily_reports',
'organization',
'executive_mailbox',
'meetings',
'meeting_notes'
);