This commit is contained in:
Your Name
2026-08-14 14:52:42 +08:00
parent 18c15d1262
commit 2fc8048844
3 changed files with 54 additions and 27 deletions
+12 -11
View File
@@ -84,6 +84,13 @@ class NavigationItem:
NAVIGATION = (
NavigationItem(
"appointments",
"接诊台",
"",
AppointmentsPage,
("doctor.appointment/lists",),
),
NavigationItem(
"reception",
"接诊台",
@@ -91,13 +98,6 @@ NAVIGATION = (
ReceptionPage,
("doctor.appointment/lists",),
),
NavigationItem(
"appointments",
"挂号列表",
"",
AppointmentsPage,
("doctor.appointment/lists",),
),
NavigationItem(
"prescription_library",
"处方库",
@@ -114,7 +114,7 @@ NAVIGATION = (
),
NavigationItem(
"patients",
"接诊台",
"我的患者",
"",
PatientsPage,
("firstvisit.myPatient/lists",),
@@ -301,9 +301,9 @@ def _resolve_navigation(
continue
if not _canonical_allowed(permissions, item.permissions[0]):
continue
if item.key == "patients":
# The server menu can still carry the legacy label "我的患者".
# Keep the workstation's product-facing navigation title stable.
if item.key in {"appointments", "patients"}:
# Keep the two product-facing navigation titles stable even when
# the server still carries an older menu label.
title = item.title
else:
title_value = first_value(
@@ -312,6 +312,7 @@ def _resolve_navigation(
title = str(title_value).strip() or item.title
resolved.append((item, title))
seen.add(item.key)
resolved.sort(key=lambda entry: entry[0].key != "appointments")
return resolved
if demo_mode:
return [