Skip to content

Commit

Permalink
feat(mis-web): 租户管理的用户列表中的关联账户支持跳转至账户的管理成员页面 (#1397)
Browse files Browse the repository at this point in the history
  • Loading branch information
piccaSun authored Aug 14, 2024
1 parent b2ee159 commit 6ab5659
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/green-apricots-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@scow/mis-web": patch
---

增加租户管理下的用户列表的关联账户跳转到账户管理的功能
12 changes: 11 additions & 1 deletion apps/mis-web/src/pageComponents/tenant/AdminUserTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { DEFAULT_PAGE_SIZE } from "@scow/lib-web/build/utils/pagination";
import { Static } from "@sinclair/typebox";
import { App, Button, Divider, Form, Input, Space, Table } from "antd";
import { SortOrder } from "antd/es/table/interface";
import Link from "next/link";
import React, { useCallback, useMemo, useState } from "react";
import { api } from "src/apis";
import { ChangePasswordModalLink } from "src/components/ChangePasswordModal";
Expand Down Expand Up @@ -240,7 +241,16 @@ export const AdminUserTable: React.FC<Props> = ({
<Table.Column<FullUserInfo>
dataIndex="affiliatedAccountNames"
title={t(p("affiliatedAccountName"))}
render={(_, r) => r.accountAffiliations.map((x) => x.accountName).join(", ")}
render={(_, r) => (
<>
{r.accountAffiliations.map((x, index) => (
<>
<Link href={`/tenant/accounts/${x.accountName}/users`}>{x.accountName}</Link>
{index < r.accountAffiliations.length - 1 && ", "}
</>
))}
</>
)}
/>
<Table.Column<FullUserInfo>
dataIndex="changePassword"
Expand Down

0 comments on commit 6ab5659

Please sign in to comment.