feat: scope workspace routes by organization slug

This commit is contained in:
2026-07-02 20:11:57 -07:00
parent fae97a7046
commit 3ab0e3e034
48 changed files with 565 additions and 96 deletions

View File

@@ -17,10 +17,11 @@ export type NavIconKey =
| "users";
export type NavItem = {
href: string;
path: string;
label: string;
icon: NavIconKey;
permission?: Permission;
anyPermissions?: Permission[];
};
export type NavGroup = {
@@ -33,34 +34,40 @@ export const navGroups: NavGroup[] = [
label: "运营",
items: [
{
href: "/app/dashboard",
path: "/dashboard",
label: "运营看板",
icon: "dashboard",
anyPermissions: ["elder:read", "facility:read", "admission:read", "incident:read"],
},
{
href: "/app/elders",
path: "/elders",
label: "老人档案",
icon: "users",
permission: "elder:read",
},
{
href: "/app/beds",
path: "/beds",
label: "床位房间",
icon: "beds",
anyPermissions: ["facility:read", "admission:read"],
},
{
href: "/app/health",
path: "/health",
label: "健康照护",
icon: "health",
permission: "elder:read",
},
{
href: "/app/care",
path: "/care",
label: "护理服务",
icon: "care",
permission: "elder:update",
},
{
href: "/app/emergency",
path: "/emergency",
label: "安全应急",
icon: "emergency",
permission: "incident:read",
},
],
},
@@ -68,62 +75,64 @@ export const navGroups: NavGroup[] = [
label: "协同",
items: [
{
href: "/app/devices",
path: "/devices",
label: "设备运维",
icon: "devices",
permission: "facility:read",
},
{
href: "/app/notices",
path: "/notices",
label: "公告通知",
icon: "notices",
},
{
href: "/app/alerts",
path: "/alerts",
label: "规则预警",
icon: "alerts",
permission: "incident:read",
},
{
href: "/app/family",
path: "/family",
label: "家属服务",
icon: "devices",
},
],
},
{
label: "系统设置",
label: "管理系统",
items: [
{
href: "/app/settings/global",
path: "/settings/global",
label: "全局配置",
icon: "global",
permission: "platform:manage",
},
{
href: "/app/settings/organizations",
path: "/settings/organizations",
label: "机构管理",
icon: "organizations",
permission: "organization:read",
},
{
href: "/app/settings/users",
path: "/settings/users",
label: "用户管理",
icon: "users",
permission: "account:read",
},
{
href: "/app/settings/roles",
path: "/settings/roles",
label: "角色权限",
icon: "roles",
permission: "role:read",
},
{
href: "/app/settings/audit",
path: "/settings/audit",
label: "审计日志",
icon: "audit",
permission: "audit:read",
},
{
href: "/app/settings/status",
path: "/settings/status",
label: "运行状态",
icon: "status",
permission: "incident:read",