Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mis-web): 租户管理的用户列表中的关联账户支持跳转至账户的管理成员页面 #1397

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading