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: PRESC-341 option show ldm assigment #558

Merged
merged 1 commit into from
Dec 13, 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
3 changes: 3 additions & 0 deletions packages/ui/Release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 10.14.5 2024-12-13
- feat: PRESC-341 option show ldm assigment

### 10.14.4 2024-12-11
- fix: SJIP-1057 remove label and input native tooltips

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ferlab/ui",
"version": "10.14.4",
"version": "10.14.5",
"description": "Core components for scientific research data portals",
"publishConfig": {
"access": "public"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type TAssignmentsSelect = {
assignedPractionnerRoles: string[];
dictionary?: IAssignmentsDictionary | Record<string, never>;
loading?: boolean;
showLdm?: boolean;
};

const tagRender =
Expand Down Expand Up @@ -57,6 +58,7 @@ const renderOptions = (
setSearchValue: React.Dispatch<React.SetStateAction<string | undefined>>,
selectedItems: TPractitionnerInfo[],
setSelectedItems: React.Dispatch<React.SetStateAction<TPractitionnerInfo[]>>,
showLdm: boolean,
) =>
options?.map((value: TPractitionnerInfo) => (
<Button
Expand All @@ -73,6 +75,7 @@ const renderOptions = (
email={value.email ? value.email : ''}
name={getPractitionnerName(value.name)}
organization={value.ldm}
showLdm={showLdm}
/>
</Button>
));
Expand All @@ -83,6 +86,7 @@ export const AssignmentsSelect = ({
handleSelect,
loading,
options,
showLdm = true,
visibleOptions = false,
}: TAssignmentsSelect): ReactElement => {
const noAssignDefaultValue = [
Expand Down Expand Up @@ -164,6 +168,7 @@ export const AssignmentsSelect = ({
setSearchValue,
selectedItems,
setSelectedItems,
showLdm,
)}
</ScrollContent>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export type TAssignmentsTag = {
handleClose?: () => void;
unAssign?: boolean;
dictionary?: IAssignmentsDictionary | Record<string, never>;
showLdm?: boolean;
};

const onPreventMouseDown = (event: React.MouseEvent<HTMLSpanElement>) => {
Expand All @@ -31,6 +32,7 @@ export const AssignmentsTag = ({
handleClose,
name,
organization,
showLdm = true,
unAssign = false,
}: TAssignmentsTag): ReactElement => {
const { Text } = Typography;
Expand All @@ -54,7 +56,7 @@ export const AssignmentsTag = ({
<UserAvatar className={styles.userAvatar} size={24} userName={name} />
<Space className={styles.userInfo} size={4}>
<Text strong>{name}</Text>
<Text type="secondary">{organization}</Text>
{showLdm && <Text type="secondary">{organization}</Text>}
</Space>
</>
)}
Expand Down
Loading