更新
This commit is contained in:
@@ -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 [
|
||||
|
||||
Reference in New Issue
Block a user