@erxes/ui 4.0.0-v2.19 → 4.0.0-v2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -45,7 +45,7 @@ const MemberList = ({ value, members, noneLabel, onPick }) => {
|
|
|
45
45
|
items: team.data?.data ?? [],
|
|
46
46
|
itemKey: (member) => ({
|
|
47
47
|
id: member.id,
|
|
48
|
-
label: `${memberName(member)} ${member.email}`
|
|
48
|
+
label: `${memberName(member)} ${member.email ?? ""}`
|
|
49
49
|
}),
|
|
50
50
|
renderItem: (member) => /* @__PURE__ */ jsx(MemberInline, {
|
|
51
51
|
memberId: member.id,
|
|
@@ -2,7 +2,8 @@ import { UseQueryOptions } from "@tanstack/react-query";
|
|
|
2
2
|
/** A team member as the pickers show one. Core's `User` has these fields and more. */
|
|
3
3
|
export interface Member {
|
|
4
4
|
id: string;
|
|
5
|
-
|
|
5
|
+
/** Empty for a member who doesn't sign in. */
|
|
6
|
+
email: string | null;
|
|
6
7
|
fullName: string | null;
|
|
7
8
|
username: string | null;
|
|
8
9
|
avatarUrl: string | null;
|
|
@@ -2,7 +2,7 @@ import { useMemo } from "react";
|
|
|
2
2
|
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
|
3
3
|
// src/modules/pickers/members.ts
|
|
4
4
|
/** How a member reads: the display name, else the username, else the email. */
|
|
5
|
-
const memberName = (member) => member.fullName || member.username || member.email;
|
|
5
|
+
const memberName = (member) => member.fullName || member.username || member.email || "";
|
|
6
6
|
/** Members by id, any status. The active team answers most; only the rest are fetched. */
|
|
7
7
|
const useMembersById = (ids, members) => {
|
|
8
8
|
const team = useQuery(members.team);
|