Skip to content

Commit

Permalink
Merge pull request #2503 from ever-co/2374-fix-header-fixes
Browse files Browse the repository at this point in the history
bug: header loading and estimate fixes
  • Loading branch information
evereq authored May 8, 2024
2 parents ad28a12 + 3167b2c commit 6202ea3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/web/app/hooks/features/useTaskEstimation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function useTaskEstimation(task?: Nullable<ITeamTask>) {
const { h, m } = secondsToTime($task?.estimate || 0);
setValue({
hours: h ? h.toString() : '',
minutes: pad(m).toString()
minutes: m ? pad(m).toString() : ''
});
}, [$task?.estimate]);

Expand Down
1 change: 1 addition & 0 deletions apps/web/lib/features/team/user-team-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export function UserTeamCard({
activeAuthTask={true}
className="w-1/5 lg:px-3 2xl:w-52 3xl:w-64"
/>

<VerticalSeparator />

{/* TodayWorkedTime */}
Expand Down
22 changes: 14 additions & 8 deletions apps/web/lib/features/team/user-team-card/task-estimate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { mergeRefs, secondsToTime } from '@app/helpers';
import { I_TMCardTaskEditHook, I_TeamMemberCardHook } from '@app/hooks';
import { IClassName } from '@app/interfaces';
import { clsxm } from '@app/utils';
import { Text } from 'lib/components';
import { SpinnerLoader, Text } from 'lib/components';
import { EditPenBoxIcon, CheckCircleTickIcon as TickSaveIcon } from 'assets/svg';
import { TaskEstimate, TaskProgressBar } from 'lib/features';
import { useRef } from 'react';
Expand Down Expand Up @@ -90,13 +90,19 @@ function TaskEstimateInput({ memberInfo, edition }: Omit<Props, 'className' | 'a
])}
onClick={() => task && edition.setEstimateEditMode(true)}
>
<EditPenBoxIcon
className={clsxm(
'cursor-pointer lg:h-4 lg:w-4 w-2 h-2',
!task && ['opacity-40 cursor-default'],
'dark:stroke-[#B1AEBC]'
)}
/>
{loadingRef.current ? (
<div className="">
<SpinnerLoader size={12} />
</div>
) : (
<EditPenBoxIcon
className={clsxm(
'cursor-pointer lg:h-4 lg:w-4 w-2 h-2',
!task && ['opacity-40 cursor-default'],
'dark:stroke-[#B1AEBC]'
)}
/>
)}
</button>
)}
</div>
Expand Down

0 comments on commit 6202ea3

Please sign in to comment.