From 30dbe3823635e218cbc560b40cd51ab3c0af451c Mon Sep 17 00:00:00 2001 From: anishali2 Date: Sun, 3 Mar 2024 23:19:18 +0500 Subject: [PATCH 01/13] fix(Kanban): working on kanban section functionality --- apps/web/app/[locale]/kanban/page.tsx | 20 ++- .../components/ui/svgs/circular-progress.tsx | 2 +- apps/web/lib/components/image-overlapper.tsx | 115 +++++++++++------- apps/web/lib/components/kanban-card.tsx | 52 +++++--- 4 files changed, 125 insertions(+), 64 deletions(-) diff --git a/apps/web/app/[locale]/kanban/page.tsx b/apps/web/app/[locale]/kanban/page.tsx index 4c8bafc48..23db52770 100644 --- a/apps/web/app/[locale]/kanban/page.tsx +++ b/apps/web/app/[locale]/kanban/page.tsx @@ -1,7 +1,7 @@ 'use client'; import { KanbanTabs } from '@app/constants'; -import { useOrganizationTeams } from '@app/hooks'; +import { useAuthenticateUser, useModal, useOrganizationTeams } from '@app/hooks'; import { useKanban } from '@app/hooks/features/useKanban'; import KanbanBoardSkeleton from '@components/shared/skeleton/KanbanBoardSkeleton'; import { withAuthentication } from 'lib/app/authenticator'; @@ -17,9 +17,12 @@ import { clsxm } from '@app/utils'; import HeaderTabs from '@components/pages/main/header-tabs'; import { AddIcon, SearchNormalIcon, SettingFilterIcon, PeoplesIcon } from 'assets/svg'; import { Select, SelectContent, SelectItem, SelectTrigger } from '@components/ui/select'; +import { InviteFormModal } from 'lib/features/team/invite/invite-form-modal'; +import { userTimezone } from '@app/helpers'; const Kanban = () => { const { data } = useKanban(); + const { activeTeam } = useOrganizationTeams(); const t = useTranslations(); const params = useParams<{ locale: string }>(); @@ -47,6 +50,10 @@ const Kanban = () => { { name: t('common.YESTERDAY'), value: KanbanTabs.YESTERDAY }, { name: t('common.TOMORROW'), value: KanbanTabs.TOMORROW } ]; + const { user } = useAuthenticateUser(); + const { openModal, isOpen, closeModal } = useModal(); + const timezone = userTimezone(); + console.log('time-zone', timezone); return ( <> @@ -67,7 +74,10 @@ const Kanban = () => { {t('common.KANBAN')} {t('common.BOARD')}
- 08:00 ( UTC +04:30 ) + + {`(`} + {timezone.split('(')[1]} +
@@ -76,7 +86,10 @@ const Kanban = () => {
- @@ -180,6 +193,7 @@ const Kanban = () => { )} + ); }; diff --git a/apps/web/components/ui/svgs/circular-progress.tsx b/apps/web/components/ui/svgs/circular-progress.tsx index c6f257ff7..b4dba1cd1 100644 --- a/apps/web/components/ui/svgs/circular-progress.tsx +++ b/apps/web/components/ui/svgs/circular-progress.tsx @@ -44,7 +44,7 @@ export default function CircularProgress({ className="absolute text-xs font-normal text-black dark:text-white rotate-90" x-text={`${percentage}%`} > - {percentage}H + {percentage}%{' '} diff --git a/apps/web/lib/components/image-overlapper.tsx b/apps/web/lib/components/image-overlapper.tsx index 25c5bd942..2cf1f8bcc 100644 --- a/apps/web/lib/components/image-overlapper.tsx +++ b/apps/web/lib/components/image-overlapper.tsx @@ -1,6 +1,6 @@ -import Link from 'next/link'; +import { Popover, PopoverContent, PopoverTrigger } from '@components/ui/popover'; import Image from 'next/image'; -import { Tooltip } from 'lib/components'; +import Link from 'next/link'; import Skeleton from 'react-loading-skeleton'; export interface ImageOverlapperProps { @@ -18,56 +18,79 @@ export default function ImageOverlapper({ radius?: number; displayImageCount?: number; }) { - const imageRadius = radius; + // Split the array into two arrays based on the display number + const firstArray = images.slice(0, displayImageCount); + const widthCalculate = images.slice(0, 5); + const secondArray = images.slice(displayImageCount); + const isMoreThanDisplay = images.length > displayImageCount; const imageLength = images.length; - const numberOfImagesDisplayed = displayImageCount; - const totalLength = (imageLength + 1) * imageRadius; - - const stackImages = (index: number, length: number) => { - const total_length = (length + 1) * imageRadius; - return { - zIndex: (index + 1).toString(), - right: `calc(${total_length - imageRadius * (index + 2)}px)` - }; - }; + if (imageLength == 0) { + return ; + } return ( -
- {imageLength > 0 ? ( -
- {images.map((image: ImageOverlapperProps, index: number) => { - if (index < numberOfImagesDisplayed) { - return ( - - - {`${image.alt} - - - ); - } - })} - {images.length > numberOfImagesDisplayed && ( +
+ {firstArray.map((image, index) => ( + +
+ {`${image.alt} +
+ + ))} + {secondArray.length > 0 && ( + +
- {imageLength - numberOfImagesDisplayed < 100 ? imageLength - numberOfImagesDisplayed : 99}+ + {secondArray.length < 100 ? secondArray.length : 99}+ +
+
+ +
+ {secondArray.map((image: ImageOverlapperProps, index: number) => { + return ( + +
+ {`${image.alt} +

{image.alt}

+
+ + ); + })}
- )} -
- ) : ( - + + )}
); diff --git a/apps/web/lib/components/kanban-card.tsx b/apps/web/lib/components/kanban-card.tsx index 66a8a788e..fc83ffca8 100644 --- a/apps/web/lib/components/kanban-card.tsx +++ b/apps/web/lib/components/kanban-card.tsx @@ -6,17 +6,17 @@ import { useCollaborative, useOrganizationTeams, useTMCardTaskEdit, - useTeamMemberCard, - useTimerView + useTaskStatistics, + useTeamMemberCard } from '@app/hooks'; import ImageComponent, { ImageOverlapperProps } from './image-overlapper'; import { TaskInput, TaskIssueStatus } from 'lib/features'; import Link from 'next/link'; import CircularProgress from '@components/ui/svgs/circular-progress'; import { HorizontalSeparator } from './separator'; -import { pad } from '@app/helpers'; -import { TaskStatus } from '@app/constants'; +import { secondsToTime } from '@app/helpers'; import { UserTeamCardMenu } from 'lib/features/team/user-team-card/user-team-card-menu'; +import { TaskStatus } from '@app/constants'; function getStyle(provided: DraggableProvided, style: any) { if (!style) { @@ -125,16 +125,26 @@ type ItemProps = { */ export default function Item(props: ItemProps) { const { item, isDragging, provided, style, index } = props; + // const seconds = useRecoilValue(timerSecondsState); - const { hours, minutes, seconds } = useTimerView(); + // const { hours, minutes, seconds } = useTimerView(); const { activeTeam } = useOrganizationTeams(); const { user } = useAuthenticateUser(); + const { getEstimation /*, addSeconds*/ } = useTaskStatistics(0); const members = activeTeam?.members || []; const currentUser = members.find((m) => m.employee.userId === user?.id); + let totalWorkedTasksTimer = 0; + activeTeam?.members?.forEach((member) => { + const totalWorkedTasks = member?.totalWorkedTasks?.find((i) => i.id === item?.id) || null; + if (totalWorkedTasks) { + totalWorkedTasksTimer += totalWorkedTasks.duration; + } + }); const memberInfo = useTeamMemberCard(currentUser); const taskEdition = useTMCardTaskEdit(memberInfo.memberTask); + const taskAssignee: ImageOverlapperProps[] = item.members.map((member: any) => { return { id: member.user.id, @@ -145,7 +155,22 @@ export default function Item(props: ItemProps) { const { collaborativeSelect } = useCollaborative(memberInfo.memberUser); const menu = <>{!collaborativeSelect && }; + const progress = getEstimation( + null, + item, + /*addSeconds || */ totalWorkedTasksTimer || 1, + item?.estimate || 0 //<-- task?.estimate || currentMember?.lastWorkedTask?.estimate || 0 - removed as when certain task's timer was active it was affecting the timers with no estimations. Was taking user's previous task's estimation + ); + const currentMember = activeTeam?.members.find((member) => member.id === memberInfo?.member?.id || item?.id); + const { h, m } = secondsToTime( + (currentMember?.totalWorkedTasks && + currentMember?.totalWorkedTasks?.length && + currentMember?.totalWorkedTasks + .filter((t) => t.id === item?.id) + .reduce((previousValue, currentValue) => previousValue + currentValue.duration, 0)) || + 0 + ); return (
)}
- + +
-
-
+
+
{item.status === TaskStatus.INPROGRESS ? (
Live:

- {pad(hours)}:{pad(minutes)}:{pad(seconds)}{' '} + {h}h: {m}:m

) : (
Worked: -

- {pad(hours)}:{pad(minutes)}:{pad(seconds)}{' '} +

+ {h}h: {m}:m

)}
-
- -
+ {item.issueType && (
Date: Sun, 3 Mar 2024 21:54:34 +0200 Subject: [PATCH 02/13] Fix: Invite DropDown (#2260) * fix: Email Input on Invite Pop Up * fix: restore AutoCompleteDropdown for emails in Invite * fix: hide DropDown by clicking Esc --- apps/web/lib/components/auto-complete-dropdown.tsx | 10 +++++++--- .../lib/features/team/invite/invite-email-dropdown.tsx | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/web/lib/components/auto-complete-dropdown.tsx b/apps/web/lib/components/auto-complete-dropdown.tsx index 6de5192a0..a91b05ac5 100644 --- a/apps/web/lib/components/auto-complete-dropdown.tsx +++ b/apps/web/lib/components/auto-complete-dropdown.tsx @@ -59,6 +59,10 @@ export function AutoCompleteDropdown({ if (event.key === 'Enter' && handleAddNew && useHandleKeyUp) { handleAddNew(query); } + + if (event.key === 'Escape') { + handleAddNew(query); + } }, [query, handleAddNew, useHandleKeyUp] ); @@ -70,7 +74,7 @@ export function AutoCompleteDropdown({ placeholder={placeholder} onChange={(event) => setQuery(event.target.value)} className={clsxm( - 'input-border', + 'input-border ', 'w-full flex justify-between rounded-[0.625rem] px-3 py-2 text-sm items-center bg-transparent', 'bg-light--theme-light dark:bg-dark--theme-light outline-none', 'font-normal', @@ -97,9 +101,9 @@ export function AutoCompleteDropdown({ )} > {/* This should only show when New item needs to be created */} {query && handleAddNew && ( diff --git a/apps/web/lib/features/team/invite/invite-email-dropdown.tsx b/apps/web/lib/features/team/invite/invite-email-dropdown.tsx index 1afe2d05d..9de772ca1 100644 --- a/apps/web/lib/features/team/invite/invite-email-dropdown.tsx +++ b/apps/web/lib/features/team/invite/invite-email-dropdown.tsx @@ -43,7 +43,7 @@ export const InviteEmailDropdown = ({ return ( <> Date: Mon, 4 Mar 2024 01:23:55 +0500 Subject: [PATCH 03/13] fix(Kanban): working on kanban section functionality --- apps/web/app/[locale]/kanban/page.tsx | 1 - apps/web/lib/components/kanban-card.tsx | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/web/app/[locale]/kanban/page.tsx b/apps/web/app/[locale]/kanban/page.tsx index 23db52770..0310c07e5 100644 --- a/apps/web/app/[locale]/kanban/page.tsx +++ b/apps/web/app/[locale]/kanban/page.tsx @@ -53,7 +53,6 @@ const Kanban = () => { const { user } = useAuthenticateUser(); const { openModal, isOpen, closeModal } = useModal(); const timezone = userTimezone(); - console.log('time-zone', timezone); return ( <> diff --git a/apps/web/lib/components/kanban-card.tsx b/apps/web/lib/components/kanban-card.tsx index fc83ffca8..8f40d821f 100644 --- a/apps/web/lib/components/kanban-card.tsx +++ b/apps/web/lib/components/kanban-card.tsx @@ -159,11 +159,11 @@ export default function Item(props: ItemProps) { null, item, /*addSeconds || */ totalWorkedTasksTimer || 1, - item?.estimate || 0 //<-- task?.estimate || currentMember?.lastWorkedTask?.estimate || 0 - removed as when certain task's timer was active it was affecting the timers with no estimations. Was taking user's previous task's estimation + item.estimate || 0 //<-- task?.estimate || currentMember?.lastWorkedTask?.estimate || 0 - removed as when certain task's timer was active it was affecting the timers with no estimations. Was taking user's previous task's estimation ); - const currentMember = activeTeam?.members.find((member) => member.id === memberInfo?.member?.id || item?.id); + const currentMember = activeTeam?.members.find((member) => member.id === memberInfo.member?.id || item?.id); - const { h, m } = secondsToTime( + const { h, m, s } = secondsToTime( (currentMember?.totalWorkedTasks && currentMember?.totalWorkedTasks?.length && currentMember?.totalWorkedTasks @@ -253,19 +253,19 @@ export default function Item(props: ItemProps) {
Live:

- {h}h: {m}:m + {h}h: {m}:m {s}:s

) : (
Worked:

- {h}h: {m}:m + {h}h: {m}:m {s}:s

)}
- + {item.issueType && (
Date: Mon, 4 Mar 2024 03:06:37 +0500 Subject: [PATCH 04/13] added tooltip on user stack --- apps/web/lib/components/image-overlapper.tsx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/web/lib/components/image-overlapper.tsx b/apps/web/lib/components/image-overlapper.tsx index 2cf1f8bcc..08dfec156 100644 --- a/apps/web/lib/components/image-overlapper.tsx +++ b/apps/web/lib/components/image-overlapper.tsx @@ -2,7 +2,7 @@ import { Popover, PopoverContent, PopoverTrigger } from '@components/ui/popover' import Image from 'next/image'; import Link from 'next/link'; import Skeleton from 'react-loading-skeleton'; - +import { Tooltip } from './tooltip'; export interface ImageOverlapperProps { id: string; url: string; @@ -42,14 +42,16 @@ export default function ImageOverlapper({ className="absolute hover:!z-20 transition-all hover:scale-110" style={{ zIndex: index + 1, left: index * 30, top: isMoreThanDisplay ? -8 : -16 }} > - {`${image.alt} + + {`${image.alt} +
))} From 89aa4c5055ebd4034547bf41715674368647e95f Mon Sep 17 00:00:00 2001 From: anishali2 Date: Mon, 4 Mar 2024 03:45:15 +0500 Subject: [PATCH 05/13] [fix]: move the 404 page into main pages --- apps/web/app/[locale]/{[...not-found]/page.tsx => 404.tsx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/web/app/[locale]/{[...not-found]/page.tsx => 404.tsx} (100%) diff --git a/apps/web/app/[locale]/[...not-found]/page.tsx b/apps/web/app/[locale]/404.tsx similarity index 100% rename from apps/web/app/[locale]/[...not-found]/page.tsx rename to apps/web/app/[locale]/404.tsx From a104efa34a982f33a8cb07691f8d83294f481be9 Mon Sep 17 00:00:00 2001 From: Cedric Karungu Date: Mon, 4 Mar 2024 13:37:55 +0200 Subject: [PATCH 06/13] fix: TableView Header & Horizontal Scrolling --- apps/web/app/[locale]/page-component.tsx | 2 +- apps/web/app/[locale]/settings/personal/page.tsx | 9 +++++---- apps/web/app/[locale]/settings/team/page.tsx | 4 ++-- apps/web/lib/features/team-member-cell.tsx | 13 ++++--------- .../lib/features/team/invite/user-invite-card.tsx | 8 ++++---- apps/web/lib/features/team/user-team-card/index.tsx | 2 +- .../lib/features/team/user-team-card/task-info.tsx | 2 +- .../team/user-team-table/user-team-table-header.tsx | 10 +++++----- 8 files changed, 23 insertions(+), 27 deletions(-) diff --git a/apps/web/app/[locale]/page-component.tsx b/apps/web/app/[locale]/page-component.tsx index 24e9ef2ba..fca662406 100644 --- a/apps/web/app/[locale]/page-component.tsx +++ b/apps/web/app/[locale]/page-component.tsx @@ -78,7 +78,7 @@ function MainPage() { -
+
{isTeamMember ? : null} {view === IssuesView.CARDS && isTeamMember ? ( diff --git a/apps/web/app/[locale]/settings/personal/page.tsx b/apps/web/app/[locale]/settings/personal/page.tsx index 4646d5c2f..6b6810d2c 100644 --- a/apps/web/app/[locale]/settings/personal/page.tsx +++ b/apps/web/app/[locale]/settings/personal/page.tsx @@ -6,12 +6,13 @@ import { Accordian } from 'lib/components/accordian'; import Link from 'next/link'; import { useTranslations } from 'next-intl'; import { SyncZone } from 'lib/settings/sync.zone'; +import { Text } from 'lib/components'; const Personal = () => { const t = useTranslations(); return ( - <> +
); }; export default withAuthentication(Personal, { displayName: 'Personal' }); diff --git a/apps/web/app/[locale]/settings/team/page.tsx b/apps/web/app/[locale]/settings/team/page.tsx index f523a31de..f99f5bc3a 100644 --- a/apps/web/app/[locale]/settings/team/page.tsx +++ b/apps/web/app/[locale]/settings/team/page.tsx @@ -23,7 +23,7 @@ const Team = () => { const { isTeamMember, activeTeam } = useOrganizationTeams(); const { isTeamManager } = useIsMemberManager(user); return ( - <> +
{isTeamMember ? ( <> @@ -110,7 +110,7 @@ const Team = () => {
)} - +
); }; diff --git a/apps/web/lib/features/team-member-cell.tsx b/apps/web/lib/features/team-member-cell.tsx index c7962501f..fb8fc145f 100644 --- a/apps/web/lib/features/team-member-cell.tsx +++ b/apps/web/lib/features/team-member-cell.tsx @@ -17,12 +17,7 @@ export function TaskCell({ row }: { row: any }) { const publicTeam = false; return ( - + ); } @@ -32,7 +27,7 @@ export function UserInfoCell({ cell }: { cell: any }) { const publicTeam = get(cell, 'column.columnDef.meta.publicTeam', false); const memberInfo = useTeamMemberCard(member); - return ; + return ; } export function WorkedOnTaskCell({ row }: { row: any }) { @@ -45,7 +40,7 @@ export function WorkedOnTaskCell({ row }: { row: any }) { memberInfo={memberInfo} task={memberInfo.memberTask} isAuthUser={memberInfo.isAuthUser} - className="2xl:w-32 3xl:w-[8rem] min-w-[15rem] w-52 lg:w-1/5 flex flex-col gap-y-[1.125rem] justify-center" + className="2xl:w-48 3xl:w-[12rem] w-1/5 lg:px-4 flex flex-col gap-y-[1.125rem] justify-center" /> ); } @@ -60,7 +55,7 @@ export function TaskEstimateInfoCell({ row }: { row: any }) { memberInfo={memberInfo} edition={taskEdition} activeAuthTask={true} - className="lg:px-3 2xl:w-52 3xl:w-64 min-w-[15rem] w-52 lg:w-1/5" + className="lw-1/5 lg:px-3 2xl:w-52 3xl:w-64" /> ); } diff --git a/apps/web/lib/features/team/invite/user-invite-card.tsx b/apps/web/lib/features/team/invite/user-invite-card.tsx index 738a19b14..82ea889a8 100644 --- a/apps/web/lib/features/team/invite/user-invite-card.tsx +++ b/apps/web/lib/features/team/invite/user-invite-card.tsx @@ -68,18 +68,18 @@ export function InvitedCard({ invitation, className }: Props) { {/* Task information */} - {t('common.TASK_TITTLE')} + {t('common.TASK_TITTLE')} {/* TaskTime */} -
+
{t('common.TODAY')}: 0h : 0m
{/* TaskEstimateInfo */} -
+
{/* : @@ -89,7 +89,7 @@ export function InvitedCard({ invitation, className }: Props) { {/* Card menu */} -
+
0h : 0m
diff --git a/apps/web/lib/features/team/user-team-card/index.tsx b/apps/web/lib/features/team/user-team-card/index.tsx index 7c2fe52ad..f2eb407c2 100644 --- a/apps/web/lib/features/team/user-team-card/index.tsx +++ b/apps/web/lib/features/team/user-team-card/index.tsx @@ -132,7 +132,7 @@ export function UserTeamCard({ {/* Task information */} -
+
diff --git a/apps/web/lib/features/team/user-team-table/user-team-table-header.tsx b/apps/web/lib/features/team/user-team-table/user-team-table-header.tsx index 68f815ae4..6c706626e 100644 --- a/apps/web/lib/features/team/user-team-table/user-team-table-header.tsx +++ b/apps/web/lib/features/team/user-team-table/user-team-table-header.tsx @@ -3,11 +3,11 @@ import React from 'react'; function UserTeamTableHeader() { return (
-

Name

-

Task

-

Worked on Task

-

Estimate

-

Action

+

Name

+

Task

+

Worked on Task

+

Estimate

+

Action

); } From a635046fffb68e6b0fe4657e55acc9fec0f58762 Mon Sep 17 00:00:00 2001 From: Cedric Karungu Date: Mon, 4 Mar 2024 13:58:49 +0200 Subject: [PATCH 07/13] fix: Idle Filter on Block View of TeamMembers --- apps/web/lib/features/team-members.tsx | 9 ++++-- .../user-team-block-header.tsx | 28 ++----------------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/apps/web/lib/features/team-members.tsx b/apps/web/lib/features/team-members.tsx index 1119ef926..c3400523b 100644 --- a/apps/web/lib/features/team-members.tsx +++ b/apps/web/lib/features/team-members.tsx @@ -25,7 +25,11 @@ export function TeamMembers({ publicTeam = false, kanbanView: view = IssuesView. const orderedMembers = [...members].sort((a, b) => (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 || (activeFilter == 'idle' && m.timerStatus === undefined) + ); const currentUser = members.find((m) => m.employee.userId === user?.id); const $members = members @@ -112,7 +116,8 @@ const sortByWorkStatus = (user_a: OT_Member, user_b: OT_Member) => { return user_a.timerStatus == 'running' || (user_a.timerStatus == 'online' && user_b.timerStatus != 'running') || (user_a.timerStatus == 'pause' && user_b.timerStatus !== 'running' && user_b.timerStatus !== 'online') || - (user_a.timerStatus == 'idle' && user_b.timerStatus == 'suspended') + (user_a.timerStatus == 'idle' && user_b.timerStatus == 'suspended') || + (user_a.timerStatus === undefined && user_b.timerStatus == 'suspended') ? true : false; }; diff --git a/apps/web/lib/features/team/user-team-block/user-team-block-header.tsx b/apps/web/lib/features/team/user-team-block/user-team-block-header.tsx index 13b912613..3ad755f58 100644 --- a/apps/web/lib/features/team/user-team-block/user-team-block-header.tsx +++ b/apps/web/lib/features/team/user-team-block/user-team-block-header.tsx @@ -41,6 +41,7 @@ export function UserTeamBlockHeader() { members?.map((item) => { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion membersStatusNumber[item.timerStatus!]++; + if (item.timerStatus === undefined) membersStatusNumber.idle += 1; }); return ( @@ -128,8 +129,7 @@ export function UserTeamBlockHeader() {

Paused

@@ -203,30 +203,6 @@ export function UserTeamBlockHeader() { )}
- {/*
- - {hook.filterType === 'search' && ( - { - hook.toggleFilterType('search'); - }} - /> - )} - -
*/} ); From 1a4ff24c456d816e4e205620571ff8921886cf6a Mon Sep 17 00:00:00 2001 From: Cedric Karungu Date: Mon, 4 Mar 2024 14:26:09 +0200 Subject: [PATCH 08/13] fix: borders of card of BlockView --- apps/web/lib/features/team/user-team-block/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/lib/features/team/user-team-block/index.tsx b/apps/web/lib/features/team/user-team-block/index.tsx index 07ea97078..565173a7b 100644 --- a/apps/web/lib/features/team/user-team-block/index.tsx +++ b/apps/web/lib/features/team/user-team-block/index.tsx @@ -83,7 +83,7 @@ export function UserTeamBlock({ className, active, member, publicTeam = false }: shadow="bigger" className={clsxm( 'relative items-center py-3 !px-4 dark:bg-[#1E2025] min-h-[7rem]', - ['dark:border border-t-[6px] ', cardColorType[timerStatusValue]], + ['dark:border border-t-[6px] dark:border-t-[6px]', cardColorType[timerStatusValue]], className )} > From 055fb814ab7820c241260cc2c9b466899290fdc3 Mon Sep 17 00:00:00 2001 From: Cedric Karungu Date: Mon, 4 Mar 2024 14:41:27 +0200 Subject: [PATCH 09/13] fix: glitch effect on Timer & Task Card on Profile Page --- apps/web/lib/features/task/task-card.tsx | 2 +- apps/web/lib/features/timer/timer.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/lib/features/task/task-card.tsx b/apps/web/lib/features/task/task-card.tsx index 2ee7c1650..1d0021a97 100644 --- a/apps/web/lib/features/task/task-card.tsx +++ b/apps/web/lib/features/task/task-card.tsx @@ -118,7 +118,7 @@ export function TaskCard(props: Props) {
-
+
{/* Task information */} @@ -69,7 +69,7 @@ export function Timer({ className }: IClassName) {
Date: Mon, 4 Mar 2024 15:11:36 +0200 Subject: [PATCH 10/13] fix: BlockView Filters --- apps/web/lib/features/team-members.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/lib/features/team-members.tsx b/apps/web/lib/features/team-members.tsx index c3400523b..d480926fb 100644 --- a/apps/web/lib/features/team-members.tsx +++ b/apps/web/lib/features/team-members.tsx @@ -27,9 +27,9 @@ export function TeamMembers({ publicTeam = false, kanbanView: view = IssuesView. const blockViewMembers = activeFilter == 'all' ? orderedMembers - : orderedMembers.filter( - (m) => m.timerStatus === activeFilter || (activeFilter == 'idle' && m.timerStatus === undefined) - ); + : activeFilter == 'idle' + ? orderedMembers.filter((m: OT_Member) => m.timerStatus == undefined || m.timerStatus == 'idle') + : orderedMembers.filter((m) => m.timerStatus === activeFilter); const currentUser = members.find((m) => m.employee.userId === user?.id); const $members = members From af99d2969df874c25facb5097aba5462b6c1c9bd Mon Sep 17 00:00:00 2001 From: Cedric Karungu Date: Mon, 4 Mar 2024 15:43:22 +0200 Subject: [PATCH 11/13] fix: Etsimate Width On Team Member Card --- apps/web/app/[locale]/settings/personal/page.tsx | 5 ++--- apps/web/lib/features/team-member-cell.tsx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/web/app/[locale]/settings/personal/page.tsx b/apps/web/app/[locale]/settings/personal/page.tsx index 6b6810d2c..1bc0a9065 100644 --- a/apps/web/app/[locale]/settings/personal/page.tsx +++ b/apps/web/app/[locale]/settings/personal/page.tsx @@ -6,7 +6,6 @@ import { Accordian } from 'lib/components/accordian'; import Link from 'next/link'; import { useTranslations } from 'next-intl'; import { SyncZone } from 'lib/settings/sync.zone'; -import { Text } from 'lib/components'; const Personal = () => { const t = useTranslations(); @@ -23,9 +22,9 @@ const Personal = () => { className="w-full max-w-[96vw] overflow-y-hidden p-4 mt-8 dark:bg-dark--theme" id="general" > - + {/* {t('pages.settings.HEADING_DESCRIPTION')} - + */} diff --git a/apps/web/lib/features/team-member-cell.tsx b/apps/web/lib/features/team-member-cell.tsx index fb8fc145f..51263cb35 100644 --- a/apps/web/lib/features/team-member-cell.tsx +++ b/apps/web/lib/features/team-member-cell.tsx @@ -55,7 +55,7 @@ export function TaskEstimateInfoCell({ row }: { row: any }) { memberInfo={memberInfo} edition={taskEdition} activeAuthTask={true} - className="lw-1/5 lg:px-3 2xl:w-52 3xl:w-64" + className="w-1/5 lg:px-3 2xl:w-52 3xl:w-64" /> ); } From a839a037d14042db66ffcff02a1b2ff3fa2ad5ac Mon Sep 17 00:00:00 2001 From: Cedric Karungu Date: Mon, 4 Mar 2024 15:43:39 +0200 Subject: [PATCH 12/13] fix: Etsimate Width On Team Member Card --- apps/web/lib/features/team-member-cell.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/lib/features/team-member-cell.tsx b/apps/web/lib/features/team-member-cell.tsx index 51263cb35..db84ada65 100644 --- a/apps/web/lib/features/team-member-cell.tsx +++ b/apps/web/lib/features/team-member-cell.tsx @@ -27,7 +27,7 @@ export function UserInfoCell({ cell }: { cell: any }) { const publicTeam = get(cell, 'column.columnDef.meta.publicTeam', false); const memberInfo = useTeamMemberCard(member); - return ; + return ; } export function WorkedOnTaskCell({ row }: { row: any }) { From 0ed6dd3dcbf73a56741e850fbc260eebe4ce14ba Mon Sep 17 00:00:00 2001 From: Ruslan K Date: Tue, 5 Mar 2024 12:33:23 +0100 Subject: [PATCH 13/13] Update kanban-card.tsx --- apps/web/lib/components/kanban-card.tsx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/apps/web/lib/components/kanban-card.tsx b/apps/web/lib/components/kanban-card.tsx index 8f40d821f..ff3c1aa71 100644 --- a/apps/web/lib/components/kanban-card.tsx +++ b/apps/web/lib/components/kanban-card.tsx @@ -118,19 +118,17 @@ type ItemProps = { isClone: boolean; index: number; }; + /** - * card that represent each task + * Card that represents each task * @param props * @returns */ export default function Item(props: ItemProps) { - const { item, isDragging, provided, style, index } = props; - // const seconds = useRecoilValue(timerSecondsState); - - // const { hours, minutes, seconds } = useTimerView(); + const { item, isDragging, provided, style, index } = props; const { activeTeam } = useOrganizationTeams(); const { user } = useAuthenticateUser(); - const { getEstimation /*, addSeconds*/ } = useTaskStatistics(0); + const { getEstimation } = useTaskStatistics(0); const members = activeTeam?.members || []; const currentUser = members.find((m) => m.employee.userId === user?.id); @@ -158,8 +156,8 @@ export default function Item(props: ItemProps) { const progress = getEstimation( null, item, - /*addSeconds || */ totalWorkedTasksTimer || 1, - item.estimate || 0 //<-- task?.estimate || currentMember?.lastWorkedTask?.estimate || 0 - removed as when certain task's timer was active it was affecting the timers with no estimations. Was taking user's previous task's estimation + totalWorkedTasksTimer || 1, + item.estimate || 0 ); const currentMember = activeTeam?.members.find((member) => member.id === memberInfo.member?.id || item?.id); @@ -232,6 +230,7 @@ export default function Item(props: ItemProps) { autoFocus={true} autoInputSelectText={true} onTaskClick={(e) => { + // TODO: implement console.log(e); }} onEnterKey={() => { @@ -253,14 +252,14 @@ export default function Item(props: ItemProps) {
Live:

- {h}h: {m}:m {s}:s + {h}h : {m}m : {s}s

) : (
Worked:

- {h}h: {m}:m {s}:s + {h}h : {m}m : {s}s

)}