From 76ab02724aac542909e3f1637b37827beba83312 Mon Sep 17 00:00:00 2001 From: cedric karungu Date: Fri, 26 Jan 2024 06:28:26 +0200 Subject: [PATCH 1/8] fix: collaborate errors --- apps/web/app/[locale]/settings/team/page.tsx | 2 +- apps/web/components/shared/collaborate/index.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/app/[locale]/settings/team/page.tsx b/apps/web/app/[locale]/settings/team/page.tsx index a747a50bc..950603f21 100644 --- a/apps/web/app/[locale]/settings/team/page.tsx +++ b/apps/web/app/[locale]/settings/team/page.tsx @@ -37,7 +37,7 @@ const Team = () => { {!user ? ( ) : ( - +
diff --git a/apps/web/components/shared/collaborate/index.tsx b/apps/web/components/shared/collaborate/index.tsx index 696a2d77c..4ba995aab 100644 --- a/apps/web/components/shared/collaborate/index.tsx +++ b/apps/web/components/shared/collaborate/index.tsx @@ -92,7 +92,7 @@ const Collaborate = () => { {members.map((member) => ( { handleMemberClick(member); @@ -135,7 +135,7 @@ const Collaborate = () => {

{member?.name}

{member?.email}

- {selectedMemberIds.includes(member.id) ? ( + {selectedMemberIds.includes(member?.id) ? ( ) : null} @@ -148,7 +148,7 @@ const Collaborate = () => {
{collaborativeMembers.map((member) => (
Date: Fri, 26 Jan 2024 06:34:01 +0200 Subject: [PATCH 2/8] fix: Shared Tasks Components errors --- apps/web/components/shared/tasks/assigned-tasks.tsx | 2 +- apps/web/components/shared/tasks/unassigned-task.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/components/shared/tasks/assigned-tasks.tsx b/apps/web/components/shared/tasks/assigned-tasks.tsx index 9eba02ff9..8e80b7489 100644 --- a/apps/web/components/shared/tasks/assigned-tasks.tsx +++ b/apps/web/components/shared/tasks/assigned-tasks.tsx @@ -48,7 +48,7 @@ const AssignedTask = ({ now = false, task }: ITaskDetailCard) => {
{`#${task && task.taskNumber} `} {task && task.title} diff --git a/apps/web/components/shared/tasks/unassigned-task.tsx b/apps/web/components/shared/tasks/unassigned-task.tsx index 014971dcf..e7921069d 100644 --- a/apps/web/components/shared/tasks/unassigned-task.tsx +++ b/apps/web/components/shared/tasks/unassigned-task.tsx @@ -50,7 +50,7 @@ const UnAssignedTask = ({ now = false, task }: ITaskDetailCard) => {
{`#${task && task.taskNumber} `} {task && task.title} From 779fd4b4ad5d7d2a83f3ade6f2a1eb588e89fbb5 Mon Sep 17 00:00:00 2001 From: cedric karungu Date: Fri, 26 Jan 2024 06:39:36 +0200 Subject: [PATCH 3/8] fix: Tasks Page Component --- .../task/details-section/blocks/task-secondary-info.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx b/apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx index 300dd7d14..d0617e95f 100644 --- a/apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx +++ b/apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx @@ -150,7 +150,7 @@ const TaskSecondaryInfo = () => { taskStatusClassName="text-[0.625rem] h-[1.5625rem] max-w-[7.6875rem] rounded 3xl:text-xs" /> - {tags && tags.length > 0 && ( + {tags.length > 0 && (
{tags.map((tag, i) => { @@ -225,11 +225,11 @@ const TaskSecondaryInfo = () => { const EpicParent = ({ task }: { task: ITeamTask }) => { const t = useTranslations(); - if (task.issueType === 'Story') { + if (task?.issueType === 'Story') { return <>; } - return (!task.issueType || task.issueType === 'Task' || task.issueType === 'Bug') && task?.rootEpic ? ( + return (!task?.issueType || task?.issueType === 'Task' || task?.issueType === 'Bug') && task?.rootEpic ? ( From d870932845b2bb3c94a142a604007e88cdcebbd6 Mon Sep 17 00:00:00 2001 From: cedric karungu Date: Fri, 26 Jan 2024 06:46:38 +0200 Subject: [PATCH 4/8] fix: Lib Components errors --- apps/web/lib/components/inputs/input.tsx | 1 - apps/web/lib/components/svgs/icons.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/web/lib/components/inputs/input.tsx b/apps/web/lib/components/inputs/input.tsx index 63a1b9e6b..c1baa763c 100644 --- a/apps/web/lib/components/inputs/input.tsx +++ b/apps/web/lib/components/inputs/input.tsx @@ -130,7 +130,6 @@ export const TimeInputField = forwardRef( Date: Fri, 26 Jan 2024 07:08:15 +0200 Subject: [PATCH 5/8] fix: Lib Features Tasks errors --- apps/web/lib/components/color-picker.tsx | 6 ++---- apps/web/lib/components/emoji-picker.tsx | 4 ++-- apps/web/lib/components/typography.tsx | 8 ++++++-- apps/web/lib/features/task/task-card.tsx | 4 ++-- apps/web/lib/features/task/task-status.tsx | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/apps/web/lib/components/color-picker.tsx b/apps/web/lib/components/color-picker.tsx index e052bcd9b..9e64308c5 100644 --- a/apps/web/lib/components/color-picker.tsx +++ b/apps/web/lib/components/color-picker.tsx @@ -94,7 +94,7 @@ export const ColorPicker = ({
diff --git a/apps/web/lib/components/typography.tsx b/apps/web/lib/components/typography.tsx index 4f6d2a9e8..8b737cf94 100644 --- a/apps/web/lib/components/typography.tsx +++ b/apps/web/lib/components/typography.tsx @@ -138,9 +138,13 @@ Text.Heading.displayName = 'TextHeading'; *
{/* TaskCardMenu */} - {task && memberInfo && currentMember && ( + {task && currentMember && ( )}
@@ -235,7 +235,7 @@ export function TaskCard(props: Props) { setLoading(load)} /> - {task && memberInfo && currentMember && ( + {task && currentMember && ( )}
diff --git a/apps/web/lib/features/task/task-status.tsx b/apps/web/lib/features/task/task-status.tsx index 462adafa9..68f993973 100644 --- a/apps/web/lib/features/task/task-status.tsx +++ b/apps/web/lib/features/task/task-status.tsx @@ -151,7 +151,7 @@ export function useActiveTaskStatus( const { item, items, onChange } = useStatusValue({ status: status, - value: props.defaultValue ? props.defaultValue : task ? task[field] : props.defaultValue || undefined, + value: props.defaultValue ? props.defaultValue : task ? task[field] : undefined, onValueChange: onItemChange, defaultValues: props.defaultValues }); From db4e7234fb1eb39993112718170a076c7a6da0fa Mon Sep 17 00:00:00 2001 From: cedric karungu Date: Fri, 26 Jan 2024 07:35:41 +0200 Subject: [PATCH 6/8] fix: lib Components errors --- apps/web/lib/features/team-member-cell.tsx | 8 ++++---- apps/web/lib/features/team-members.tsx | 2 +- apps/web/lib/features/team/team-item.tsx | 2 +- apps/web/lib/settings/integration-setting.tsx | 2 +- apps/web/lib/settings/issue-types-form.tsx | 6 +++--- apps/web/lib/settings/member-table.tsx | 10 +--------- apps/web/lib/settings/team-avatar.tsx | 2 +- apps/web/lib/settings/team-size-popover.tsx | 6 ++---- apps/web/lib/settings/transfer-team-modal.tsx | 6 +++--- 9 files changed, 17 insertions(+), 27 deletions(-) diff --git a/apps/web/lib/features/team-member-cell.tsx b/apps/web/lib/features/team-member-cell.tsx index 17c152c42..c7962501f 100644 --- a/apps/web/lib/features/team-member-cell.tsx +++ b/apps/web/lib/features/team-member-cell.tsx @@ -13,7 +13,7 @@ import get from 'lodash/get'; export function TaskCell({ row }: { row: any }) { const member = row.original as OT_Member; const memberInfo = useTeamMemberCard(member); - const taskEdition = useTMCardTaskEdit(memberInfo?.memberTask); + const taskEdition = useTMCardTaskEdit(memberInfo.memberTask); const publicTeam = false; return ( @@ -43,8 +43,8 @@ export function WorkedOnTaskCell({ row }: { row: any }) { ); @@ -53,7 +53,7 @@ export function WorkedOnTaskCell({ row }: { row: any }) { export function TaskEstimateInfoCell({ row }: { row: any }) { const member = row.original as OT_Member; const memberInfo = useTeamMemberCard(member); - const taskEdition = useTMCardTaskEdit(memberInfo?.memberTask); + const taskEdition = useTMCardTaskEdit(memberInfo.memberTask); return ( (sortByWorkStatus(a, b) ? -1 : 1)); const blockViewMembers = - activeFilter == 'all' ? orderedMembers : orderedMembers.filter((m) => m.timerStatus == activeFilter) || []; + activeFilter == 'all' ? orderedMembers : orderedMembers.filter((m) => m.timerStatus === activeFilter) || []; const currentUser = members.find((m) => m.employee.userId === user?.id); const $members = members diff --git a/apps/web/lib/features/team/team-item.tsx b/apps/web/lib/features/team/team-item.tsx index ab274ae03..61f5a288b 100644 --- a/apps/web/lib/features/team/team-item.tsx +++ b/apps/web/lib/features/team/team-item.tsx @@ -122,7 +122,7 @@ export function TeamItem({ style={{ background: color || `${stc(title)}80`, - ...(color ? { color: color ? readableColorHex : undefined } : {}) + ...(color ? { color: readableColorHex } : {}) }} > {logo && isValidUrl(logo) ? ( diff --git a/apps/web/lib/settings/integration-setting.tsx b/apps/web/lib/settings/integration-setting.tsx index f83d26852..cb858fe87 100644 --- a/apps/web/lib/settings/integration-setting.tsx +++ b/apps/web/lib/settings/integration-setting.tsx @@ -31,7 +31,7 @@ export const IntegrationSetting = () => { } as { [x: string]: string }; }, [locale]); - const queries = new URLSearchParams(params || {}); + const queries = new URLSearchParams(params); const url = `https://github.com/apps/${GITHUB_APP_NAME.value}/installations/new?${queries.toString()}`; const { activeTeam } = useOrganizationTeams(); diff --git a/apps/web/lib/settings/issue-types-form.tsx b/apps/web/lib/settings/issue-types-form.tsx index cd4843bcf..2852ced95 100644 --- a/apps/web/lib/settings/issue-types-form.tsx +++ b/apps/web/lib/settings/issue-types-form.tsx @@ -181,9 +181,9 @@ export const IssueTypesForm = () => { issueTypes.map((type) => ( { setCreateNew(false); setEdit(type); diff --git a/apps/web/lib/settings/member-table.tsx b/apps/web/lib/settings/member-table.tsx index a3a3b7329..19ceafa53 100644 --- a/apps/web/lib/settings/member-table.tsx +++ b/apps/web/lib/settings/member-table.tsx @@ -207,15 +207,7 @@ export const MemberTable = ({ members }: { members: OT_Member[] }) => { {/* TODO dynamic */} - + diff --git a/apps/web/lib/settings/team-avatar.tsx b/apps/web/lib/settings/team-avatar.tsx index 2e6f56e15..88de9f198 100644 --- a/apps/web/lib/settings/team-avatar.tsx +++ b/apps/web/lib/settings/team-avatar.tsx @@ -80,7 +80,7 @@ export const TeamAvatar = ({ disabled, bgColor }: { disabled: boolean; bgColor?: )} style={{ backgroundColor: bgColor || `${stc(activeTeam?.name || '')}80`, - ...(bgColor ? { color: bgColor ? readableColorHex : undefined } : {}) + ...(bgColor ? { color: readableColorHex } : {}) }} > {activeTeam?.image?.thumbUrl || activeTeam?.image?.fullUrl ? ( diff --git a/apps/web/lib/settings/team-size-popover.tsx b/apps/web/lib/settings/team-size-popover.tsx index 1bf7121cd..dfe730b36 100644 --- a/apps/web/lib/settings/team-size-popover.tsx +++ b/apps/web/lib/settings/team-size-popover.tsx @@ -108,10 +108,8 @@ const TeamSize = ({
{isTeamManager && (