Skip to content

Commit

Permalink
Merge pull request #558 from Ferlab-Ste-Justine/feat/presc-341
Browse files Browse the repository at this point in the history
feat: PRESC-341 option show ldm assigment
  • Loading branch information
claudia1296 authored Dec 13, 2024
2 parents 35eb315 + b62a4d4 commit 7e40ca7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
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

0 comments on commit 7e40ca7

Please sign in to comment.