diff --git a/apps/new/widget/components/project/ProfileCard.jsx b/apps/new/widget/components/project/ProfileCard.jsx new file mode 100644 index 00000000..52216fe5 --- /dev/null +++ b/apps/new/widget/components/project/ProfileCard.jsx @@ -0,0 +1,98 @@ +const MutedText = styled.span` + color: #818181; + + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 20px; /* 125% */ +`; + +const AccountName = styled.span` + color: #818181; + font-size: 16px; + font-style: normal; + font-weight: 500; + line-height: 20px; + + max-width: 30ch; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +`; + +const ProfileCard = (props) => { + const accountId = props.accountId ?? context.accountId; + const link = props.link ?? true; + // const hideAccountId = props.hideAccountId; + // const hideName = props.hideName; + const hideImage = props.hideImage; + const iconOnly = props.iconOnly; + const openLinkInNewTab = props.openLinkInNewTab ?? false; + + const profile = props.profile ?? Social.getr(`${accountId}/profile`); + + const name = profile.name ?? accountId; + const title = props.title ?? `${name} @${accountId}`; + const tooltip = + props.tooltip && (props.tooltip === true ? title : props.tooltip); + + let inner = ( +
+ {!hideImage && ( + + )} + {!iconOnly && ( +
+ {name} + @{accountId} +
+ )} +
+ ); + + inner = link ? ( + + {inner} + + ) : ( + {inner} + ); + + if (props.tooltip === true) { + return ( + + ); + } + if (tooltip) { + inner = ( + {tooltip}}> + {inner} + + ); + } + return
{inner}
; +}; + +return ProfileCard(props); diff --git a/apps/new/widget/page/project/TaskEditor.jsx b/apps/new/widget/page/project/TaskEditor.jsx index 6593c84b..375d0638 100644 --- a/apps/new/widget/page/project/TaskEditor.jsx +++ b/apps/new/widget/page/project/TaskEditor.jsx @@ -13,6 +13,7 @@ const task = props.task; const onEditTask = props.onEditTask; const onAddTask = props.onAddTask; const project = props.project; +const isEditTask = props.isEditTask; const [taskDetail, setTaskDetail] = useState(task); @@ -136,6 +137,7 @@ return ( list: [...(taskDetail.list ?? []), { ...listItem }], }) } + data-testid="add-task-item" > diff --git a/apps/new/widget/page/project/tabs/Task.jsx b/apps/new/widget/page/project/tabs/Task.jsx index e8ebbc07..e1b45884 100644 --- a/apps/new/widget/page/project/tabs/Task.jsx +++ b/apps/new/widget/page/project/tabs/Task.jsx @@ -369,6 +369,7 @@ const DropdownMenu = ({ columnTitle, item, index, changeStatusOptions }) => { onBlur={() => handleDropdownToggle(columnTitle, index, false)} >